Skip to main content

Posts

Showing posts from October, 2016

gvim - Opening first lines of large files in VIM

I run Windows XP and gvim7.2. I want to inspect a large (130 MB) XML file with VIM. Is it possible to simply open the first 1000 lines of the file? Answer the main problem of vim is not the file size, but the syntax highlighting of the file. i use the ' large file ' script to disable such timeconsuming things when working on large files.

Kernel panic booting CentOS 5 image in VirtualBox

I'm using VirtualBox, and have a vdi. It works fine on the virtual machine I originally configured for it, but if I clone it (with VBoxManage clonehd) or just copy it, create a new VM and boot it, I always get the same errors: mount: could not find filesystem '/dev/root' ... Kernel panic - not syncing: Attempted to kill init! Anyone know how I can fix this? The VDI is an image of a clean system that I want to keep reusing to save me having to keep installing the OS into a new empty VDI.

linux - How to run logrotate as a local user?

I'm trying to manage logs which are generated by local scripts. These logs are nothing but stdout and stderr redirected to local files. I don't have root access and trying to run logrotate as a localuser with a local config file gives me the error: Ignoring /home/user/customlogfile because the file owner is wrong (should be root). Handling 0 logs Is it possible to run logrotate as a local user?

laptop - Windows 7, sound is intermittently dropping

I have a Windows 7 laptop, a Toshiba Satellite Pro C650 (Conexant HD audio - don't know the exact chipset). I've just put it back into service for the kids to watch movies on after several months in storage. Intermittently, the sound just dies. This can be after a few minutes, or as little as a few seconds. If I bring up the mixer, the sound level meter still shows that there is a sound signal there from whatever sources are outputting, as well as a signal in the main volume meter. There's just no sound coming out of the speakers. I first figured out that putting the computer to sleep and waking it temporarily fixed it. The audio source didn't need to be shut down for this. I could leave, say, a YouTube video playing when I put it to sleep, and when I woke it up, the video would continue playing, but the sound would have returned. I've since discovered that simply adjusting the volume, either up or down, in the Windows mixer will also bring the sound back. This real

linux - Windows XP freezes on welcome screen after resizing partitions

I am using Windows XP and Linux on a dual boot system and after resizing the partitions, Windows hangs just before login. I shrank the Linux partition and enlarged the Windows partition using GParted. Linux still works and the Windows files are still accessible from Linux, but Windows freezes before the login screen pops up, so that you can see a Windows logo on a blue background. The same happens in safe mode. I tried tried chkdsk /p , fixmbr and fixboot inside the recovery console but the problem remains. Any ideas?

windows - Ways to shut down/sleep and wake up hard drives on command?

I have a rather noisy storage HDD in my SSD-based system (Win 8.1). Since I need the HDD only once a day tops, I have been looking for a way to keep it in sleep mode or otherwise shut down and wake it up when I actually need it. I tried removing the drive in device manager or setting the sleep interval in the energy settings to 1 minute, but that didn't really work. It kept on running. I also tried 3rd party software: Hotswap: rather reliable, but doesn't always recognize the drive plus there doesn't seem to be a way to wake it up after shutdown. Having to reboot just to access the drive is a no go. RevoSleep: sends the drive to sleep mode and allows it to wake up, but fails when autostarted during boot time and also throws out random errors in general. Sometimes it even screws up the entire configuration thinking the drive is asleep while it's still running. This resulted in the drive being unaccessible with a reboot as the only fix. I'd prefer a nice native soluti

linux - lshw tells me my processor is a 64 bits but my motherboard has a 32 bits width

Recently I noticed lshw tells me a strange thing. Here is the first part of my lshw output: bpetit-1025c description: Notebook product: 1025C (1025C) vendor: ASUSTeK COMPUTER INC. version: x.x serial: C3OAAS000774 width: 32 bits capabilities: smbios-2.7 dmi-2.7 smp-1.4 smp configuration: boot=normal chassis=notebook cpus=2 family=Eee PC... *-core description: Motherboard product: 1025C vendor: ASUSTeK COMPUTER INC. physical id: 0 version: x.xx serial: EeePC-0123456789 slot: To be filled by O.E.M. *-firmware description: BIOS vendor: American Megatrends Inc. physical id: 0 version: 1025C.0701 date: 01/06/2012 size: 64KiB capacity: 1984KiB capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd... *-cpu:0 description: CPU product: Intel(R) Atom(TM) CPU N2800 @ 1.86GHz vendor: Intel Corp. physica

ubuntu - gedit flashes and exit automatically when opening a file

Environment:Ubuntu 11.10 gedit 3.2.3 When I open a specific .php file with gedit, it will appear in a flash and disappear immediately. I searched the web and found one way to get around this - use gconf to change the encoding of gedit but I didn't find the key it mentioned. I tried to use VIM to change the encoding of this .php file to UTF-8 and that didn't work either. Answer I had a similar problem (caused by a different bug), but the underlying causes might be similar enough for this to work: gedit saves metadata about all known files using the GnomeVFS . If that metadata contains something gedit doesn't "like", it crashes. As a workaround, create a copy of the file from the command line ( not in Nautilus). cp doesn't preserve the metadata, so this allow you to open the file if the metadata is in fact the problem. In case it is, you can inspect the file's metadata by executing the following command: gvfs-info -a metadata FILENAME Then, one by one, t

git - Can you GPG sign old commits?

Git now has the ability to sign commits with git commit -S , which is great, but sometimes I forget the flag to commit , and sometimes I mail myself patches which I apply with am , and that command doesn't have a flag for signing. Is there a way to add a signature to an already recorded commit?

Windows 10 high memory usage when screen is off

I upgraded my laptop a few days ago to Windows 10. I have my power plans set in such a way that my screens turn off after a few minutes if there is no activity (I have a secondary screen hooked up to my laptop). Ever since I upgraded, when I return to my laptop after a period of inactivity and wake up my screens, they wake up very slowly and I get a warning that Windows is running low on memory. I already tried letting my monitors turn off with task manager open to see which process is taking up much memory. It appears that the "System" process uses up to 1GB of memory when the screen is off, which is a lot when having 4 GB in total. When the screens are back on again it stays at around 1 GB for around a minute and then drops back to normal levels of around 200 MB. I did not have this problem when running Windows 8.1, so it leads me to believe it is related to the upgrade. I already looked at the suggestion for this question to use poolmon to look for a driver issue. From th

windows explorer - How does "PROGRA~1" path notation work?

Since my first Windows 98 (and even now on Win7), I could enter the first 6 letters (symbols) of a folder's name and add ~1 after it (when there was just one folder with those six letters in current directory), and it would work as the full name of it. And it appears that if there are more than one folder with the same six first symbols in its name, I can use FOLDER~2 and so on, and it will open the corresponding folder, as if I entered its full name. Like c:\progra~1 will open C:\Program Files and c:\progra~2 will open C:\Program Files (x86) on win7 64 bit. How does this work? Answer Knowledge base entry Basically on FAT systems all directory entries are still stored in a format compatible with the old 8.3 format; longer names are stored in a series of hidden entries. The short name is there for compatibility.

windows - How to make All Chrome Threads Run High CPU Priority?

Run normally, all Chrome processes have normal priority. The various threads represent various tabs, extensions, etc. But, then i launch chrome with high CPU priority. I'm using: cmd.exe /c start "" /high "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" Then a few threads run with high priority, some Normal, and others run Low priority. Why? Is it possible to make all chrome sub-threads run with High priority? Maybe i could achieve it by running chrome in single-process mode, but that's non-ideal. Windows 10 Chrome 73.0.3683.103 (Official Build) (64-bit)

windows 7 - How to safely remove eSATA drive when it's not in the Safely Remove Hardware dialog

I have Windows 7 32bit which was installed when the SATA devices on my PC (DVD & HDDs) were set as AHCI in the BIOS. Today I added two extra disks that are to be set up as RAID 1 so I went into the BIOS and switched from AHCI to SATA. This caused Win 7 to bluescreen on startup so following a solution found online I made a registry change which fixed the issue. I set up my RAID volume, installed Intel Rapid Storage Technology (from the mobo driver disk) and it all looks good. I can use all my SATA devices and everything is present in Disk Management as well as in Intel Rapid Storage Technology. The thing is all the SATA devices have now disappeared from Devices and Printers and from the Safely Remove Hardware dialog. I assume the later happened because of the former. Is this normal? I don't really mind except I have an external HDD connected via eSATA and I'd like to switch it off. Is there anything I should do beforehand to safely unmount or should I just turn it off? Answ

Can VPN see web browser usage?

If I'm connected to a wireless network and then additionally connect to a private VPN, can all my web browsing activity be logged through the VPN? if I use Safari in "Private Browsing" mode, will each website I visit be retrievable by the network that's running the VPN (which is distinct from the network providing me the webaccess)? thanks

How can I hide 0-value data labels in an Excel Chart?

I would like to hide data labels on a chart that have 0 as a value, in an efficient way. I know this can be done manually by clicking on every single label but this is tedious when dealing with big tables / graphs. Take this table: Which is the data source of this stacked bar chart: But I would like this chart: Notice the 0 labels are hidden and are related to different products and markets. Answer Right click on a label and select Format Data Labels. Go to Number and select Custom. Enter #"" as the custom number format. Repeat for the other series labels. Zeros will now format as blank. NOTE This answer is based on Excel 2010, but should work in all versions

Windows 8 offline login

Possible Duplicate: Your machine is offline please try to sign in with the last password used on this PC I am away for the holidays and went to log in on Windows 8. Because I am offline and it cannot access Windows Live it is asking for the last password used. I do not have one as this was a clean install and I have tried every password I've ever used but to no avail. I am stuck I cannot get into Window. I'm sure when I get home and it picks up my network and autoconnects I'll be fine but I need my computer now. I am at inlaws and computer is only escape. Had to borrow one to enetr this request. Also how do you enter safemode from Windows 8? Thank you!

windows 7 - Create a Link to Resource Monitor

I'm running windows 7 and I want to create a link to the resource monitor that I can place anywhere . But all I've been able to do was pin it to the taskbar and not the start menu. Is there a command to run the RM so that I can paste it inside a shortcut? The reason is that I have a costumized toolbar on my taskbar that groups the most useful/common control panel applications (such as system restore and windows update) and I'd like the resource monitor to be in there. Any ideas? Thanks EDIT:Changed to say Resource monitor, instead of Performance Monitor. Answer Create a shortcut with this as target: %windir%\system32\perfmon.exe /res

networking - Why can't IP addresses start with 0 or 255?

It was specified somewhere (presumably in an RFC) that Class A addresses range from 1-126 in the first octet, and that class E addresses range from 240-254, but that leaves out two potential networks on either side, namely a 0 and a 255 network. I believe that addresses starting with these IPs are invalid. Does this mean that they wouldn't work on a private network, and is there a reason for them being invalid? Answer The IP address 0.0.0.0 is used as a wildcard to bind to all addresses. The IP address 255.255.255.255 is used to indicate a local broadcast. Because this decision was part of the classful network design that predates CIDR , to reserve these specific IP addresses alone, special rules would have had to have been created for the /8's that contained them. Since some /8's were going to remain reserved anyway, it made sense to reserve these rather than creating additional rules so they could be used.

64 bit - Can I use a Windows 7 Professional 32-Bit OEM licence to install the 64-Bit version, too?

Possible Duplicate: When installing Windows 7 or Vista, does the language, version, architecture (64-bit or 32-bit) or source (OEM, retail, or MSDN) matter? I plan to buy a Notebook that does come with an OEM version of Windows 7 Professional 32-Bit installed. Is it possible to use this licence to install the 64-Bit version of Windows 7 Professional (assuming I can get a recovery DVD for the 64-Bit version from somewhere)? Answer Officially and technically from Microsoft - Yes. From your OEM - Unknown - you will have to ask them. When you buy an OEM edition of Windows, you are mainly buying the key and not the media.... I buy loads and very rarely ever touch the CD, I usually only stick the sticker on the case and then use my PXE server to install the OS, I then give the media to the client. The licence says the edition e.g. Windows Vista Ultimate, but it does not say x86 or x64, and the licence is valid on both editions. As like all commodities, the x86 and x64 disks are bought and

linux - Extract/save a mail attachment using bash

Using normal bash tools (ie, built-ins or commonly-available command-line tools), is it possible, and how to extract/save attachments on emails? For example, say I have a nightly report which arrives via email but is a zip archive of several log files. I want to save all those zips into a backup directory. How would I accomplish that? Answer If you're aiming for portability, beware that there are several different versions of mail(1) and mailx(1) . There's a POSIX mailx command, but with very few requirements. And none of the implementations I have seem to parse attachments anyway. You might have the mpack package . Its munpack command saves all parts of a MIME message into separate files, then all you have to do is save the interesting parts and clean up the rest. There's also metamail . An equivalent of munpack is metamail -wy .

operating systems - Structure of Chromium OS

I have used Chromium OS built distributed by hexxeh (weird hobby of mine). On Friday I gave a presentation (classroom activity, not some big seminar) in college on "Changing trends in Operating System Design". Among other things, I mentioned Google chrome OS and Chromium OS. How they influenced market as operating systems designed specifically for cloud computing. During question answer round, I managed to convince class about this 'Internet only OS' trend. However one query remains unsatisfied. What is Structure of web browser based Operating system. Is it a new Operating system build over Linux kernel or is it just a persistent browser running over general Linux based OS. I know that Chrome OS is based on Gentoo Linux, but cant understand its structure. spent whole yesterday to searching it. One thing I got is that Joli OS is non browser like cloud based OS, so it must be lot different than chrome OS. Can any one explain architectural concept of Browser based oper

mac - Greyed out emails in Mail.app

Within Mail.app on my Gmail account, deleting or moving items no longer removes that item from the Inbox; instead they appear greyed out. In the image above these emails have either been moved automatically to archive directories by rules or deleted by me. This only started happening recently. I'm using Gmail with IMAP. I've checked through the settings and can't see what I'm doing wrong. Any suggestions would be appreciated. Answer Since you're using IMAP, it's possible these deleted messages are being shown, when they should not be. From the menu, choose View → Hide Deleted Messages , or press ⌘ + L on your keyboard. That should do the trick.

csv - How to set character encoding when opening Excel

Is it possible to set the default encoding for Excel (any version, e.g. 2010) when opening files like csv files (like you can in Open Office Calc)? I When I try to open a csv file encoded in Japanese SHIFT-JIS, it opens but with mojibake (corrupted characters). In Open Office Calc, if you click on a csv file with a non-standard encoding like SHIFT-JIS, it automatically opens a dialog where you can set the encoding. Answer Use the import function under "Data" tab where Excel allows us to specify the encoding. Select "from text" and choose your csv file then Select Japanese shift-jis encoding.

mac - Avast on macOS High Sierra claims it has caught the Windows-Only “Cryptonight” virus

Yesterday I ran a full system scan using my Avast antivirus software and it found a infection file. The file's location is : /private/var/db/uuidtext/7B/BC8EE8D09234D99DD8B85A99E46C64 Avast categorizes the infection file as : JS:Cryptonight [Trj] So, after deleting the file I did several more full system scans to check to see if there were any more files. I found nothing, until I restarted my macbook pro today. The file reappeared in the same location. So I decided to let Avast put it in the virus chest, restarted the laptop, and again the file was in the same location again. Therefore the virus is re-creating the file every restart of the laptop. I want to avoid wiping the laptop and re-installing everything, so that is why I am here. I researched the file path and cryptonight and found out that cryptonight is/can be malicious code that can run in the background of someone's computer to mine cryptocurrency. I've been monitoring my CPU usage, Memory, and Network and I haven

windows - Chromium - Selective Cookie blocking doesn't work

I have a fresh install of Chromium Browser on Windows 7. Chromium Version 36.0.1926.0 (261698). I got to Settings -> Privacy -> Clear Browsing Data .. & clear all cookies from from the beginning of time. Now if I go to Settings -> Privacy -> Content Settings ... -> All cookies and site data, I don't see any cookies. In Settings -> Privacy -> Content Settings ... I set "Allow local data to be set". I also go to Manage Exceptions and block the following sites from setting cookies. I then visit gmail.com (not even login, just visit the home page). I go back to Cookies & Site data, I see cookies set by the sites I have asked Chromium to block What am I doing wrong? Answer Try specifying the patterns as [*.]google.com to catch references to sub-domains. Source : Issue 90009: UI for entering hostname patterns in "Cookie and Site Data Exceptions" is unclear .

Downloading files in Ubuntu makes them "shared" in Vista

If I download files using Ubuntu, and store them on my Vista partition, when I go to Vista, they all appear with the sharing icon on them. In the sharing dialog (right click > share > change permissions) it says the following (doesn't mean anything to me, but maybe it helps someone answering): Everyone         Co-owner Scott                Owner In Ubuntu I can access all the files from the Windows partition, whether they're shared or not, so I guess it's not really important, just a bit annoying. If I try to stop sharing any files it takes several minutes for the dialog to say it's done, even though the icon disappears off the files pretty much instantly. If I stop sharing any folders, the files inside the folders still have the icon. So in short, I want to do one of two things: In Ubuntu, make it so any files saves to the Windows partition don't show up as "shared". In Vista, make unsharing files a lot simpler/quicker! EDIT: should also add that I

macos - What's causing all the disk activity on OS X?

Occasionally my Macbook Pro will slow down as the hard drive clicks away endlessly. CPU load is low, but applications and menuitems are slow to respond. Is there a utility that can help me determine what's going on, such as the number of bytes read/written or files open/closed per process, over time? Answer From man iotop : iotop tracks disk I/O by process, and prints a summary report that is refreshed every interval. This is measuring disk events that have made it past system caches. Since this uses DTrace, only the root user or users with the dtrace_kernel privilege can run this command. This may not be precisely what you want - but it's a ksh script which wraps around dtrace, so you should be able to figure out how to make dtrace do what you need, if iotop doesn't handle it by default. However, something like iotop -C 5 12 should give you something to start with: it will output 12 samples, each 5 seconds long.

ubuntu - Win8 migration HDD to SSD

Can you guys instruct me how to migrate a HDD to a SSD? Also I was thinking about having ubuntu and win8 in the same SSD, 250GB each and then have the HDD for files only. I bought an MSI GT70 20C, do you guys recommend this idea of having both operative systems? Answer You should try AOMEI Partition Assistant, you can clone the hdd to ssd using this program. hope this helps!

debian jessie - Centralized and local syslog

Right now I have my clients send any syslog messages to my centralized syslog server. However, if that server went down, I would be unable to capture any logs. Is there an option to have syslog write the message locally and remotely? Or if the remote server is down, then write locally? Answer Just add to config both on that remote host *.* @YourServerThatReceivingFromThisMachine *.* /var/log/messages

Should I install DirectX 9.0(c) on my Windows 7 RTM machine?

I've just installed a new game on my Windows 7 RTM machine. The game is asking me to install DirectX 9.0(c). I said 'NO' because my machine has DirectX 11 (confirmed with dxdiag ). When I run the game, an error occurs informing me that d3dx9_39.dll is missing. Is Windows 7 DirectX backwards-compatible? Answer Yes. The Direct X installer is smart enough to just pop files there for stuff to work. Some programs go about things the wrong way (as is the case here) and ask for files directly, rather than the functionality the files provide.

virtualbox - What's better a better VM app: VMWare, Parallels or Virtual PC

From a Windows developer's perspective, which VM application is the best? Why? Answer Vmware Workstation - Simply put, it does what I need, it works fast and I find that Snapshots are a time saver (and a God-send!). I have 2 VM's running 24x7 on my laptop, and even though I have a lot of programs open, my CPU averages around 3% on idle with it occasional touching 0%. That being said, I know a lot of people prefer and use VirtualBox . I beleive that this also has some good snap-shotting stuff in it, however I cannot vouch for it as I only used it briefly on Linux. When it comes down to it, I do not look at price if it is something I need work related - as long as it works and does what I need. I have had good experiences with VMware Workstation, it does what I need when I need it.

How do I start a MySQL server on Windows?

I've installed a MySQL server onto my computer and when I first installed it, it ran automatically. Now I've restarted my computer it is no longer running. What file do I need to run to get it back up and running again? I've tried running MySQL 5.6 Command Line Client and mysqld.exe from the Program Files/MySQL/MySQLServer/bin directory, and I've had no luck. Upon running mysqld.exe, I get the following error: 2013-10-28 18:52:12 4788 [ERROR] InnoDB: .\ibdata1 can't be opened in read-write mode 2013-10-28 18:52:12 4788 [ERROR] InnoDB: The system tablespace must be writable! 2013-10-28 18:52:12 4788 [ERROR] Plugin 'InnoDB' init function returned error. 2013-10-28 18:52:12 4788 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2013-10-28 18:52:12 4788 [ERROR] Unknown/unsupported storage engine: InnoDB 2013-10-28 18:52:12 4788 [ERROR] Aborting` Naturally, I tried running it as administrator, and I got this: C:\Windows\system32>"

windows - How can I measure my computer temperature?

I would like to monitor the temperature of the computer's components and also the fan speed. How can I do this? Answer Speedfan does all that. SpeedFan is software that can read temperatures, voltages and fan speeds of computer components. It can change computer fan speeds depending on the temperature of various components. The program can display system variables as a chart and as an indicator in the system tray. Fully configurable user events can be defined to execute specific actions based on system status. As of version 4.37, temperatures in the event section must be specified in °C no matter if the display setting is for °F. Source

script - Delete a directory from the Windows command line even if it's been opened in a program

I want to delete a directory with files owned by other processes in Windows 7. Other answers say to find the process that is accessing it which I do not want to do. I tried using PowerShell and couldn't even get past deleting non-empty directories without having to resort to writing a script which I will never ever do. I tried using the Bash command rm -rf ./directory and I got the error The process cannot access the file because it is being used by another process I tried import shutil \ shutil.rmtree('./directory') in Python and got the same error. The other process can die, I don't care. It's my file and I'm an administrator. How do I say "I really mean it, I don't care about the consequences, just do what I ask, computer, for the love of all that is good." Clarification: I do not care and do not want to care which other process is accessing the files. I also would like to use the command line if possible.

What VmWare VM is associated with a Process (pid) (on Windows Host)?

I run several VMs on a beefy windows host. Every now and then one of the VMs goes into CPU spin mode taking up 100% of the HOST CPU . To get the HOST and other VMs to be usable I find the mis-behaving VM, and set the processor affinity to one logical CPU and the rest of the machine is now usable. After moving from spinning drives to solid state drives my approach to doing this stopped working. I used to use Windows Task manager to find the mis-behaving PID and then use Windows Resource Monitor disk activity to find the VM. I would see a file like: J:\Virtual Machines\vm123\vm123-000004.vmdk From this information, I know mis-behaving VM is vm123. After moving to SSD drives, however, I don't see any disk activity. So I need to find another way to get this information. I'm guessing the disk activity doesn't show up because the activity is often less than 1ms but I'm not positive. For now, I'll use ProcessExplorer from Sysinternals tools at docs.microsoft.com/.../downlo

ubuntu - Google Chrome - Mouse Not Changing

I'm currently running Ubuntu 14.04 LTS (not in a VirtualBox) with Chrome, and I have a interesting issue. Currently there is a solution to a similar problem listed here and here , but my problem is just slightly different and none of the known fixes for the other problem are working. My problem is that the mouse does not change when placed over things such as links where the mouse should turn into a pointing hand, or over text where there should be the I beam. Also, hover states and active states on website elements aren't being triggered either. However, if I'm currently scrolling or the mouse is held down, then everything works fine, but not while only moving the mouse. I have tried: Purge and reinstall of Chrome Running Chrome with --touch-devices=123 Trying to recreate this error on another system (Without success) Trying Opera (since it's also WebKit, which has the same issue) NOTE: The other more widely seen bug has symptoms that aren't affecting me. For exa

macos - Free video converter software for Mac?

I'm using Mac OS X 10.5 and am looking for a free video converter software which supports mp4, avi, and wmv files (and perhaps rmvb, too). I want to convert avi, wmv, and rmvb files to mp4 to be able to play them on my iPod. I've already searched but could only find quite expensive shareware. Do you know any software available for free, please? Answer I still use Visual Hub: Works a treat every time. Unfortunately it's not available for download from the creator anymore, but it can still be had via alternate means . Actually, the source files for Visual Hub (filmredux) are also available

networking - Connections to activate.adobe.com shown in process hacker

I opened up the connections tab in Process Hacker and saw this... So my questions is this, What gives? Answer When you made activate.adobe.com point to localhost in your hosts file so that you could steal whatever Adobe products you use it made process hacker show that as your address. In other words those are just programs connecting to the localhost and because you named localhost "activate.adobe.com" it is showing that as your local address.

linux - Using an index to make grep faster?

I find myself grepping the same codebase over and over. While it works great, each command takes about 10 seconds, so I am thinking about ways to make it faster. So can grep use some sort of index? I understand an index probably won't help for complicated regexps, but I use mostly very simple patters. Does an indexer exist for this case? EDIT: I know about ctags and the like, but I would like to do full-text search. Answer what about cscope , does this match your shoes? Allows searching code for: all references to a symbol global definitions functions called by a function functions calling a function text string regular expression pattern a file files including a file

debian - DLNA-stream a web video from Linux to TV

I'm using DLNA on Debian to share my local media files to my smart TV and this works perfeclty. Now I would like to improve that and stream a web video directly to my TV via DLNA. For example, I have a url http://namesite.tlg/somedir/video.mp4 , and if you open this URL in the browser you can download it or watch it directly. I would like to share this URL to DLNA and stream it on the TV in some way. I saw some Browser Add-Ons are able to do this, for example vGet Chrome .

Windows 10 default programs keep changing

Since the fall update last month, Windows 10 automatically keeps changing the default apps for certain types (mostly browser,pdf,mp3,jpg). I have tried changing them back from the Settings app as well as the Control Panel. I have observed that this happens mostly while unzipping files using WinZip. Windows changes the default programs back to Microsoft recommended programs such as Edge, Photos, Groove etc. Is there a way to restrict this from happening? Has anybody else encountered a similar situation? I couldn't find similar question anywhere so I'm asking this here. Answer I switched to the latest version of WinZip (20.0) and haven't encountered the problem since. So i guess the previous version (15.0) was in some way incompatible with Windows 10 file associations and triggered the reset.

vmware - How can I share the folder var/www on my emulated Ubuntu virtual machine with the hosting OS?

How can I share the folder var/www on my emulated Ubuntu virtual machine with the hosting operating system ? (In this case OSX Leopard) I'm using vmware, I've installed VMware Tools. I can drag and drop files in between the 2 os. I just need this last step. thanks Answer In VMware (I'm assuming Fusion), go to your Ubuntu virtual machine Settings -> Sharing. Share the /var/www folder as read-write. You likely won't be able to select it from the dialog box so just type it with ⇧⌘G. That folder gets mounted under Ubuntu at /mnt/hgfs/www . In Ubuntu, make a symlink /var/www to /mnt/hgfs/www .

wireless networking - Why does my wifi speed slow dramatically when more than one person uses it?

Whenever both my roommate and I use the wifi in a certain room in our apartment, it slows dramatically for me. It doesn't slow for him. If he uses it in another room, it's fine; if I use it in another room together with him, it's fine; it's just in this particular room. Does anyone know of a reason this could be?

Excel calculation based on user input from dropdown fields

We are using Excel 2003 but can upgrade if necessary. We need to compute (or lookup) a value based on two inputs. Both inputs will be Excel dropdown boxes. The first one will have values 6 , 9 , 12 , 16 , 20 . The second dropdown has 6x6 , 10x10 , 20x20 . How can we lookup the corresponding value and place the result into a separate cell? Answer It doesn't need to be quite that complex. Take for example the following. Select your column headers and name them Input1. (Range E1:I1 in the example.) Select your row headers and name them Input2. (Range D2:D4) Select your data and name it Data. (Range E2:I4) Use data validation to get the dropdowns. Select cell B2 and click on Data - Data Validation. Set Validation criteria Allow to List and Source to =Input1 Do whatever you want for Input Message and Error Alert. (I turned them off.) Repeat for your 2nd input. (cell B3 gets source =Input2 ) In your Result cell, type in this formula =INDEX(Data,MATCH(B3,Input2,0),MATCH(B2,Input1,0))

linux - sed needs `\n` to append new line

I am trying to append a new line using sed , it works only when I add the new line like this: \\\n : echo "sometextutf8_filesystemmmmm" | sed -r "/utf8_filesystem/a \\\n# Passive mode" the output: sometextutf8_filesystemmmmm # Passive mode One or two back slashes do not work! With one \n or two \\n back slashes I just get this output: sometextutf8_filesystemmmmm n# Passive mode without any new line. Even though, it works properly without having three backslashes with substitution: echo "sometextutf8_filesystemmmmm" | sed -r "s/utf8_filesystem/\n# Passive mode/" Output: sometext # Passive modemmmm Could some one explain that behavior?

installation - Windows 8 OEM Reinstalling

I know this question is a repetition but I didn't find any solution of my problem from any of the previous questions. Recently I formatted my Laptop HDD and now I want to re install windows 8 I've a Windows 8 OEM license but the problem is I don't have a disc , I downloaded en_windows_8_x64_dvd_915440 from msdn , but when I boot the windows it shows the error that the current version is not suitable with my serial key, so where I can find an OEM Windows 8 and also I've a retail windows 8 disc so if I install that windows 8 in my pc and is there any way to activate it using my OEM key

remote desktop - Unable To RDC One PC

I can Remote Desktop any PC under our domain, except this ONE! When I try to RDC this one PC, I get an error of: Connection was denied because the user account is not authorized for remote logon I have Domain Admin Credentials, so what would be keeping me from being able to RDC this 1 PC? Answer Unable To RDC One PC I can Remote Desktop any PC under our domain, except this ONE! When I try to RDC this one PC, I get an error of: Connection was denied because the user account is not authorized for remote logon I have Domain Admin Credentials, so what would be keeping me from being able to RDC this 1 PC? A few items to consider for a solution to this problem. . . Ensure the PC is joined to the correct domain for the administrator account you're RDP'ing into it as. Unjoin the PC from the domain, reboot it, rejoin it to the domain, reboot it again, and then try to RDP into it again. Ensure there is no local (or domain ) group policies that are explicitly denying access for this

How to change date format from dd-mm-yyyy to dd-mm-yy in formula bar of MS-EXCEL?

I've written a date in one of the cells of MS Excel spreadsheet as 26-09-2013 . Then by right clicking on that cell I selected Format cells and gone to Number->Date option and by selecting the type value as *14-03-01 and changed the date format to DD-MM-YY . Now the date in the cell looks as per the selected date format. Now, what I want is to use the same date format into formula bar too. But when I select the cell having date in dd-mm-yy the date in formula bar is displayed as dd-mm-yyyy. Can you help me in bringing the date in dd-mm-yy in formula bar too?

How to connect my front audio panel?

My motherboard is Gigabyte GA-945PL-S3 . So due cleanning I had to disconnect front audio panel wires. Then I installed Windows 7 on a new hard drive. But now I don't know how to plug the wires back. Well I plugged how I remember (hope didn't damage it) but Realtek HD Audio Manager can't detect speakers nor microphone at front panel, everything seems to be fine on back panel. This is what manual show: This is how it was before (that worked - but can't see well) From front panel comes these wires: 2x GND(black) Mic Bias(yellow) Mic in(green) Left out(red) Right out(white) Edit I have found the problem. It was in Realtek Manager itself. I had to disable "Detect front panel sound". Answer My motherboard is a Gigabyte GA-H87-HD3 and I was having the same problem of Realtek HD Audio Manager not detecting speakers in the front panel. After trying all kinds of solutions and reading the MB's manual dozens of times, I found out it was simply a matter of checki

ssd - How can I use SRT to cache a non boot hard drive?

In a comment on my answer to the question Making SSD & HDD work together like a hybrid I was informed that my statement that SRT can only cache a Windows boot drive is no longer valid. I have several SSDs in my system and several hard drives too. I boot from one of the SSDs and would really like to use some of the spare space on one of my other SSDs to cache the hard drives (or at least one of the hard drives). I know that this wasn't possible at the time I wrote my answer to that question (you could only SRT cache the boot drive), but is it still true? A quick search didn't find anything useful, most articles appear to refer to the version of SRT released at the time of the Z68 chipset. If it is possible to cache an arbitrary hard drive, what are the requirements? Do you just need to update SRT, or does this functionality need a more recent chipset or ICH? Is it possible to set up multiple cache sets (presumably one cache partition per real partition or drive cached).

networking - How do DNS servers work?

I know that a domain name is resolved by a DNS server to an IP address, which is then used to reach the requested server. I'm slightly embarrassed that I don't know some of the details of how this works. In order for my computer to ask the DNS service to resolve a domain, the DNS server must be known by my computer. I never explicitly told my computer about any DNS servers, so how does it know which DNS server it should use? Is it the ISP that pushes this information to my computer somehow? For that matter, where are these DNS servers located? Does my ISP have some DNS servers running somewhere which are used by all it's (the ISP's) customers? The DNS server my computer uses must know all domains in order to be able to resolve them, how are it's records updated/maintained? Is there some central entity/registry/... that feeds a DNS server changes that have occurred? If I order a domain name somewhere, the seller has to establish a connection between an IP address and

windows 10 - uTorrent starting up automatically

I installed uTorrent couple of months ago and while installing I unchecked the box that says "Start uTorrent with Windows" and it worked that way until few days ago when I turn on the PC uTorrent is already up and running, it seems like it doesn't even need time to start. I thought some settings got messed up and went to Task Manager->Start Up but uTorrent was't there. What can I do to stop it from doing that? Running on Win 10, latest version of uTorrent - 3.5.0 build 44294 Answer Verify that the startup option is disabled in uTorrent options. Check if you have a uTorrent shortcuts under C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\ , if so - remove it. When windows start, it will run each of the files in that directory.

partitioning - How to mount a multi-partition disk image in Linux?

I downloaded an raw SD card image that has two partitions. It caused some file system errors when I tried to dd it directly into an SD card. I am not sure if the card is defective or the image. Is there a way to examine this image without writing it to a physical card? Like trying to mount the partitions separately or checking the tables? Answer You can use kpartx or partx to create loop devices for the partitions on the image, and then mount them. So either: $ sudo kpartx -v -a file.iso add map loop0p1 (253:17): 0 8382464 linear 7:1 2048 $ mount /dev/mapper/loop0p1 ./mnt_point ... do something with the partition ... $ umount ./mnt_point $ kpartx -d -v file.iso del devmap : loop0p1 loop deleted : /dev/loop0 or: $ sudo partx -a -v file.iso partition: none, disk: file.iso, lower: 0, upper: 0 Trying to use '/dev/loop0' for the loop device /dev/loop0: partition table type 'dos' detected range recount: max partno=1, lower=0, upper=0 /dev/loop0: partition #1 added $ mou

64 bit - Is my Windows 7 x86 license key valid for a x64 installation of Windows?

Possible Duplicate: When reinstalling Windows 7, does the language, version, architecture (64-bit or 32-bit) or source (OEM, retail, or MSDN) matter? I've just got a new laptop with Windows 7 x86 Home Premium installed, however I ideally I'd like to be running a 64-bit operating system: Is my Windows license key "generic" (in that it entitles me to install either a x86 or x64 edition of Windows), or does this licence key specific to the x86 version of Windows? Is there any way of me installing and running Windows 7 Home Premium x64 using my x86 license key? Answer Yes your Windows 7 key works for both x32 and x64 versions of Home Premium. Source: Microsoft eOpen only provides 1 key per purchase, regardless of how many computers you have or which architecture (x32/x64) you are using. Furthermore, Microsoft TechNet subscribers get 10 keys for each flavor of Windows 7 (Home Premium, Professional, Ultimate, etc.) These keys can be used to install on either architecture.

How to fix broken taskbar icons in Windows 7

I have a program pinned to the taskbar. After I upgraded the program (I think) the icon broke. What I get now is what you see below; that ugly default application icon thing. If I unpin it, I get the correct icon. If I then right-click on it, the icon breaks again. If I pin it again, still the broken icon. Unpin again and back to good icon. Very annoying. How can I fix this? Answer Based on @dash17291's answer, here is a slightly faster procedure (no reboot) that worked for me: Open Windows Explorer, go to %userprofile%\AppData\Local , delete IconCache.db. Open Task Manager, go to Processes tab, highlight explorer.exe, and click End Process. Your desktop will "disappear." Still in Task Manger, select File > New Task (Run...), type explorer.exe, and click OK. Your desktop should reappear, with the previously missing icons.

How do I find out which program and process ID accesses a given IP address in Windows?

Is it possible to catch, which program is accessing a specific IP address? I found my computer is flooding and wish to check addresses one by one. May be it is possible to set up some audit for this? Answer TCPView Solution TCPView from SystemInternals will display "detailed listings of all TCP and UDP endpoints on your system, including the local and remote addresses and state of TCP connections." TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints on your system, including the local and remote addresses and state of TCP connections. On Windows Server 2008, Vista, and XP, TCPView also reports the name of the process that owns the endpoint. TCPView provides a more informative and conveniently presented subset of the Netstat program that ships with Windows. The TCPView download includes Tcpvcon, a command-line version with the same functionality. Make sure you have "Resolve Addresses" unticked to get IP Addresses instead

How to include a filter for PDF documents in Windows 7 (64 Bit) file open dialog

Is there a way to include PDF files (or any other type of file) in the default Windows 7 (64-bit) file open dialog. The image below will illustrate what I want to say: The way I see it, this includes all native Microsoft file types.

wireless networking - Public WiFi Security

Possible Duplicate: SSH from public network? How does a hacker in a public WIFI actually view your computer? HTTPS in public wireless network: is it ok I have heard and read about public access WiFi being unsecure. I understand some of this yet some I do not. How risky is it to use public wifi and if I am using a SSL Connection with a website is my data secure? Answer Public WiFi access is generally regarded as insecure. Because you are sharing access to the network with untrusted users, you cannot guarantee that your data is secured on the network. This applies not only to website, but also email and any other network communication (instant messenger, file transfer, etc). There are several ways to secure your network communications on a public wireless network. SSL is a good start for securing your web browsing. Using POP3S/IMAPS and SMTPS for your email client will protect your email communications over the network. Many instant messenger clients now have support for SSL in the ser

How can I copy a table of data from a PDF file into Excel?

I have a table of data and I need to get it into Excel. I found a few websites that suggested copy and paste into MS Word and then use the "Convert Text to Table" which unfortunately doesn't work as the columns come in with a space in between them but if I choose space as the column separator it breaks up columns that have multiple words in them into different columns. Is there a better recommended way to get a table from a PDF file into Excel?

linux - Using spare pc as second monitor

I'm looking for a piece of software that can enable a second pc to function as a second monitor via network. Both pc's are running linux so I would like something like MaxiVista only for linux. Is this possible? Answer This is what Xdmx was designed to do, but it hasn't been updated since 2004. Good luck getting it to work with (insert distro here)'s heavily patched and recent X.org. Another solution there is, is Synergy . However, Synergy is designed for use with multiple working computers, and not to simulate monitors. As such, you won't be able to access your files from the first machine while using the second machine's monitor, and you won't be able to run applications on one and switch them to the other (like a second monitor). If you're determined , you might setup NFS so that the two systems can at least share your personal files.