Sunday, 31 December 2017

export - Photoshop How to save selection to PNG


I have a largish PSD file with a couple of hundred layers, that I would like to extract selected areas from into PNG files.


Areas can consist of a couple of layers.


Being new to Photoshop, I have been using the following workaround. Duplicate needed layers into a new scratch PSD file of same size, TRIM to transparency, Save As PNG, undo TRIM, hide layers, rinse and repeat...


I suppose I could do it without the scratch file and just crop selection, Save As PNG and undo, but there must be a nicer method.


What other ways are there to accomplish this export of a selected area to PNG?


EDIT: This is on Windows Xp running Photoshop CS3 Extended



Answer




  • Make your selection

  • Edit -> Copy Merged

  • File -> New (Photoshop should automatically suggest a new canvas size to match the selection size)

  • Edit -> Paste

  • File -> Save As (PNG)

  • Rinse and repeat... (keyboard shortcuts are handy here)


(Tested on Photoshop CS4)


How can I install Linux on an old laptop without CD-ROM or bootable USB (have Windows installed)

I have an old Compaq Armada M700 laptop with 256MB of RAM and an 800MHz Pentium III CPU. I would like to install Linux on the machine for web browsing and use as an SSH client.


Unfortunately the CD-ROM drive is broken and this laptop can't boot from USB.


Right now I have a working copy of Windows XP onboard.


One thing I tried was putting two Linux installers on a USB stick, and running them from Windows:



  • Linux Mint Installator - installation completes on Windows but shows errors when booting.

  • WUBI with Ubuntu 9.10 and 11.04 - both install okay in Windows, but hang when booting.


Perhaps someone could recommend how I can install any other small Linux distributions from Windows?

virtualbox - Converting existing PC into a VM with Virtual Box

I'd like to convert my laptop (Windows Vista) into a VirtualBox VM. I think there is a utility for VMWare, but is it possible to do with Virtual Box?


Also, do I need another (host) PC to run the conversion process?

macos - Is there a way to perform an install of osx from a flash drive?


I have a mac mini that currently has osx 10.3. I want to upgrade it ultimately to Leopard (10.5). My problem is that the mini only has a CD drive and 10.4/10.5 seem to only come on DVDs. Is there a way I can create an install/upgrade disk on a flash drive to perform my install/upgrade? If there is a way to do it, would a 4GB flash drive work or would I need a larger flash drive?



Answer



My method was to use a freshly reformatted hard drive in an external USB enclosure, because I didn't have a large enough flash drive. It requires about 7.5GB (DVD-DL), so no, a 4GB won't work, but you can pick up an 8GB or use the external like I did. Follow the instructions at macinverse and it goes very quickly.


memory - How important is the 1GB RAM per 1TB disk space rule for ZFS?

I'm planning on building my first NAS box and currently I'm considering FreeNAS and ZFS for it. I read up on ZFS and it's feature set sounds interesting, although I will probably only use a fraction of it.


Most guides say that the recommended rule of thumb is that you need 1 GB of (ECC-)RAM for every TB of disk space in your pool. So my question is, what is the actual (expected) impact on ignoring this rule?


Here is a setup of someone who build a 71 TiB NAS with ZFS and 16GB RAM. According to him it run's like a charm. He uses Linux however (if this makes a difference).


So apparently you don't actually need 96 or even 64 Gigs of RAM to run such a large pool. But the rule must be there for a reason. So what happens if you do not have the recommended amount of RAM? Is it just a bit slower or do you run the risk of losing data or accessing your data at a snails pace only?




I realize that this has also a lot to do with the features that will be used, so here are the parameters I'm considering:



  • It's a home system

  • 16GB ECC RAM (the maximum supported by the setup I have in mind)

  • No deduplication, no ZIL, no L2ARC

  • Probably with compression enabled

  • Will store mostly media files of various sizes

  • Will probably run bit torrent or similar services (frequent smaller reads/writes)

  • 4 disks, probably 5 TB each

  • Actual pool setup will probably be part of another question but I think no RAIDZ (although I would be interested to know if it actually makes a difference in this context), probably two pools with two disks each (for 10TB netto storage), one acting as backup

windows 8.1 - How can I force my laptop use NVIDIA instead of Intel?

I have a Lenovo G710 laptop with integrated Nvidia GeForce GT 820M and an Intel HD Graphics 4600 card. My problem is the default card is the Intel one and it provides very bad performance with Windows 8.1. I am looking at gpu-z application and see that only the intel card is working.


I searched the Internet for a solution and found only these instructions that don't work for me:




  1. Open Nvidia control panel




  2. Select Manage 3D settings




  3. Global Settings tab




  4. Switch the drop-down from Auto to Nvidia




  5. Reboot your computer



    • both cards updated



autohotkey - Set Scaling of individual applications in Windows

I occurs to be that I want any app I'm not looking at to be scaled down (to say 100%), but the one in focus to be scaled up (to 200%). This would both make maximal use of my hi-res laptop screen for peripheral vision and give my eyes a rest for the focused task.


I'm not talking about per-application, like Set DPI of individual applications in Windows


I want any app that supports scaling to be re-scaled when I'm looking at it.


The magnifier sucks, in case you thought of that :)


I'm supposing it needs to be an autohotkey (AHK) script.


Thanks, Martin.

64 bit - 4.00GB (3.25GB usable) in Windows 7 x64

I have set up Windows 7 Ultimate 64-bit on my PC. I have 4GB RAM and my BIOS states the correct amount (4096MB), but Windows (System Manager) says I have 4.00GB (3.25GB usable).


This seems to be a popular issue, and I have looked for an integrated video card (integrated with my chipset) to disable but haven't found anything.


What else can be preventing me from seeing all 4GB? When I had Vista 32-bit, it would say 3.25GB RAM not 4.00GB (3.25GB usable). I have a 64-bit CPU and when I bought my RAM, I used a compatibility tool from Crucial (the memory vendor) to test how much memory my PC can support and 4GB was the answer (this was a Windows app I think).


Chipset is Intel(R) G33/G31/P35/P31 Express Chipset PCI Express


In the BIOS, I looked for an onboard video card (integrated) and there was no such thing, but a couple of other onboard devices. There are also no "Resource Mappings" settings.


FURTHER DETAILS:


Chipset
North Bridge: Intel Bearlake G33
South Bridge: Intel 82801IR ICH9R

Maximum Memory Amount 8 GB

Graphics Controller Type Intel GMA 3100 (Enabled)

I guess the first thing is, how do I disable the graphics controller?


EDIT: This thread indicates the issue is with memory mapped devices, but someone on this thread says that does not apply to 64-bit. The rest of the comments points to a motherboard issue for the guy who started that thread.

windows 7 - what is en.v9.com and how to remove it?

I was reinstalling Windows (namely installing Windows 8 instead of Windows 7). But then Chrome suddenly closed. When I started it again, it had that annoying en.v9.com home page.


I don't know how to get rid of it. I tried removing the argument in Chrome's shortcut and changing Chrome settings (Set pages). Also, it made itself the default search engine and who knows what else. I thought that it must be µTorrent's doing. So I decided to:



  1. Reinstall Windows once again

  2. Give Tixity a try. To my surprise, just after installing Windows 8 and running Internet Explorer, I saw that very en.v9.com page again.


I'm now going to reinstall Windows once again, but move the content of the disk into a folder first, so that Windows doesn't inherit anything, if that's what's happening.


I'm open to your suggestions. I doubt reinstalling windows will do any better. Also, do you know by any chance what it is and where it came from? I saw a similar report on µTorrent's forum.


UPDATE I reformatted the hard drive, installed Windows and I can't see en.v9.com anywhere now.

drivers - Alternative to setpoint that allows key configuration profiles for multiple mice?


I have 2 mice: Logitech MX Revolution and Razer DeathAdder.


I use my mx revolution for browsing internet (I set up a lot of hotkeys on all my buttons to make browsing really convenient) and the deathadder for gaming (the mouse is a lot more accurate and smooth).


The problem is that by having two mice, setpoint randomly forgets its settings once in a while (I'm assuming due to getting confused why theres two input devices), and I constantly have to restart setpoint (every few minutes) to get it to rerecognize that the



Answer



This is the ultimate tool of them all. (enhances SetPoint possibilities)



http://uberoptions.net/



enter image description here


bashrc - Is it possible to override the command line's built in "cd" command?


Just about every time I 'cd' to a different directory on my machine (in this case, running Mac OS X 10.6.7) via the command line (which is bash), I immediately type 'ls' to get the list of contents in that directory. I'm trying to figure out a way to override 'cd' so that it changes to the requested directory and then gives me the list in one shot.


I've been able to get the basic functionality I'm looking for working by with the following line added to my ~/.bash_profile


function cl() { cd "$@"; ls -l; }

This works as expected. Changing to the requested directory and then showing me the contents. Where I run into an issue is trying to override "cd" itself instead of creating a new "cl" command.


The following things do not work


##### Attempt 1 #####
# Hangs the command line

function cd() { cd "$@"; ls -l; }


##### Attempt 2 #####
# Hangs the command line

function cd() { 'cd' "$@"; ls -l; }


##### Attempt 3 #####
# Does not change directory.
# Does list contents, but of the directory where you started.

function cd() { /usr/bin/cd "$@"; ls -l; }


#### Other attempts that fail in various ways #####
alias cd=cd "$@"; ls -la;
alias cd="cd '$@'; ls -la;"
alias cd='cd "$@"'; ls -la;
alias cd=/usr/bin/cd "$@"; ls -la;

I also tried several other iterations that aren't listed as well as making an alias that points to the working 'cl' function. None of which worked.


What I've read in documentation talks about the fact that 'cd' can't be run as an external command (which is what I understand to be the way the function would need to use it).


So, I can currently use my "cl" command and get what I want, but the question is/remains:


Is there a way to override the behavior of 'cd' to have it change to the requested directory and then do something else afterward?



Answer



The following should work:


function cd() { builtin cd "$@" && ls -l; }

Since the function is on a single line, ensure that it is terminated with ; as above in order to work correctly.


Saturday, 30 December 2017

ffmpeg - How to set circle mask using geq filter

I can creat rectangle mask but not creat circle mask. What do I set geq filter options?


rectangle mask setting


ffplay -f lavfi color,geq='st(0,between(X,W/3,2*W/3)*between(Y,H/3,2*H/3));ld(0)*255:128:128'

circle mask image sample


enter image description here

images - Mass rescaling of PNGs


I have a bunch of PNG files that I want to rescale.


Oversimplifying a little, let's say I have files named:



  • apple@2x.png

  • orange@2x.png

  • pear@2x.png


and so on, and I want to make:



  • apple.png

  • orange.png

  • pear.png,


and so on, with the output files all at half the scale of the corresponding input files.


Is there a good tool for that?


I have about 200 input files, so preferably the whole process would be automated.


EDIT: I'm on a mac.



Answer



Yep as mentioned by Ignacio, the convert function from ImageMagick can do so.


If you have access to a Unix based shell, e.g. Linux or Mac terminal, something like this will do:


cd folder-with-the-png-files
for i in *.png; do convert $i -resize 50% ${i/.png/}.resized.png; done

The above command will resize all the images in the folder and save them as xxx.resized.jpg.


Note however, that you may need to install ImageMagick first...


windows 7 - Alert when someone connects to my PC


I'm sharing various folders on my Windows 7 PC. When I go to the Computer Management section, I can see if there are any open sessions in my shared folder. When I connect to the PC from another computer, the Sessions section displays information about the connecting computer, such as its IP address. Is there a way that I can get an alert pop up on my Windows 7 PC whenever a new session is opened? So, instead of me having to manually check if someone has connected to my network, I get a popup appearing stating that a new session has started with a certain computer. It would be preferable if this was possible without downloading any tools.



Answer



If you're looking for a tool to alert you when someone is accessing your shared folders, see this article:
Monitor and Notify when Shared Folders being Accessed (NetShareMonitor).


For a tool that can tell what file the user is actually accessing and can log it down for future reference:
Track Who Modified or Deleted Files in Your Shared Folder (System Tray Share Monitor).


How to create a Microsoft Word 'template' for a set of image postcards

I need to create what are essentially 'postcards'. That is each page will contain a photo with a caption underneath. One per page, all images are the same dimensions. There are about 100 images that need to be added with different captions.


This really isn't a technically a template because the image will be different on each page and I'm not sure if there's any built in way of doing this - or if I need a macro or something else altogether.


Ideally I need to be able to resize the images after they've been imported into the document, but that's not essential.


(Word is not essential - something that would create PDFs would be fine too)

linux - Why is my SSH login slow?


I'm seeing delays in SSH Logins. Specifically, there are 2 spots where I see a range from instantaneous to multi-second delays.



  1. Between issuing the ssh command and getting a login prompt and

  2. between entering the passphrase and having the shell load


Now, specifically I'm looking at ssh details only here. Obviously network latency, speed of the hardware and OSes involved, complex login scripts, etc can cause delays. For context I ssh to a vast multitude of linux distributions and some Solaris hosts using mostly Ubuntu, CentOS, and MacOS X as my client systems. Almost all of the time, the ssh server configuration is unchanged from the OS's default settings.


What ssh server configurations should I be interested in? Are there OS/kernel parameters that can be tuned? Login shell tricks? Etc?



Answer



Try setting UseDNS to no in /etc/sshd_config or /etc/ssh/sshd_config.


command line - How do you change the color scheme in bash on Ubuntu for Windows?


I've tried to create color schemes with https://terminal.sexy and http://ciembor.github.io/4bit/ but I can't get any of their exports to work with bash on Ubuntu on Windows.


What's the correct approach to customize the colors in boUoW?



Answer



The problem is not specific to bash on Ubuntu for Windows, as the terminal is still provided by conhost.exe.


To change the colors, you can go into the Defaults:


enter image description here


And then you can click each individual color and change it to some other color.


enter image description here


The process is somewhat confusing, because by clicking a color rectangle, you're changing what is selected as the Screen Background. So you first have to change that selection, adjust the color and then change the selection back to your desired background color.


Overall, it is easier to just go with a different terminal or console emulator altogether. I personally use ConEmu now, which allows you to change color schemes much easier.


Windows 10 Quick access jumping to another folder


In the Windows 10 Quick access menu, whenever I select the Downloads/Documents/Pictures folder it will automatically jump to its related folder. This is very annoying and I couldn't find any options to stop this behavior.


It's happening to me on a brand new Windows 10 installation (build 10586.164). I made a crappy screen recording of my problem where it keeps jumping:


http://i.imgur.com/Tk25o3R.webm



Answer



Make sure the circled option is not ticked. If it's already the case, try to toggle it (tick -> ok -> untick -> ok).


enter image description here


If it still doesn't work, then your Windows is messed up somehow.


Using fuse and webdav on linux vps

I have a 20GB VPS running Linux 2.6.32-042stab124.2 The server is used to automatically analyze big firmware files, therefore I want to mount my 1TB webdav using davfs2.


Davfs2 depends on fuse, I have fuse installed but I get this error:


modprobe: ERROR: ../libkmod/libkmod.c:508 kmod_lookup_alias_from_builtin_file() could not open builtin file '/lib/modules/2.6.32-042stab124.2/modules.builtin.bin' modprobe: FATAL: Module fuse not found.


This is due to my linux kernel being quite old but my vps provider does not allow installing a newer kernel.


Is there anything I can do to still extend the storage without having to pay my VPS provider for expensive storage?

Word document has very strange "hidden" formating after converting from PDF to .docx


I have a PDF document with my resume which I need to edit. I used this service to convert it to doc. I opened it in Word 2010 and saved it as .docx. There are some bizzare problems where there's empty space and if you try to delete it text gets shifted into vertical columns. How can I fix this? I'm afraid this document has a lot of private information and I can't just fill in dummy text, then the formatting gets even more messed up :/ Otherwise I'd post screen shots.



Answer



You might have luck copying and pasting chunks of content one at a time to a new document. Even if this doesn't work you may find the root cause of whats causing the strange formatting.


windows 8 - Force a program to run on x86?



I'm using Windows 8.1 x64, and I'm trying a legacy app.


I get an error message complaining that the program is not compatible with x64.


Is there a way to force a program to run on 32-bit mode on a 64-bit system?


Here are some screenshots, that might shed a light on what type of program this is:


I run the program pointed to by the arrow, and the message show up one after the other (when clicking OK):
enter image description here
enter image description here
enter image description here



Answer



Since you have provided so little information, I am going to hazard a guess that the program your are running is not actually 32 bit, but 16 bit.


Look at the title bar of the first screenshot. It says "Unsupported 16-Bit Application"


32 bit Windows applications should run under 64 bit Windows. 16 bit applications will not.


I believe if you really have to run this application, you can get around this by running 16 bit application in a 32 bit virtual machine.


installation - Is it possible to enable logging or any kind of debug mode for the Office Deployment Tool?


I'm having a difficult issue with installing Office 2016 using the Office Deployment Tool (ODT). The problem is compounded by the fact that I can't see any way to get information about what ODT is actually doing - it simply gives this vague status message, and no other information beyond error messages (and I've extracted as much relevant info from those as I can).



We're getting things ready



According to this MS blog article from 2010, for earlier versions of Office it was possible to enable "Verbose logging" for their installers:



The first thing to do when troubleshooting Office install failures is to ensure that MSI verbose logging is enabled. In Office 2007/2010 there is a setup.exe log file that gets created by default, but it does not give the amount of detail that is usually required to diagnose an installation failure. With verbose MSI logging enabled we will get a verbose log file for each component that Office 2007/2010 installs. We will have a verbose log for the install of the Word component, one for Excel, and so on.


To enable verbose logging you will want to set the following registry keys.


 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer] 
"Debug"=dword:00000007
"Logging"="voicewarmup"

However, this is specific to the old installation procedure which appears to have been per application ("a verbose log for the install of the Word component, one for Excel, and so on"), whereas my understanding is that ODT (introduced with Office 2013) installs them all as one.


Is there anything like this that allows verbose logging, or any other form of debugging, for installs using the Office Deployment Tool with Office 2016?



Answer



It turns out logging settings for ODT is controlled by the Configuration.xml config file, which toggles between Off and Standard logging.


From the reference for the config xml, the default is Standard logging, saved to %TEMP%.


I had trouble finding the relevant logs there, so I got easier-to-use results by creating a log folder in the folder I was using for ODT and adding the following to my config file, below the but outside the :


  

The log files themselves have a filename with no reference to ODT (hence my problems finding them in %TEMP%), of format PCNAME-DATESTAMP-TIMESTAMP for example MYPC-20151120-1330.




Here's an example of a complete configuration that worked for me, including the logging config, so you can see more easily where it goes:













usb - Can I use a charger with more output amperage than the device needs?


I've just bought a portable battery, but the portable battery don't comes with an adapter for the house current; it only comes with a USB cable so I can charge it with my laptop. My mobile phone came with a charger, and I want to know if is safe to use that charger with the battery without problems, even though the output has a higher amperage. These are the specifications:


Battery input: 5V, 1A
Charger output: 5V, 2A


Will the output only give the quantity that the input is requesting, or will the input overheat because it cannot handle all the current it receives?



Answer



Yes, it is absolutely safe to charge a device with a charger that has more current capacity than needed.


Ohm's law tells us the relation between current, voltage, and resistance:



I = V / R
(current = voltage / resistance)

Since the voltage is held constant (5V), the only factor that determines current draw is the load (another term for resistance) the device places on the charger. Thus, the device will only draw as much current as it needs and no more.


Speaking from personal experience, I've had no problems charging my phone (which only draws 700 mA) with my Kindle charger (850 mA) or my iPad charger (2.1 A).


boot - Grub "no such device" error does not correspond to config

GRUB is failing to boot. BIOS tries to boot the second hard drive first (in Legacy Mode, and the first hard drive is Windows) but this yields a no such device: cfb69400... error.


The given id does not appear in grub.cfg or in the output of blkid -o full -s UUID.


grub-install /dev/sdb reports no errors. Grub was mistakenly installed on /dev/sda during an earlier install, and booting from this disk DOES work (using UEFI), but that's not what I need.


I can't understand where this nonexistant hard drive id is coming from, if grub-install worked and grub.cfg doesn't contain it.


How should I proceed? Thanks.

windows 7 - What to do with a ton of extra memory?


I have 8gigs of RAM in this machine. I never really use more than say 4gigs (includes my virtual machines I use for dev testing).


What can I do with this extra space to best improve system performance?


Some guesses:



  • Improve my disk performance by turning off the pagefile?

  • Improve my disk performance by increasing the disk cache amount?

  • Move temporary folders to a ramdisk?

  • Somehow configure SuperFetch to cache more? (currently 1.5gigs)

  • Any other suggestions??


This is on 64-bit Windows 7.



Answer



Let Windows manage the memory. It does a much better job than you can, even if you understand how it works, which you probably don't. A RAMDISK is almost always a poor use of memory. Disabling the pagefile will more often than not impair performance.


formatting - Windows installation: Couldn't create a new partition or locate an existing one


I was trying to get a clean Windows installation on my hard drive, but am running into some issues. I get to the part where I need to select which hard drive I want to install Windows on. I have 2 harddrives, but both give this error:



We couldn't create a new partition or locate an existing one. For more information, see the Setup log files.



Extra info:



  • Trying to install Windows 8.1

  • The computer had Windows 8.1 installed before that too

  • I'm installing through an USB drive with MBR partition scheme

  • Screenshot of the error message

  • My BIOS settings: 1, 2, 3

  • I'm unable to copy or upload my Setup log files (since no OS) but I seem to be getting the exact same ones as here


Things I have tried:



  • Cleaning the DISKPART

  • Formatting the drives before attempting to install Windows

  • Deleting and re-adding the drives

  • Deleting and attempting to install on unallocated space

  • Changing the boot order in the BIOS between Harddrive and USB

  • Changing the SATA mode in the BIOS between AHCI and IDE

  • Changing the EFI mode in the BIOS

  • Disabling USB Legacy Boot mode and re-enabling it again

  • Resetting the PC through the advanced Repair options, however this would corrupt the USB drive and result in this error

  • Plugging out one of the hard drives so there was only one to install to

  • Unplugging the USB, however it wouldn't let me continue the installation or even get to the first step without the USB.

  • Fixing the MBR

  • Tried Windows 7

  • Resetting the BIOS to default Factory settings


None of these solutions worked.



Answer



Apparently my specific BIOS version simply did not allow OS installation through USB:


Serial ATA AHCI BIOS, Version iSrc 1.20E
Copyright (c) 2003-2008 Intel Corporation
**This version supports only Hard Disk and CDROM disks.**
Please wait. This will take few seconds.

This would appear for about 0,5 sec during the boot sequence.


I found an old Windows 7 CDRom and it's installing without issues now.


How to change active boot partition of Windows 8.1 UEFI?


I've a 64 bit Windows 8.1 on GPT / UEFI and am trying to boot to another OS without a CD-ROM or external harddisk.


I've created a fresh partition (Z:) and copied Puppy Linux.iso over to it. However, I can't change the active partition to Z:. diskmgmt.msc's "Mark Partition as Active" is grayed out:


enter image description here


diskpart's active command also doesn't work:



–§–  The selected disk is not a fixed MBR disk.


The ACTIVE command can only be used on fixed MBR disks.



I've also tried both EasyBCD and EasyUEFi, to no avail.


How can we change the boot partition and boot to another OS ?



Answer



It's possible, but not certain, that you'll be able to boot the image you copied using my rEFInd boot manager. You can test this without installing anything to your hard disk by downloading the USB flash drive or CD-R image, preparing a boot medium with it, and booting it. If you're lucky, you'll see one or more entries for the Linux kernel(s) and/or the EFI boot loader from the Puppy Linux image you copied to your hard disk, and selecting that image should boot the OS.


That said, installing an OS in this way is highly non-standard, and there are a number of reasons why using rEFInd might not help in your case. I'm not very familiar with Puppy Linux, so I can't say how you're supposed to install it to a hard disk. Skimming its main page, I get the impression that it's intended mainly for use on USB flash drives and CD-R media, although there is one passing reference to installing it to hard disks. If you want to run something from your hard disk, there's a good chance that another distribution would be a better choice.


linux - Weird noise while scanning, using scanimage and a Canon Lide 35


I'm trying to scan a bunch of images, using xsane's scanimage :


scanimage --format=tiff --batch --batch-prompt

This command scans the first picture perfectly, but as soon as I press enter, the scanner makes a weird noise, and the scanning "arm" moves very, very slowly.


If I stop scanimage and start again, it scans normally again.


Is there another scanimage option that I need to add? I've checked the man page, but can't see what I'm missing.


Edit: the problem seems to be that the scanning "arm" doesn't go back to it's original position after the first scan.



Answer



I've found this link, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525963, where the guy has the same problem :



leads to the optical array moving very slowly and the motor making lots of noise while doing so (after scanning the first page). Interrupting the scan (CTRL-C) doesn't help, one has to unplug the scanner.



It seems to be a libsane bug, fixed in the next version.


Ok thanks.


I've got to stop answering my own questions. :)


EDIT : Got it to work by downloading the following packages from the next version of Ubuntu :



worksheet function - How to remove it items from one Excel list, if the same item exist in different list


I know nothing about Excel, so the first thing I would like to do is to remove any duplicates from within the lists themselves.


But then I would also like any rows from list B that has a duplicate row in list A to be removed.


For example, if the email John@John.com is in list B and there is also a John@john.com in list A, I want to remove John@john.com from list B.


here is a pic of situation/problem



Answer



To remove the duplicates:



  1. Select the range of cells, or make sure that the active cell is in a table.

  2. On the Data tab, in the Data Tools group, click Remove Duplicates.enter image description here


To remove duplicates form list A in list B:


=IF(COUNTIF(ListB!$A:$A;ListA!A1)>0;"";ListB!A1)


First of all, you need to make a new sheet ListC For example, This is what you should paste into ListC at A1 and pull it down across.
Of course you'll have to change ListA! & ListB! by the names of your sheets.


linux - How to automatically restart MySQL and MongoDB when being unresponsive?


I’m running a simple development server (Ubuntu) on which MySQL and MongoDB sometimes crash. I always restart them with sudo service mysql restart.


Although I know I need to investigate why they crash—and I will—I’m currently looking for a way to automatically restart them after they've crashed. I guess I need to have some kind of daemon which pings them and restarts them if they are not responsive anymore, but I'm unsure of how to do this.


I read about tools like Nagios, but I guess that’s a bit overkill for my situation.


Does anybody know how I can get started?



Answer




I read about tools like Nagios, but I guess that’s a bit overkill for my situation.


Does anybody know how I can get started?



Easy. Look into setting up monitoring configurations with Monit. It’s a lightweight and easy to setup system monitoring tool that is very useful to setup in scenarios exactly as you describe; service goes down, restart it and alert me about it.


I’ve mainly use it for Apache web servers, but there are lots of examples of what can be done for other programs/software such as MySQL and such.


Setting up Monit.


The way I set it up is line this. First, install the Monit program itself like this:


sudo apt-get install monit

Once installed, then edit the config here; I prefer to use nano but feel free to use whatever text editor you prefer:


sudo nano /etc/monit/monitrc

Adjust the default daemon values to check services every 60 seconds with a start delay of 120:


set daemon 60
with start delay 60

Then find the mailserver area of monitrc and add the following line. Postfix or an SMTP needs to be active for this to work. I typically have Postfix installed on my servers so I use the following setup:


set mailserver localhost

Then I make sure a Monit config directory is setup like this:


sudo mkdir -p /etc/monit/conf.d

Setting up a Monit Apache2 monitoring ruleset.


Now—like I said—I mainly use Monit for Apache monitoring so this is a simple config I like to use but the basic concept is similar for MySQL, MongoDB or other things. I would save it in this file:


sudo nano /etc/monit/conf.d/apache2.conf

And this would be the contents of that file:


check process apache with pidfile /var/run/apache2.pid
start "/usr/sbin/service apache2 start"
stop "/usr/sbin/service apache2 stop"
if failed host 127.0.0.1 port 80
with timeout 15 seconds
then restart
alert email_address@example.com only on { timeout, nonexist }

The syntax is fairly self-explanatory, but basically:



  • The process hinges on the apache2.pid; be sure to change that to match the actual location of your apache2.pid or httpd.pid in your environment.

  • Then has commands connected to the processes of start and stop.

  • And has logic that monitors the web server on port 80 on localhost (127.0.0.1)

  • And only acts of the server is unreachable for 15 seconds.

  • An if it has to act, it attempts a restart.

  • And then sends an alert to the specified email address on incidents of the server timing out or not existing.


Setting up a Monit MySQL monitoring ruleset.


Based on the examples I linked to above, I would assume a config like this would work for MySQL. First, create a file like this:


sudo nano /etc/monit/conf.d/mysql.conf

And I have adapted the example so it—I would assume—behaves similarly to what I have setup for Apache:


check process mysqld with pidfile /var/run/mysqld/mysqld.pid
start program = "/usr/sbin/service mysql start"
stop program = "/usr/sbin/service mysql stop"
if failed host 127.0.0.1 port 3306 protocol mysql
with timeout 15 seconds
then restart
alert email_address@example.com only on { timeout, nonexist }

Of course that should be tweaked to match your actual working environment—such as adjusting the location of the mysqld.pid, the email address and such—but past that it’s fairly generic in ideas/implementation.


Once that is set, restart monit and all should be good:


sudo service monit restart

Setting up a Monit MongoDB monitoring ruleset.


To create a MongoDB monitoring ruleset, create a file like this:


sudo nano /etc/monit/conf.d/mongod.conf

And here is the MongoDB monitoring rule; note this matches the active MongoDB daemon and not a PID (aka: mongod.lock) since it didn’t seem to work with that:


check process mongod matching "/usr/bin/mongod"
start program = "/usr/sbin/service mongod start"
stop program = "/usr/sbin/service mongod stop"
if failed host 127.0.0.1 port 27017 protocol http
with timeout 15 seconds
then restart
alert email_address@example.com only on { timeout, nonexist }

Of course that should be tweaked to match your actual working environment—such as adjusting the actual path of the /usr/bin/mongod binary, the email address and such—but past that it’s fairly generic in ideas/implementation.


Once that is set, restart monit and all should be good:


sudo service monit restart

Monitoring Monit.


You can follow the Monit log to see it in action:


sudo tail -f -n 200 /var/log/monit.log

And as a test, you can simply stop the MySQL or MongoDB server and then see what shows up in that log. If all goes well you should see the whole monitoring process and restart happen including an email being sent to the address you have set in the config.


How to make my Nvidia Graphic Card is the Default in PES 2015


I had PES 2015 game and it's always use Intel(R) HD Graphics as a default How to change that to Nvidia ?



Answer



In addition to Vinayak's answer: To default that choice you can follow Vinayak's instructions but then instead of clicking High-performance NVIDIA processor you click on the option to change the default GPU. The NVIDIA-configuration panel pops open on Manage 3D-settings -> the 2nd tab Program settings where you can select for each seperate program which GPU should be used.
If your program/game doesn't show up in the dropdown list, click browse, locate your game-folder (PES 2015 in your case) and search and select the .exe (PES2015.exe I presume).
Select the preferred GPU, and don't forget to save/apply the settings.


ics - Windows 7 share internet connection with multiple network interfaces

On Windows 7 an existing internet connection can be shared with one other network interface through the default system control center.
In my case, however, I need to share the connection with more than one interface. Is it possible without installing any additional software?


To setup ICS for a single interface I have used the following option: Properties of Adapter -> Details -> Sharing -> Allow other users...

Friday, 29 December 2017

performance - Windows 7 starts getting sluggish over a few days


Myself and the other developer are running Windows 7 Enterprise 64 bit with 8GB RAM on different Gigabyte motherboards with Quad core Intel CPUs. Most of the time, it runs like a dream. We use VMware workstation a lot (hence the 8GB) and that works well.


Except... now and then, after the PCs have been on for a few days, the whole system starts getting really sluggish doing certain tasks. The other's developer's system is far worse than mine with it taking up to a minute to launch IE. Today, mine has gone sluggish but nowhere near as bad. For example, normally when I click on a new tab in IE, it's instant. Today, there's an obvious delay. Right-clicking in this window to trigger iSpell is normally instant, right now it takes about five seconds. I've got resource monitor open on my second monitor and when I did that right-click, there was no obvious peak in CPU, disk or memory.


A reboot does fix it so it does sound like a resource issue but haven't a clue what might be to blame. The two computers have similarities (same spec) but also differences (like motherboard, RAM & CPU models).


So I guess the question is, any pointers on diagnosing why a PC is sluggish? What could cause such a right-click slow down in IE for example? It sounds like such a simple operation.


NOTE: whilst typing this message alone, it was fine performance wise. I can click around the page no problem but right-click still is noticeable slow. Will reboot over lunch...



Answer



It's possible we'll never know the exact answer to this one as the problem has gone away over time. Maybe it was a bug in Windows 7 fixed with one of the many hot fixes or maybe it was a problem on our infrastructure & servers that equally faded away.


Cheers. Rob.


Is there a way to reduce the memory usage of Firefox?


On my notebook with 2GB and Windows XP, Firefox 3.5.2 uses about 150MB of the memory with 4 tabs open. Is there a way to reduce the amount of memory that Firefox consumes?



Answer



This works wonders!



  • Check your Extensions and Themes. (By running Firefox in safe mode.)

  • Check the Plug-ins.

  • Clear Download History.

  • Restart Firefox Periodically.

  • Assign Memory Cache on Firefox. (browser.cache.memory.enable and browser.cache.memory.capacity)

  • Release Memory when Firefox is minimized. (config.trim_on_minimize)


wireless networking - How to find the MAC addresses of an unsecure network, on Windows, using the easiest steps?

As I try to prove that an insecure network, even with MAC filtering feature, is a bad thing (link here) , I've tried to find out the easiest way to do so.


I'm trying to show that it's easy to enter such a network . I've already seen many links saying this, and that it's easy to do it.


Since Windows is still the most popular PC OS, I've tried to find answers about it. I know that linux is very popular for this task and that there is even a linux distro exactly for these type of security checks (called "backtrack" ), but I want to show that it is easy for everyone.


I also know that there are even tutorials for Windows (like this one) but i couldn't find any that involves a working , free solution .


What I know is that proving this would take 2 steps:




  1. find the MAC addresses of devices that are already connected to the insecure network.




  2. spoof the MAC address of one of them.




for #2 i've find some easy apps (like etherChange for windows, and MacMan for Android).


However, for #1 I couldn't find an easy, free solution on Windows.


Can anyone please help me with this?


Am I even in the right direction? Maybe I could do packets sniffing after spoofing the MAC address of the access point itself? If so, what should I search for there, and which tool is the easiest for this task?

windows - Did my USB Drive just die?

I have a 32 GB USB stick. I was in Mac (VMWare) putting some stuff on. Then accidentally removed the drive. I put it back in, and wanted to format it. Using disk utility, I chose 1 partition, it automatically filled in 312 GB and I just clicked format or whatever. It didn't take long, then I could see the progress bar hanging at "Waiting for device to reconnect". Nothing happened for a while so I ejected it. Now comes the problem:


In Disk Utility (Mac): No sign of the USB drive.


In Paragon Partition Manager (Windows): No sign of the USB drive.


In Disk Manager (Windows): I can see that it's there. But it says: Disk 1 Removable (D:) No Media. When I right click it, I can only assign drive letters to it. No way to format.


In diskpart (Windows): diskpart list will show me the following: Disk 1, Status: No Media, Total Size: 0 B. When I eject the drive, the disk 1 will disappear. So I know that it's this drive. If I type clean, it will say that "There is no media in the device".


In HDD Low Level Format Tool 4.25 (Windows): Doesn't detect it at all.


In Device Manager (Windows): It is detected as USB Mass Storage Device.


In Gparted (Linux): Doesn't detect it.


In HP USB Disk Storage Format Tool 2.1.8 (Windows): It detects device as: "GENERIC USB Mass Storage 1.00 (0 MB) (D:)". When I press Start it gives me this error: "There is no media in the specified device"


In BIOS: Detected


In Spinrite (Live Boot): Doesn't detect it


Any help is appreciated.

windows xp - Applications are being opened by IE instead of running normally


I rewrote the Question to add everything that i tried so far.



  • Many of my applications are being opened by Internet Explorer. (not all)


  • For example when I run Firefox.exe (from shortcut) I get IE run instead, with the following URL


    http: // %22d/ Browser/firefox.exe%22 (I added spaces to prevent link creation)




    1. the shortcut target is: "D:\Browser\firefox.exe"




    2. when I attempted to open firefox.exe from it's folder the results were the same as the previous one




    3. I attempted to open it by cmd, so i navigated with cmd to the FF path then wrote: firefox.exe




    4. the was the same except that the URL was:


      http: // Firefox.exe/




    5. when i jsut write firefox the result URL was:




    http: // Firefox/ (is it some kind of parameter or something??)




    1. trying the same with chrome resulted the same results as the previous tests.




    2. I tried creating a new user (adminstartor) but the problem still there.




    3. I tried every registry key with exe on it (not sure if i tried them all) no change




    4. I tried removing IE but came back by itself somehow, meanwhile IE is removed, FF and its fellow apps gave me open with window




    5. I tried reinstalling the applications but it just no use.






Time Line: (as requested from @Daredev)




  1. I don't know when it happened because the computer is for the company i work for and it was like that since i got it. (The IT there gave up on the problem lon time ago!).




  2. applications were installed already are "firefox" and "XPS viewer" .




  3. applications were working after the problem everything except what uses browsing (MS help viewer, XPS viewer, firefox-even I've re installed it-, opera, chrome)




  4. that what I thought but after installing Maxthon , comodoDragon this theory was blown away.




system info:
1- windows xp professional service pack 3
2- system fully patched: Yes
3- anti-virus up to date: Yes
4- same behavior when booting into safe mode: Yes



Answer



Armed with addtional information you've given me via chat:
Unfortunately it does seem that your PC may get somehow infected with malware. As an example, This thread does look very similar to your problems


Malware or not, root cause of your problems probably lay in this little known registry gem - originally thought to allow easy debbuging: (source)


To setup an application to launch the debugger automatically

Start the Registry Editor (regedit).
In the Registry Editor, open the HKEY_LOCAL_MACHINE folder.
Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\currentversion\image file execution options.
Under the Image File Execution Options folder, locate the name of the application you want to debug (myapp.exe, for example). If you cannot find the application you want to debug:
Right-click the Image File Execution Options folder and choose New Key from the shortcut menu.
Right-click the new key and choose Rename from the shortcut menu.
Edit the key name to the name of your application, for example, myapp.exe.
Right-click the myapp.exe folder and choose New String Value from the shortcut menu.
Right-click the new string value and choose Rename from the shortcut menu.
Change the name to debugger.
Right-click the new string value and choose Modify from the shortcut menu.

The Edit String dialog box appears.
In the Value data box, type devenv /debugexe.
Click OK.
From the Registry menu, choose Exit.

Problem being you could (and malware does) put any executable as debugger, effectively running program of your choice instead of original target.
I was able to replicate your PC behavior adding Firefox.exe key with a debugger target of Iexplore.exe
To check if that's what affect you, open registry editor, navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\currentversion\image file execution options and look for Firefox.exe and similar entries for programs exhibiting this behavior. Rename any suspicious keys to something else (eg. Firefox.exe bad) and re-run the app.


Last but not least - analyze those keys - maybe it will give you a hint of what was the source - and run a thorough scan of your system with a different tool than the one you have installed (if possible - with windows offline)


Edit: Sysinternals Autoruns (http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) comes in handy in checking image hijacks (among many other nice features). Download the tool, run it and unselect Hide Windows Entries in Filter options, then select Image Hijacks:


Autoruns screen


You may then either simply delete the entry or analyze it further using several options.
There is also a command line version, autorunsc. autorunsc -h prints image hijacks. Use autorunsc -? to see all options.


browser addons - Is there a replacement for AniDisable for firefox 3.5?


Anidisable is a very handy FF extension that allows to block animated gifs, but still allows to view them when you really want. Unfortunately, it hasn't been ported to FF 3.5 yet. Any alternatives?



Answer




  1. Type about:config in your address bar

  2. Search for image.animation_mode

  3. Change the value to none


It will show the gif first frame, but will not display the animation.


Agreed, this is less handy then using an extension allowing you to set/unset animated gifs, as was the case with AniDisable. There's a nice tutorial for creating Firefox Extensions at http://roachfiend.com/archives/2004/12/08/how-to-create-firefox-extensions/.


EDIT:
I just inspected the plugin. It is indeed compatible with Firefox 3.5. Download it from http://www.siliconmethod.com/firefox/anidisable/ and follow these steps.



  1. Rename the file extension to zip.

  2. Open it with your favorite decompressor.

  3. Extract the file install.rdf.

  4. Edit the following line 3.0+

  5. Change it to 3.5+

  6. Put it back in the zip file, replacing the old file

  7. Rename the zip extension back to xpi

  8. Install by selecting Open File... from the Firefox File menu


AniDisable works by making changes to the above about:config setting. The changes it does to this setting (none, once, and normal) are still in effect as of Firefox 3.5.


worksheet function - Create a hyperlink from URL and title in Excel

I'm trying to construct a hyperlink from a URL and a name in different cells.


a1 = http://www.example.com/
b1 = example
c1 = example

What I want that is the URL in A1 to is made into a hyperlink with the name taken from B1:


example

I created a formula, but it's not working


&”=b1”

should result in


example

Why does Notepad++ disable the HexEditor plugin?


Notepad++ is a great editor... The regular expression facility is stunted, but I can live with that. It is OK for most find/replace situations, and for the occasional others I'll just hop across to UltraEdit (Unicode) or TextPad (ASCII only).


However, I can't live without a hex editor on tap!


The Notepad++ HexEditor plugin seems to work fine... I use it frequently.


For some reason unknown to me, this plugin is forcibly disabled by Notepad++ whenever I upgrade to the latest version (of Notepad++), with a message something like ".. due to instability issues". HexEditor.dll gets moved into a "quarantine" subfolder: .\disabled.


This sounds a bit ominous. I have searched high and low, and I have found nothing which makes any reference to this mysterious "instability". The plugin is available on the Notepad++ plugins page (which lists third-party plugins, and is not, strictly speaking, a Notepad++ page), and there is no mention of instability.


What's going on? Does it randomly get it wrong and corrupt data? Does it crash Notepad++?


Can I trust this plugin?



Answer



The Hex Editor plugin was disabled for being unstable. This means that the plugin crashed Notepad++ in some situations. I encountered this problem myself when trying to save an edited file.


Earlier versions of Notepad++ don't have those problems with the plugin.


firefox - How do I backup my bookmarklets?


Any ideas how to backup bookmarklets so I can install them on a new machine? I'm thinking specifically of Chrome -- but I'd like to know how to do the same with Firefox too.



Answer



To export your bookmarks on Chrome, you can go into the Bookmarks Manager (Bookmarks menu -> Bookmarks Manager) and in the Organize menu, click Export Bookmarks. This will give you an HTML file that both Firefox and Chrome will be able to import. (To import them back into Chrome, follow the same steps, but click Import Bookmarks and locate the bookmarks file).


To export your bookmarks on Firefox, click on Organize Bookmarks in the Bookmarks menu (may be called Manage Bookmarks). Go to the File menu and click Export (or Import and Backup), and save the HTML file that way.


boot - Windows Vista stuck beforestart up

I have a Toshiba laptop with Windows vista, and ever since about a year ago it has been nothing but trouble.


The computer has had multiple viruses, which we have gotten fixed, even though we have had Norton 360 in the past, and now we have since switched to Kaspersky Labs. The problem I am having now looks like a problem we have had in the past, where the computer does not even begin booting up when you press the power button. The lights come on, but the screen stays blank.


I think that the virus (if it is a virus) may be called RootKit, which I have a repair disc for, although I can't run that disc with out the computer starting up. Since the screen stays blank, I can't even choose to run safe mode. If anybody has a solution I would really appreciate it.

Printer Add button not enabled in ubuntu 12.04


I am trying to set-up a network printer on my system.


Navigated to System Setting>>Printing and viola the Add button out there is disabled.


When i troubleshooted using Help it said that the CUPS print spooler does not appear to be running. To correct this, choose System->Administration->Services from the main menu and look for 'cups' service.


Please tell me what to do in order to add a printer!



Answer



When CUPS is not running the Printers panel looks like this on my Ubunbu 12.04:


enter image description here


Is this what you see?


About CUPS:




  • Use this command to check whether CUPS is installed:


    dpkg --list | grep ' cups '

    Typical output when installed is:


    ii  cups                1.5.3-0ubuntu4      Common UNIX Printing System(tm) - server

    If you don't see any output, install CUPS:


    sudo apt-get install cups

    and start it:


    Ubuntu 12.04: sudo service cups start


    Ubuntu 16.04: sudo sudo systemctl start cups.service




  • If it is already installed it may not be running, check it like this:


    ps -ef|grep cups | grep -v grep

    Typical output when running is:


    root       925     1  0 Oct17 ?        00:00:00 /usr/sbin/cupsd -F

    If you don't see any output CUPS is not running. Start it like this:


    Ubuntu 12.04: sudo service cups start


    Ubuntu 16.04: sudo sudo systemctl start cups.service




Could you try it and post any problems?


More information on CUPS:



Remove keyboard option from Windows


I use danish localization option and danish keyboard layout most of the time. But when I am programming I use US keyboard layout. But Windows have added


enter image description here


But I cant seem to remove it anywhere


enter image description here


The problem is that I often just use ALT + LSHIFT to shift between DA layout and US layout, but I cant do this now as it shifts between DAN and ENG/DA which is still DA layout


I can use Win + space, but its not optimal


Another option would be if I could set default layout per application and not having to set it each time I open an application


Edit: enter image description here enter image description here enter image description here



Answer



Under "Region & language settings" select "English (Untied States)". Three buttons should pop up, one of which is "Options". (Shown below for UK Eng.)


win10 region and language settings screen


If you click that it will bring you to a list of Keyboard layouts for that language, where (if you click one) they can also be removed.


win10 language options screen


In case the Danish layout is not listed, first add and then remove it as described in this post.


Thursday, 28 December 2017

microsoft outlook 2007 - What's the impact of undoing Cached Exchange Mode?


I'm running Outlook 2010 in Cached Exchange mode against an Exchange 2007 server.


I understand that disabling Cached Exchange Mode removes the local cache and makes me operate directly against the server, but when going from cached exchange mode to non cached, does it delete the OST file, empty it, or other?



Answer



Essentially yes. Cached Mode syncs the server and client so in the event of disruption in your connection to the server you can still work in your mail , albeit in "Off-Line" Mode. when the connection to your server is restored any changes to your local copy of your mail will be upload to the server.


If you disable cached mode, you can only use you client when you have a connection to the server. this is how Exchange primarily operated prior to Exchange 2003. I used cached mode for that reason with my users but I also use it since it gives me another backup of their email which I have found handy to have on occasion!


To answer Matt's Updated question, it doesn't delete the local ost file it just;s stope using it sync with the Exchange Server. If you ever decided to go back to cache mode (with changiing the profile) it will just pick up from where it left off..


How do I get the distinct/unique values in a column in Excel?


If I have a column with values, and I want to find out what distinct values are in there (not how many - but the actual distinct values), how can I do that?


In SQL Server I would do something like


SELECT Distinct(MyColumn) FROM MyTable

Answer



Simpler than you might think:



  • Click the Data Ribbon Menu

  • Select the Advanced Button in the Sort & Filter section

  • Fill in the dialog Box, copying the results to another location and making sure you tick Unique records only


enter image description here


terminal.app - Scroll Bar on OS X Lion Terminal won't go away




Possible Duplicate:
Snow Leopard hide scrollbar in terminal?



I have this scrolling bar on the right side of my terminal because I accidentally split the window and I've merged the windows, quit the terminal, and restarted my computer, and this evil thing won't go away.


It's not really in the way but when it's in full screen or window it's there and it's annoying.



Answer



Have you tried going into OS X System Preferences > General > Show scroll bars: and unchecked always?


ubuntu - Installing windows 10 over Ubuntu16.04 LTS; W10 Installation USB not being read


Like the title states, I have downloaded an iso for Windows 10, and etched it on an 8GB USB flash drive. My purpose is to get rid of an Ubuntu 16.04 LTS installation; and install a brand new Windows 10 OS. I am currently using a Samsung 850 Evo 250gb SSD.


Btw it's a relatively new machine; I built it back in 2016, which means that it's not even a year old, and to date, has run successfully Windows 10, 8.1 and Ubuntu. So this might not be a hardware issue. Please note, that all of those versions in the past have been installed using a USB like I am using now.


With my USB plugged in, and me being able to select it as the boot method, the PC either boots into Ubuntu like nothing happened, or I get four choices from a GNU/GRUB screen.


The four options in the GNU GRUB are as follows:


1.-Ubuntu
2.-Advanced Options for Ubuntu
3.-Memory Test (memtest86+)
4.-Memory Test (memtest86+, serial console 115200)

Also, it must be noted that the entire drive except for some swap memory space is laid out for Ubuntu and I have nothing else on this SSD.


Why am I not booting into the Windows Installer Screen?


Is there something that I am doing wrong?



Answer



You can create a Windows bootable USB from Ubuntu through winusb


Install it:


sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
sudo apt install winusb

Create it :


sudo winusb --format  

Use sudo fdisk -l to get the right


Also you can use unetbootin montionned on @AFH comment's :


sudo apt-get install unetbootin

From the BIOS settings set the USB on the first boot order (verify the legacy boot order and the UEFI boot order too) . Or you can select to boot from USB directly (It depends on your BIOS manufacture)


windows - Can anyone recommend a simple screenshot tool that can be installed as a portable app?



The printscreen button doesn't work on our university computers, so I'm looking for a simple free screenshot tool that can be installed on a USB drive.


this question is similar: https://superuser.com/questions/254/screenshot-utilities-for-windows though I'm looking for something specifically portable.



Answer



FastStone Capture fits the bill quite well.


windows - Recently visited directories?

Does Windows store a list of recently-visited directories somewhere in the registry, or in Docs & Settings?

Wednesday, 27 December 2017

Auto Redial for PPTP VPN connections in Windows 8

I have been trying for hours to find any info on how to reconnect to a PPTP VPN automatically. In Windows 7 there was an option to auto reconnect and how many redial attempts etc.


I can not find that in Windows 8.


Have they removed it? Are they going to add this functionality? I have to have my vpn connected for long periods unattended. This is a deal breaker for me I will be going back to Windows 7 if I can not find a solution.

audio - Windows 8 Communication Sound Setting not working

I've been having a problem on my new laptop recently which is familiar but baffling the usual fixes. I'm running Windows 8 with an onboard Realtek soundcard. It's similar to the one on my older computer running Windows 7.


The problem is, when I'm in Skype or Mumble, Windows changes the sound output to lower everything else automatically. I've disabled the communications sound change option on the communications tab within sound devices and checked all the applications settings to insure that they are not responsible. They aren't, and I noticed something else. When I'm in the sound properties dialog, and I switch to the microphone tab, the same audio output reduction occurs. This seems to say to me that the microphone must be responsible in some way, but seeing as I uninstalled all the drivers and installed windows drivers instead, I'm confused as to why this would be occurring.


Any thoughts?


EDIT: I just tried disabling the built in microphone and the sound no longer get changed. More confused now? As soon as I turn it back on, the sound gets dropped again.


Incidentally, the fix for this on windows 7 was this question: Windows 7 lowers applications' volume automatically I've got my computer set that way and it doesn't work.

BSOD During Windows 7 Install


I current have a working XP partition a Dell XPS m1330 laptop along with a working Ubuntu partition. After launching the Windows 7 install DVD from within XP I run through the options for a custom install on a free NTFS partition. Everything seemingly works as it should and then my computer restarts. After choosing to boot into the newly created Windows partition I am given the Windows 7 splash screen only to be followed by the BSOD.


Here are the stop codes from the BSOD:


stop: 0x0000007b (0x80D86B58,0xc0000034,0x00000000,0x0000000)


Googling this tells me that it indicates an 'inaccessable boot drive'. Is it possible that its having problems booting from this partition due to the other existing partitions?


I'm thinking that there may be a windows recovery CD workaround this but I am not quite proficient in its capabilities.


This is what happens when I try to install by booting from the DVD



Answer



I have an XPS M1330.




  1. Make sure the BIOS is up to date.




  2. Have you tried disabling AHCI for the hard drive? Note that this will likely break your existing OS installs, but I had tremendous difficulty installing any OSes on my M1330 until I disabled AHCI.





After formatting and beginning a clean install of Vista, I ran into a little problem where the machine would bluescreen immediately on startup after the install. I found that switching the hard drive interface from AHCI back to standard fixed that problem.



http://www.codinghorror.com/blog/archives/000927.html


software rec - Bit-for-bit copy of hard drive in Windows?




Possible Duplicate:
Clone a Hard Disk Content to Another Hard Disk



What's the equivalent of SuperDuper on Windows? I want to replace my current hard drive with a new one so I imagine that I would want a program that does a bit-for-bit copy from one hard drive to another, right?



Answer



Clonezilla


What about CloneZilla?



Clonezilla, based on DRBL, Partclone and udpcast, allows you to do bare metal backup and recovery. Two types of Clonezilla are available, Clonezilla live and Clonezilla SE (server edition). Clonezilla live is suitable for single machine backup and restore. While Clonezilla SE is for massive deployment, it can clone many (40 plus!) computers simultaneously. Clonezilla saves and restores only used blocks in the harddisk. This increases the clone efficiency. At the NCHC's Classroom C, Clonezilla SE was used to clone 41 computers simultaneously. It took only about 10 minutes to clone a 5.6 GBytes system image to all 41 computers via multicasting!




Windows 10: Laptop display refuses to turn off


System: Clevo P157SM (Sager NP8255-S).


I've just upgraded to Windows 10 Pro on my laptop and now the display refuses to turn off even if I lock the session or after the configured timeout (15 minutes on AC, 3 minutes on battery). It doesn't matter whether the laptop is plugged in.


The Monoff utility causes the screen to switch off, but it comes back on immediately, suggesting spurious input from an input device. Turning off the trackpad and disconnecting any external mice or keyboard do not help.


The laptop has a hotkey which switches off the display at the firmware level; a key press on the onboard keyboard turns it back on. The display stays off with this feature, eliminating the keyboard as a possible cause; however, it bypasses the OS and it doesn't allow any kind of ACPI control.


I have no trouble putting the computer to sleep—the system stays asleep unless I wake it up. The computer will wake up from external device inputs but ignores input from the onboard keyboard and trackpad (this is normal) so this eliminates external hardware as a possibility.


Any ideas on how to troubleshoot this?




Update: The issue seems to be caused by a userspace app as the monitor does turn off if left idle before I log into the machine. How do I isolate the guilty application?



Answer



The issue has been fixed in Windows 10 build 10586 released in November 2015. The display now turns off on its own when the machine is idle.


performance - How can I identify the culprit of my slow Windows shutdown?


My computer is taking a very long time to shutdown.


How can I identify the culprit? I don't want to wait minutes for my computer to shutdown...


Is there a program I can use to track how long it takes to shutdown?



Answer



Windows provides Performance Counters as well as Event Tracing which allows applications to do performance analysis so that one can pin-point the cause of performance problems, amongst those that exist there is one outstanding toolkit: The Windows Performance Toolkit available in the Windows SDK.


In this toolkit you will find xbootmgr.exe, meant for Windows On/Off Transition Performance Analysis.


Although the above linked document goes into all the details for every on/off transition, here is the general idea about tracing and analyzing the shutdown transition using xbootmgr and the xperf GUI:




  1. Download the Windows SDK, then install the Windows Performance Toolkit using it.




  2. Open up a command prompt as an administrator, then run:



    cd %ProgramFiles%\Microsoft Windows Performance Toolkit





  3. If you want help in the future, you can type xbootmgr -help as well as xperf /?.




  4. Do a reboot trace like this:



    xbootmgr -trace shutdown -traceFlags BASE+DIAG+LATENCY -noPrepReboot





  5. After the boot, it will generate a trace within two minutes.




  6. The trace has been saved in %ProgramFiles%\Microsoft Windows Performance Toolkit, you can drag it onto xperf.exe and it will be opened in a GUI.




  7. You will see a GUI with different graphs, the arrow at the left side allows you to add/remove graphs.




  8. Look at the graphs and see if you can identify anything out of the ordinary, you can select an interval and zoom in on it if you want to. Right click and unzoom when you want to see the whole.




  9. For each graph, you can right click to get summary tables for the currently selected interval.




  10. In these tables, sort by weight or by time to figure out which it is spending the most to. Please note that you can drag around columns, so for example the I/O table allows you to check out the highest using process as well as the highest using path.


    The divider (a yellow header column) makes it so that the columns right of it show the total for the columns left of it. So, if you have Path first and then Process, then you can open the tree for a file to see what processes have accessed it and then you get the totals for that process/file combination.




  11. You can find more information on how the graphs and tables function here.




  12. If you somehow need to go down to look into the stack traces; do another boot trace and append the -stackWalk profile parameter, set the _NT_SYMBOL_PATH and right click on any graph and enable "Load Symbols". This will allow you to check what functions it's actually calling, in general you won't need this for a shutdown though; but it can allow for things like discovering that your firewall is interfering with your debugger as a programmer. Pretty nifty...




Good luck, I hope you can find the culprit. If not then drop the trace and we'll take a look for you...


Please note that DPCs are Deferred Procedure Calls and Interrupts are Software Interrupts, both are related to drivers / hardware.


How to hide or remove email address from Windows 8 lockscreen?

I'm using Windows 8 and I have an Microsoft account (@outlook.com). I was wondering if there is a way to remove or hide my email address from the lockscreen.


Note: I don't want to use a local account, just to hide my email address. I also know about Hiding email address in Windows 8, but I'm asking specifically about the lockscreen.

display - Is it possible to have different cleartype and color settings in a multimonitor setup in Windows 8?


I just bought a Samsung 24C300HS and I have it connected to a Surface Pro. The color settings are horrible.


I used windows' "Calibrate color" to adjust the color and clearType settings and with that I can get a very reasonable image that I'm happy with, the problem is that it also changes the settings on the Surface Pro screen, making that one miserable.


Is there any way to get around this? For example having different color profiles for each monitor, or if not possible, is it possible to save the settings so that I can change them quickly without having to go through the Calibrate Color tool?



Answer



The solution was to run the "Calibrate color" tool (right click desktop->personalize->Display->Calibrate Color) with the external monitor connected in "expanded mode" so that both screens are visible.


If you run the calibration tool like this, you can just drag the calibration tool window to the monitor you want to calibrate(e.g. the external monitor) and it will only affect that monitor. ClearType adjustment will give you the option of choosing which monitor you want to calibrate when you have the external monitor in extended mode.


networking - How do I set up an OS level proxy when a specific application does not support it?

I'm running a certain desktop app (actually Youwave Android) which doesn't have any built-in proxy configuration settings.


I need to get all traffic just from this app directed through a proxy.

How do I stop Windows Operating System from using up my bandwidth quota?

I'm in NZ, which means my internet is capped at 5GB, which is not funny. I notice on my Windows 7 that even after disabling automatic update (don't worry, I flick it back on during my off peak hours) it still constantly downloads about 1kb per second, which starts to stack up. Apparently, it's svchost.exe, and it doesn't seem to be doing anything important.


How do I stop Windows from stealing all my internet? Please help!


If I may clarify things, is it possible for me to connect to the internet without letting the Operating System itself using bandwidth?

How do I get the fully qualified path of a share in Windows?


I know that I can find out what a drive is mapped to with:


net use X:


But how do I resolve a share easily? Like \\JoshPC\SomeSharedFolder


Is there a way to get the fully qualified path?



Answer



if you want to see the full path and you have admin privs on the remote workstation then the following will work


wmic /node:hostname share


What are "Debug/Checked" versions of a Windows OS?


While looking for a Windows XP download in the MSDN subscriber portal, I noticed this:


enter image description here


So, what is the Debug/Checked version?



Answer



The debug/checked version is used for debugging device drivers. It contains run-time checks for error conditions and has run-time optimizations removed.


boot - Windows 8 Not Shutting Down Properly With Fast Start-Up Enabled


While Fast start-up is enabled, on turning the computer off (shutdown) the computer idles for about 5min after logging out/screen turning off. It then turns off. On returning into Windows I receive the error message saying Windows didn't shut down properly.


Hibernate works fine, and I am told this shouldn't be the case - If one doesn't work, neither should. It works when both Fast start-up is enabled and disabled, as does restart and sleep.


Windows is installed under UEFI.


The UEFI ultra fast boot option for my motherboard cannot be enabled as my GPU doesn't support some UEFI GOP tech. As far as I know, not related to windows fast start-up, but thought it was worth mentioning.


To clarify, if this: http://www.eightforums.com/tutorials/6320-fast-startup-turn-off-windows-8-a.html is enabled, the computer does not shut down properly.


EDIT: Some more information on the matter:


Formatting didn't fix the issue. Still fails regardless of drivers installed.


Hardware was purchased ~6months ago. Running a good SSD.




Event viewer

Always these two messages in close succession:


Error (event ID 6008): The previous system shutdown at 7:45:21 PM on ‎27/‎10/‎2012 was unexpected.


Critical (kernel power, event ID 41): The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.


Update


Upon installing WPT as suggested below to figure out what was happening during shutdown, and running the cmd


xbootmgr -trace shutdown -noPrepReboot -traceFlags BASE+CSWITCH+DRIVERS+POWER -resultPath C:\TEMP


Windows fast start-up is now working consistently. Still works upon uninstalling WPT. This is the only change to occur on the computer. Nothing else has bee installed/uninstalled, no Windows Updates, nothing. Windows fast start-up did not work prior to installing WPT and running the cmd (made sure I tested).


Update 2


Since a random patch to Windows Defender, computer has again been failing to shut down properly. The above "fix" didn't work this time around.


Update 3


Latest update to Windows Defender has fast stat-up working again.


Update 4


Computer shutting down properly is now completely inconsistent.



Answer



Looks to be an issue surrounding Windows Update... Ensuring there are no updates waiting to be downloaded/installed at point of shutdown, I haven't had a problem. This is the closest I've come to 'solving' the issue.


linux - mounting ext4 fs with block size of 65536

I am doing some benchmarking on EXT4 performance on Compact Flash media.


I have created an ext4 fs with block size of 65536. however I can not mount it on ubuntu-10.10-netbook-i386. (it is already mounting ext4 fs with 4096 bytes of block sizes)


According to my readings on ext4 it should allow such big block sized fs. I want to hear your comments.


root@ubuntu:~# mkfs.ext4 -b 65536  /dev/sda3
Warning: blocksize 65536 not usable on most systems.
mke2fs 1.41.12 (17-May-2010)
mkfs.ext4: 65536-byte blocks too big for system (max 4096)
Proceed anyway? (y,n) y
Warning: 65536-byte blocks too big for system (max 4096), forced to continue
Filesystem label=
OS type: Linux
Block size=65536 (log=6)
Fragment size=65536 (log=6)
Stride=0 blocks, Stripe width=0 blocks
19968 inodes, 19830 blocks
991 blocks (5.00%) reserved for the super user
First data block=0
1 block group
65528 blocks per group, 65528 fragments per group
19968 inodes per group

Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.



root@ubuntu:~# tune2fs -l /dev/sda3
tune2fs 1.41.12 (17-May-2010)
Filesystem volume name:
Last mounted on:
Filesystem UUID: 4cf3f507-e7b4-463c-be11-5b408097099b
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index
filetype extent flex_bg sparse_super large_file huge_file uninit_bg
dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 19968
Block count: 19830
Reserved block count: 991
Free blocks: 18720
Free inodes: 19957
First block: 0
Block size: 65536
Fragment size: 65536
Blocks per group: 65528
Fragments per group: 65528
Inodes per group: 19968
Inode blocks per group: 78
Flex block group size: 16
Filesystem created: Sat Feb 5 14:39:55 2011
Last mount time: n/a
Last write time: Sat Feb 5 14:40:02 2011
Mount count: 0
Maximum mount count: 37
Last checked: Sat Feb 5 14:39:55 2011
Check interval: 15552000 (6 months)
Next check after: Thu Aug 4 14:39:55 2011
Lifetime writes: 70 MB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: afb5b570-9d47-4786-bad2-4aacb3b73516
Journal backup: inode blocks


root@ubuntu:~# mount -t ext4 /dev/sda3 /mnt/
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...