terminal

Termcap “cl” command doesn't clear screen

寵の児 提交于 2021-01-28 07:05:42
问题 I can't seem to get termcap 's "cl" command to work, but the terminal escape code does. For example: #include <termcap.h> #include <stdio.h> int main() { tputs(tgetstr("cl", NULL), 1, putchar); } This doesn't change the terminal. But when I run: #include <stdio.h> int main() { printf("\e[2J"); } or if I call echo `tput cl` The terminal is cleared. Why does this happen? Shouldn't termcap give that same escape code? EDIT: Fixed writing characters EDIT2: It's because i didn't call tgetent()

Terminal stalling on every command due to Xcodebuild

拈花ヽ惹草 提交于 2021-01-28 00:42:13
问题 I just updated Xcode to 11.4 and suddenly my terminal (iTerm 3.3.9) is now very slow. Typing a command works fine, but upon pressing enter I often wait 3-4 seconds to perform a simple task ( cd , git add , etc). When I look at the status bar I notice that xcodebuild is running during the time while I am waiting. I'm assuming that the new Xcode update did something that makes this process longer or needs a setting updated somewhere. I have already tried sudo xcodebuild -license accept and that

How to solve “pdftk: Bad CPU type in executable” on Mac?

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-26 03:10:24
问题 I want to use pdftk but I always get this error zsh: bad CPU type in executable: pdftk I reinstalled pdftk and I changed the terminal from bsh to zsh as I found in my search for how to solve this error but without any success. I'm using the latest MacOS version "Catalina v10.15.4" 回答1: This version of pdftk works on macOS Catalina (10.15). https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg The link on the website is not up to date. That means by

How to solve “pdftk: Bad CPU type in executable” on Mac?

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-26 03:05:02
问题 I want to use pdftk but I always get this error zsh: bad CPU type in executable: pdftk I reinstalled pdftk and I changed the terminal from bsh to zsh as I found in my search for how to solve this error but without any success. I'm using the latest MacOS version "Catalina v10.15.4" 回答1: This version of pdftk works on macOS Catalina (10.15). https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg The link on the website is not up to date. That means by

How to solve “pdftk: Bad CPU type in executable” on Mac?

筅森魡賤 提交于 2021-01-26 03:04:25
问题 I want to use pdftk but I always get this error zsh: bad CPU type in executable: pdftk I reinstalled pdftk and I changed the terminal from bsh to zsh as I found in my search for how to solve this error but without any success. I'm using the latest MacOS version "Catalina v10.15.4" 回答1: This version of pdftk works on macOS Catalina (10.15). https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg The link on the website is not up to date. That means by

npm WARN registry Unexpected warning for https://registry.npmjs.org/:

半城伤御伤魂 提交于 2021-01-21 06:13:18
问题 guys I am facing a strange problem here that my git-bash and my terminal when I am trying to use npm install I git this error my error message some guy told me to clear my caches and I did so my case just changed and now I git no error message the installing process is never done and I git some thing like this the second error message 回答1: Step 1: Delete package-lock.json file from your project Step 2: If your npm version is 5 and above. Then run the following command npm cache verify Step 3:

python text to morse translator breaks in mid-way

二次信任 提交于 2021-01-05 07:20:15
问题 As a practice in python, I tried to make a text to morse translator. but it breaks after executing only once. Could you help me figure out the problem? (It's probably in morse function) function beep is for sound, dictionary item_list is a pack of every character's special code. import winsound import time def beep(char): if char == 'a': winsound.Beep(500, 150) time.sleep(150) winsound.Beep(500, 500) time.sleep(150) elif char == 'b': winsound.Beep(500, 500) time.sleep(150) winsound.Beep(500,

python text to morse translator breaks in mid-way

丶灬走出姿态 提交于 2021-01-05 07:18:24
问题 As a practice in python, I tried to make a text to morse translator. but it breaks after executing only once. Could you help me figure out the problem? (It's probably in morse function) function beep is for sound, dictionary item_list is a pack of every character's special code. import winsound import time def beep(char): if char == 'a': winsound.Beep(500, 150) time.sleep(150) winsound.Beep(500, 500) time.sleep(150) elif char == 'b': winsound.Beep(500, 500) time.sleep(150) winsound.Beep(500,

How to resolve VScode terminal lag / choppiness when typing?

最后都变了- 提交于 2021-01-04 05:40:22
问题 Not sure if this is from Big Sur, installing the Docker extension or what else it could be but in the last week, I have noticed that when typing in the VScode terminal, every single time that I've done my git add. , git commit -m "etc", git push origin master, there is always once or twice where the terminal visually shows that I'm not typing anything for a brief moment. It essentially lags and shows the typing white square icon and in 1 second after a brief "pause" what I was actually typing

Firebase command not found days after having already successfully used it

徘徊边缘 提交于 2021-01-02 20:41:45
问题 I am trying to use the 'firebase' command from my Mac terminal to deploy firebase cloud functions using 'firebase deploy --only functions'. I just used this command a week or two ago when I updated my firebase-functions and firebase-tools to version 3.18.4 but now everytime I try to use the 'firebase' keyword to run a command it says -bash: firebase: command not found . When I run npm -g list I see that I have firebase, firebase-tools and more in that list. I've tried running 'npm install -g