Whenever connecting my Western Digital WD Passport Ultra drive via USB to perform backups on Windows 10, my Wi-Fi connection went for a toss and wouldn’t recover for a while even after disconnecting the backup drive. The network connection slowed to a crawl and some web-sites would timeout trying to access them in a browser. Looking at the task manager did not show any task consuming high amounts of CPU or memory or disk or network bandwidth. After some research, I came across some comments indicating that USB 3.0 can interfere with Wi-Fi signals which are in the 2.4 GHz range. This paper describes this problem in more detail. Apparently the best solution is to switch to using Wi-Fi in the 5GHz range if your Wi-Fi router supports it. Alternate approaches are to somehow shield the USB cable and connector so the electrical noise doesn’t spread out or adjust the Wi-Fi dongle/antenna so it isn’t too close to the drive and it’s cabling. The linked paper describes various tests done with shielding and managing Wi-Fi dongle placement.
The above lists the process bound to the specific port. Use with the ‘-k’ option to kill the process bound to the port.
Because of thermal equilibrium — there is more stuff in the room (like the walls) that is colder than you are and so you are loosing heat while the walls are trying to get warmer resulting in you feeling cold. In summer, the walls are warmer and there is less of a temperature difference between objects and so you aren’t loosing heat and so you don’t feel as cold. There is also humidity that contributes into the same thing of establishing thermal equilibrium.
After updating Emacs to 24.5.1 (from 23.2) on my Windows 7 machine, I found that Emacs wouldn’t startup properly and would just display a white/blank screen and appear to hang. When running it from the command line, I was seeing a couple of lines of errors indicating a problem with GTK on startup:
GLib-GObject-CRITICAL **: gtype.c:2720: You forgot to call g_type_init()
GLib-CRITICAL **: g_once_init_leave: assertion `result != 0′ failed
This reminded me that I had installed GTK+ 3.0 recently prior to my update and thought perhaps this was some interaction with the new GTK installation. Rather than uninstall GTK, I opted to remove the path to the GTK bin from my Windows 7 PATH environment variable. Once I did that and then tried to run Emacs, it worked properly. Not sure what the weird interaction was about — perhaps the wrong GTK DLL was being loaded up?
When using Emacs 24.3.1 on Windows 7, I found that cygwin-mount.el would not work (it gave a bogus error of being unable to locate mount.exe) or using version control (cvs) within Emacs would fail with “Permission Denied”. Turns out the problem was Windows UAC (User Access Control). By changing the properties on runemacs.exe to “Run as administrator”, I was able to fix this issue.
When using CoRD to RDP to a Windows 7 machine from a Macbook Air running OS-X 10.6.8 (Snow Leopard), I was having trouble with the mouse cursor disappearing after starting any email edits with Microsoft Outlook on the remote Windows 7 machine. Turns out this is a Windows feature where the mouse cursor is hidden whenever in a editing window. There are settings in the Mouse control panel to remove this default behavior: Control Panel > Hardware and Sound > Mouse (dialog) > Pointer Options (tab) > “Hide pointer while typing” (checkbox). My problem was that the mouse pointer would disappear and stay disappeared for that session. Turns on there is a setting already to fix this — if you press the “Control” key and then move the mouse, the cursor reappears. Also clicking the mouse button once while still editing brings the cursor back temporarily (until you start editing again).
To ensure that Windows 7 Emacs uses the Cygwin Bash shell when executing the compile command (M-x compile) and to ensure that Bash reads the .bashrc, do the following:
(setq shell-file-name "bash")
(setq shell-command-switch "-ic")
The title says it all. This is some documentation to track how to get colors right when using PuTTY from Windows to SSH into a Linux server and then use Emacs in text-mode and edit php or other programming language files in syntax highlighted color.
In PuTTY, first make the following change (away from the default) — On the left-hand side configuration Category tree, select the Data sub-node from the Connection node. In there change, the “Terminal-type string” to “xterm-256color”
Once you connect and login to the Linux server, do “echo $TERM” and you should see “xterm-256color” as a result. This allows the terminal emulation to support an xterm-type terminal with 256 colors. Once logged in, if you run “tput colors“, you should see “256” as the result of running this command.
Then run Emacs — Emacs will run in text-mode. Within Emacs, run the command ‘list-colors-display‘. This should display 256 colors.
After this, you need to load up the appropriate major mode for the language you are going to be working on to get proper syntax coloring for that language (if you don’t use a suitable mode, you might get some syntax color, but not all the syntax coloring that will be supported in a full-fledged mode that is designed to support the language of your choice).
sed -i ‘3d’ filename.ext
The above deletes the 3rd line in file filename.ext. The -i option replaces the filename.ext with the modified file (i.e. the change is made in place). Omit this option if that is not what you want.
This requires use of standard C library support for the clock_gettime() function. This returns time as a data-structure (struct timespec) that includes the current time in seconds and nano-seconds. Call this one time before the section of code to evaluate and once after and then take a difference of the end time versus the start time to figure out the time taken in the section of code.
struc timespec timespec_diff(struct timespec end, struct timespec start)
struct timespec start, end, diff;
for (i = 0; i < 100000; i++)
x = i * 45;
diff = timespec_diff(end, start);
printf(“Section of code took %u seconds %d nano-seconds\n”, diff.tv_sec, diff.tv_nsec);