Friday, 31 January 2020

Cant find computermanegment by searching in Windows 8.1


I realy loved windows 7 but i use now windows 8 and one simple thing drives me nuts. Using windows 7 i was able to to press the windows key and then just type "computermanagement" to find the computermanagement console.


Now when i try to find the computermanagement console on windows 8.1 it does not find it and it drives me nuts. Im only able to open the computermanagement searching for compmgmt.msc or computer and then right click on computer and then press "manage".


Is it somehow possible to make windows find the management console using the keyword "computermanagement"?



Answer



It’s called “Computer Management”, with a space. I currently don’t have an English Windows 8 available but I can find it by its German name “Computerverwaltung” no problem.


Whether or not this works probably depends on whether you chose to show the “Administrative Tools” folder in your start menu/screen:



  • On the start screen, bring up the charms bar (WinC)

  • Select “Settings”, then “Tiles”

  • Enable “Show administrative tools”


Don’t worry, they’re only visible in the complete view, they aren’t forced onto the customizable start screen.


Which exceptions should I add for WSL and Hyper-V in Avast Firewall?


Summary:


I have my firewall blocking the WSL server (Ubuntu 18.04) only when running on Visual Studio Code. It is also preventing my Hyper-V VM (Ubuntu 19.04) to establish almost every connection to internet, for example sudo apt update or browsing (for some reason I can ping successfully though but I would't focus on this as of now).


Details:


After many trail and error efforts I have isolated and concluded that my firewall (Avast Premier) is the only culprit for this. Disabling the firewall for 10 mins allows me to do these two different operations, connect to WSL server from Visual Studio Code and also to navigate and update packages in my virtualized Ubuntu from Hyper-V.


What I have done so far:


I have checked that VSCode has all connections allowed in all ports (inbound and outbound):


enter image description here


Allowing rules seem to be in place:


enter image description here


And also added VSCode to the antivirus exceptions list:


enter image description here


None of the actions above worked, only disabling the firewall.


Question:


What rules should I add to the firewall for allowing:



  1. WSL server (Ubuntu 18.04.2) from VSCode

  2. Internet connection on Ubuntu 19.04 from Hyper-V.


Notes: WSL works perfectly outside VSCode. I can even start a batch terminal from it (the connection from the left of status bar is what is the issue).




UPDATE:


This is the output I get from WSL terminal in VSCode:


Failed to connect to the remote extension host server (Error: connect ETIMEDOUT 127.0.0.1:62388)

Failed to connect to the remote extension host server (Error: connect ETIMEDOUT 127.0.0.1:62388)



Answer



The Avast Forums post Support WSL pico processes has this useful text:



Avast. much like Windows Defender currently requires the entire Linux distribution to be exempted in order to run pico processes. This is an unacceptable risk to security in any corporate environment. What Avast needs to do is treat Pico processes the same way as Windows processes. Microsoft will soon be releasing an update to Windows Defender in "Skip-Ahead Insiders" builds that manage rules at per process/port level. Avast should implement a similar setup. There is a blog from 2016 Microsoft has provided to assist third-party vendors such as Avast to integrate with WSL. Here's the blog: https://blogs.msdn.microsoft.com/wsl/2016/11/01/wsl-antivirus-and-firewall-compatibility/



The Microsoft article Pico Process Overview further explains the concept:



This post discusses pico processes, the foundation of WSL. It explains how pico processes work in Windows and goes into the history of how they came to be, the abstractions we decided to implement and the various use cases beyond WSL that emerged.



As far as I could find, the Ubuntu release in Windows resides in the following folders:



  • C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1804.2019.521.0_x64__79rhkp1fndgsc

  • C:\Users\USERNAME\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc

  • C:\Windows\System32\lxss


If the Avast Forums post is correct, these are the folders that are need to be exempt in Avast in order to allow the execution of Ubuntu.


As far as Avast settings are concerned, it has been advised to enable the following:



  • Internet Connection Sharing mode

  • Allow all connections with Friends when in Private mode

  • Enable automatic profile switching

  • Enable automatic port scan detection


A reboot is required after enabling these settings.


These are all only workarounds, until Avast releases an update to support WSL. If the above workarounds don't work for you, you need to disable the Avast firewall while using WSL, or suspend Avast until they fix the problem. Until then, Windows Defender is good enough for most purposes.


ubuntu - Where does Okular store the PDF annotations?


I am using Okular in Ubuntu 11.04 as it has support to annotations and is faster to do a quick find across large documents. The annotations are not stored in the document, but are stored as metadata in some folder. I would like to know where Okular stores the metadata, so that I can create a symlink in Dropbox so that my annotations to the PDF are automatically backed up.


The answer to the below query mentions the location of the metadata in KDE, but I am using GNOME.


Where does okular store it's metadata



Answer



Update (thanks to @fifaltra for pointing me to it, see the comments)


The new annotation place is:



~/.local/share/okular



they were previously stored by default in xml files located in



~/.kde/share/apps/okular/docdata



or better



$(kde4-config --localprefix)/share/apps/okular/docdata/



regardless of the fact you're using gnome or not.


windows 10 - UWP icons are missing


I noticed that Micrsoft Edge was missing the taskbar icon, and then noticed all UWP apps are missing their icons. You can see this clearly in this screenshot of the lock screen settings:


Image on Lock screen settings with fallback icon


Things tried:



  • Tried repairing Windows using DISM.exe /Online /Cleanup-image /Restorehealth and sfc /scannow, but they didn't find any problems.

  • Reinstalling Edge with the following command didn't help either: Get-AppXPackage -AllUsers -Name Microsoft.MicrosoftEdge | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml” -verbose}

  • updating my graphics drivers to no avail.

  • chkdsk C: /f /r /x

  • Get-AppxPackage | Remove-AppxPackage then reboot and follow with Get-AppxPackage -allusers | foreach {Add-AppxPackage -register "$($_.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode} and reboot again.

  • Try and delete %AppData%..\Local\IconCache.db then restart.

  • Rebuild a Broken Icon Cache in Windows 10 - "To rebuild the icon cache, you have to delete all the iconcache files that appear in this folder": \AppData\Local\Microsoft\Windows\Explorer


Any idea what the problem might be, or suggestions on how to get the icons back?


Windows 10 Pro, 1709; OS Build 16299.192.



Answer



From Windows Explorer in the address bar, copy in the path ‪C:\Program Files\WindowsApps and then press Enter.


enter image description here


You'll likely get a pop up window telling you that You don't currently have permission to access this folder so you'll press the Continue option.


enter image description here


You'll then likely get a pop up window telling you that You have been denied permission to access this folder where there will be a link called security tab which you will click on.


enter image description here


From there the WindowsApps Properties window will open and from the Security tab you will select the Advanced option.


enter image description here


You will then press the Change option from the Advanced Security Settings~ window


enter image description here


You will then type in the username of the account you want to take ownership of the folder, press Check Name and then OK. Press OK again another time or two and then close any of the pop up windows from there that opened during this process.


enter image description here


Lastly, you should locate a folder with images/assets for the icons of an image file or two, right click the file and then select Open With option and then choose the Paint 3D app, or try various other programs until you see thumbnails being generated. The icons will mostly be back at this point and waiting, perhaps for the indexer and should eventually restore all icons everywhere.


enter image description here


macos - Disable automatic fsck_exfat on dirty volume mount in Mac OSX

I've several large hard disks formatted in exFAT to keep clean compatibility between Win7/Bootcamp and Snow Leopard.


Here's the problem: fsck_exfat needs something like 6-8gb of RAM to complete on a large disk. (windows' chkdsk works fine, btw). If OSX detects a volume as dirty, it appears to automatically try to fsck the volume... but I am discovering that it doesn't actually fix any problems. During this automatic scan, OSX has to page nearly everything else to swap. I use several external drives when I am at my desk at home, and if an exFAT volume is dirty then it might be 10+ minutes before the laptop is usable per drive, and this is after Finder loads.


Before you suggest using an alternate file system:



  • FAT32 - 4gb file limit is a problem for me, and I have at least one 3tb drive. Considering formatting back to this for the smaller drives

  • NTFS - Every OSX NTFS driver I have tried sucks. ntfs3g is wildly inefficient with CPU time and for some reason frequently freezes the whole system for seconds at a time during heavy I/O. Tuxera NTFS is better, but still crappy for heavy use. Things like Finder generating thumbnails for a large folder of images, or basic usage of Songbird on a managed library of 300+gb, become extremely unpleasant (and rickety).

  • HFS+ - The HFS driver I use in Windows (Paragon bundled with a Seagate drive) has corrupted at least one important folder and I refuse to touch it again


Worse, I was trying to run this laptop without swap as I am getting pissed off with OSX' swap behavior (basically, it pages inactive stuff to disk regardless of available RAM). The performance increase from having the swap file disabled was very nice. BUT! Whenever fsck starts, automatically, the laptop would freeze soon thereafter due to running out of RAM.


This of course threw me into a loop: start laptop, OSX sees dirty exFAT, automatically fscks them, laptop freezes, drives marked dirty because of bad shutdown, lather, rinse, repeat... not pleasant. Booting into Win7 and running chkdsk (and shutting down cleanly) breaks out of this loop. Swap is re-enabled for now :-(


The best part is I still have to manually fix the dirty volumes, because for whatever reason they mount as read-only! I can only undo that after I fsck them myself!


This is most frustrating. So... how does one disable the automatic fsck_exfat that runs on a dirty exFAT mount? Or do you have any alternative solutions? I don't mind OSX mounting the drives RO if it means I keep control of my computer (and can fsck the drives later, at my leisure).

windows - How do I install a previous version of Chrome?


I have a problem with the latest version of Chrome (https://stackoverflow.com/questions/31225926/how-do-i-download-a-file-with-webdriver-in-the-latest-chrome-version-43-0-2357-1) so I need to download and install the previous version of Chrome. A few places suggest FileHippo or OldVersion, but FileHippo only redirects to Google's Chrome download page and OldVersion only goes up to version 23.


http://filehippo.com/download_google_chrome/history/2/


http://www.oldversion.com/windows/google-chrome/


All the similar questions are out of date.


I already turned off auto update by setting the registry key.



Answer



You can look up the build version of a Chromium version on https://omahaproxy.appspot.com. Simply paste the version (e.g. 40.0.2172.0) into the position lookup field and submit.


In the output the "base position" represents the build number.


example


With this number you can finally find the corresponding download on either:



  1. this page - for builds before early 2016, or

  2. this page - for builds since early 2016


Updated links may be found on the Getting Involved page of the Chromium Wiki.



windows 7 - Batch repacking zip archives into 7z


I have many zip archive files that I would like to re-pack into 7z archive format, as that would save me a lot of space. How do I batch-repack those files on a Windows 7 computer?


I tried doing this via GUI version of 7-zip archiver, but I didn't find a corresponding function. WinRar has a "Convert" functionality, but it doesn't archive into 7z format.


I'm not asking exclusively for a solution involving Batch-file scripting.



Answer



This is my own take on the problem:


for %%F in (*.zip) do ( "C:\Program Files\7-Zip\7z.exe" x -y -o"%%F_tmp" "%%F" * & pushd %%F_tmp & "C:\Program Files\7-Zip\7z.exe" a -y -r -t7z ..\"%%~nF".7z * & popd & rmdir /s /q "%%F_tmp" )


Save this to a zip to 7z.bat file, place it into the directory with all the zip files you want to convert and double-click it there.


Thanks to Clint Priest for the base code.


Is it possible to use GPU memory as more main memory?

I have a ATI Graphics Card with 1G of RAM. GPU-Z says that 143MB (dedicated) and 75MB (dynamic) is being used on the card (GPU).


Is it possible to get your PC to use GPU as more RAM (main memory) for normal usage?


Or can you get your PC to be make more use of GPU memory to increase performance?

windows 7 - How to back up HP recovery partition

I have a HP Pavilion dm1, a light-weight laptop with no optical drive.


It has a recovery partition from which I can restore the installed Windows 7 Home edition. It seems to be a special folder; I do not get access to it from within Windows 7.


Is there any way for me to back up this partition (through the network, or onto a USB device) so I can restore it in case the hard drive fails?

How can I download files from shared Amazon Cloud Drive links through the command-line?

I have been using Amazon Cloud Drive (ACD) for a while now and I am very happy someone has developed a command-line-client for it (called acd_cli). It allows me to keep my files in "sync" with my computers even when logging in over ssh in a terminal (generally running on some type of unix system).


However, from time to time I would like to access shared files from ACD. (People can create shared links for this purpose through the website interface similar to shared links in Dropbox).


Unfortunately, these links only show an interactive website, where you manually have to click on the file and press a download button, which then seems to generate a temporary download link to the actual file of interest.


What I would like to do, is being able to download a shared file with wget (or at least a comparable tool) through a command-line-interface. If anyone has found a way to access the actual file-download-link without using the website, please share your findings.


The shared link will look something like this:


https://www.amazon.com/clouddrive/share/ABCDEFG...


The actually generated download link stays valid for at least 20 min (I just tested this), but I assume it is temporary, which is fine, but I can only get it through the website right now:


https://content-na.drive.amazonaws.com/cdproxy/templink/VWXYZ...


[Comments]


Maybe there is a way through the RESTful API Amazon is providing for ACD, but that generally appears to only allow you to access your own files, not shared links form someone else. There is also this somewhat related thread on their developers forum, which confirms that Amazon doesn't really want you to serve HTML content from ACD: https://forums.developer.amazon.com/forums/thread.jspa?messageID=15698㵒

Change the folder that Windows Explorer starts at

In Windows7, when you open the Windows Explorer using the pinned Windows Explorer button on taskbar, it opens WE and points it to My Documents folder.


Is there a way to change this so it doesn't open My Documents, but rather "Computer" just as Windows+E keyboard shortcut does?

Converting the /dev/ttyUSB to com port to use it with Wine in Linux

I have some software which runs on Windows. I installed Wine and ran it in Linux. It works fine but the issue is it communicates with a serial port. Therefore the only option I can choose are com1, com2, …


But my device on the Linux machine is actually located at the /dev/ttyUSBn location. How do I use the above software in Linux Ubuntu?


I have tried ln -s /dev/ttyUSBn COM1 in the ~/.wine/dosdevices/. It does not appear to work.

Thursday, 30 January 2020

usb flash drive - Cant Re-install Mac os x 10.10

Last night i factory reset my mums mums MacBook pro.
I had got to the point where I had to re install mac os x. I selected the hard drive I wanted it on and it prompted me with a apple id sign in. I knew from then that my or my mothers apple Id wasn't going to work because my mum told me she had got it off trade me ( like ebay but in NZ ) 
I've tried making a bootable usb drive to re install lion os x but it didn't work, or I just didn't do it right. Its a MacBook Pro 2010 mid I think and I am stumped on what to do, now that it has no operating system on it or anything on it now, only thing that works is the utilities mode. 
All help is very appreciated. 


Thanks 

windows 7 - Computer Suddenly started waking up from sleep by itself

My PC was functioning fine for a longtime until last night when I went to sleep it suddenly turned itself on. I made it sleep again and around 10 mins later it went on again.


So I ran powercfg lastwake and found that my ACPI power button was the problem?.....


Nobody could have touched the power button and I have disabled waking up with mouse and keyboard. A ghost maybe? lol

networking - Dynamic DNS at freedns.afraid.org using a Fritz!Box


I am having some trouble setting up Dynamic DNS with my Fritz!Box 7360.


I have set up the Dynamic DNS page with (this is translated from German, so might be worded a bit differently):


[x] Use dynamic DNS
Dynamic DNS Provider: User defined
Update-URL: https://freedns.afraid.org/dynamic/update.php?MY-DIRECT-URL-KEY
Domain Name: mydomain.crabdance.com
User Name: myusername
Password: mypassword

Now on the FritzBox status page, it says:


Dynamic DNS: activated, mydomain.crabdance.com, Status: Account temprarily deactivated

When I check back on http://freedns.afraid.org, my IP address never changes. Is there any way to fix this?


Note my router is on an IPv6 network (m-net), with IPv4 only through DS-Lite. I'm not sure whether this affects anything.


Update: Following the guide here (putting myusername instead of MY-DIRECT-URL-KEY) hasn't given any succes. However, the status field has changed slightly:


Dynamic DNS: activated, mydomain.crabdance.com, Status: unknown

Update 2: So the problem is that accessing the direct update link would work - however my home connection is native IPv6 so it hits freedns.afraid.org via DS-lite, which then doesn't work as a DNS entry. I've contacted the Fritz!Box support team and they said they might implement Dynamic DNS for afraid.org in the next firmware release. Until then I'll look at using MyFritz or an alternative DNS provider.



Answer



So, the support team at AVM was incorrect, the URL for updates supports placeholders for things like IP address. The one for IPv6 address is not listed on the help page but is . Together with freedns's address field this lets me solve the problem.


The following ended up working for me:


http://freedns.afraid.org/dynamic/update.php?MY-SECRET-TOKEN&address=

Create a bootable USB drive from a DMG file on Windows

A Mac machine needs to be reformatted with Lion. I backed up the Lion dmg file when I purchased it via the Mac App Store.


I now need to create a bootable USB drive from the DMG file but I need to be able to do it in Windows, preferring open source or at least free options.


How can I do this?

input languages - How do I remove English (US) from Windows 8.1?

I've got a slightly annoying problem. My locale is English (UK), but occasionally my keyboard randomly switches to English (US) on Windows 8.1. I see that the task bar has a language selector, which when I click on it displays two languages:



Most of the time it stays on UK, but occasionally randomly switches to US. When I go into the Language section of the control panel, only English UK exists:



In Advanced Settings I've specifically set the input method to be English (UK), but English (US) persists in its obstinate existence.


Why is the 'US keyboard' there? How do I get rid of it?


edit There is only one language listed under 'input settings':


vim - jVi alternative that supports .vimrc

Considering that jVi does not support .vimrc files, what alternatives do we have that do support .vimrc files? Specifically, I have many handy insert-mode mappings that I would prefer not to give up, such as this:


inoremap kk A

Additionally, there are some mappings that I could live without, but I think that I will need real VIM for, such as this:


inoremap hh ?\%=line('.')l\({}\\|\[]\\|<>\\|><\\|()\\|""\\|''\\|>\)?s+1

Note: I know that the question of VIM keybindings in Netbeans / Eclipse / any IDE comes up often enough, but in this question I am not asking about VIM keybindings, but rather about .vimrc specifically, or better yet real VIM embedded in Netbeans. I have not seen this facet addressed in any other of the myriad of ostensibly-similar posts.


I have looked at Vi Vim for netbeans / ViEx, vim for netbeans, and others. Apparently VIM includes a socket interface for integration into an IDE which is interestingly enough called "netbeans". The help file for this feature lists a few projects, but is terribly out of date. The only project that still seems active from that file is PIDA but their website is down.

windows 7 - Why can't I extend this partition into the unallocated space?


Check out the screenshot below, I want to extend my C partition (where Windows is installed) into the unallocated free space shown. This space was cleared up by shrinking the D partition. I can extend the D partition if I want to, but not the C.


Why not?


Screenshot



Answer



It's because you can only extend a partition if the blank space is directly following it. Your D: partition is in the way.


Perhaps look into a partitioning program like GPartEd.


windows - How to use slow motion effect in a specific time interval with ffmpeg

I'm trying to use slow motion effect on my videos. Let's say I have a 2 minutes long video and I want to use this effect between 20 and 30 seconds.


I found this command from a blog:


ffmpeg -i input.mp4 -vf "setpts=(/1)*PTS" output.mp4

But i don't know how to implement duration in it.

Wednesday, 29 January 2020

shell - grep fails in upstart script


I have an upstart configuration for a service which needs to check the existance of a process on it's startup. This sounds fairly easy but I'm already trying for 3 hours to get this thing solved and I'm lost. The problem seems to be that some grep statements lead to an exit of the script within upstart, leading to a failure in starting the service. But upstart doesn't log anything, it just exits the script and is gone.


Following are some example lines which trigger the problem: The first echo and the output of it's grep are logged, the second echo is logged, but not the output of it's grep. After the second echo upstart just exits the script and stops. The problem is adding the -v option or something other like using regexp classes like [[:digit:]]. It seems like I need to escape some characters but I simply don't know how. A simple -v or something like that doesn't work.


script
echo grep
ps ax | grep "postgres: wal writer process" | grep "grep"
echo grep2
ps ax | grep "postgres: wal writer process" | grep -v "grep"
end script

Does anyone has an idea on what I'm doing wrong and how to fix the problem?



Answer



As explained in the manual, all scripts run with sh -e. That means any unhandled command failure will terminate the script with an error. If you have code which might return failure, you would code it like


command || true

or wrap it in a conditional or something.


By the by, your code is better written as


ps ax | grep "[p]ostgres: wal writer process"

See also https://stackoverflow.com/questions/9375711/more-elegant-ps-aux-grep-v-grep


So in summary, you would probably be looking for something like


if ps aux | grep '[p]ostgres: wal writer process'
then
: already running
else
: start it up
fi

Now that grep is run as part of a conditional, a failure is no longer considered unhandled (even if you don't have an else clause!) and so it will run safely under set -e.


ip address - What happens when all IP addresses run out?


I recently read an article in which they wrote that that there will be a time when there will be no more IP addresses available. Is that right? Do I need to register a website now just in case?



Answer



No, you don't need to worry.


Registering a website (domain name) is totally separate to having an IP address. Registering a domain name just gives you the name, this name will then be entered into DNS servers, which will allow the name to be resolved into an IP address. This will be the IP address of the web server that holds your site. The company running the web server or their ISP will be responsible for ensuring that they have valid IP address, you don't need to worry about it. It can also change, so you don't need to reserve a specific address.


Something called Network address translation (NAT) has relived a lot of the pressure on IPv4 addresses. It allows a single external IP address to be mapped to a large number of IP addresses internally within a smaller network. (Such as a home or company network).


We are moving towards support for IPv6, which will expand the number of available addresses significantly. Most modern operating systems now support it, and a a lot of network hardware is starting to support IPv6 now.


Unless you are a registrar or ISP you do not need to significantly worry about IpV4 addresses running out. Just consider it when buying hardware and try to buy IPv6 compatible hardware where possible.


You can read more about it here.


Will system restore "restore" a wubi root.disk?


I have Windows XP on C:, and installed Wubi Ubuntu 10.10 on D:\ubuntu.


I encountered a power interruption while using XP. When the power got back, I booted into Ubuntu, detected the Windows wasn't properly shutdown, fixed it, and went on to boot Ubuntu just fine.


Then the next day, I wasn't able to boot into ubuntu. Did chkdsk on D: since a folder I was trying to copy files into (when the power went out) got corrupted.


XP is fine, but Ubuntu still won't boot. After trying lots of solutions that didn't work, I just found out that the whole /ubuntu/disks/ folder is gone.


So, before doing system restore, will it restore my root.disk? Thank you.



Answer



Windows XP System Restore monitors only a list of file extensions defined in %SystemRoot%\system32\Restore\filelist.xml, and DISK is not in it.


If you find a way to run explorer /separate as the "SYSTEM" user, you can browse C:\System Volume Information for files of the same size as your root.disk, but it's unlikely to be there.


iptables - LInux squid proxy

We have RHEL 5.0 squid proxy in our office.


Our LAN is 172.20.12.0 /24 n/w. proxy ip is 172.20.12.4 /24 .


I want to share internet through proxy.


Most importantly:



  1. I want to give full access to two IPs 172.20.12.8 and 172.20.12.9 to access the internet

  2. All the users should have the proxy address in their browsers to get internet, without the proxy in the browser internet should be blocked.


Can someone help me with what to write in iptables?

microsoft excel - How can I add Drop Down List after inserting new row in VBA


I am trying to insert a drop down list with two items after adding a new row. This code below not working properly.


     Dim varUserInput As Variant
varUserInput = InputBox("Enter Row Number where you want to add a row:",
"What Row?")
If varUserInput = "" Then Exit Sub
RowNum = varUserInput
Rows(RowNum + 1).Insert Shift:=xlDown
With Sheet1.RowNum.listBox1
.AddItem "Paris"
.AddItem "New York"
End With

Answer



Try this:


Sub Macro1()

RowNum = InputBox("Enter Row Number where you want to add a row:", "What Row?")
If RowNum = "" Then Exit Sub

Range("A1").Offset(RowNum, 0).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove

With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="London,Sydney"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub

Note: I recorded most of this using the Record Macro tool on the Developer tab, then edited to use parts of your code. It's a useful method when you aren't sure the exact code required to insert something, such as this drop down validation list.


Edit: To add two lists at the same time:


Sub Macro1()
'ask user for row to insert data
RowNum = InputBox("Enter Row Number where you want to add a row:", "What Row?")
If RowNum = "" Then Exit Sub

'insert dropdowns in column A
Range("A1").Offset(RowNum, 0).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove

With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="London,Sydney"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With

'inset second drop down in column E
Range("E1").Offset(RowNum, 0).Select '<-- change reference to E
'Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove '<-- line removed as don't need to insert twice

With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="New York,Jakarta"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With

End Sub

and with many identical lists:


Sub Macro1()
Dim RowNum As Integer
Dim Lists As Integer

'ask user for row to insert data
RowNum = InputBox("Enter Row Number where you want to add a row:", "What Row?")

'insert row
Range("A1").Offset(RowNum, 0).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove

'ask how many drop down lists to make
Lists = InputBox("Enter number of drop down lists to make in this row:", "Number?")

i = 0

Do While i < Lists And i < 1000
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="Hong Kong,Rome,Wellington,Cairo"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With

'move across one cell
ActiveCell.Offset(0, 1).Range("A1").Select

i = i + 1
Loop


End Sub

audio - Force Windows XP to output only mono sound


So, the 'right' half of my pair of headphones broke (the transducer+wire are fine, but the earpiece broke on the headband and so the earpiece won't sit over my ear). So now the right channel is being broadcast to my cube neighbors when I wear my headphones. Yes, they look very silly.


Is there a way to ensure, in Windows XP (or Windows Media Player), that all stereo sound is downmixed to the left channel only (ie, in mono) so my neighbors don't hear my music? I know that I can setup the mixer to set the balance to 100% left, but information in the right channel won't be heard.



Answer



Did you check Control Panel > Sounds and Audio Devices > Audio > Sound Playback > Advanced ? You can set the speakers to all possible "Mono" choices you might have. Then set the balance to 100% left. That should work.


upgrade - How can I force Ubuntu 9.10 to reinstall itself without losing my information?


The title says it all... I'm having lots of issues after upgrading 9.04 to 9.10 - I want to reinstall without losing my files and I gave away my Ubuntu Disc and I can't make another one right now...


How can I force Ubuntu 9.10 to reinstall itself (without losing my information)?


EDIT:


The issues are: unresponsive mouse: [fixed by modding xorg.conf] and weird graphics issues which don't seem to be hardware or software, I can't tell. (specifically, bouncing lines on top of my screen and a loading bar on the shutdown screen - my friend says he has 9.10 and that the bar shouldn't be there.)


EDIT:


I ran sudo dpkg-reconfigure -phigh -a and it didn't work. The following is my terminal's output. Any ideas would be welcome.


moshe@moshe-laptop:~$ sudo sh
[sudo] password for moshe:
# sudo dpkg-reconfigure -phigh -a
* Disabling power management... [ OK ]
update-rc.d: warning: /etc/init.d/acpi-support missing LSB information
update-rc.d: see
* Checking battery state... [ OK ]
acpid stop/waiting
acpid start/running, process 3544
* Stopping web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting [ OK ]
* Starting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
Caching application data...
Generating mime/codec maps...
Caching application data...
Generating mime/codec maps...
* Starting AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox-3.5
[ OK ]
* Reloading AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox-3.5
[ OK ]
dpkg-trigger: dpkg-trigger must be called from a maintainer script (or with a --by-package option)

Answer



To reinstall without losing your info ...



  1. Make a backup of the info you want to keep.

  2. Test the backup.

  3. Reinstall. Make sure the root partition gets reformatted, because you want to get rid of the old Ubuntu 9.04 stuff completely.

  4. Restore the backup.


You could attempt to perform the installation and try forcing the installer not to format the root partition, and that would keep the files you're probably interested in keeping. But it would leave files around from the previous install, it might lead to problems during the installation, and it might create problems later.


I don't know what you're considering "your information", but I'm assuming your user's HOME directory (or the entirety of /home) is the main candidate. If you have a website or database installed you'll also want to back those up (usually these are under /var).


And you probably want to make a backup of /etc as well, but don't automatically restore that one.




To reinstall without an install disc ...


Ubuntu provides many installation options; installing from the CD is only one of them. See the Installation page at the Community Ubuntu Documentation.


In particular, here is the section on Installation without a CD:



The documents listed below provide instructions for installing Ubuntu without using a CD or CD-ROM drive.




As you can see, there are lots of options. I think the best option might be to use a USB stick (Installation/FromUSBStick), if that's an option for you. If you still have the LiveCD ISO, or can download it again, and you have a spare USB stick you can use, this is a good option.


Installing from within a running Linux (Installation/FromLinux) might be an option for you, but it can be complicated -- in particular the debootstrap option (bottom of the page) is very powerful, but the process is not for the faint of heart.


Finally, one of the network installation options might work.


Telnet error when connecting from Windows to Unix


When I try to connect through telnet from a Windows system to Unix, I am not able to connect. I am getting this log error. Is this related to a firewall issue, or anything I need to mention in the etc\service file?


"Telnet is busy with its port23"

Does that mean that telnet is not properly working, or do I need to mention a different name here?



Answer



This looks like a network issue, not a telnet one. Either your Windows firewall (or any other you are using) is blocking telnet, or your router is configured to block it.


Tuesday, 28 January 2020

linux - Links SSL Error

What version of links does the user called "bytepool" have that he's able to find this workaround? Refer to link below.


How to tell `links` to ignore expired SSL certificate and proceed?


He writes "I quickly peeked into the code, and it seems that the relevant function is verify_cert in https.c. .... So as a quick fix for my problem I just built myself a custom version in which verify_cert always returns true, i.e. the cert check is just completely bypassed."


Further edit by barlop


Going to http://links.twibright.com/download.php and downloading and extracting http://links.twibright.com/download/links-2.8.tar.gz I see this is the contents of https.c I see no verify_cert function


Here is the contents of https.c
/* https.c
* HTTPS protocol client implementation
* (c) 2002 Mikulas Patocka
* This file is a part of the Links program, released under GPL.

* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
* OpenSSL library under certain conditions as described in each
* individual source file, and distribute linked combinations
* including the two.
* You must obey the GNU General Public License in all respects
* for all of the code used other than OpenSSL. If you modify
* file(s) with this exception, you may extend this exception to your
* version of the file(s), but you are not obligated to do so. If you
* do not wish to do so, delete this exception statement from your
* version. If you delete this exception statement from all source
* files in the program, then also delete it here.
*/

#include "links.h"

#ifndef PATH_MAX
#define PATH_MAX 255
#endif

#ifdef HAVE_SSL

static SSL_CTX *context = NULL;

SSL *getSSL(void)
{
if (!context) {
const SSL_METHOD *m;
unsigned char f_randfile[PATH_MAX];
unsigned char *os_pool;
unsigned os_pool_size;

const unsigned char *f = (const unsigned char *)RAND_file_name(cast_char f_randfile, sizeof(f_randfile));
if (f && RAND_egd(cast_const_char f) < 0) {
/* Not an EGD, so read and write to it */
if (RAND_load_file(cast_const_char f_randfile, -1))
RAND_write_file(cast_const_char f_randfile);
}

os_seed_random(&os_pool, &os_pool_size);
if (os_pool_size) RAND_add(os_pool, os_pool_size, os_pool_size);
mem_free(os_pool);

/* needed for systems without /dev/random, but obviously kills security. */
/*{
static unsigned char pool[32768];
int i;
int rs;
struct timeval tv;
EINTRLOOP(rs, gettimeofday(&tv, NULL));
for (i = 0; i < (int)sizeof pool; i++) pool[i] = random() ^ tv.tv_sec ^ tv.tv_usec;
RAND_add(pool, sizeof pool, sizeof pool);
}*/

SSLeay_add_ssl_algorithms();
m = SSLv23_client_method();
if (!m) return NULL;
context = SSL_CTX_new((void *)m);
if (!context) return NULL;
SSL_CTX_set_options(context, SSL_OP_ALL);
SSL_CTX_set_default_verify_paths(context);

}
return (SSL_new(context));
}
void ssl_finish(void)
{
if (context) SSL_CTX_free(context);
}

void https_func(struct connection *c)
{
c->ssl = DUMMY;
http_func(c);
}

#else

void https_func(struct connection *c)
{
setcstate(c, S_NO_SSL);
abort_connection(c);
}

#endif

windows - what's the remote desktop software that requires least configuration on client side?




Possible Duplicate:
Remote desktop type software that the client need not install anything…



I need to help my sister in Bangkok maintain her PC (running Windows XP), and since she's not very computer literate, I think a remote desktop software would be the best option.


However, I'm not physically there to install and configure the remote desktop client on her computer. Is there any way that I can help her with the installation and configuration (probably sending her a script which she could just execute and get it done)? She can do basic installation of Windows app (just click on Next), but further configuration could be too much for her.



Answer



http://ammyy.com


No setup, no installation, no router configuration, completely free*. Download the executable and run it, have your sister click start and read you her ID number. You download the exe file, run it, go into the "operator" tab, enter her ID, and click connect. She will be prompted to allow your connection, and when she does, you will be connected.


I've used Ammyy many, many times to help out family and friends; it's way simpler than setting up VNC or RDP over an internet connection. Gets you out of all that sticky port forwarding or VPN connections, and you won't have to walk your sister through configuring any clients on her end. All she has to do is download the program, run it, click a button and read you a number.


Also, performance is surprisingly good; I personally get speeds close to using RDP over an internet connection, but it's going to depend somewhat on where you are in relation to Bangkok.


Edit: *by completely free, I meant for personal use. There appear to also be restrictions of 15 hours per month on the free license (they state "possible" restirictions); I've never used it that frequently, so I've never come across that. It's not open source or freeware, but for one-off connections (such as helping out your sister), you really can't do better. Sorry if my original post was misleading, I hope this clarifies.


ipv4 - How to find the network address of a given subnet?


How do I find the x th subnet of X.X.X.X /XX (300 th subnet of 172.16.0.0 /29)?



Answer





  1. calculate how many address is there in /29 subnet (full IP has 32 bits, so you're left with 3 bits for subnet), 2 to the power of 3 is 8. You have 8 address per subnet.




  2. see how many /29 subnets can you have in a one /24 subnet (172.16.0.0-172.16.0.255), it 256/8 so 32 /29 subnets




  3. Divide 300 by 32 and get 9.75 so the 300th /29 subnet will be in the 10th /24 subnet (172.16.9.0-172.16.9.255), beacuse you have to take 9 full /24 subnets and part of 10th




  4. multiply 9*32 and you get that the 9th subnet ends with 288th /29 subnet, so you have to take 12 more /29 subnets from the 172.16.9.0/24, which is (12-1)*8 so the 300th is 172.16.9.88.0/29




backup - Backing up Google Chrome


Having recently switched to Google Chrome, I was wondering what files and directories I should be including in my backups to make sure that bookmarks and history are included. Along the same lines, is there a process to restore these settings on a new install?


This is on Windows Vista.



Answer



On Windows, Google Chrome and Chromium store their histories, bookmarks, settings, and such in the User Data directory under the program’s folder in the user’s local-data directory (ie not carried over when you log-on to other computers on the same network). Google Chrome uses the folder Google\Chrome while Chromium uses Chromium (big surprised huh?)


There are many ways to access the user’s Chrom(e|ium) folder, dynamically or statically, but the easiest, most reliable are:


For Google Chrome:
"%localappdata%\Google\Chrome\User Data"

For Chromium:
"%localappdata%\Chromium\User Data"

(You can use shell:local appdata in Explorer, but that won’t work in the command-prompt or batch scripts, so you’ll need to use the %localappdata% environment variable which should be set anyway.)


NB: the folders in question are the ones created and used by default; you could easily have Chrome/Chromium use one from elsewhere with the --user-data-dir switch.


(For brevity, henceforth, “Chrome” refers to both Google Chrome and Chromium unless otherwise noted.)




Backing up the settings and such is as simple as copying the folder and its contents since, however you don’t need to keep it all when you make a backup—especially since Chrome is currently plagued by a cancerous user-data folder.

(Make sure to quit all instances and copies of the browser so that no Chrome.exe processes remain before copying/restoring, otherwise some files will be locked, and other temporary files will remain undeleted.)


Some files and folders may or may not exist depending on the Chrome version and whether extensions, plugins, etc. have been installed.




The following files and folders are either temporary (eg cache), or regenerated/updated, and thus can be deleted or omitted from the backup.

  • UserData\​Safe Browsing Bloom    (the anti-phishing file is regularly updated anyway)

  • UserData\​Safe Browsing Bloom Filter 2    (basically the same thing, and even smaller)

  • UserData\Default\​ Cache\    (and all of its contents—whether normal, or for media—is emptied out anyway when you clear the cache)

  • UserData\Default\​Last Session    (the session and tabs files are only useful if the browser has crashed, otherwise they just get recreated the next time you run or exit Chrome)

  • UserData\Default\​Current Session    (session files hold things like the state of forms such as data typed into text fields)

  • UserData\Default\​Last Tabs    (tabs files indicate what tabs were open to what URLs)

  • UserData\Default\​Current Tabs    (Current is the status of Chrome during the most recent time it was open, while Last is the state from before it was opened—restoring a crashed session means Chrome will overwrite the Current files with the Last files)

  • UserData\Default\​Thumbnails    (this keeps graphical thumbnails of all of the the ‘most visited’ sites for display in the MRU list—whether or not they actually currently appear on the list—as well as favorite icons; known to get quite big in recent versions with even modest browsing)

  • UserData\Default\​Bookmarks.bak    (just a backup of the bookmarks file in case the regular one gets corrupt if Chrome crashes)

  • UserData\Default\​*-journal    (you will only have these if Chrome is running—in which case exit Chrome—or else if Chrome crashed)

  • UserData\Default\​JumpListIcons\    (contains ICO-format files of the favorite-icons of the open tabs)

  • UserData\Default\​Transport Security    (related to secure connections; transient)




The following files and folders are the ones you will want to keep.

  • UserData\​Local State    (this is basically just the status of the browser, eg window position, crashed or not, sessions, etc.—you don’t actually need to keep this since it is regenerated anyway, but if you want to keep the window in a specific position or something, then copy it)

  • UserData\​Custom Dictionary.txt    (whenever you “Add to dictionary” in the spell-checker)

  • UserData\Default\​*History*    (browsing history, past, present, and future—includes downloads)

  • UserData\Default\​ Cookies    (cookies, normal and extension ones if you have any installed)

  • UserData\Default\​Bookmarks    (bookmarks, of course)

  • UserData\Default\​Databases\    (per-site offline data—as yet contains very little if any useful data)

  • UserData\Default\​Extensions\    (extensions, ie installed .CRX files—or unpacked extensions)

  • UserData\Default\​Favicons    (this used to hold the favorite icons—the icons associated with pages, but these have since been moved to Thumbnails; you may have this file left over from older versions of Chrome)

  • UserData\Default\​Local Storage\    (this is where sites—and extensions—store more advanced offline data and settings as opposed to using cookies; ie a long-term storage of site-related data like a “My Documents” for the web)

  • UserData\Default\​Login Data    (this contains auto-login data—passwords are encoded, but usernames/email addresses/etc. are clear-text)

  • UserData\Default\​Plugin Data\    (data associated with various plugins, by site, often contains—only—a folder for Google Gears, containing data for sites that use Gears such as MySpace)

  • UserData\Default\​Preferences    (preferences, including pretty much all of the settings in the Wrench->Options dialog, but also installed extensions, plugins, per-page zoom and translation settings, content and privacy black/white lists, tips, and whether or not Chrome crashed last time)

  • UserData\Default\​Top Sites    (stats and info for determining MRU list on New Tab page—you'll probably notice some discrepancies, but if you like having your most visited pages available quickly, you'll want this)

  • UserData\Default\​User Scripts\    (like extensions, but less so, ie .JS files)

  • UserData\Default\​User StyleSheets\    (often only contains a blank Custom.css file, but can contain stylesheets for customizing pages and sites)

  • UserData\Default\​Visited Links    (determines purple links)

  • UserData\Default\​Web Data    (this has all of your custom searches, auto-login data, auto-complete data, credit-card/address/etc. auto-fill data—​some of this information like login data has been offloaded to other files, but may also still be present here​)




(Almost) all of the binary files that Chrome uses are SQLite3 database files—text files and Visited Links being notable exceptions. As such, before archiving a backup copy, you may want to consider using an SQLite3 tool to vacuum out the files to cut out any wasted space, and do an integrity check on them. (Note, older versions of Chrome used FTS2, which would break when vacuum’d.)

Since some files tend to get quite big after a while, you may also want to compress them if you are going to store them for a while (7-Zip is free and can compress them quite a bit at a decent speed).



Finally, if you use a browser backup tool (that supports Chrome/Chromium), make sure to use the latest version possible because since Chrome and Chromium are under constant development, the user-data folder and its contents are in flux and subject to change—some stop being used, other new ones get added, etc.—and an out-of-date backup utility can result in missing files while at the same time leaving you thinking that you are backed up.

audio - Volume Low in Chrome Browser


Volume for audio and video sounds too quiet in Chrome, e.g. on YouTube. I have tried restarting it (via the actual exit option) and then I tried restarting the computer.


Running Windows 8.1.


Volume mixer looks normal.



Answer



Please find below the steps for the volume issue in Google Chrome, on Windows OS:



  1. Open a new google chrome browser.

  2. Open the webpage by typing "chrome://plugins"

  3. Now click "+details" towards the right side of the screen.

  4. Disable the "\PepperFlash\Pepperflashplayer.dll"

  5. Let the "\Macromed\Flash\" be enabled.


Change these settings and check for the volume


networking - how does tor encrypt information from your ISP or local network?


At my work, I have a network administrator that presumably sees everything I connect to on the internet (and has banned things like Facebook, Youtube, etc). However, tor seems to let me through those blocks. How does Tor prevent my network admin and local network from seeing what I'm doing. It seems to me that everything I request from my browser must go through my work's router/network first. Can't they see these initial requests? Does this anonymity also apply to downloading?



Answer



The Wikipedia article explains this quite nicely.


Basically, you run a proxy on your system which encrypts outgoing traffic, so no, your admin cannot see what you are doing, as data only leaves your system in encrypted form.


How can I display the contents of an environment variable from the command prompt in Windows 7?


In Windows 7, when I start the Command prompt, is there any command to display the contents of an environment variable (such as the JAVA_HOME or PATH variables)?


I have tried with echo $PATH, echo PATH and $PATH but none of these work.



Answer



In Windows Command-Prompt the syntax is echo %PATH%


To get a list of all environment variables enter the command set


To send those variables to a text file enter the command set > filename.txt




Related



SSD drives lifetime



Some years ago when I was looking to buy an SSD drive, I remember reading about how SSD drives had low lifetime with frequent read/writes, so I backed off.


Now I see this in Specifications:
http://www.kingston.com/en/ssd/s#sms200s3
MTTF: 1,000,000 Hrs


That's 114 years (ok, it could be a few years less, but still WOW)


What has changed since then?
What is your personal experience about this technology?



Answer



Not to much has actually changed with the technology, more so the understanding of it. Yes with a ton of read/writes it will degrade the life of an SSD drive. Which is why you need to make sure some settings on your PC are turned off. (Specifically defrag) However not so much that it'll kill your computer within the lifetime of its use. Even if it dies 3-5 years from now, there will be better SSDs on the market for a lot cheaper than you purchased your SSD.


Personally I've got a 256gb SSD as my OS drive. I couldn't see going back to a platter drive for my operating system, and the handful of programs I have running of it. Running programs, starting up the computer, everything just goes by very quickly compared to a platter drive. The best thing you can give your computer to upgrade how quickly it responds to what you want to do is by installing an SSD.


If you haven't taken the plunge in purchasing an SSD drive. By all means do so now! There are tons of great drives out there for fairly reasonable prices. You should have no excuse as to why you haven't upgraded yet.


browser - I can't access any Microsoft website. Other sites work fine

I have tried all the Microsoft websites - microsoft.com, windows.com, live.com, even bing.com won't open. All other websites are opening. What is the problem? Google Chrome just gives the error that the website is not available. Opera gives the error "Connection closed by remote server." Internet Explorer can't open it. It just stays blank in Safari.


I'm running Windows 7 64-bit Ultimate. Chrome is throwing this error:



This webpage is not available. The webpage at microsoft.com/en/us/default.aspx might be temporarily down or it may have moved permanently to a new web address


More information on this error


Below is the original error message


Error 101 (net::ERR_CONNECTION_RESET): Unknown error.


windows 10 - Import Chrome user profile from another computer


So I recently performed a clean reinstall of Windows as my system was starting to lag horribly.


I made sure to backup my Chrome user profile (C:\Users\Username\AppData\Local\Google\Chrome\User Data\Default) to another partition before doing this, but simply copying that folder over the new install of Chrome resulted in an error message saying "Some settings were reset - Chrome detected that some of your settings were corrupted by another program and reset them to their original defaults. Learn more".


My only option from there was to click "Restore all settings to defaults", so now I have my old cache, history and bookmarks but no extensions or saved passwords from my old install. Those last two items are what I really wanted to keep the most!


I had followed this same procedure in the past to successfully transfer an entire installation, but Chrome has obviously been updated many times since then and one of those updates must have made this "security fix" (I'm sure that's what they would call it, but I call it an unnecessary nuisance!).


So does anyone know of a way to extract saved passwords and extension info from an old user profile? Even if I could just get a list of all the extensions that I had installed, so that I could manually reinstall them one by one, that would suffice. But the passwords are the most critical thing; I had username/password combos saved for ~200 sites and don't remember them all. Even if I did, I really don't like the idea of having to painstakingly log in to each site again to save the info again!


As always, MTIA :-)


EDIT: Just found this question which confirms that the ability to simply copy one profile over another has been disabled since Chrome 55 :-( Should've looked into this before reinstalling! D'oh!



Answer



Many thanks to everyone who posted answers to this question. Thanks to their insights, I was able to open the Login Data file from the old profile in ChromePass and retrieve my saved sites and passwords.


Now if only it were that simple in Chrome! All I had to provide ChromePass was my old Windows user password to decrypt all 208 passwords stored in the file. Seeing as how the process is that simple, I don't understand why Chrome doesn't have an option to do this built in. Actually yes I do: because they'd rather have everyone store their passwords on Chrome servers. God only knows what they might do with that information!


hashing - QR Codes for Files on Google Code


When you download files from Google Code now (example), in addition to the text version of the SHA1 hash, it includes a QR code of it.


The device that the file was downloaded to is the one that has to hash the file. But, if it can download the file (ie, has access to the webpage), it also has access to the text version of the hash, so the QR code seems completely useless—and more work to decode when the raw text is available. How would reading the hash into a mobile phone allow you to verify the file you download to the computer? Or if you download the file to the phone, how would you use the phone to take a picture of the QR code displayed on the webpage on its own screen?


Does anyone know what the point to the QR code is or how you would use it to verify the downloaded file (I don’t mean QR codes in general, but specifically in this context).



Answer



The QR code contains the file URL not the file SHA1 Checksum. If you check the html for the image you will see the title text says "File download URL". It is common to see these codes in situations where you may need to download the file to a mobile device or access the webpage from a mobile phone..


Programs like QuickMark can be used to scan the QR Code from your phone, and if a site doesn't provide a QR Code you can use something like this Google Chrome QR Code extension to automatically generate one. I use both of these and use them once or twice a month.


You basically then just use the camera on the phone to take a picture of the webpage while it is displayed on your desktop computer and open the URL in the mobile browser, sort of like Copy & Paste between two computers.


Windows 8.1 default (system) lock screen customization


Recently, I've reinstalled Windows on my laptop, upgrading it from Windows 7 to Windows 8.1. Now, I want to change the theme (or at least, wallpaper) which is shown on the screen before any user logs in. (Note: not the user lock screen, but the one which appears upon clean reboot - systemwide)


I don't want it to be a custom image, just another one from standard. Is there a way to do it without group policy or much tinkering with the registry? I've used one of the tricks to move User folder from system SSD drive to secondary HDD on the PC, and the result was that I couldn't upgrade to Windows 8.1. So I want to know if there is any more-or-less native way.


NOTE: this is not a duplicate of the question shown below, because my question refers to systemwide locking screen and not the user custom one. As you may guess, there's only one systemwide image per computer, but multiple user custom ones.



Answer



If you have local admin rights and Windows 8.1 Pro (does not work in non-pro versions), the correct way to do this is to do the following steps:



  • Open - Local Group Policy Editor (gpedit.msc)

  • Computer Configuration - Administrative Templates - Control Panel - Personalization

  • Set the value under "Force a specific default lock screen image"


Full details: https://support.microsoft.com/en-us/kb/2787100/en-us


Original Source: https://social.technet.microsoft.com/Forums/windows/en-us/2590f111-7709-40b9-acee-c2aeaa9a48f8/change-default-logonstartuplock-screen-in-windows-8-pro?forum=w8itprogeneral


virtualbox - Stop Ubuntu From Automatically Updating the Time


I just need to set the date temporarily. I run this


date 051918002010.00

and it sticks for just 5 seconds or so. Then it syncs with the time server. I have tried:


ps aux | grep ntp

but there is nothing there.


I need a correct answer now, more than a more detailed answer later :)


Edit: As answerers quickly discovered, my Ubuntu is running in a VirtualBox, which turned out to be relevant for some versions of the answer. Thanks to everybody.



Answer



It sounds like you're really looking for a way to run a program so that the program thinks it's running under a different date and time.


An earlier question was asked about this: Linux RunAsDate analogue? Below is the answer I gave there. Note you seem to be attempting Option 3.


The ntpdate package isn't a daemon and should not be updating your system time automatically (it should run once at boot and no more). I'm not overly familiar with VirtualBox, but I'd guess you've either got ntpd installed or the VirtualBox Guest Additions are syncing the time directly from the host OS, in which case you'll need to disable them, or use one of the wrapper libraries mentioned below in Option 2.


Update: It looks like the VirtualBox Guest Additions install /usr/sbin/vboxadd-timesync -- I'd guess this is the executable that syncs the guest clock with that of the host. Check to see if it's installed a startup script (possibly /etc/init.d/vboxadd-timesync); if so, you can stop the sync with sudo /etc/init.d/vboxadd-timesync stop. If no startup script, you can probably just kill the process.




What RunAsDate does is the following:



RunAsDate intercepts the kernel API calls that returns the current date and time (GetSystemTime, GetLocalTime, GetSystemTimeAsFileTime), and replaces the current date/time with the date/time that you specify.



Under Linux you have some options to accomplish the same thing:




  1. If you can get a Windows version of the program, you might be able to run RunAsDate under Wine (but watch out for a recent bug).




  2. Find a wrapper library to do this, or write your own. Some options are given below.




  3. Use a Virtual Machine. This is overkill, but since an OS in guest VM is completely separate from the underlying host, you can set it's system time to something completely different. It may be quicker to setup than the other options.






Option 2 can be accomplished by different methods, depending on the what you're trying to run. DaveParillo's answer below links to a DIY approach that explains the different methods and includes code for an executable. Some other options include:



command line - CMD-file and task scheduler


I want to run CMD-file, as described here.


I set run file every 5 minutes in the task scheduler. But when the scheduler runs the file - the window flashing. How to run CMD-file in background mode?


Installed Windows 7.



Answer



For full text and alternative methods see http://www.ericphelps.com/batch/samples/invisible.txt:



Save this one line of text as "invisible.vbs":


CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

To run any program or batch file invisibly, use it like this:


wscript.exe "C:\Wherever\invisible.vbs" "C:\Some Other Place\MyBatchFile.bat"

This is just a little dangerous because your batch file MUST be able to close itself and MUST never produce an error which might require user input. Otherwise the batch file will hang invisibly until system shutdown or until someone kills it with the task manager.



Monday, 27 January 2020

windows 10 - "wrong path" after running command via address bar in explorer

after I run a command via the address bar in an explorer window, the path shown in the address bar will point to the command and not to the current folder


is there any known fix how to prevent this?


steps to reproduce:



  1. open explorer

  2. place cursor into address bar

  3. run command (e.g cmd)

  4. place cursor into adress bar -> path will point to C:\Windows\System32\cmd.exe

Google chrome extension to synchronize extensions


I want to have same extensions on my pen drive chrome, windows at work, and mac at home... And no, Chrome does not sync them (just the data)! Anything that facilitates this process is welcome. I'm just asking for an extension because it's probably the easiest path. I'd welcome even something that just drops me a list of my installed extensions and make it clickable so I can go and install one by one.


Actually it seems like there's already a way to do exactly that. But I haven't tested it and it looks too complicated for regular users. So, again, extension anyone? :P


edit: Just as another reference, and it may help other people who might want just that, I've found a way to do backup and restore on windows. Again, not what I'm looking for. I don't want windows only, and I don't need a tool to manage profiles or do backup. It's more of a sync than backup. So I even changed the title.



Answer



You don't even need an extension. Just go to Chrome preferences and click "Personal Stuff" and choose "Set Up Sync..." Then enter your Google account information. Repeat this for all the computers you want synchronized. This will sync everything, passwords, extensions, bookmarks, etc. When setting up the sync, you can also specify what to sync if you only want extensions.


How do I display the current "session" name or "sockname" of a screen session in the status bar?


I run multiple screen sessions each created with 'screen -S name' and I would like to be able to display in the status bar the name I used to create the current screen session.


However, I cannot seem to accomplish this. Any ideas?



Answer



This is coming in the next version: http://savannah.gnu.org/bugs/index.php?23738


Also, you can use the terminal variable $STY, though people seem to get inconsistent results with it.


cleaning - How to clean a keyboard in Toshiba laptop?


I have Toshiba Satellite Pro P300-1CG with slim keyboard. I haven't spilled anything major on it, but I often eat in front of the laptop while watching some videos. Therefore small drops of milk and other liquids often leave spots at the laptop and sometimes go between keys. And it's not to mention small dust particles that have been falling though during last 1.5 years.


It's not that my keyboard is working badly, but I would like to have it clean. I assume I need to disassemble it. How do I do it? I would like to avoid disassembling whole laptop and there is suspicious plastic holder on the top of the keyboard (see picture) - maybe I can use it to remove just keyboard? Also keys don't go off if I just pull them up with the knife. Should I do it at all (maybe the risk to break something is too high)?


Laptop



Answer



Found this:


enter image description here


After removing this one can remove keyboard and clean it separately.


linux - Fedora: Create windows 8.1 bootable USB


I tried everything and nothing works I have 2 brand new USB keys 3 more packaged. I have 3 valid Windows 8.1 ISO files and yet no approach works.


I tried Unetbootin takes forever to copy 4.3GB to the USB stick and does not work. I tried Ask Fedora approach using:


1) Formatting USB drive to FAT32 and using:


su -c 'dd if=/home/kristjan/Prejemi/win.iso of=/dev/sdc bs=400M'

This takes 30min to complete and nothing files are copied to the drive but it does not boot. When I mount it after it's now showing as FAT but as UDF.


2) Formatting USB Drive to NTFS and using:


su -c 'dd if=/home/kristjan/Prejemi/win.iso of=/dev/sdc bs=8M'

This takes 30min same as above.


3) I tried using GParted approach shown here:
SuperUser: Windows USB from Fedora This one wants to boot but does not. I reboot, press ENTER>F12 To get to boot selection menu I select the USB drive and it does not skip back to boot selection screen like above solutions do but it just stays on a black screen with a blinking _ cursor.


4) I tried setting the boot flag from GParted and using DD but does not work either.


Why is this so hard on Linux systems. I mean on Windows/Machintosh I can create a bootable USB stick in 10min. On Linux it takes 30min to copy the ISO contents and then nothing works : (



Answer



Just now, I successfully created a bootable USB from a Windows 8.1 ISO containing a UDF filesystem. This will properly boot a UEFI machine into UEFI mode for subsequent install. It will not boot a BIOS machine or a UEFI machine in BIOS compatibility mode.




  1. Mount the ISO:


    sudo mount -t udf -o loop,ro,unhide /path/to/file.iso /mnt


  2. Insert the USB drive.




  3. Run fdisk and specify the device name of the USB drive; for example:


    sudo fdisk /dev/sdc


  4. Delete any existing partition table and create a new one.




  5. Create a new partition of at least 4.5 GB. Mark it bootable and set its type to 7 (HPFS/NTFS/ExFAT).




  6. Write changes and exit fdisk.




  7. Create a FAT-32 file system in the new partition; for example:


    sudo mkfs.vfat -F 32 /dev/sdc1


  8. Mount this partition to an existing subdirectory; for example:


    sudo mount /dev/sdc1 /media/usbstick


  9. Copy all of the files from the mounted ISO into this directory:


    sudo cp -rv /mnt/* /media/usbstick


  10. Sync the file systems just to be sure:


    sudo sync


  11. Unmount both items previously mounted:


    sudo umount /media/usbstick
    sudo umount /mnt


linux - Should I kill zombie process in my system?


Since I'm newbie in Linux/Unix systems and just read about zombie processes, I have one question. I have 10 of them right now. Do I need to kill them and if yes, why? Are they a load on my system?


592 processes: 581 sleeping, 1 running, 10 zombie, 0 stopped

Answer



You cannot kill a zombie, it is already dead.


The resources of that process are free and available to other processes. What remains is an entry in the process table. This does not have an influence on the performance, don't worry.


Linux Virtual Machine for Windows 7 that will run Keryx?


I'm having a problem getting packages onto a Linux computer that doesn't have an internet connection. The accepted answer here suggests Keryx, which needs a Linux computer with internet to get packages onto the one without.


Are there any virtual machines that I could use to run Linux on Windows 7? Specifically anything that will use Keryx and the computer's internet connection. Thanks!



Answer



You can use VirtualBox for that. Just install it and install Ubuntu in it.



VirtualBox is a general-purpose full virtualizer for x86 hardware, targeted at server, desktop and embedded use.



enter image description here


Virtualbox Website


shell - Is it possible to set a Custom quick look preview image in OS X?

Is there any way to set a custom quick look image in OS X? I'd like a command line tool or applescript to change or embed a custom preview for a zip file using a jpeg.

worksheet function - Multiple Search Formula in Excel

I am trying to find a formula which will search one cell for specific words.


I would like the outcome of the formula to be words I have selected.


The example of this I have is if one cell shows the list of ingredients, and the other cell shows a list of allergens. I need the formula to search the list of ingredients and choose the allergens.


enter image description here


I know that I could use the find function so that it came back with one result and then concatenate the results but there must be a more simple way!


Thanks

video - Repairing corrupt MP4

I took a video from my Android phone (Sony Xperia P, if you need to know), and before I could stop recording it, the phone memory got full and the phone got hanged too. I rebooted the phone, the video was there, but I couldn't play it from any media player on Android. It's in mp4 format.


So I tried to open it on PC and Mac with different video player, like VLC, quick Time, Windows Media Player etc., but none of them can play it. I know that the video is corrupted, but I believe it's repairable, since it got more than a GB in size. Is there anything that I can try to repair the video file? The video is really important.

Windows 7, Lenovo Keyboard

Have just purchased a Lenovo Keyboard with fingerprint reader, which driver do I need and where do I get it, using Windows 7

Windows 7 Black screen of death

My two week old computer went down early this afternoon. I've been working all day to fix it with no luck, I'd really appreciate any help or advice that you can offer.


I'll also mention that I am seeing tons of pages on this issue when I search, but none of the fixes I've found so far have done the trick. I have an OEM Windows license so unfortunately contacting MS will be fairly costly at this point.




The window load screen appears as normal and then my screen goes completely blank except for a white mouse pointer. The mouse pointer moves as normal but clicks / key combos / etc do nothing.


It is a new system so there have been a lot of new program installs and changes recently, however I have been too distracted by Dragon Age to have done much since the last restart.


Known changes since the last restart- Joined system to home network
Installed a Saitek joystick
Installed daemon tools immediately proceeding the crash


I can't find any similar issues related specific to either product so I assume that this is a general windows install issue, or a registry corruption that occurred during one of the installs.


Steps taken so far-



  1. Attempted to boot to safe mode & safe mode w/ cmd prompt - Same result

  2. Tried ctrl-shift-tab // ctrl-alt-delete // shift *5 - no results

  3. Attempted to boot to Low res mode - Same result

  4. Removed secondary monitor and peripherals

  5. Ran diagnostics on Memory & Hard drive - Tested Ok

  6. Ran system restore / System repair from disk

  7. Checked that Reg key @ HKEY_LOCAL_MACHINE\MySYSTEM \ControlSet00X\Services\RpcSs is set to NT AUTHORITY\NetworkService

  8. Underclocked RAM - Just in case

  9. Used RegEdit > load to get access to log files - temporally moved them

    1. Tried to view events in system32\winevt\logs\ but I can only work with command prompt / note pad so the contents are pretty garbled.

    2. Swore at computer / threatened computer - Swore at computer while threatening it




I can access command prompt using my windows disk - but i can't seem to do much as most of the system tools use dependencies that aren't loaded yet.


I am completely at a loss - Any help you can give would be greatly appreciated. The system is less than two weeks old and has been rock solid up until this point. My husband is running a system with identical hardware / OS, and has not experienced any issues to date.


Obviously I can't rule too much out at this point but I'll also mention that this is a fairly low risk computer as far as malware goes. Less than two weeks since the last install - OS / AV always up to date - no file-sharing or pirated apps.


System specs



  • OS: Windows 7 pro 64bit- Version: 61.7600.2.0.0.256.1


  • AV: Nod-32




  • Radeon HD5770 Sapphire video card



  • Core I7-860

  • Gigabyte P55-UD4P Motherboard

  • 4GB Ram : 2 X 2GB 240-PIN DIMM 256Mx64 DDR3PC3 -10600 Unbuff


--


Edit: Sorry for the lack of updates on this. I'm a bit afraid of reboots seeing that they haven't been going well for me. The problem has been reoccurring with pretty much every reboot although leaving the system off for a while solves the issue regardless of what I leave plugged in.


I removed and reseated the video card yesterday which immediately let me boot. I've done one reboot since and it actually worked although I haven't had the courage to try it again. I will keep updating as I know whether this worked or not.


Thanks again for all of the help- I can't tell you how much I appreciate it.

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...