Sunday, 31 March 2019

Chrome doesn't show in list of browsers when setting default in Windows 10


After an update to both Windows 10 and Chrome (51.0.2704.103), my default browser has cleared:


enter image description here


and clicking the "+" button to choose the default only gives me the option of Edge and Firefox:


enter image description here


Does any one know why this is or what I can do to fix it?



Answer



Sometimes I have mixed results with the ModernUI default programs. Can you try opening Control Panel and using that interface?


Control Panel\Programs\Default Programs\Set Default Programs


control panel defaults


linux - OpenVPN server does not provide access to internet

I am able to connect to my newly installed OpenVPN server (Debian 6.0 VPS using OpenVZ).


When connected with the windows client, I am not able to access the internet. net.ipv4.ip_forward and iptables are enabled and the necessary reboot for these changes where made.


How can I get the access to work? Can someone help me out? I could imagine, that I used wrong IP adresses when configuring OpenVPN, but how can i verify those in case this might be the issue?


My server.conf: http://pastebin.com/TtbNgdaG

boot - Windows 10 unconditional startup BSOD; can't read file system(?)

Mostly irrelevant(?) backstory


My Windows 10 laptop was working fine before its bimonthly restart. I had closed most programs, except Firefox, an hour or two before shutdown /s /t 00. There was a pending File Menu Tools post-install restart which I had ignored, hibernating at least twice in the meantime. I closed Firefox before the shutdown. I then left the laptop for about 15 minutes.


I have no backups. As soon as my laptop is fixed, I promise I'll make one if the data's still there. (Edit: I'm making a disk image using dd on a Ubuntu disk at the moment.)


Problem


Upon turning my computer back on, I was greeted with a BSOD. I didn't pay attention to the stop code. I left it too long, and was greeted to an Automatic Repair loading screen. I left this to load for several minutes before it occurred to me that the machine was powering on and off much more than expected.


It turns out that the machine is stuck in a loop, attempting to load Windows before being greeted with a NTFS FILE SYSTEM BSOD. It then tried to fix itself, flashing a conhost window(?) (EDIT: winpeshl.exe, italics, Windows 7 sans Aero-style title bar) for a split second, then a 1-3 second pause, then a FAT FILE SYSTEM BSOD.


I don't know whether the computer applied Windows Updates in the time I was gone. I'm hoping it's just a corrupt kernel.


What's wrong, and how do I fix it?

How do I edit an existing buffer in a new tab in vim?


Suppose I have started vim like this:


vim foo bar

Now I decide that I want each of those files in its own tab. Is there a way to do that without exiting vim and adding the -p option to my command line?



Answer



When you start vim like that, you don't get a vim client, the text editor is using the terminal or cmd prompt - the two files are in two different buffers. Use :ls to list the buffers:


:ls
1 %a "foo" line 6
2 "bar" line 0

The %a is the active buffer. You can use :b2 to switch to buffer 2 or use :bn to cycle to the next or :bp for previous. I prefer (CTRL-W v) to split windows vertically, rather than (CTRL-W s), which splits horizontally.


If you have 2 files loaded & no tabs (yet), you can, :tabnew and in the new tab type :b2


If you want to always have buffers loaded into their own tabs, check out this article.


software rec - Is there a program that can represent functions as sound?



I need a program that can represent functions as sound. Something like Mathematica's "play" which can generate a sound with the amplitude given as a function of time.


The program should support "writing/exporting" to a lossless audio format.


@soandos what I meant was a program that gives sound represntation of a mathmatical function "similar to how you plot functions"visualy"" Check Mathmatica for play to see what it does.



Answer



You can do this using the ChucK programming language. It is made specifically for synthesizing audio.


Directly specifying the waveform as a function is not the typical way to work, but I believe it is also possible.


browser - Multi-row tab bar in Firefox Quantum

Firefox Quantum breaks tab mix plus and tab kit. Is there any way to get a multi-row tab bar in Firefox Quantum?


If possible, I'm looking for a supported, stable solution, that is unlikely to break at the next new version.

windows - Chinese IME: Microsoft or Google?



I am learning a bit of Chinese and there are two options for entering Chinese text using IME: the Chinese IME that ships with Windows and Google IME (a recent entrant).


Which do you recommend and why?



Answer



April 2016 update:


QQ IME is merged with Sogou, so now they use the same engine. The input quality of Sogou IMO is still second to none, but after these years, Sogou has got even more bloat.


Google Pinyin hasn't been updated since 2014. It is virtually dead.


The Windows 10 stock IME, Microsoft Pinyin, is probably a good bet, it is quite lean even compared with its predecessors, plus you don't have to install anything.


Some people vouch on 中州韵. It's an Open Source solution. Besides pinyin, it also supports a world of input solutions. I've tried it some time ago and it may have some quirks, but you get a totally free IME - How cool is that!


Below are the old answer. Some of it no longer holds but oh well.


--


Never ever use the default Windows IMEs for inputting Simplified Chinese text, they totally suck.


Sogou Pinyin is the father of all modern Chinese IMEs. It has the largest market share in China. It has a hell of a feature set, but current versions included lots of useless bells and whistles (Who the heck needs a custom theme for an IME?), of course you can disable them, but you have to dig into the settings menus.


Google Pinyin is an excellent IME. It copied many ideas from Sogou, even stealed the word and phrase database for once, but it has been improved for quite a bit. Due to the awkwardness of Google's position in China, it doesn't have much market share here, except for some die-hard google fans.


QQ Pinyin is another one on the rise. It is the last one joined into the competition, and I'd say it copied many ideas from Sogou as well, but its market share is drastically increasing due to the popularity QQ (the IM) in China.


The features of the 3 IMEs are quite similar. You wouldn't have problems switching from one to another, by far I still like Sogou most.


If you want a solution from Microsoft, try MSPY 2010. It originally came out with the release of Office 2010, and now you can get it as a separate download. It's not as cool as the other three. The only advantage you get is the hit rate of long sentence input. As saf123 mentioned, it's probably the only IME which doesn't gather user information.


And finally, the google trend chart:


enter image description here


The blue one is Sogou, of course.


All of the above IMEs support the input of Traditional Chinese texts, but since they all use GBK charset, if you are accustomed to the Big5 charset, i.e., you are from Hong Kong or Taiwan, some of the characters might come out a bit strange to you.


Saturday, 30 March 2019

Is it possible to make the motherboard log instant random shutdowns?

My computer randomly shuts down instantly. It even happens sometimes in the bios. And sometimes it runs for days under load without any problem.


I checked and it is not a temperature issue.


What I'm wondering is if it's somehow possible to log what caused the instant shutdown. I was thinking that only the motherboard could log it since sometimes it even happens when in the bios.


My motherboard is an Asus p8p67 pro rev 3.1.

download - Microsoft Visual C++ repository


I had a program looking for MSVCR100.dll, which after some looking realized it is a part of Microsoft Visual C++ 2010. I found a download here:


http://microsoft.com/download/details.aspx?id=13523


However I was wondering: does Microsoft have a page with links to each version of Visual C++, or some official way to browse the different versions? The page I linked has no category tree, so I cannot use it to navigate "up", and if I do a search:


http://microsoft.com/en-us/search/DownloadsDrillInResults.aspx?q=Visual+C%2b%2b+2010


it gives over 10 pages of results.



Answer



You can get the latest versions of the redistributable packages for Visual C++ at Where can I download Visual C++ Redistributables?. Here are the versions available:



  • Visual C++ 2017 (14.1)

  • Visual C++ 2015 (14.0)

  • Visual C++ 2013 (12.0)

  • Visual C++ 2012 (11.0)

  • Visual C++ 2010 (10.0)

  • Visual C++ 2008 (9.0)

  • Visual C++ 2005 (8.0)


Note that if the program you are trying to run is x86, the x64 redistributable will not work.


internet - Cloud computing vs file sharing websites?


When it comes to Cloud Computing, I always get in trouble to understand the difference between



  • Cloud computing file sharing vs.

  • File sharing services offered by 4shared, Rapidshare, etc.


Can anyone give me a brief about this?



Answer



What the emergent cloud computing direction is really about is companies outsourcing services to third-party companies, instead of having their own server rooms and IT staff, so they can concentrate their efforts on what they primarily do.


It's like how factories in the industrial revolution stopped generating their own power using steam engines and started using electricity from power generation companies.


This is a good explanation: http://www.cloudpro.co.uk/cloud-essentials/1209/what-cloud-computing-quick-guide-subject


On a more user oriented level, it can also mean using web applications instead of desktop applications, but that is a smaller scale example of the same concept.


vlc media player - How to add system time to VLC toolbar?

I am using VLC Media Player to run video and audio file. I want to know whether it's possible to add the current system time to the toolbar of VLC Player. It would be easier to check the system time without escaping from the full screen mode.

openssh - How can I force SSH to ignore the IdentityFile listed in "Host *" for one specific host?


My SSH config file is set up to use a specific IdentityFile in the Host * section as the default key. For one particular host, I want to offer a different key (and only that key, never the default key).


My ~/.ssh/config file looks like this:


Host specialhost
HostName specialhostname.mydomain.com
IdentityFile %d/.ssh/special-key
LogLevel debug
IdentitiesOnly yes

Host *
IdentityFile %d/.ssh/regular-key
IdentitiesOnly yes

Regardless of what I do, or regardless of the order of sections in the config file, my SSH client (OS X OpenSSH_6.2p2) offers the 'regular-key' first (which the server accepts, which is not what I wanted).


The ssh_config man page states the following about IdentityFile:



It is possible to have multiple identity files specified in configuration files; all these identities will be tried in sequence.



The "sequence" it refers to is unclear to me, since the IdentityFile listed in the Host * section is always offered first, even if "specialhost" is listed prior to it (as in the example above). The IdentitiesOnly trick suggested here only seems to be relevant to keys offered by ssh-agent. A few other similar questions have not yielded any answers.


I want to leave the regular-key in the Host * section because I use that key with dozens of other hosts and I don't want to duplicate the IdentityFile in every host entry.


Is there any way to force SSH to offer only the 'special-key' using just the SSH config (and without copying my IdentityFile directives to every other host)? I can see how I might achieve this by taking the keys out of the Host * section, adding them to the agent, and then using IdentitiesOnly yes for specialhost, but I would really prefer to avoid using ssh-agent unless there is no other way.



Answer



A Host line can have more than one pattern. And it's not really spelled out in the documentation, but a "!" (exclamation) at the beginning of a pattern means "if a host matches this pattern, then don't apply the section". In other words, you can do this:


Host * !special1 !special2
IdentityFile etc...

And it should match any host except "special1" and "special2".


I don't think the order of the patterns is important. The hostname being checked has to match one non-exclamation pattern, and it has to not match any exclamation patterns.


networking - I have LOTS of TAP-Win32 Adapter OAS and TAP-Windows Adapter V9

What are these, and what are they used for; how do I get rid of this? Because I haven't got OpenVPN or any other VPN-client installed on my computer (to my knowledge).


I am not sure but I thing this makes my computer "not connect to the Internet as fast as it should" on start-up. Provided image displays my annoyance. (It's Norwegian)


Network adapters

macos - Run Safari from terminal with given URL address without open command


I'm having trouble with opening Safari from terminal. Command I tried is


/Applications/Safari/Contents/MacOS/Safari http://www.example.com

Safari opens and tries to navigate to the url:


file:///Current/Terminal/Path/Here/http:/www.example.com

I know, I could do it using open:


open -a safari http://www.example.com

But I can't. The bigger picture is quite complicated: I'm actually trying to run the browser from command-line .NET application (which is running using mono). I use System.Process .NET class to run the command and I have to be able to control the process (get process Id, check if it's active, kill it if necessary, etc.). Using open command does not return correct process Id (I tried using open with -W switch - does not help either).



Answer



One solution would doing this in 2 times



  • Open safari

  • Using AppleScript to open the url tell application "Safari" to open location "http://www.google.com"


Here is a oneliner :


/Applications/Safari.app/Contents/MacOS/Safari & sleep 1 && osascript -e 'tell application "Safari" to open location "http://www.google.com"'

NB: you need to wait before running the AppleScript because Safari is not started yet. The sleep 1might not work in every case since it will really depend on how much time Safari will need to start.


How do you swap the primary mouse button via commandline in Windows 8 without a reboot?


I've tried


RUNDLL32.EXE USER32.DLL,SwapMouseButton

But it doesn't work, even when run as administrator.


My goal is to make a .bat file that I can call via my fancy shmancy new mouse I bought that allows me to call any arbitrary command from a mouse click.



Answer



Swap mouse buttons from command line



We can swap mouse buttons by editing the registry value SwapMouseButtons under the registry key HKEY_CURRENT_USER\Control Panel\Mouse. To swap mouse buttons we need to set its value to 1.


Same thing can be done from command line using the below command.


reg add "HKEY_CURRENT_USER\Control Panel\Mouse" /v SwapMouseButtons /t REG_SZ /d 1

It requires a logoff or reboot to make the changes effective.


Reference Swap mouse buttons from command line:




Alternative Solution


How do I use Rundll32 to swapmousebutton? for a C# solution (requires the .NET Framework Runtime to be installed)


Friday, 29 March 2019

Using the Terminal keybindings with bash on macOS


I have been trying to learn the keyboard shortcuts for the shell on macOS, but when I tried using ALT+B, it did not work.


How do you discover, configure and use keybindings in the shell? Any cheatsheets would be helpful.



Answer



One way to deal with 'meta' key sequences not working on the OS X terminal is to assign specific character sequences to particular keypresses. For those of us with non-US keyboards, this is often a better solution than the "Use option as meta" setting mentioned in the comments of other answers. (Many international Mac keyboards are essentially unusable for development work without the Option/alt key because certain critical characters are otherwise unavailable. There's no # on a UK Mac keyboard, for example.)


To get word-left and word-right working for bash, I've used the "Keyboard" section of the Settings in Terminal. You can tell it to generate particular code sequences when particular keypresses are made. I've got mine configured so that alt+ generates \033b (that's actually two characters: Esc, and then a lowercase b) and alt+ generates \033f (i.e., Esc f). This lets you use the arrow keys with the option key held down to get the word left and right behaviour.


What I've not yet worked out is how to get the Esc key to work - in theory you should be able to use that for 'meta' sequences but it appears not to work. (So just typing Esc+b should go back one word.)


If you have a US keyboard layout, or some other keyboard in which Apple have seen fit to provide all the keys you actually need, then as others have suggested, "Use option as meta key" (also on the Keyboard section of Terminal's settings) is probably a better choice because you'll be able to get to any meta key combination. With that switched on, Alt+b works as expected.


Ubuntu/Windows suddenly freezes


I've a strange problem with my ubuntu 10.04 installation. Whenever i boot into ubuntu the entire system freezes / hangs soon after (~ 2 mins in). This problem exists on my windows 7 installation too. However if i start World of Warcraft or Warcraft on windows it doesnt hang for the duration i'm playing the game. After i stop playing and exit the game my laptop hangs inside 2 mins. Here is when it gets weirder. If i disconnect the charger, the laptop doesn't hang. However when I start it in ubuntu recovery mode and drop to root shell and use the 'startx' command everything works perfectly. I cannot figure out what the problem is.


i have an intel core2duo 2.2ghz processor, intel mobile 965 graphics, 2 GB RAM


for more details here is the output of cat /proc/cpuinfo :


processor    : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz
stepping : 11
cpu MHz : 2201.000
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm ida tpr_shadow vnmi flexpriority
bogomips : 4389.80
clflush size : 64
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz
stepping : 11
cpu MHz : 2201.000
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm ida tpr_shadow vnmi flexpriority
bogomips : 4388.96
clflush size : 64
power management:

here is the output of cat /proc/meminfo


MemTotal:        2052440 kB
MemFree: 55924 kB
Buffers: 579352 kB
Cached: 821752 kB
SwapCached: 704 kB
Active: 897124 kB
Inactive: 1032256 kB
Active(anon): 412140 kB
Inactive(anon): 264804 kB
Active(file): 484984 kB
Inactive(file): 767452 kB
Unevictable: 0 kB
Mlocked: 0 kB
HighTotal: 1178440 kB
HighFree: 6012 kB
LowTotal: 874000 kB
LowFree: 49912 kB
SwapTotal: 995988 kB
SwapFree: 986616 kB
Dirty: 8928 kB
Writeback: 0 kB
AnonPages: 527596 kB
Mapped: 76536 kB
Slab: 39480 kB
SReclaimable: 21100 kB
SUnreclaim: 18380 kB
PageTables: 5672 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 2022208 kB
Committed_AS: 1856400 kB
VmallocTotal: 122880 kB
VmallocUsed: 11928 kB
VmallocChunk: 104644 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 4096 kB
DirectMap4k: 16376 kB
DirectMap4M: 892928 kB

Also the kern.log doesn't show any errors. What I want to know is what might be the problem, how i could test for it and if there are any solutions I could try. Thanks :).



Answer



Sounds like a hardware problem (yeah, Cpt. Obvious is here). If the laptop still got warranty, use that. Wouldn't mess around with it (not like you could fix it).


Guess it's a problem with the power management. Inside the laptop that is. On Windows, it uses "Balanced" usually. When you go into the game, it tries to squeeze out everything from your lappy. On Linux if you start from recovery console, the performance governor won't start I guess. Try checking: cat /proc/cpuinfo | grep MHz from the recovery and from the normal start (well... at the normal start try to be fast. ;))




Note: Please, next time open a topic like: My laptop freezes. Ubuntu is OK , but its not a desktop OS and even freezes with a random Intel VGA. So... guess everyone starts to think about such a problem first. (Problem with the OS, not with the laptop.)




Workarounds:
On Windows, try setting your energy settings to performance. If that doesnt help, install BOINC. Join into the "World Community Grid" and that's it, convert your laptop into a hairdryer, AND you help important researches. Profit! :) (your pc works and you do a good thing)
On Linux: Guess you'd have to disable the governor with sudo service % stop (% = service name, like cups). Uhm check which is Ubuntu's governor. (ls /etc/init.d/) If you can't figure it out, post it here. But first, I would be happy with one (W7) half working OS until I get it into the service.


Specifying word separator for double-click selection in ConEmu?

In ConEmu, when I double click on a line, it's going to select from the previous to the next white space. However, I'm looking for an option (if it exists) to specify word separators other than spaces.


For example, if I double-click on the "host" part below, only "host" is selected. If I double-click on "home", "/home/user/" is going to be selected. Any idea if it is possible to do this in ConEmu?


user@host:/home/user/

windows - Where to find Win32 Disk Imager or an alternative when you don't trust Sourceforge

I need Win32 Disk Imager in order to write Raspbian on an SD Card. It seems the place to find that software is Sourceforge, which nowaday can hardly be considered a safe place to download software. Is there another place I can find Win32 Disk Imager, or maybe do youknow an alternative software which could let me do what I need?

Why Outlook 2007 pasted images are larger than original?


I have been using Outlook 2007 for over a year with no image problems. Around September 1st, images that I paste into messages are enlarged in the messages.



  1. This happends with WinSnap, the Vista Snipping Tool, or any jpeg pasted into the message

  2. I tried jpegs with 96dpi settings w/o sucess

  3. I tried different Outlook Format Picture ... and Size ... settings

  4. Problem happens with both RTF and HTML messages

  5. Attached images are ok


Something mysteriously changed and I cannot figure it out. I googled this to death without any success (others have the problem but there is no solution). This is driving me nuts because I snap screenshots all day long ("a picture is worth a thousand words").


Thanks in advance.



Answer



If Outlook is using Word as the editor check that you have not inadvertently set zoom to larger than 100%. If you have, it will continue to use that size.


hibernate - Delete hiberfil.sys on Windows 7


Ok, so I know what hiberfil.sys is, and I want to use hibernation on my laptop.


But I have another hard drive active in my laptop, it's taken from my old one... and I want to get rid of the hiberfil.sys on that drive. But even with admin privileges I can't delete it.


Any ideas?



Answer



I wanted to do this in the easiest way possible, especially without rebooting.


Open a command prompt as administrator and go to the disk where hiberfil.sys resides. In my case:


C:\Windows\System32\> e:

In e:, check for hidden files:


E:\> dir /A:H

In the listing hiberfil.sys should show up. If so, delete it:


E:\> del /AS hiberfil.sys

I have to warn you: I don't know what happens if you do this with an active hiberfil.sys file. In my case it was on an old hard disk drive and was no longer needed.


javascript - How to make Firefox always stop a script when it's not responding

On some pages I get the "Script not responding" error with an option to stop it and a checkbox to never ask again.


Later I get the same question again, with that pointless checkbox.


How do I make Firefox always stop a script when it's not responding?

Packaging / Extracting Windows 10 Native Flash Player

To make a very long story short: Someone #@%@ed up and there are several Windows 10 assets in my environment that require Flash OCX repair (IT WASN'T ME!)


Simply re-registering the OCX modules doesn't entirely resolve the issue, even after completely removing ownership from the built-in application itself (several keys return ACCESS DENIED when regsvr32 tries to access them).


I've decided that uninstall / reinstall Windows 10 Native Flash Player (ActiveX) on the deployed Windows 10 assets. Using a DISM.EXE method similar to the one found at this blog, I've scripted the uninstall routine. However, I'm looking for a "light-weight" method of reinstalling it. Any suggestions? I'd prefer not to have to mount an entire image to each machine (I'm looking at SMS / SCUP deployment for this solution). Is there a way to, say, isolate the Windows 10 Flash Player application on an image file, extract it (say to a .WIM file), and then point DISM to it?


Thank you!

How do I use my f-1 - f12 keys without pressing FN on Windows 7 using bootcamp on a Macbook Pro?

How do I use my F1 - F12 keys without pressing FN in Windows 7 using bootcamp on a Macbook Pro?

repair - How to change microswitches (left/right "mouse button") on Logitech G700?


I already have the new microswitches (left and right mousebutton). Seems like the original ones are for 10 Million clicks, my new ones are for 20 M - OMRON D2FC-F-7N(20M). That's just for whoever searches this in the future.


So the mouse is open - you can find an how-to on ifixit!


I took off all screws on the boards. The upper board that has the microswitches on it seems to be still connected with the lower board via the 14 soldering joints in #3 in this picture:


enter image description here


This is how it looks from underneath:


enter image description here


So I'm asking myself.. Do I just have to pull a bit harder? Or do I have to unsolder the 14 points?


Thanks!



Answer



Okay I got it! The mouse is working just fine.


The 14 points on #3 are "Rectangular Connectors/Headers/Pins".


I had to unsolder them one by one. After that I was able to lift the board.


Here is how it looks like underneath the first board: enter image description here


After that you just have to unsolder the three points from the microswitch you want to change. Put it back together and you're good.


hard drive - SATA to USB cable sector size


I have been having a lot of problems connecting different kinds of SATA drives to my PCs using SATA to USB adapters and the problems seem to boil down to sector size mismatches: sometimes the original sector size is 512 but the adapter "presents" a sector size of 4096, thus rendering the contents of the drive illegible to the OS, or vice versa, showing 512 instead of 4096 with the same results. I recall looking into this a couple years ago and found out the problem is in the adapters themselves, because of a "thing" related to the SATA version or SATA mode supported by the adapters, however I don't seem to find much information about this these days. What exactly is this "thing" I'm looking for when buying an adapter, so I know it won't mess with my drives?


These are the most relevant places and questions I've looked up so far, but don't exactly address what is the "thing" that's missing:



TL;DR


There is something regarding the SATA version or some SATA mode that makes some adapters mess up sector sizes on some drives, making the illegible but not unusable, i.e.: I can create a new partition table and use them just fine, except the next adapter I try may or may not force me to do the same. What is it?



Answer




What exactly is this "thing" I'm looking for when buying an adapter, so I know it won't mess with my drives?



As it's stated in this answer:



The enclosure exposes the drive to the computer as an Advanced Format 4Kn device, allowing the use of MBR for compatibility with Windows XP systems.



(which this blog post further expands):



Advanced Format was adopted by drive manufacturers to increase the size of a physical sector on the drive from 512 bytes to 4 kiB (i.e. 8 times larger).



the problem lies in a feature that's known as Advanced Format, that translates 512 bytes per physical sector into 4096 ones to improve efficiency; which some adapter manufacturers don't implement in their hardware, resulting in the wrong sector sizes being exposed to the OS.


And as to how to look for that feature in an adapter: You just have to know how to identify the drives' and adapters' capabilities and maybe have one or two lying around just in case.


There is a length limit to Windows file extensions?


If I want to create a new file extension for a binary/text data file that will open on my own application (extension ".mylongfileextensionname" for example), will Windows list it with my aplication (considering that I already listed it on Windows Registry before)? There is a length limit, I mean, on my example should I use ".mylong" or any specific layout?



Answer



I always thought 255 total as in Breakthrough's answer but I found this to be contradictory as I started to double-check my thoughts:


Windows 2000 has a 254 character limit.
Windows XP has a 255 character limit.
Windows Vista and Windows 7 has a 260 character limit.

Path+Filename limit is 260 characters.

http://www.wincert.net/tips/microsoft-windows/windows-7/2427-windows-7-file-transfer-issue-destination-path-too-long.html


Confirmed on this Microsoft site:


http://windows.microsoft.com/en-US/windows-vista/File-names-and-file-name-extensions-frequently-asked-questions (expand "What is the maximum length of a file name?")


http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx


partitioning - TF101 Android: Image block device via adb

I have an Asus TF101 tablet running Android ICS. I am trying to image the entire internal flash file system onto my desktop via adb. The problem is that the image I am obtaining appears to be corrupted:


On my desktop I am using Ubuntu 12.10:


adt-bundle-linux-x86-20131030/sdk/platform-tools/adb shell su -c "dd if=/dev/block/mmcblk0" | pv > mmcblk0.raw

I am then trying to use this image with:


testdisk mmcblk0.raw

Unfortunately testdisk finds only nonsensical partition data even using a deep search. Attempting to list any of the files contained in these admittedly non-sensical partition results in a corrupt filesystem error.


Even when trying to read out only a single partition, e.g.


adt-bundle-linux-x86-20131030/sdk/platform-tools/adb shell su -c "dd if=/dev/block/mmcblk0p7" | pv > mmcblk0p7.raw

the resulting partition image seems corrupted. Trying to mount via a loop device fails with corrupt filesystem errors. Running fsck on the image floods me with non-ending file-system errors.


Any hint on what I am doing wrong here?

Unable to connect to Windows computer for file sharing


I have a Windows 7 machine to which I am unable to connect from several other computers.


When I try to connect to it from other Windows computers I do get the 0x80070035 error code.


I've tried the solutions described here, such as accessing the computer by IP and not by name, to no avail. Please help.



Answer



This is what solved my problem: Disable password protected shared use


Control Panel, Network Center, Advance Sharing configuration, Password Protected shared use --> disable.


After trying all the solutions, that is the option that was causing trouble.


hard drive - Password protect a 1 TB Seagate external HDD

I have a 1 TB Seagate external HDD with 700 GB data. I want to put a password on it without any encryption.


I tried BitLocker but it takes 33 hours to encrypt the whole drive and I don't want to wait that long. I just want to put a simple password on it so my 11-year-old niece can't access it.


Is there any way I can do that?

Thursday, 28 March 2019

motherboard - Computer continuously power-cycling

Suddenly my computer has begun to power cycle continually with no end in sight until I physically remove the power cable from the PSU. This has begun spontaneously and not on the back of any hardware or software changes.


The PC will "boot" for about 3-5 seconds - fans start spinning and LED's come on, and then turn off abruptly. After about another 3-5 seconds, fans start spinning and LED's come on, and then turn off abruptly. This cycle continues to infinity.


Immediately I thought the PSU was to blame, but upon swapping it out for a brand new one the issue persists.


I have tried a myriad of hardware troubleshooting combinations to diagnose this issue:



  • Motherboard with just CPU

  • Motherboard with CPU / RAM

  • Motherboard with CPU / RAM / GPU

  • Motherboard with CPU / RAM / GPU / HDD


(Both in and out of case to negate any potential shortages)


None of these have had any effect whatsoever on the issue.


Also, when I remove the 6 (or is it 8?) pin connector which powers the CPU and attempt to boot, the cycling stops and the fans stay on. Obviously, however, the system will not properly boot without this plugged in.


The motherboard is a Gigabyte GA-EX58-UD3R. From googling it seems that this is quite a widespread issue particularly among Gigabyte mobo owners, but nobody seems to nail down a cause.


I've taken the CMOS battery out for tonight, but I'm not hopeful!




Edit


The CPU input I'm talking about is here:


enter image description here

windows - All .lnk files always open with Wordpad




Possible Duplicate:
How to reset shortcuts (.lnk file) in Windows 7?
How do you associate the .exe file extension with a program in Windows?
Accidentally caused all .exe programs to open in Notepad



My friend e-mailed me a .lnk file, and I chose to open it with Wordpad. I think the check box for 'always open using this program' was checked, because all of my links now are opened using word pad. Is there a way to undo this?



Answer



There are two ways, but only one tends to work:


Go to Start -> Default Programs (on the right or just type it in). Click on Associate a file type or protocol with a program. Scroll down to .lnk and change the program.


If that doesn't work, then take a look here: http://support.microsoft.com/kb/172053


download - wget decides not to load because of black list


I'm trying to make a full copy of a web site; e.g.,


http://vfilesarchive.bgmod.com/files/

I'm running


wget -r -level=inf -R "index.html*" --debug http://vfilesarchive.bgmod.com/files/

and getting, for example


Deciding whether to enqueue "http://vfilesarchive.bgmod.com/files/Half-Life%D0%92%D0%86/".
Already on the black list.
Decided NOT to load it.

What is happening?  What does wget mean by "black list", why is it downloading only parts of what is there, and what should I do to get the entire web site?


The version of wget is


GNU Wget 1.20 built on mingw32

(running on Windows 10 x64).


P.S. I think I've managed to solve this with


wget -m --restrict-file-names=nocontrol --no-iri -R "index.html*" 

even though the filenames are slightly crippled due to special chars in URLs.  Is there a better solution?



Answer



I think I've managed to solve this with


wget -m --restrict-file-names=nocontrol --no-iri -R "index.html*" 

even though the filenames are slightly crippled due to special chars in URLs.


How to download list of files from a file server?

How would I download a list of files from a file server like this one http://www.apache.org/dist/httpd/binaries/ ?


I suppose I could use wget but then it tries to get all the links and the html file as well. Is there a better tool to accomplish this?

windows 8 - Change the color of the cursor in Sublime Text

I'm using Sublime Text the dark theme. The problem is that my cursor is also black and I can't see where it is with my background being black. How can I change my cursor color without change any color characteristics of my theme.

macos - Make Windows 10 File Explorer look like Mac OSX Finder's column view

I'm switching from a Mac to a PC with Windows 10. Is there anyway (either 1st party or 3rd party) to make the File Explorer in Windows 10 look like Finder's column view in Mac OSX?


Windows 10 File Explorer looks like this: enter image description here


MacOSX Finder column view looks like this: enter image description here


I don't like how Windows displays a mix of drop down menus (seen in the left column) and standard folders, and I don't like how I can't see all the folders and files in the directories above mine--only in the topmost directory (seen in the lefthand column). This makes it much slower to switch between folders in different subdirectories, especially when you don't remember how many layers deep a file might be.


In contrast, with the Mac OSX Finder column view, all my directories at all levels are clearly visible in neat columns, and you can even enable it to show the path bar at the bottom, just like Windows shows at the top of the File Explorer.

security - Can I configure Chrome to block insecure content on mixed pages

In Chrome I've noticed that I occasionally get mixed-content warnings in the url bar, eg:


gmail mixed content ssl warning


Can I configure Chrome to block mixed content, not just warn about it (or, if I have accidentally dismissed a warning before - reset the default).


The reasoning being - this tells me nicely, after the bad thing has happened. I'd rather the bad thing was blocked - after which, by all means warn me.


Details:


I'm using Gmail*, so it's not just the little sites, but I've seen it on other websites.


I get no pop-ups or dialogues asking if I want to display the insecure content.


Clicking on the padlock to get the details shows the following message, which implies that the insecure resources were displayed and not blocked:



Your connection to mail.google.com is encrypted with 128-bit encryption. However, this page includes other resources which are not secure. These resources can be viewed by others while in transit, and can be modified by an attacker to change the look of the page.



I'm using Chrome 30.0.1599.101 on OSX, but I've seen this previously in older versions.


*Strictly speaking I'm using google apps for domains, ie, my current employer use gmail for their domain's email. Checking the javascript log (instructions)shows that the insecure content was due to a logo of my employer downloaded via an insecure connection. Getting them to fix that would also help of course - but that's outside the scope of this question.

windows 8.1 - Is it possible to enable System Protection from the command prompt?


I just tried to install some updates for my laptop, and now it is stuck in an automatic repair loop. From what I've been able to find so far in the logs, I believe it is some problem with the registry.


The system restore tells me that there are multiple restore points available, including one it created just before attempting to install the updates. However, it tells me that I can't restore my C: drive because "You must enable system protection on this drive".


Is there a way that I can enable system protection on my drive through the command prompt? Failing that, is there a way to restore just the registry (either manually or automatically)? I've been able to open up regedit, though I have no clue what part of the registry is corrupted.


Update:


Here's the only relevant thing the SrtTrail.txt log has to say about the issue:


Root cause fount:
---------------------------
Registry is corrupt.

Repair action: System Restore
Result: Failed. Error code = 0x1f
Time taken = 588875 ms

Repair action: Registry roll back
Result: Failed. Error code = 0x3
Time taken = 0 ms

Update 2:


I booted using the legacy boot and managed to surface a new error:


Realtek PCle FE Family Controller Series v1.27 (10/31/11)
PXE-E61: Media test failure, check cable

Looks like this is a red herring. This just means that I can't boot from the network.



Answer



Looking at a an article for Windows 7 about the same issue, I found a suggestion to use the following command:



Rstrui.exe /offline:C:\windows=active



Rstrui.exe opens up the system restore window. I'm not sure what the argument means, but it made it so I could actually use the restore points! Yay!


Unfortunately, this did not completely fix my problem - the system restore failed. The error message implied that it had something to do with the registry. So, using the command prompt I went into C:\Windows\System32\config and renamed two of the registry files:


ren SYSTEM system.001
ren SOFTWARE software.001

After doing this, I ran the system restore again (using the same argument as I did the first time) and it worked! I was able to log back into my computer!


linux - Looping through files and collecting data

Ok, I have a problem that I think you guys can help with.


I have 24 folders. Labeled Angle1, Angle2, ... , Angle24


Each folder has a file name output.txt


In each file named output.txt, I want to take certain information.


There are 10 columns of data with numbers, but the numbers are variable length. I want the 9th column of numbers, but this does not mean that this is just the 9th column by characters. It could be 46 columns in or something. Anyways, each column is separated by a blank space so perhaps that would be of use.


I want to loop through Angle1, Angle2 etc. and get the 9th column of data from each and put the total of 24 columns of data into a new file in parent directory called total.txt.


This may not be possible, but just curious - is it possible?


Note that I am using Windows PowerShell but could use Ubuntu if that is easier. If any answer might not work in both environments, please indicate which environment it is for.

Wednesday, 27 March 2019

filesystems - Auto deleting files older than given minutes on Windows

I have a folder on my PC in which I keep my temporary files, which I won't be needing after some time. I manually delete them from time to time. What is a way to automate this? I can think of deleting files whose last access time is greater than 20 minutes using Java, but then again, I would have to run it myself which still wouldn't be automation. I using using Windows and file system is NTFS.

Excel on Windows 10: Recovering old file version accidentally overwritten and saved over?

I was working on a file (Excel, from MS Office Professional Plus 2016) stored on the local drive of my laptop, in which I entered marks of my students for papers.


Later, I reopened the same file and replaced the paper marks with assignment marks; I intended to use "save as" the file rather than save, but accidentally pressed Ctrl+S; then I realized I overwrite the previous file version, replacing the file contents, rather than creating a new file.


How can I restore the older version of my Excel file, which contained paper marks??


I tried using the Windows 10 "restore previous version" option as shown in this screenshot, but I couldn't find a previous version there.


snapshot

Windows 7 Backup Fails

I am trying to backup a Windows 7 laptop to my file server.


The error code is 0x80070005. The Event Viewer shows this:



The backup operation that started at '‎2011‎-‎06‎-‎06T19:56:48.283117300Z' has failed with following error code '2147942432' (The process cannot access the file because it is being used by another process.). Please review the event details for a solution, and then rerun the backup operation once the issue is resolved.



There were no applications running other than background services and the backup program itself. How can I resolve this?

Computer won't boot from a bootable DVD

My friend gave me his old computer that used to have WinXP on it. I'm trying to load Win7 on it and I thought there was something wrong because it wouldn't boot off a bootable disc, even though I setup the BIOS boot settings properly (I've done this sort of thing a million times).


However, this closely related post helped me realize that I can boot off a bootable CD (WinXP), just not a DVD (Win7)


Computer won’t boot from CD/DVD drive


That might be the answer to my question, however, this motherboard is still pretty current technology. It's a good quality Gigabyte board, and judging from this product page, it came out in 2004.


If I can't figure out a solution to my DVD boot problem, I'll have to try something like this:


Boot and Install Windows from a USB thumb drive


I guess it's possible that this motherboard doesn't allow booting from a DVD, but I still think that I might be missing something. It wouldn't be the DVD rom drive would it? I did try another drive and had the same results. However, I didn't try booting a DVD in the computer that the other test drive came out of, I'll do that later today.


Any other advice? Thanks.

Tuesday, 26 March 2019

networking - Getting strange IP Address from router


I've had a router set up for quite some time and it has been working perfectly. My wife called me to tell me the wireless internet wasn't working and when I came home I saw that my phone was connected to the wireless but there wasn't any internet, even though the wired devices had internet. My router is at 192.168.1.1 and gives out the normal IP addresses that you would expect 192.168.1.xxx. The IP address on my phone though was 10.55.142.7, still in the private network range, but totally nothing that should be assigned by my router. I reset the router, disable and enable dhcp, verified what IP address it should be assigning, but without success. I had another spare router that I wasn't using so I replaced the non-working router with the spare but all the wireless devices are still get the 10.55.142.xxx addresses and no internet connection. So I changed the SSID on my router to make sure someone else wasn't trying to used the same SSID but that didn't changed anything. There are no other router's in my house and nothing I can think of that would try to assign out IP addresses.


The wired connections to the router work just fine, but they all have static IP addresses. So I changed my computer to get an address through DHCP, and it got a 10.55.142.xxx address. If I changed the phone to have a static IP address it works! What is going on! It appears that DHCP isn't working but it can't be the router can it? The router was working and I replaced it with another one with the same results. I'm totally confused on this one.



Answer



It looks like you have a new DHCP server on your network.


The first thing you should try and see is which gateway you are assigned, when you are on the bogus subnet. If it is in the range 192.168.1.0/24, you may probably guess on which computer it resides, since you stated your pcs are all on static IPs.


Or, you may try turning off your pcs one by one, and see when your wireless devices, eventually, acquire an IP address in the 192.168.1.0/24 range. The last pc turned off is then the culprit.


Or, you may use a Ubuntu installation (drop an Ubuntu image onto a USB stick, and boot from that)to issue the following commands:


    sudo service network-manager stop
dhcp -v eth0

from an ethernet-connected pc. The output,


   dhclient -v
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/e8:e0:b7:be:72:6a
Sending on LPF/eth0/e8:e0:b7:be:72:6a
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x333a3d1d)
DHCPREQUEST of 192.168.73.88 on eth0 to 255.255.255.255 port 67 (xid=0x333a3d1d)
DHCPOFFER of 192.168.73.88 from 192.168.73.1
DHCPACK of 192.168.73.88 from 192.168.73.1
bound to 192.168.73.88 -- renewal in 35456 seconds.

shows this critical line,


  DHCPOFFER of 192.168.73.88 from 192.168.73.1

which displays the IP address of the pc making the offer (192.168.73.1, in my case).


Or, assuming these IP addresses don't mean a thing (i.e., they fall in the 10.0.0.0/8 range), you may try installing a program called nmap, and run it with the command


  nmap -T4 -A 10.55.142.1

where 10.55.142.1 is the gateway your pc is assigned, if it is not 10.55.142.1 please change it to its true value. This will tell you many things about the host pc, including (if you only have Windows machines) its name.


This should at least identify the pc where the new DHCP server is running.


audio - Change framerate on MKV container


I got a problem with playback of some MKV containers (89 items, totalling 196,3 GB).


The audio+video are encoded in 25 fps, but the subs are totally out of sync - these are encoded on 23.976 fps.


My question: Is there anyway i can batch change/reencode the framerate on these movies to 23.976?



Answer



You can try recoding the video and audio to a different frame rate while keeping the subtitles as they are:


ffmpeg -i input.mkv -c:v libx264 -crf 21 -c:a aac -strict experimental -b:a 128k -r 23.98 -c:s copy output.mkv

The CRF sets the video quality. Choose something lower for even better quality, like 18. 23 is the default for x264.


tv - Monitor Resolution says one thing, but displays another


I have purchased a large TV for a monitor that claims it is 1080p and clearly states that its native resolution is 1920x1080, and when I hook it up using HDMI, everything does read that; But the image I am getting is very, very clearly not 1920x1080; I can tell this because the exact same resolution on my second monitor (a 19 inch LG) displays things at a very different size and ratio. For example, things that span the entire screen easily on the smaller screen do not fit at all on the larger one.


When I say "smaller", I do not mean that the things on the large TV are smaller; I fully expect that, given that it is a larger screen. I mean that the actual amount of pixels it displays across the screen is inaccurate. For example, if I open up a website that is sized to fit a 1024x768 resolution on my LG screen, there is a massive amount of padding on either size as the content floats correctly in the center; But on this new TV, it fills up the entire screen as if it is the actual resolution.


Is this even possible? I am at a loss as to what to do. I have looked over the specifications time and time and time and time again and I see absolutely no reason why this should be showing at a smaller resolution.


The exact TV I am using is here; Sceptre 32'' LCD HDTV


This is on Windows 8.1 (x64), using an nVidia GeForce GT 540M display adapter.


To illustrate what I mean by "it reads that it is 1920x1080", I have taken a screenshot of the same page (this one) across both screens, with the resolution display from Windows visible as well.


Demonstration



Answer



What is the resolution the computer is using?:
To find out the exact resolution that the computer itself is "sending" to the tv, do a ScreenShot , or hit the PrintScreen Button and paste the image off the clipboard into some picture editing program. Then read the dimentions of the captured picture.
That will confirm that the computers own resolution viewport thing. Screen caps to test can be done with a single monitor or dualies and you can find out what the computer sees.
If the computer own res is showing low, check out features of your video card, using your video card software. HDMI is not always pixel perfect with the video cards, sometimes (depending on the version and manufacture) it requires a bit of tweaking. ATI for example treated HDMI as if it was going to act like an analog tv. Some early LCD digital televisions did act that way (overscans).


DPI (not resolution) is system wide not monitor independant:
From what you showed (luv them pics) the computer is indeed in the desired resolution, and for some reason your tv is doing an interpolation. (it also looks like it is being interpolated) That does not explain the size difference , when DPI settings are system wide not monitor independant. While it looks like your usual 720type interpolation (again) it doesnt explain what looks like a DPI change.
Also why are the Icons of the same clearity but the browser not? have you tested what your observing with many programs, or could it be something that a browser is doing? (I dont know of any browsers that would scale thier DPi based on a monitor, but ya never know what stupid features they will put in next :-)


Resolution can be different on different monitors:
The windows system is completly capable of running 2 monitors at 2 different resolutions. Each monitor can therfore have a resolution set for it. OffTopic- color profiles and cleartype and refresh rates can also be different.


TVs for a computer what fun:
If the screen capture shows the proper res, it could be assumed (but not guarenteed) that the changes you need to make are on the TV itself. First verify the actual model number, to insure you got what you think you got (look on the back of the actual tv). Then try and find format , aspect and other settings on the tv, while nothing seems cropped or zoomed, and the tv will always deal with the picture as a whole item (again not making a lot of sence that it is only part of the image).


Setting everywhere , find them all, learn the purpose:
Tvs are tvs , they are not monitors, so they have a lot of settings designed to work with broadcast signals, most tvs can be set to other than pixel by pixel settings, and some will even overscan still (throwback from CRTs).
Hooking up a TV often required tweaking both the software for the GPU, and the TVs own settings to attempt to keep everything pixel=pixel, so it could be some tweaking will be in order. (overscan, underscan, aspect, format even possible to be effected by refresh rates)


The pictures you display are very usefull, but I could not determine for a fact what is going on, maybe some of the above will help, or help you to provide more information.


Added:
Windows Display Resolution:
In the windows Display Control Panel\All Control Panel Items\Display\Screen Resolution select the monitor/tv picture (first) that you are having troubles with and check the resolution settings there. If you have 2 monitors make sure before you make changes you have the monitor (picture) selected.


Monitor drivers (profiles):
Usually it is not really important if the tv/monitor name is not shown (the profile driver for the monitor is not installed) "Generic" connections should still be capable of getting the correct resolutions, without the added profile for the monitor. With that said it doesnt hurt to check if the monitor came with a CD or a download off thier web that has a "monitor driver" which is just a profile for that monitor. Monitor profiles also hold color calibration information.


What windows wont do, GPU software often will:
The software that comes with the GPU card (or chip even) Often has many more advanced features for adjusting things than the windows own simple and to the point display setting. Because your using Nvidia, I dont know where the options are. In ATI it also has a special section for HDMI connected tvs, that can resolve some issues and differances when hooking up an actual TV (instead of a monitor).


How to tell if DirectX 9.0c is installed


This is related to this question >> DirectX 11 is installed but programs say DirectX 9.0c is needed


But more so that I don't get "errors" saying I don't have DirectX 9.0c installed, but I can't launch Retroarch and I'm thinking it's related to DirectX 9.0c not being installed. I get an error relating to memory that can't be written, but this could be related to other things like how I use GPU Passthrough via vt-d or Windows 10 LTSB. (Retroarch launches with the video_driver set to "gdi", but not with GL or D3D)


So to confirm if I even have the DLL's required/installed for DirectX 9.0c installed, how can I check?



Answer



I found something called the "DirectX 9.0c Control Panel" which verified the installation for me.


Couldn't find offical DL but here it is @ MajorGeeks >> http://www.majorgeeks.com/files/details/microsoft_directx_control_panel.html


enter image description here


Convert RAID 1 to RAID 10 in mdadm


In my current Ubuntu server, I have 2x 2TB Western Digital RED hard drives in a RAID 1, using mdadm. I would like to add 2 more 2TB RED drives, and convert it to a RAID 10. I realize I would have to wipe the data most likely, but is there any way that I wouldn't need to? I have the 2TB volume almost completely filled up



Answer



This took some strategy, and unfortunately, was a little while ago, so bear with me; I'm going by memory.


Essentially, I shut down the server, and installed the two new drives. I did a backup beforehand to an External 4TB HDD (much faster since it had USB3!), just in case. I didn't need to use it thankfully, but I'm happy I at least had it. I took note of what the partition sizes were on the disk (by block size), and what each disk was. At the time, sda and sdb were the drives with the current array loaded. sdc and sdd were the new drives. I copied the partition layout to the two new disks, using fdisk as root. I then created a new array, with two missing members:


mdadm -v --create /dev/md1 --level=raid10 --raid-devices=4 /dev/sdc1 missing /dev/sdd2 missing

This command creates the array, called /dev/md1, sets the RAID type to 10, and says that there should be 4 devices, in a perfect world. The devices I added were /dev/sdc1 and /dev/sdd1 for the first partition. Once it was up, I mounted the array (as /mnt/raid), and did an rsync -avP /mnt/data/ /mnt/raid/, and waited a day for everything to copy.


Once it was copied over, you need to fail the hard drives in the array, and remove them: mdadm /dev/md0 --fail /dev/sda1 --remove /dev/sda1. You can then add that hard drive to the new array, and wait for it to rebuild. Then, remove the last drive from the array (using /deb/sdb instead), and add it back (mdadm /dev/md1 --add /dev/sda1).


Finally, to remove the old array from starting up or giving warnings, run mdadm --stop /dev/md0. At this point, the old array is gone! I would suggest double-checking that the boot loader is installed correctly on the array (or, depending on your scheme, the boot sector of the hard drives). Give it a test reboot; if everything comes up, great! If not, that's why we have a backup!


As a bonus, I learned a new useful command: watch cat /proc/mdstat to automatically update the screen every 2 seconds with the rebuilding status of your drives. I also wrote a blog entry about my experience, including pictures.


external display - How to prevent clipped screen edges on my TV, HDMI-connected?


I'm going to start with the problem statement:


My TV over HDMI cuts edges of the picture.




Obviously, most of these problems I have found in the search, point to the cable... But I don't think this is the case.


Cable: EVOLVEO XXtremeCord 3 meters, direct link to manufacturer web site.



  • type: HDMI

  • version: 2.0b

  • specifically mentioning

    • UltraHD resolution support

    • HDR capability

    • way too much other information concluding it should be of superior quality




^^^ The cable IMHO is not the culprit, moving on...




Then, my natural reasoning was either my graphics card is doing it, or more likely the TV itself.


So, the GPUs, my laptop is Dell with service tag HG6D142 (direct link to product page):



  • NVIDIA GeForce GTX 1060 with 6GB GDDR5 memory which, Max-Q Design
    ^^^ This, once again, IMHO is not likely the problem. Since you can scroll down on the page, and see to Full Specs, and verify Standard Display Connectors including HDMI 2.0b.

  • The integrated GPU I don't use that I know of, none-the-less, Intel i7-7700HQ has Intel HD Graphics 630
    ^^^ this should also not be the problem, but I am stating it, for this question to be complete


^^^ Both of these GPUs should be just fine, but I believe, only the NVIDIA is actually in use for the TV.




The operating systems I use:



  • Windows 10 Pro (1903)

  • Linux Mint 19.2 Cinnamon


^^^ The picture resolution and refresh rates are the same on both. The only difference is I can enable HDR only on Windows, but this question is not about that.




The TV itself is not exactly Smart as it has only some basic functionality:




Answer



I know you have answered your own question. But in case others don't have the same setting on their TV, but are still getting the image cropped all round, I'll leave this answer.


My TV, an 8 year old Panasonic, has what it calls "Picture Overscan" where a small number of pixels, maybe 20 or so, are cropped off all round. Irritatingly enough, this is often just enough to hide a lot of the task bar in Windows. There is an option on my TV's settings menu to turn this feature off. See https://en.wikipedia.org/wiki/Overscan for more info.


windows 7 - How do I pin more than one instance of Firefox to my taskbar?

I have several Firefox profiles and I have them pinned to my taskbar.


Since i installed windows 7 SP1 I can no longer have both there. Is there a way to fix this so that I can have multiple instances of the same program pinned at once?

windows 7 - how to close google chrome and have it save your tabs


When my computer shuts down due to automatic updates and I restart it all the tabs I had open are restored. But when I do Ctrl + Shift + Q all the tabs are lost.


Is there a way to have my tabs saved when I manually close Google Chrome? Or should I just kill every single instance of it in the Task Manager or something?



Answer



In the settings, there is an option that says "Continue where you left off" under "On Startup" option. That should keep your tabs intact when you close and launch chrome every time.


This will work for both the hotkey and manual close.


How to show menu bar in notepad++?



The menu bar in notepad++ is missing. I have tried to remove plugins, even reinstate the program, still menu bar is hidden. Any ideas ?



Answer



The Menu Bar can be turned on and off in Settings -> Preferences. Since the bar is missing, you can open the Settings menu by pressing ALT-t.


If the Title Bar is missing along with the Menu Bar, it may be in Full Screen mode and/or Post-It mode. Press F11 and/or F12 to toggle Full Screen and Post-It modes, respectively.


linux - How can I encrypt a string in the shell?

Can I encrypt a message (string) using a public key at the command prompt? Also, how can I decrypt the result afterwards?

Monday, 25 March 2019

worksheet function - Microsoft Excel 2007 - Drop down list that grabs multiple columns from another sheet


I've been scouring the internet for this but can't seem to find a solution.


Let's say I have 2 Sheets - "Items" and "Inventory".


Inside "Items", I have 3 columns:



  • Item Name

  • Item Type

  • Item Cost


Inside "Inventory", I have the same column as above. However, under Item Name in the "Inventory" sheet, I have a drop down list that lists all items found under Item Name in "Items".


What I want to happen is that in "Inventory", if I select an item from the drop down list... I want not only the Item Name to be shown... but the Item Type and Item Cost in "Inventory" should be populated as well with whatever data is in "Items" for the corresponding item I have just chosen.


Is this possible?



Answer




  • Yes, using VLOOKUP. Explanation taken from here, courtesy of bigmyk2k in reply to similar question.



The work here is not done in the dropdown (which is easy to make), the work is done in each column you want to populate.


For each cell, write a VLOOKUP which finds the desired value in a table, based on the value in the drop-down cell. In the example above, you will either want to name the ranges of parent data (the information on a separate spreadsheet that you are populating from) or adjust as necessary. For this example, lets assume that we have named the parent data: Parent_Data


A1 B1 C1 D1 Full Name ID Addr1 Addr2


For instance, in the example above, if your drop down for FULLNAME is in cell A1, and you are creating the VLOOKUP for Addr Line 2 would be,


=VLOOKUP(A1,Parent_Data,4,True)


This would find the exact match for your full name, go to the third column to the right of that, and return that value.


To keep it neat, you will want to embed the vlookup in an IF statement, so that if there is no result, it doesn't show anything. That would look something like this:


=IF(ISNA(VLOOKUP(A1,Parent_Data,4,True)),"",VLOOKUP(A1,Parent_Data,4,True))



Additional clarifying instructions:



For this explanation, I have to start with the fact that excel works either down and right, or up and left. In this case, we are in the "Down and Right" realm.


In order for the function to work, the value that you are searching with (Fullname in A1) also has to be in the leftmost column of the parent data you are searching. This is because Excel is going to search Down the first column until it finds that value, and then Right across the row until it comes to the column you specify.


Assuming that Fullname is in the A column, Excel will return the value in column D because we have told it to look in the fourth column of the row in which we find the matching value. This is the "4" in the formula. For the cell that you want to return AddressLine1, you would enter the exact same formula, but with a 3, instead of a 4.


"False" directs the VLOOKUP function to return a value for the query only if it finds an exact match. "True" will return results for the first close match. To be totally honest, I haven't figured out what Excel thinks is close in a text string...




  • Here is a VLOOKUP video tutorial on YouTube for additional instruction.


search - web scraping import to local website

I'm looking for a way to search for a specific product on a website and extract data from it, but without going directly to this website, like from a local website that queries information and downloads them,


I think "web scraping" is what I'm looking for, but I wanted to ask if you know any way to get my data in realtime.


My best solution will be to have a single page with a search case, and extract data from the website and display the result.


Anyone ?:D


Thanks

boot - How do I add startup applications in Lubuntu/Lxde?


I want to add Gnome-Do to my startup applications in Lubuntu 10.04 and the only reference I've found on the net is to edit /etc/xdg/lxsession/LXDE/autostart. But surely there must be a way to do this on a user basis?



Answer



http://wiki.lxde.org/en/Autostart



Add a .desktop file to your ~/.config/autostart directory (create one if not available) with 3 lines saying : [Desktop Entry]


Type=Application


Exec=wicd-client -n



security - Does using Tor prevent my ISP/sysadmin from seeing what sites I visit?

Does using The Onion Router prevent my Internet Service Provider or system administrator from seeing what websites I visit?

how to copy I/O not just redirect (Windows and Linux)


I have a simple call command


call calabash -D sim.xpl >test.txt 2>&1

and this redirects into test.txt, how do I do both redirect into a file and allow it to show up in the prompt?


(I could use the command for both linux and windows)


(use case: tar-ring a backup takes a while and watching the the verbose output allows me to keep an eye on it, and kill it early if needed, rather than to open a large file or wait until its done)



Answer



tee


call calabash -D sim.xpl 2>&1 | tee test.txt

How do I add Administrator Tools to the Windows 8 Start Screen?




Possible Duplicate:
Is it possible to display the Administrative tools as Tiles?



As a frequent user of the administrator tools how can I add them to the Start screen for quick access?



Answer



To enable Administrative Tools, open Settings either using the upper right corner hot spot or by pressing WinKey + I. Next, select Tiles and move the Show administrative tools slider to the right. The Start screen will be populated with many of the familiar administrative tools you know and love.


How do I get applescript to work with Preview in Snow Leopard?

How do I get applescript to work with Preview in Snow Leopard? I'd like, for instance, my applescript for resizing a window to full screen (which works for most applications (e.g., chrome)) to work for preview.


In old versions of OS X (as ghoppe points out), one can enable this by typing



defaults write /Applications/Preview.app/Contents/Info NSAppleScriptEnabled -bool YES



into a terminal. This doesn't seem to work in Snow Leopard.

How does Windows deal with process memory or resource exhaustion?


The other day I was working on a Windows 7 32-bit PC, with a few applications running including Firefox.


Over time I kept opening new tabs in Firefox until, suddenly, the Firefox window started flickering. From that point, most of Firefox's GUI turned black and refused to repaint. After trying to blindly close some tabs, the Firefox process crashed entirely. All other applications seemed to continue to work just fine.


I'm assuming (correct me if I'm wrong) that the Firefox process exhausted its 2GB virtual memory entitlement or some other resource. Which brings me to the key questions:




  1. Can memory/resource exhaustion in one process de-stabilize other processes or even the kernel itself?




  2. How does modern Windows deal with this scenario? How robust is it under these high-pressure conditions?




My concern is that, if other processes or kernel services are compromised, that could conceivably result in a broken system (e.g. file/disk/registry corruption).



Answer



How does Windows deal with process memory or resource exhaustion?


How a program behaves under "stress conditions" depends on how the particular program has been written (what privileges it has, does it contain bugs, etc) and this behaviour will determine how the rest of the system is affected when something "goes wrong".


It is possible that data can be lost. It is possible for the system to crash with a BSOD or just be unable to write data because of a delayed write failed error.




Pushing the Limits of Windows


The blog post series by Mark Russinovich (starting at Pushing the Limits of Windows: Physical Memory) goes into this topic in some detail.


In particular, in Pushing the Limits of Windows: Paged and Nonpaged Pool, he illustrates the effect of running a test program:



If you want to witness first hand how a system behaves when pool runs low, use the Notmyfault tool. It has options that cause it to leak either nonpaged or paged pool in the increment that you specify. You can change the leak size while it’s leaking if you want to change the rate of the leak and Notmyfault frees all the leaked memory when you exit it



On one test system, he said about the results:



On one test system, I eventually saw this error message indicating that data had potentially been lost. I hope you never see this dialog on a real system!


enter image description here





Further Reading


Windows Internals, 6th edition by Mark Russinovich contains a lot more information on how Windows works under the hood.


ftp - How to download a file in FilleZilla using an URL with credentials?


How can I open FTP site and download a file in FileZilla with given link as follows


ftp://ftp-pub:avilex@ftp.avilex.ru/Pub/schooldesk/schooldesk-20171025.iso

supposed credentials are ftp-pub and avilex I got invalid credentials response from FTP server


the question is not FileZilla specific. I would use any FTP client with right credentials extracted from the link.



Answer



The problem are not the credentials. FileZilla can accept credentials from an URL, if you paste the URL to the "Host" box on FileZilla toolbar.


The problem is that FileZilla cannot accept a file name in the URL. Only an initial path.


So if you paste the following URL:


ftp://ftp-pub:avilex@ftp.avilex.ru/Pub/schooldesk/

FileZilla will connect to that server and navigate to the /Pub/schooldesk/.


But you will have to locate the file (schooldesk-20171025.iso) and initiate the download manually.




You will have to use another FTP client, if you need to do everything in one go.


There are some command-line clients that can accept file URL.


If you are looking for GUI client, there will be less options.


My WinSCP FTP client can accept full file URL on its command-line to initiate a GUI download:


winscp ftp://ftp-pub:avilex@ftp.avilex.ru/Pub/schooldesk/schooldesk-20171025.iso

enter image description here


windows 7 - Is it possible to delete `C:ProgramDataMicrosoft` folder without breaking programs?


I have a large hard drive, but over the course of time, I find that I now only have 5 GB of space. While manually looking through my hard drive, I noticed that the folder C:\ProgramData\Microsoft takes up 2.2 GB of space.


Is it possible to manually delete C:\ProgramData\Microsoft folder or at the very least reduce the size of this folder without breaking Microsoft programs?


If there are other ways to reduce the size of this folder, please detail the necessary steps to take.



Answer




Is it possible to manually delete C:\ProgramData\Microsoft folder or at the very least reduce the size of this folder without breaking Microsoft programs?



No.



If there are other ways to reduce the size of this folder, please detail the necessary steps to take.



There is one possibility.


That is the default location for the windows search database, which can be several gigabytes on its own. If this happens to be indexing more information that you really need, then you could reduce the database size by excluding these options from the index.


To do that, you go the your Control Panel and search for 'Indexing options' it this should allow you see what is being currently indexed and you can modify the criteria.


You may also need to delete and rebuild the index which can be done from the advanced section. (It also allows you to change the location of the database, but I presume that isn't off any benefit to you)


microsoft office - How do I find the version number in 'ribbon' versions of Excel?


How do I find the version number in 'ribbon' versions of Microsoft Office?


The Help menu is gone, and menu Help/About had the version information in earlier versions of Microsoft Office.



Answer



In Office 2010, the version information is now in the menu item Help in the File menu (for instance, press ALT + F and choose Help):


enter image description here




In Office 2007, click the Office button, choose Options at the bottom of the menu, then open the Resources section.


Office menu Options window


windows xp - *.exe is not a valid win32 application


Recently I bought a VGA card, "ATI Radeon HD4650", and after that I installed it on my PC, I can't run any .exe files just from my CD-Rom! Even when I attempted to install the driver of the VGA Card, I couldn't do that.


So I downloaded it and installed it with no problems. After that when I try to install some games from a DVD (more than 5 different games I have tried). It prompted me with: setup.exe is not a valid win32 application so I couldn't install the game, in addition I need to say that there's nothing wrong with the DVD's and my DVD-Rom.


What should I do?



Answer



You may want to reinstall your drivers for the CD/DVD-ROM drives. Then reinstall the drivers for the VGA card and see if that works. If this doesn't work, uninstall the VGA card and see if your executables work again. This ma help you troubleshoot where the problems started.


Sunday, 24 March 2019

How to enable Windows 10 S mode for version 1803?


Following the attached link, i tried to enable S mode from my win10 Pro. But it was not successful. I did each step exactly and there wasn't any errors appeared. But my HDD had been formated when i tried it. I wanna cry. :(( Please help me to setup it. Thanks


https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-10-s-deployment-sxs



Answer



i have resolved this problem. Following the link i had posted. There are some steps you must do to re-install windows 10 in S mode: -from start to "Enable customizations". Note: use ":" instead of "=" at the command: "DISM /Image=C:\mount\windows /Apply-Unattend=C:\mount\windows\Windows\Panther\unattend.xml". - Unmount WinRE Image and make a copy - Copy install.wim and winre.wim to your USB drive. Note: at the step copy scripts folder to T:\, you must copy the contents in folder scripts\old to scripts. - Deploy the image to reference PC. Note: it will clean your hard disk. be careful. all partition will be cleared. dont try it on your main PC. Thank for your help and goodluck!!!


Prevent MacOS from making .* and ._* files


Whenever I plug someone's FAT32 flash drive into my computer, MacOS loves to add all sorts of hidden files.


A couple of these include:
.Spotlight-V100/
.Trashes/
.fseventsd/
.DS_Store


When they get the drive back, they see all this cruft. How can I prevent this from happening?


Thanks!



Answer



I don't know if saying "here's an app" is an OK solution to a problem, but I did some digging and found this:
http://www.zeroonetwenty.com/blueharvest/


Might be worth taking a look at but might not be worth $16.95...


EDIT:


I'm using BlueHarvest trial and seems to work very well. Because it provides the most complete solution for the original question, I'm marking this as the accepted answer.


Share internet connection from windows to android via bluetooth

I have an internet connection via ppoe, which works on my pc. My pc is connected to the router via wifi, and I don't think I have a second wifi card (and I don't have an ethernet cable - so I can't use my pc as a router).


I would like to connect to the internet with my non-rooted Android. I saw some instructions about sharing internet connection (for example Sharing Wifi-internet access via bluetooth ),but I have paired the computer and the phone, shared the ppoe connection and internet still doesn't work on my phone. Is there something missing?

Windows nslookup: Do reverse DNS lookup in one step?


A lot of times I need to see if a host's reverse DNS matches the A record it's associated with. So, what I do is nslookup superuser.com followed by nslookup 64.34.119.12. Is there a way to get nslookup to do this in one step?



Answer



Unfortunately, the PTR and A records are on different servers. The owner of the domain will have name servers for the A record. Smaller users will have IP addresses provided by a separate organization. That organization will have have their own name servers for the PTR records. Even where both were on the same servers, different queries are required. Even zone transfers would not work as the data is in different zones.


If you are repeating the same lookups, which is common if you are running an MX mail server, consider setting up a caching nameserver on the same host. A program like dnsmasq provides a light-weight caching name server with a limited (but configurable) cache size. However, dnsmasq doesn't run on Windows. Running bind, which is available for Windows, as a caching name server provides full functionality at the expense of a possibly more complicated configuration. In either case, the name server cache should not be accessible from the Internet, but must be able to query the Internet.


How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...