Monday 30 September 2019

media - What application do you use to play and manage music on your computer?

What software do you use to play and manage music on your computer? Include a link if you can, so others may discover great software!


Please, one application per answer. That will allow the votes to bubble the most popular answer/application!

Show date format in Excel as the OS default

Is there a way in Excel (2007 and up) to set the date format of a column to the date format of the OS locales. The data entered in this column is a date (imported from a database date field).


For example I enter 2003-01-02 00:00:00 (Jan 2nd 2003) I want to see 01/02/2003 00:00:00 in the USA and 02.01.2003 00:00:00 in Germany when I open my spreadsheet (without updating the column date format).

windows - Run a program using NVIDIA dedicated GPU only when plugged into power

Under 3d Settings in NVIDIA's control panel, it allows me to choose whether specific programs always start using the integrated graphics on my CPU or the dedicated GTX 960M.


Can I create a condition where the program opens with my GPU when my laptop is plugged into AC by default, and the same program opens with integrated graphics when it is on battery power by default?

unix - ubuntu 9.04 /var/www permissions

ubuntu 9.04, user luca wants to access the /var/www directory.


the directory is owned by user root, group root


I changed the group ownership to www-data (sudo chgrp -R www-data /var/www/) and added write privileges to that group (sudo chmod -R g+w /var/www), and added luca to that group (sudo adduser luca www-data).


Now, why can't luca still write to /var/www? It should be able to, right?


in /etc/group we have: "www-data:x:33:luca"


permissions for /var/www are: "drwxrwxr-x 2 root www-data 4096 Feb 26 15:35 www"

microsoft excel - Sum if ONLY all the cells have a value?


I need to sum 9 cells of data, each one on a separate sheet, but always in the same location. I only want a figure returned when all the cells have data, even if it's a 0. But, if one of the cells is blank I want a blank return.


I'm trying to get my head around, making it up actually, where the IFs and ISBLANK and SUMS would go. Any pointers would be greatly appreciated.


SUM(IF(ISBLANK(RANGEA,OR(RANGEB),0,ALLRANGES)))

Many thanks


Michael



Answer



Assuming the data is in A1 to A9:


=IF(COUNTA(A1,A2,A3,A4,A5,A6,A7,A8,A9)<9,"",SUM(A1,A2,A3,A4,A5,A6,A7,A8,A9))

And yes, this will work for cells on different sheets, even files, just change the reference, make sure you change it in both parts of the formula though.


Disable Narrator shortcut key in Windows


I've install Windows 8 on a BootCamp macbook air The problem is that the command key located differently from the winkey in a normal keyboard, therefor, I keep clicking Winkey+Enter which starts the narrator (which is really annoying!)


Is there a way to disable this shortcut?



Answer



I have not tried it personally but here's what I found.



  1. Navigate to %systemroot%\System32

  2. In this folder a file called Narrator.exe is to be found

  3. Right click the file and choose Properties

  4. Choose the Security tab and press Advanced

  5. In the top of the window press Change to change the Owner permissions

  6. In the text field write your username and press OK to all the dialogs


Now you should be able to change the permissions of the file, this is where we remove all the permissions from your user and the user back to system, this way your user will not be able to start the Narrator.



  1. Right click the Narrator file again and choose Properties and Security

  2. Press Advanced

  3. Now that you are the owner you can change permissions for other users. Choose your own user and press Edit

  4. Remove the Read & Execute and Read permissions and press OK

  5. Now press Change in the top under Owner and write system in the text field

  6. Press OK to all dialogs


Source


ssd - SATA drive disappears every hour, back on hard reboot


I consistently lose one of my two SATA drives (one SSD, one HD) after (almost?) exactly one hour. Doesn't matter if the computer is at idle or the disk is being written to frequently. The machine is dual boot and the behavior is the same in Windows 7 and Ubuntu 10. Seems to be whichever port is closest to the top of the machine. The drive will disappear and will not remount until I do a hard (power cycling) reboot. Both drives appear to be fine.


I don't see anything in the BIOS that would do this, but 15 times in a row at between 58 and 62 minutes (maybe exactly 60) is some setting somewhere, isn't it? It's an ASUS mobo, AMI BIOS, Marvell controller for the 6GB port, but the phenomenon also happens when both drives are plugged into 3GB/s ports.



Answer



This is a known issue with older firmwares of Crucial m4 SSDs after a few months of use:



Correct a condition where an incorrect response to a SMART counter will cause the m4 drive to become unresponsive after 5184 hours of Power-on time. The drive will recover after a power cycle, however, this failure will repeat once per hour after reaching this point. The condition will allow the end user to successfully update firmware, and poses no risk to user or system data stored on the drive.



Source. You need to get at least firmware 0309 from here.


vim - copy-paste not working in MacVim when launched in tmux


MacVim's copy-paste stops working when I launch it from a tmux terminal (on zsh). If I exit tmux and then launch MacVim copy-past works. Any idea how to fix this?



Answer



You might try the patch mentioned in a related thread (“OSX 10.6.5 , Terminal.app, iTerm.app pbpaste, pbcopy do not work under tmux”) from the tmux-users mailing list (actually hosted at sf.net, but I abhor their archive interface).


Note: the patch was, at one time, applied to the MacPorts port, but it was later reverted when it was suspected to be causing other errors. However, those errors might have actually been caused by liking against the wrong version of libevent (and it seems that recent versions of tmux will work with either version of libevent).




Since helgeg brought it up, I’ll mention my notes on my attempt to use the above referenced patch.


Summary: I found the patch unreliable. It allowed pasteboard access, but it triggered many warning messages from my installation of libevent version 2 (maybe version 1 is less affected). It also prevents the tmux server from doing its normal fork(2) (via daemon(3)), which is a significant change to how the server process was designed to work.


I ended up publishing a program that works around the problem without patching tmux. People that have had problems using the pasteboard under tmux (and those for which the above patch does not work satisfactorily) might want to give my workaround a try.


encryption - How to encrypt a file or directory in Linux?

What's the most popular command to do such things as encrypting a file or directory in terminal in Linux?

bookmarks - 'Edge' favorites folder location on Windows 10

Evidently Microsoft moved away from a Favorites folder used in Internet Explorer that was set to the %UserProfile% with Edge.


I have found some information on this on the web i.e. it should be located at -%localappdata%\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\User\Default\Favorites.


For some reason, for me, mine are not located there. I have searched all over (folders, registry, online via searches, Reddit, etc. and I have not found anything to help me.


Is there a way to overcome this issue?

windows - How to copy only new files AND only those that are modified after a certain date?


I would like to copy files from one drive to another, but I only want to copy source files that are newer than the destination file. BUT, I also want to only copy source files that have been changed after a certain date.


I know I can use xcopy to do either one of these things, but I would like to do both at the same time.


So for example, I want to copy all source files dated on or after 3/1/2013, but in addition I only want the file copied if the source file is newer than the destination. So ideally I would like to do something like this:


xcopy c:\*.* e:\*.* /D:03-01-2013

combined with something like this:


xcopy c:\*.* e:\*.* /D

Can this be done with xcopy or Robocopy?



Answer



This will probably get you what you want:


Robocopy c:\ e:\ *.* /MAXAGE:20130301 /XO /E

Add the /L command to this to see what it will do without it actually doing it first just to make sure.


Check here for more information on Robocopy's options.


Sunday 29 September 2019

windows - When would a persistent route not be an active route?

I've added a persistent route to our Windows Server 2003 box using "route -p add". After a reboot the "route print" gave this:


Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.91.131.1 10.91.131.9 20
10.88.0.0 255.255.255.252 10.88.0.1 10.88.0.1 30
10.88.0.1 255.255.255.255 127.0.0.1 127.0.0.1 30
10.91.131.0 255.255.255.0 10.91.131.9 10.91.131.9 20
10.91.131.9 255.255.255.255 127.0.0.1 127.0.0.1 20
10.255.255.255 255.255.255.255 10.88.0.1 10.88.0.1 30
10.255.255.255 255.255.255.255 10.91.131.9 10.91.131.9 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
224.0.0.0 240.0.0.0 10.88.0.1 10.88.0.1 30
224.0.0.0 240.0.0.0 10.91.131.9 10.91.131.9 20
255.255.255.255 255.255.255.255 10.88.0.1 10.88.0.1 1
255.255.255.255 255.255.255.255 10.91.131.9 10.91.131.9 1
Default Gateway: 10.91.131.1
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
10.88.0.0 255.255.255.0 10.88.0.2 1

The route I added is listed as a persistent route, but not an active one. Why might this be the case?


The route in question is for an OpenVPN connection, would that have anything to do with it?


Edit I should have mentioned that the route was not working. Only once it was added again did it work. After that it did show in the Active Routes table.

performance - Why don't websites immediately display their text these days?


I've noticed that recently many websites are slow to display their text. Usually, the background, images and so on are going to be loaded, but no text. After some time the text starts appearing here and there (not always all of it at the same time).


It basically works the opposite as it used to, when the text was displayed first, then the images and the rest was loading afterwards. What new technology is creating this issue? Any idea?


Note that I'm on a slow connection, which probably accentuates the problem.


See below for an example - everything's loaded but it takes a few more seconds before the text is finally displayed:


enter image description here



Answer



One reason is that web designers nowadays like to use web fonts (usually in WOFF format), e.g. through Google Web fonts.


Previously, the only fonts that were able to be displayed on a site was those that the user had locally installed. Since e.g. Mac and Windows users not necessarily had the same fonts, designers instinctively always defined rules as


font-family: Arial, Helvetica, sans-serif;

where, if the first font wasn't found on the system, the browser would look for the second, and lastly a fallback "sans-serif" font.


Now, one can give a font URL as a CSS rule to get the browser to download a font, as such:


@import url(http://fonts.googleapis.com/css?family=Droid+Serif:400,700);

and then load the font for a specific element by e.g.:


font-family: 'Droid Serif',sans-serif;

This is very popular to be able to use custom fonts, but it also leads to the problem that no text is displayed until the resource has been loaded by the browser, which includes the download time, the font loading time and the render time. I expect that this is the artifact that you are experiencing.


As an example: one of my national newspapers, Dagens Nyheter, use web fonts for their headlines, but not their leads, so when that site is loaded I usually see the leads first, and half a second later all the blank spaces above are populated with headlines (this is true on Chrome and Opera, at least. Haven't tried others).


(Also, designers sprinkle JavaScript absolutely everywhere these days, so maybe someone is trying to do something clever with the text, which is why it is delayed. That would be very site specific, though: the general tendency for text to be delayed in these times is the web fonts issue described above, I believe.)




Addition


This answer became very upvoted, though I didn't go into much detail, or perhaps because of this. There have been many comments in the question thread, so I'll try to expand a bit (a lot of comments seem to have disappeared a short while after the topic was protected — some moderator probably manually cleaned them). Also, read the other answers in this thread as they all expand in their own ways.


The phenomenon is apparently known as "flash of unstyled content" in general, and "flash of unstyled text" in particular. Searching for "FOUC" and "FOUT" gives more info.


I can recommend web designer Paul Irish's post on FOUT in connection with web fonts.


What one can note is that different browsers handle this differently. I wrote above that I had tested Opera and Chrome, who both behaved similarly. All WebKit based ones (Chrome, Safari, etc.) choose to avoid FOUT by not rendering web font text with a fallback font during the web font loading period. Even if the web font is cached, there will be a render delay. There are a lot of comments in this question thread saying otherwise and that it is flat out wrong that cached fonts behave like this, but e.g. from the above link:



In what cases will you get a FOUT



  • Will: Downloading and displaying a remote ttf/otf/woff

  • Will: Displaying a cached ttf/otf/woff

  • Will: Downloading and displaying a data-uri ttf/otf/woff

  • Will: Displaying a cached data-uri ttf/otf/woff

  • Will not: Displaying a font that is already installed and named in your traditional font stack

  • Will not: Displaying a font that is installed and named using the local() location



Since Chrome waits until the FOUT risk is gone before rendering, this gives a delay. To which extent the effect is visible (especially when loading from cache) seems to be dependent on among other things the amount of text that needs to be rendered and perhaps other factors, but caching does not completely remove the effect.


Irish also has some updates concerning browser behavior as of 2011–04–14 at the bottom of the post:




  • Firefox (as of FFb11 and FF4 Final) no longer has a FOUT! Wooohoo! http://bugzil.la/499292 Basically the text is invisible for 3 seconds, and then it brings back the fallback font. The webfont will probably load within those three seconds though… hopefully..

  • IE9 supports WOFF and TTF and OTF (though it requires an embedding bit set thing– mostly moot if you use WOFF). HOWEVER!!! IE9 has a FOUT. :(

  • Webkit has a patch waiting to land to show fallback text after 0.5 seconds. So same behavior as FF but 0.5s instead of 3s.

  • Addition: Blink has a bug registered for this too, but it seems a final consensus has not been reached regarding what to do with it - currently same implementation as WebKit.



If this was a question aimed for designers, one could go into ways to avoid these kinds of problems such as webfontloader, but that would be another question. The Paul Irish link goes into further detail on this matter.


worksheet function - What should I do if I see a reference in Excel cell formulas to a sheet that I cannot see in the workbook?


Similar to 'Reference Data' in the publicly accessible file described below.


There is the Capacity Planning Guide spreadsheet excel file on Capacity Planning Considerations for Windows Azure Caching, it is downloadable.


The fact of the matter is that it contains formulas like ='Reference Data'!F128


Reference Data in Excel formula


Trying to trace precedents of this formula leads me to an empty cell where I just get an The trace Precedents command requires that the active cell contain a formula which includes valid references. exclamation.


The trace Precedents command requires that the active cell contain a formula which includes valid references


Can anybody tell what do such formulas mean and how are they really calculated?



Answer



It's hidden in VBA. Go to the Developer tab on top, and then click Visual Basic.


At the left, you'll see something like "VBA Project (Windows Azure Caching Capacity Planner)


Under that, you'll see "Sheet3 (Reference Data)"


If you look at the properties for this Sheet3, you'll see that "Visible" is set to "2 - xlSheetVeryHidden" which not only hides it, but removes it from the Unhide feature in Excel.


enter image description here


windows 7 - Remove default "open with" setting


I have managed to leave the make default option ticked when using the "open with" option in windows 7. I ideally want this removed so the OS can manage the file type as before. I can't find the menu to remove this anywhere, I'm sure it used to be in the folder options panel in XP.


Thanks



Answer



On the menu bar next to "Organize" in windows explorer, there should be the default action "Open with App" and a drop down box. Choose the drop down box to change what the default program is.


You can also go to the control panel and get the list of all extensions


Control Panel\All Control Panel Items\Default Programs\Set Associations


This is probably pastable into the address bar of your explorer window.


ubuntu - Dual/triple booting Surface Pro?

Before I purchase a Surface Pro, I would like to know how well it dual boots. I often develop for Mac, Windows, and Linux, so I highly value in a computer the community-supported ability to natively run multiple operating systems. Does grub work well for Windows 8 / Ubuntu on the Surface Pro?


Has anyone been able to dual boot Mac OS X / Windows 8 on the Surface Pro?

networking - VLAN trunking on interface only pingable from hosts on its VLAN


I am trying to set up subinterfaces on my Ubuntu 14.04 server for each VLAN. I believe I have successfully set them up using vconfig, but the subinterface is only pingable from hosts on its own VLAN. I'll need hosts outside its VLAN to be able to connect to it. This seems to work fine for my CentOS server so I know my networking is correct. I also see ICMP request packets on the subinterface when I do a tcpdump and ping the subinterface from a client outside the VLAN.


Any ideas? What other troubleshooting tips can you give me?


EDIT: I managed to fix this. My tcpdump on the server was showing icmp echo requests, but no reply. I found a related post here. Enabling martian source logging like this:


echo 1 >/proc/sys/net/ipv4/conf/eth2/log_martians

and then


sysctl net.ipv4.conf.all.rp_filter=2

Fixed it. I'm surprised this doesn't come up more often.



Answer



I managed to fix this. My tcpdump on the server was showing icmp echo requests, but no reply. I found a related post here. Enabling martian source logging like this:


echo 1 >/proc/sys/net/ipv4/conf/eth2/log_martians

and then


sysctl net.ipv4.conf.all.rp_filter=2

Fixed it. I'm surprised this doesn't come up more often.


Can Excel show a formula and its result simultaneously?


I know that it's possible in Excel to toggle between displaying values and displaying formulas. I'm required to turn in assignments for a statistics class as a printed Excel sheet showing both the formula and the result. Right now the instructor makes us either copy the formula and paste it as text next to the computed value, or copy the value and paste it next to the formula. This is very inefficient, prone to error (if you change the formula or values after doing the copy-paste), and generally a waste of time.


Is there any way to have Excel show the formula and its value in the same cell? If not, is there any function which will display the formula from a referenced cell as plain text, e.g. =showformula(A1) which would print out =sum(A2:A5) instead of 25 (if those were the formula and value of cell A1)?


I'm using Excel 2010, but a general answer that works for any recent edition of Excel would be nice.



Answer



I'm not aware of any built-in functions for this. You can, however, create a user-defined VB function to accomplish what you want.


Press Alt+F11 to open the VBA editor, right-click in the Project Explorer and select Insert -> Module. Paste the following code:


Function GetFormula(cell)  
GetFormula = cell.Formula
End Function

Now you can use =GetFormula(A1) to show the formula of that cell.


Saturday 28 September 2019

login - how do I see which user I am logged in as in MySQL?


I have multiple text console session open and log in as different users into different consoles. I forget after while which consoles belong to which user, it would be nice to not have to quit and log back in.


How do I see which user I am logged in as?


Is there a way to change which user I logged in as with out logging out?



Answer



Actually, you need to use two functions


SELECT USER(),CURRENT_USER();

USER() reports how you attempted to authenticate in MySQL


CURRENT_USER() reports how you were allowed to authenticate in MySQL


Sometimes, they are different


Keyboard shortcut to start Calculator in Windows 7


Does anyone know it? Is there a way to create it?



Answer



Find the shortcut to calculator in the Start menu, right click and select "Properties". You can enter any shortcut you want in the "Shortcut Key" field.


Can I split a spreadsheet into multiple files based on a Row in Excel 2013?

I have a spreadsheet in excel 2013 which have multiple column and rows. I need to send some columns to different people separate files. Please anyone can help me in this. Please try to use macros, or without VBA as I am not good in VBA.


Alex    Joshy   Ahmed   Vikrant   ...

I need to send only related column to each person (Alex, Joshy....More than hundred people)


Following is the code I already tried, It works if we need to split by column, but I need to split by row, "


Public Sub SplitToFilesfromcolumn()

' MACRO SplitToFiles
' Last update: 2012-03-04
' Author: mtone
' Version 1.1
' Description:
' Loops through a specified column, and split each distinct values into a separate file by making a copy and deleting rows below and above
'
' Note: Values in the column should be unique or sorted.
'
' The following cells are ignored when delimiting sections:
' - blank cells, or containing spaces only
' - same value repeated
' - cells containing "total"
'
' Files are saved in a "Split" subfolder from the location of the source workbook, and named after the section name.

Dim osh As Worksheet ' Original sheet
Dim iRow As Long ' Cursors
Dim iCol As Long
Dim iFirstRow As Long ' Constant
Dim iTotalRows As Long ' Constant
Dim iStartRow As Long ' Section delimiters
Dim iStopRow As Long
Dim sSectionName As String ' Section name (and filename)
Dim rCell As Range ' current cell
Dim owb As Workbook ' Original workbook
Dim sFilePath As String ' Constant
Dim iCount As Integer ' # of documents created

iCol = Application.InputBox("Enter the column number used for splitting", "Select column", 2, , , , , 1)
iRow = Application.InputBox("Enter the starting row number (to skip header)", "Select row", 5, , , , , 1)
iFirstRow = iRow

Set osh = Application.ActiveSheet
Set owb = Application.ActiveWorkbook
iTotalRows = osh.UsedRange.Rows.Count
sFilePath = Application.ActiveWorkbook.Path

If Dir(sFilePath + "\Split", vbDirectory) = "" Then
MkDir sFilePath + "\Split"
End If

'Turn Off Screen Updating Events
Application.EnableEvents = False
Application.ScreenUpdating = False

Do
' Get cell at cursor
Set rCell = osh.Cells(iRow, iCol)
sCell = Replace(rCell.Text, " ", "")

If sCell = "" Or (rCell.Text = sSectionName And iStartRow <> 0) Or InStr(1, rCell.Text, "total", vbTextCompare) <> 0 Then
' Skip condition met
Else
' Found new section
If iStartRow = 0 Then
' StartRow delimiter not set, meaning beginning a new section
sSectionName = rCell.Text
iStartRow = iRow
Else
' StartRow delimiter set, meaning we reached the end of a section
iStopRow = iRow - 1

' Pass variables to a separate sub to create and save the new worksheet
CopySheet osh, iFirstRow, iStartRow, iStopRow, iTotalRows, sFilePath, sSectionName, owb.fileFormat
iCount = iCount + 1

' Reset section delimiters
iStartRow = 0
iStopRow = 0

' Ready to continue loop
iRow = iRow - 1
End If
End If

' Continue until last row is reached
If iRow < iTotalRows Then
iRow = iRow + 1
Else
' Finished. Save the last section
iStopRow = iRow
CopySheet osh, iFirstRow, iStartRow, iStopRow, iTotalRows, sFilePath, sSectionName, owb.fileFormat
iCount = iCount + 1

' Exit
Exit Do
End If
Loop

'Turn On Screen Updating Events
Application.ScreenUpdating = True
Application.EnableEvents = True

MsgBox Str(iCount) + " documents saved in " + sFilePath


End Sub

Public Sub DeleteRows(targetSheet As Worksheet, RowFrom As Long, RowTo As Long)

Dim rngRange As Range
Set rngRange = Range(targetSheet.Cells(RowFrom, 1), targetSheet.Cells(RowTo, 1)).EntireRow
rngRange.Select
rngRange.Delete

End Sub


Public Sub CopySheet(osh As Worksheet, iFirstRow As Long, iStartRow As Long, iStopRow As Long, iTotalRows As Long, sFilePath As String, sSectionName As String, fileFormat As XlFileFormat)
Dim ash As Worksheet ' Copied sheet
Dim awb As Workbook ' New workbook

' Copy book
osh.Copy
Set ash = Application.ActiveSheet

' Delete Rows after section
If iTotalRows > iStopRow Then
DeleteRows ash, iStopRow + 1, iTotalRows
End If

' Delete Rows before section
If iStartRow > iFirstRow Then
DeleteRows ash, iFirstRow, iStartRow - 1
End If

' Select left-topmost cell
ash.Cells(1, 1).Select

' Clean up a few characters to prevent invalid filename
sSectionName = Replace(sSectionName, "/", " ")
sSectionName = Replace(sSectionName, "\", " ")
sSectionName = Replace(sSectionName, ":", " ")
sSectionName = Replace(sSectionName, "=", " ")
sSectionName = Replace(sSectionName, "*", " ")
sSectionName = Replace(sSectionName, ".", " ")
sSectionName = Replace(sSectionName, "?", " ")

' Save in same format as original workbook
ash.SaveAs sFilePath + "\Split\" + sSectionName, fileFormat

' Close
Set awb = ash.Parent
awb.Close SaveChanges:=False
End Sub

regards,

Windows Explore alternative for Windows 7 (file browser like XP)

The Explorer file browser interface for Windows 7 is really driving me nuts. I'm used to using the left TreeView pane together with the right ListView pane. I often open a folder in the right pane and I expect the left pane to synchronise with it (open the same folder) - exactly what it did from Windows 95 to Windows XP.


I've enabled the "Automatically expand to current folder" option, so it sort of does that, but the entire pane seems to reload and it scrolls, ie. the relative position of folders on the screen changes even when it doesn't need to. This makes me lose track of where I am in the tree (which is what the left pane is really useful for). It sounds like a minor thing, but it's annoying as hell!


Is there a way to get Windows XP explorer behaviour (potentially with a third-party application) in Windows 7?

daum pot player - Chat/comments window appears in Potplayer?

Several days ago I updated my potplayer. Beside the few changes that the update did like changing what key does what.


The most annoying thing happened. Every time I go full screen (either by enter or by double clicking) a small black window appears in the middle of the screen. That window is called chats/comments. I cannot find anything about that window on the Web or in the player's settings. How do I remove it?

PowerShell Get List Of Folders Shared


I am trying to get a list of folders that are shared on a file share. At the moment I have two test folders:


\\MYPC\Test1

\\MYPC\Test2

This is the code I have at the moment:


$FileServer = Read-Host "Enter file server to search"
$FolderList = Get-ChildItem -Path $FileServer

Write-Host $FolderList

But this comes up with "cannot find the path". I can see examples of how to do this for \\Server\Share as the directory, but is it possible to just search the \\Server?



Answer



Try this:


get-WmiObject -class Win32_Share -computer dc1.krypted.com

Ref: List Shares in Windows w/ PowerShell


Create New Spreadsheet of data from many Excel workbooks

In retrospect, this is an issue of data-collection, but I want to see if there is an easy way to do it without doing each file.


I have about 350 separate Excel workbooks. Each workbook has a bit of information pertaining to one individual.


What I want to do is create a simply spreadsheet of everyone with the necessary data, so it is then usable.


To give you an idea. A1 lists "Name" with B1 having the person's name. A2 has "Last 4 SSN" and B2 has the 4 digits.


Then A3 has the word "Year", then A4 "2014 est", A5 - "2013", A6 - "2012, etc, to 2009.


Then in Row 3 from B to N there are different pieces of information.


What I want to do, if possible, is have a master spreadsheet with columns of name, last 4 ssn, and then years for each of the pieces of data. ie. 2013-Interest


Is this even possible?I hope this makes sense.

hard drive - What can I do about 99% disk usage (only 0.9 MB/s)?

My new laptop is two months old, the first day I got this laptop I noticed this but I assumed it was a bug in Windows 8. However I still have this issue today after reformatting and installing all updates.


The problem is that the disk shows 99% usage from an application...


In this case Dropbox, but the usage is never over 2 MB/s; in this case it is 0.8 MB/s.


What can I do about this?


osx snow leopard - Is There A CPU Process Limiter For Mac OS X?


I am having trouble with some processed which hog up all the CPU power such as flash.


Is there a GUI app which can limit how much each process can use the CPU? I know you can do this via command line, but I would like something more user friendly.



Answer



Freezer. Thanks to beiju for finding these for his own answer.


Setting CPU cores off-limits to all threads not specified (preferably in Windows 7)

I have a really specific machine configuration in the works that would really be helped out if there were any way to do this...basically what I'm looking for is the opposite of setting CPU Affinity for a process. I want to be able to tell Windows "No applications except [x] are allowed on [these cores]."


Is there any mechanism whatsoever for doing this? (Yes, I am aware of some of the potential issues this could cause and I normally would never fool with processor affinities, since the OS usually does a damned good job itself, but this is a pretty odd situation involving some software that is very CPU-bound constantly having to wait on interrupts and DPCs and things from other threads.)

Friday 27 September 2019

microsoft office - OneDrive for Business giving 'Credentials Needed' error on every file


Since changing my password, OneDrive for Business (Office 2013) will no longer sync any files.


It is showing sync errors against every file saying ‘Credentials Needed’ when I click any of these sync errors, it opens internet explorer and takes me to my files on Office 365. It still syncs the whole folder structure, but not any of the files.


I have tried the following to try and fix this problem:



  • Done a ‘repair’ on OneDrive

  • Stopped syncing all libraries and re-added them

  • Logged out/in to Office 365

  • Removed all credentials from Windows Credentials Manager

  • Unlinked the account from Outlook

  • Uninstalled/reinstalled OneDrive

  • Applied all available updates for Windows & Office


How can I fix this problem?



Answer



This solved the problem for me:


Uninstall Office 2013 update KB3085566.


For some reason, this security update was causing my problems. I uninstalled it, rebooted and the problem went away.


You can follow instructions for uninstalling an update





  1. Open Installed Updates by clicking the Start button Picture of the Start button, clicking Control Panel, clicking Programs, and then, under Programs and Features, clicking View installed updates.




  2. Click the update that you want to remove, and then click Uninstall. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.





Excel 2010: Formula for Sum and Return Date

I have a workbook with a Summary sheet and a Data Set sheet with a linked table containing 700k+ records of financial data on investments. (In my particular case, it is real estate properties; but this is the same scenario as tracking stocks and dividends.) The Summary Sheet contains one row per property (investment) and shows the amount (of money) originally injected (i.e., input or invested) per property, with the expectation that the monetary output (or return on investment) will at some point equal that original injection/investment amount. The Data Set shows daily production (i.e., monetary output) per property, with one row per property per date (i.e., has many rows for each property) and cannot be edited. It should be noted that the PropName column is unreliable (inaccurate/inconsistent), and so PropID should be used to correlate the two sheets.


I would like to have a formula in the "100% Recovery Date" column on the Summary sheet that will tell me the date that the total (cumulative) Output reaches or exceeds 100% of Input (i.e., the date that the investment has been recouped). I assumed that I would need a formula to do the following, though I may be wrong:




  1. Sum all production (return on investment) data for each Property, from oldest to newest (data set is already sorted this way),


    UNTIL it reaches 100% of the Original Input/investment (shown in Total Input column on Summary sheet),




  2. then return the date (located in a field in the Data Set sheet) when 100% recovery is met,




  3. If 100% recovery is not met, return "TBD".




For example, the desired 100%RecoveryDate for property 0764 (“Prop 1”) would be 6/7/2013 (from the sixth data row of the Data Set sheet) because 1.667000055+ 5.000999928 +1.667000055 + 3.334000111 + 5.000999928 (from the first six rows of the Data Set sheet) = 16.670000077, which is greater than 13 (Total Input for property 0764).


Any and all constructive feedback is welcome and most appreciated!


Sample of Summary Sheet:


PropID   PropName   TotalInput   CurrentOutput  100%RecoveryDate  ProgressToRecovery
0764 Prop 1 13 71,820 189%
0736 Prop 2 30,711 134,746 439%
1680 Prop 3 25,014 52,887 211%
4078 Prop 4 29,494 36,705 124%
5226 Prop 5 43,983 41,438 94%
6427 Prop 6 28,786 50,855 177%
6683 Prop 7 19,231 60,501 315%
6739 Prop 8 28,350 48,229 170%
9153 Prop 9 37,888 28,125 74%
8020 Prop 10 31,429 41,094 131%

Sample of Data Set:


PropID   PropName     Date          Output
0764 Prop 1 6/1/2013 1.667000055
0764 Prop 1 6/3/2013 5.000999928
0764 Prop 1 6/7/2013 1.667000055
0764 Prop 1 6/10/2013 3.334000111
0736 Prop 2 6/19/2013 361
0764 Prop 1 6/19/2013 5.000999928
0764 Prop 1 6/22/2013 6.668000221
0764 Prop 1 7/12/2013 3.334000111
1680 Prop 3 7/17/2013 389
0764 Prop 1 7/23/2013 10.00200081
0736 Prop 2 8/2/2013 236
4078 Prop 4 8/22/2013 236
0764 Prop 1 8/25/2013 6.668000221
0764 Prop 1 8/30/2013 3.334000111
0764 Prop 1 8/31/2013 5.000999928
0764 Prop 1 9/11/2013 1.667000055
6427 Prop 6 9/15/2013 1018
1680 Prop 3 9/16/2013 389
0764 Prop 1 9/20/2013 6.668000221
0764 Prop 1 9/22/2013 10.00200081
0764 Prop 1 9/23/2013 10.00200081
5226 Prop 5 9/23/2013 125

How can I build my own DVR/PVR?


I have found many resource on Internet but they are all dated from before 2006.


Any people have good information to build a setup to record video from tv to computer?



Answer



What about Windows Media Center and a TV tuner?


macos - How do I reset the $PATH variable on Mac OS X?


I've messed up my path variable, and now some apps that I run raise errors saying Command Not Found (error 127) for commands like date and sleep. These commands work fine when executed directly in the shell.


I'm guessing this has something to do with a malformed $PATH variable, and need to know how to reset it. I've deleted the files ~/.bashrc, ~/.bash_profile, /etc/bash.bashrc, and ~/.bashrc and ~/.profile.


What other files could hold my $PATH? Is there some simpler way to reset the Path than dig into the myriad files which could hold my path?


Note, this path problem is only with my user. I made a test user on my system, and the path was fine, back to normal.


UPDATE: Thanks. I dunno which one of the files I deleted did it, but things are working again. You guys did what the 'Experts' couldn't. And yes, Chris, you were right. The PATH customizations I had made were in bash_login. But somehow it worked without me deleting those customizations. I think it might have been coz I was using this prefpane called 'RCEnvironment', and I had entered a path with quotes and :PATH in it. I dunno whether it takes quotes, and it doesn't replace :$PATH, so that probably is the root of the error. I forgot I even had that prefpane!



Answer



If you have a ~/.MacOSX/environment.plist file, check it to see if it provides a default PATH value.


If it is in XML format (plists can be in many formats), you can edit with any text editor. Check it with plutil -lint ~/.MacOSX/environment.plist if you edit it by hand.


Or, you can use commands like defaults or PlistBuddy to make controlled modifications to XML or binary format plist files.




You can always set your own PATH in any of your shell's initialization files.


Put something like the following in your of your shell's startup files (.bashrc, or .bash_profile/.bash_login/.profile):


PATH=/usr/bin:/bin:/usr/sbin:/sbin
export PATH

# add custom, local installations to PATH
PATH=/usr/local/bin:/usr/local/sbin:"$PATH"

# add MacPorts to PATH
PATH=/opt/local/bin:/opt/local/sbin:"$PATH"

That will override whatever default PATH is set when the shell starts (the first PATH= does not use $PATH, so it will always start out with only whatever you give it).


Only one of the ‘login’ files will ever be used (the first one that exists and is readable of ~/.bash_profile, ~/.bash_login, and ~/.profile will be used). .profile is for backwards compatibility with other shells—if you use it, be sure to keep it free of syntax that is specific to bash. If you go with .bash_login or .bash_profile (they are functionally equivalent except for the names), then use a line like [[ -e ~/.bashrc -a -r ~/.bashrc ]] && source ~/.bashrc ]] near the top so that login shells will also get the customizations made in your .bashrc.


If you want all instances of bash to have the same PATH, then use .bashrc. If you often find yourself interactively modifying a single shell's PATH from the command line and want to use that modified PATH in subshells (a cases that is probably not terribly common), then you should put the statements in one of the ‘login’ files instead. Pick only one of the login files and use it.


firefox - How to block images from a specific domain?

I want to block images from all Google search services, except Google Images and captchas.


I've tried both tools>options>content>exceptions on Firefox and options>content settings>images>manage exceptions on Google Chrome with no luck. They work for other sites but not google.com.

macos - Remove Applications from Location Services in Security & Privacy on Mac OS X 10.8

I wanted to remove applications from location services in the security and privacy settings on MaC OS X 10.8 Mountain Lion. (The apps were still listed even though they were uninstalled.) I found the post Remove application from Location Services in Security & Privacy on Mac OS X 10.7, and that got me going in the right direction. Here is the OS X 10.8.2 Mountain Lion equivalent that worked for me. The main difference is the location of the clients.plist file. I also wanted to provide a step-by-step process.


DISCLAIMER: This worked for me. Make sure you have a good backup of your system. This process includes making a backup of the clients.plist file, but one can never be too safe.


1. Start terminal and then sudo to a root shell
sudo -s


2. Go to /var/db/locationd
cd /var/db/locationd


3. Make a backup of the clients.plist file
cp -p clients.plist clients.plist.save


4. Convert clients.plist to xml (editable format)
plutil -convert xml1 clients.plist


5. Use vi (vim) to edit the clients.plist file and remove the application.
vi clients.plist


The file will likely contain many application entries. Here is the format of a single application entry (Safari in this case). The entire entry needs to be deleted.


    com.apple.Safari

Authorized

BundleId
com.apple.Safari
Executable
/Applications/Safari.app/Contents/MacOS/Safari
LocationTimeStopped
376348187.80421197
Registered
/Applications/Safari.app/Contents/MacOS/Safari
RequirementString
identifier "com.apple.Safari" and anchor apple
Whitelisted



6. Convert the clients.plist file back to binary
plutil -convert binary1 clients.plist


7. Restart locationd
killall locationd


If the apps are still there, do the process again, except restart locationd using kill -9 after determining the PID as follows. The PID is the second field in the ps output.


ps -ef | grep locationd | grep -v grep
Output: 205 427 1 0 6:31PM ?? 0:00.07 /usr/libexec/locationd
kill -9 427


I ran the process twice to remove one app at a time. The first time, killall was sufficient. The second time, it was not. I do not know why. It acted like locationd was keeping a cache and rebuilding clients.plist. I say this because the entries were added back to clients.plist after running killall -- and even on a reboot. Whatever the root cause, using kill -9 solved the problem for me.


If things go badly, then copy back the original file and restart locationd.
cp -p clients.plist.save clients.plist
killall locationd (or the kill -9 method)


I hope this helps. Cheers!

process - How to determine which program is causing Window to have trouble logging off or shutting down?

When logging off Windows 7 SP1 or turning off the computer, how does one quickly diagnose which program is causing the system to issue a warning that a process needs to close?


This post, does a great job providing an answer (albeit not a quick one!) for when the problem is completely unknown. My case is different in that I am 99% certain it is a single program, but I want to make sure before I mess with things (disabling it is not trivial).


The 'Waiting for a program to close' dialog does not list any programs.


Lengthy bootups are pretty simply to diagnose, but how can one quickly determine which program is having trouble terminating itself during logoff or shutdown?

windows - A command-line or batch cmd to concatenate multiple files

I have 50 text files in one directory.


Is there a Windows command-line method to concatenate those files into a single file?


I am using Windows Vista.


I don't want to type the name of all files.

How do you prevent the current user folder from opening when starting Windows Explorer?


When you run Windows Explorer, the current user folder is always fully expanded, taking up a lot of space on the screen. But rarely is the current user folder the folder that I want to go to when starting Windows Explorer.


So, is there a way to prevent the current user folder from opening every time I start Windows Explorer?



Answer



Under Organize / Folder and search options turn off Show all folders (you can also access the option by right-clicking on empty space in the left Explorer pane). Now simply pressing Win+E should start Explorer rooted at Computer without the user folder expanded (at least it works that way for me in Windows 7).


You can also change the Target of the Windows Explorer Start Menu shortcut to something like %windir%\explorer.exe /e,C:\ to open at C:\ instead of Libraries (or whatever the default location is).


Finally, if you want to remove the user folder completely from the navigation pane irrespective of whether Show all folders is enabled or not, follow the tutorial here.


File Explorer Crashing on Windows 10


Whenever i tried to open the file manager it crashes right away but if i go to my Documents for example , i can acess all my files via the dropdown menu like nothing was wrong.


I tried also to right click some folders like c/program files/windowsapp and whenever i right click this folder it crashes too (probably because its a hidden folder and protected[but i got away anyway avoiding to right click and stuff]) Anyone know to fix , i can easily reproduce this error.



Answer



Looks like the utx.dll from Autodesk Inventor 2014 cause the crash:


EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ffd0713a1c8 (KERNELBASE!RaiseException+0x0000000000000068)
ExceptionCode: e06d7363 (C++ EH exception)
ExceptionFlags: 00000001
NumberParameters: 4
Parameter[0]: 0000000019930520
Parameter[1]: 000000000216abc0
Parameter[2]: 00007ffcdf76db30
Parameter[3]: 00007ffcdf600000

DEFAULT_BUCKET_ID: APPLICATION_FAULT

PROCESS_NAME: explorer.exe

ERROR_CODE: (NTSTATUS) 0xe06d7363 -

EXCEPTION_CODE: (NTSTATUS) 0xe06d7363 -

EXCEPTION_PARAMETER1: 0000000019930520

EXCEPTION_PARAMETER2: 000000000216abc0

EXCEPTION_PARAMETER3: 00007ffcdf76db30

EXCEPTION_PARAMETER4: 7ffcdf600000

NTGLOBALFLAG: 0

APPLICATION_VERIFIER_FLAGS: 0

APP: explorer.exe

MISSING_CLR_SYMBOL: 0

ANALYSIS_VERSION: 10.0.10240.9 amd64fre

LAST_CONTROL_TRANSFER: from 00000000738814f1 to 00007ffd0713a1c8

STACK_TEXT:
00 ntdll!NtWaitForMultipleObjects
01 ntdll!RtlReportExceptionEx
02 ntdll!RtlReportException
03 ntdll!LdrpInitializeNode$filt$1
04 ntdll!_C_specific_handler
05 ntdll!RtlpExecuteHandlerForException
06 ntdll!RtlDispatchException
07 ntdll!RtlRaiseException
08 KERNELBASE!RaiseException
09 msvcr100!CxxThrowException
0a utx
0b utx
0c 0x0
0d utx


FAILURE_IMAGE_NAME: utx.dll

FAILURE_BUCKET_ID: APPLICATION_FAULT_e06d7363_utx.dll!Unknown

FAILURE_ID_HASH_STRING: um:application_fault_e06d7363_utx.dll!unknown

Loaded symbol image file: utx.dll
Image path: C:\Program Files\Autodesk\Inventor 2014\Bin\utx.dll
Image name: utx.dll
Browse all global symbols functions data
Timestamp: Thu Feb 28 22:59:45 2013

Install the latest update and look if this fixes it.


java - JDK-Installer doesn't install

I can't install JDK on my Windows 7 64bit system. I downloaded the latest version (jdk-7u4-Windows-x64.exe) from Oracle and ran it. A warning appeared, because it's a download. I commited to continue. Nothing happened. Thus, I tried again (several times). Without success.


Therefore, I downloaded the installer again and tried as well the 32bit version. But no effect.


Hence, I monitored the hard disk with "Disk Pule":


Created, modified and deleted at the end:


C:\Users\USERNAME\jdk1.7.0_04_combo\java_jdk.exe

2 folders were created in:


C:\Windows\Temp\

And after all, this was modified:


C:\Windows\Prefetch\JDK-7U4-Windows-X64.EXE-341334B2.pf

I am at my wit's end. Any ideas?


Edit: Same problem on another PC with Windows 7 64bit.

How do I delete all but 10 newest files in Linux?

I'm trying to keep a directory full of log files manageable. Nightly, I want to delete all but the 10 most recent. How can I do this in a single command?

linux - Is there a way to show notification from bash script in Ubuntu?


Most of the application can show nicely formatted notification on events that appear on top right corner of the screen. I'm about to write a bash script that will do fairy long processing in the background and I really want to know when it is finished. How can I show that nice notification from a bash script?



Answer



If you're using the new notification system in Jaunty, you want the notify-send command


notify-send - a program to send desktop notifications

SYNOPSIS

With notify-send you can sends desktop notifications to the user via
a notification daemon from the command line. These notifications can be
used to inform the user about an event or display some form of information
without getting in the user's way.

OPTIONS

-u, --urgency=LEVEL
Specifies the urgency level (low, normal, critical).

-t, --expire-time=TIME
Specifies the timeout in milliseconds at which to expire the notification.
-i, --icon=ICON[,ICON...]
Specifies an icon filename or stock icon to display.
-c, --category=TYPE[,TYPE...]
Specifies the notification category.

windows 10 - From "battery plugged in but not charging" to "critical process died"

I have a windows10 hp pavilion laptop.


For my laptop before, I had the error "battery plugged in not charging" when my battery had around 30% left and I followed the steps https://superuser.com/a/777827/331921 to get it to work again. However, this time, I didn't do it and the battery went down to 0%. When I try to reboot it, it leads to critical process died loop and now I'm not sure what to do.


None of the recovery methods work so far, including system restore, reset pc, enter safemode ... etc. Not sure what I can do now.

what happens when connected to two networks at same time,using two different wireless network connections?

What happens when connected to two networks at same time, using two different wireless network connections and/or two different wireless network adapters?


Conflict? Or does the stronger connection take charge? Or do they enhance one another? (Example: I have a TP-link booster adapter, which I can plug in via USB and connect, which shows up as a second 'wireless network connection' in my Network Connections. Sometimes the first will pick up one wireless signal from nearby, but the TP-link will pick up another, from a different router/network.)


Can anyone explain in extreeeemely simple terms, to someone who is super bewildered by the concepts of how internet connections work? I wish to know whether I should worry about disabling one if using the other, and all that sort of configuring...


Windows XP Pro home edition

Excel: I need a formula that will count months between two dates. If it's 1-15 it should be a half month. Any ideas?


So I am trying to find a formula for excel. Bascically I have two dates and I need to know the number of months between them. But to add complexity, I need a rule in there that if the earlier date is the 1st to 15th it will be a whole month but if it is 16th to end of the month it will be a half month.


For example: Date 1: April 4, 2012 Date 2: December 31, 2012 Answer: Number of months would be 9 months


If Date 1 was April 16, 2012, with the same Date 2 of December 31, 2012, then the number of months would equal 8.5.


Can anyone help me with this one? You help would be greatly appreciated. many thanks



Answer



Assuming the dates are in G8, H8


=DATEDIF(G8, H8, "m") +1 -IF(DAY(G8) <16,0, 0.5)

enter image description here


Are GnuPG 1 and GnuPG 2 compatible with each other?


With Macports, I realize that there are ports gnupg and a newer gnupg2. I'd like to use GnuPG to encrypt files. Should I install both, or just one is enough? If I installed both, are both compatible with each other? Does it matter which one I install first matter at all?



Answer



GnuPG 1


GnuPG 1.4 ("classic") will stay for embedded and server usage, as it brings less dependencies and smaller binaries. Earlier, it was often installed as gpg, today it is more often named gpg1 (depending on distribution).


From the GnuPG 1.4 man page:



This is the standalone version of gpg. For desktop use you should consider using gpg2 from the GnuPG-2 package (On some platforms gpg2 is installed under the name gpg)



GnuPG 2


GnuPG 2.0 is a redesigned version of GnuPG -- but changes are mostly on internal level. The newer version is split into multiple modules, for example there are also modules for X.509 (used by S/MIME).


From man gpg2:



In contrast to the standalone version gpg, which is more suited for server and embedded platforms, this version is commonly installed under the name gpg2 and more targeted to the desktop as it requires several other modules to be installed.



GnuPG 2.1


An important change came with GnuPG 2.1, which combines the formerly separated public and private keyrings (pubring.gpg vs. secring.gpg) into the public keyring. This has been implemented in a manner keeping things compatible, so you can still use GnuPG 1 when GnuPG 2.1 integrated the private keyring, but changes to the private keys will not show up for the respective other implementation. From the changelog:



[...] allows co-existence of older GnuPG versions with GnuPG 2.1. However, any change to the private keys using the new gpg will not show up when using pre-2.1 versions of GnuPG and vice versa.





To directly answer your question:



Should I install both, or just one is enough? Does it matter which one I install first matter at all?



Just install both. They don't interfere anyway. Install gpg (if not installed anyway) for other applications that access it (like package managers, mail clients, ...), and gpg2 for "direct use" on the command line.



If I installed both, are both compatible with each other?



Both implement the OpenPGP protocol, so they're compatible to each other regarding data shared among them. Additionally, they're (mostly) using the same commands and options, so most of the time you could switch between them arbitrarily.


GnuPG 2.1 makes changes to the private keyring invisible to pre-GnuPG 2.1 implementations (see above in the GnuPG 2.1 section).


Thursday 26 September 2019

windows 7 - My mouse icon is messed on my computer


My mouse cursor has decided to randomly display what appears to be half an 'X' whenever the resize window cursor is displayed. I have circled it in red in this image. It is driving me nuts! I am always misclicking because of it. It is cross application. I see it in everything from Chrome to a report editor.


Oddly, I took a screenshot with 'cursors on.' But the artifact is not included! So I had to take a picture with my phone.


Windows 7 64. Relatively new install (three months old or so). Any ideas how to fix/remove it?


enter image description here



Answer



I found that by uninstalling Synaptics mouse software for my laptop's touchpad via Add/Remove programs fixed the issue. I am very happy.


touchpad - reduce laptop touch pad sensitivity in ubuntu


I have Ubuntu 10.10 Maverick Meerkat installed. The problem is that the tap to click feature on my touchpad is too sensitive in ubuntu. It works fine with windows. I randomly end up clicking things while moving the mouse. Its very irritating. Any solutions ? I have a HP Probook 4410s laptop.



Answer



This works for me in Ubuntu 10.10


To see what trackpad you've got and what it's called, try:


xinput list

My device is called "SynPS/2 Synaptics TouchPad"


There are 3 finger pressure settings: low, high & press. See what their current values are with something like:


xinput list-props "SynPS/2 Synaptics TouchPad" |grep -i finger

Change the values with something like:


xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Finger" 50 90 255

By increasing the second parameter, you require more finger pressure for the trackpad to respond. The first parameter controls release pressure, the third is to detect a button press (I think).


macos - Why won't Firefox recognize application keyboard shortcuts created in Mac OS X System Preferences?


I go into System Preferences, open the Keyboard & Mouse pane, and create keyboard shortcuts for various Firefox menu items in the application keyboard shortcuts section. When I load Firefox, the menu items now appear with the appropriate shortcut listed, but pressing the key combination merely flashes the menu header (e.g. for “Add-ons” it only flashes Tools) without performing the appropriate behavior. I’ve checked the key combinations to make sure they’re unique, checked in other applications and the shortcuts work, and clicked the Firefox menu items to see that they work. There’s just something about Firefox being unwilling to open the menu item when the instruction comes from the keyboard. Any thoughts? (I’m running Firefox 3.5.2 on Mac OS X 10.5.8)



Answer



This is a known issue in Firefox for Mac. You should read this bug report because the author embellished the impact of the issue with humor and Lord of the Rings references. Actual discussion of the core issues and potential fix are in a different bug report.


windows xp - Should I always hibernate instead of shutting down?


I'm using Windows XP and I hate the long start up time when I shut down and then turn on my laptop. However if I hibernate instead of shutting down it starts up much faster. Are there any harmful effects / disadvantages if I always hibernate whenever I'm done for the day instead of shutting down?



Answer



There is nothing wrong with Hibernating, it is an option in windows for all of the reasons you have just listed! I have been using it for years.


Automatic driver search & update on Windows?



I have a Dell laptop issued by my employer, and I always find it a real pain to search for, download and maintain their drivers. It baffles me that there does not seem to be a nice way (product, website, ...) to just download the stuff you need, without hassle. The same goes for the other Windows based laptops in my direct environment.


Are there any (preferably free) automated solutions available? Or do you have a nice workflow - other than searching the manufacturers website - to help smoothing this process?



Answer



Drivermax is free and the best and supports Windows XP, Windows Vista, Windows 7/8, 64 and 32-bit.


google chrome - How do I open `.localstorage` files from Local Storage folder?


I want to open Local Storage files of Google Chrome. I found where Chrome stores them, but I could not open them.


How can I do that?



Answer



You can browse .localstorage files by a SQLite browser, such as the open source program called sql-lite database browser


On macOS, you can install via Brew: brew install sqlite.


macos - How to script Bluetooth on/off and Tethering on Snow Leopard

The Bluetooth / Tethering features in OSX are excellent. But they could be a little bit better. Is there a way to script (via AppleScript?) turning the bluetooth radio on and off, so that I could bind it into a key. No reason to drain battery while not tethered.


It would be even better if the connecting itself could be automated. Now I have to click the Bluetooth icon, then select my phone, and select connect. All unnecessary work I have to repeat many times every day. This could be so much more convinient.

hard drive - Why should I choose (or not) AHCI over IDE in my PC's BIOS settings?


I've noticed in the BIOS settings of the newer PCs I own that I can configure the drive controller work either in AHCI (Advanced Host Controller Interface) mode, or else in IDE mode.


I'm suspecting that AHCI "performs" better, but I really don't know much about that from a practical standpoint. However, I've also noticed that certain programs (e.g. Ghost 2003) simply don't detect my hard drives if I choose AHCI mode. (AHCI = A Heck of Compatibility Issues?)


So ... why does AHCI exist, why should I care and want to use it, and why/when should I not want to use it? Are there features of newer hard drives that require AHCI, and do they otherwise dumb themselves down when running in IDE mode?



Answer



You can see AHCI as the language which the controller uses to speak with the system. The disk can't see if AHCI is being used or IDE emulation. If you use AHCI, all Serial ATA features are available, while you don't need any drivers specific to your controller.


To actually use AHCI, the OS (whether that's Windows, Linux or even Ghost) has to have an AHCI driver. Windows Vista and 7 include the driver, but don't install it if the boot drive's controller doesn't have AHCI enabled. Similarly, the IDE driver doesn't get installed if the IDE controller is disabled. That's why you can't just toggle the setting in the BIOS on an already installed Windows system.


Ghost 2003 was released in 2002, a few years before the AHCI specification was completed. It's hardly surprising that Ghost 2003 doesn't support AHCI. Apparently the latest enterprise version of Ghost can run in a boot environment based on either Windows or Linux, so it's likely that version does support AHCI.


Is it possible to use FUSE with Windows?


(FUSE). Preferably without admin rights. An example would be sshfs, maybe via MSYS?



Answer



There is a FUSE compatibility layer for the Windows File System Proxy (winfsp).


This project seems to be live (as of 2019) - although it looks to be almost entirely a 1-developer show.


Code is hosted on github under GPLv3 - "If you find the constraints of the GPLv3 too onerous, a commercial license is also available."


Someone in my office has got winfsp running, but not using the FUSE compatibility layer.


Temperature monitoring on Dell Precision M4500 under Linux: sensors-detect doesn't, what next?


I have a Dell Precision M4500, Intel Core i5 CPU, running Linux (Ubuntu Lucid), and would like to keep an eye on CPU temperature.


I've tried lm-sensors: sensors-detect didn't find any sensors; following its hint ("This is relatively common on laptops, where thermal management is handled by ACPI rather than the OS.") I tried acpi -V but got nothing thermal. The Gnome panel applet "Hardware Sensors Monitor" reports on GPU temperature but nothing else.


What should I be trying next?



Answer



I find the CPU temperature for M4500 in:


cat /sys/kernel/debug/ips/cpu_temp

database - Excel Formula to Calculate Duration of Time Based on a String of Text Such As 9:00am — 12:30pm

I'm trying to develop an Excel formula that would calculate the actual time duration for a string of a time range of the following format: 1:00am – 3:00am


According to this article it seems it should be as simple as subtracting the two times. For example, to get the hours, minutes, and seconds between two times (4:55:00), the article says to do the following:


=TEXT(B2-A2,"h:mm:ss")

Here's about how far I got:


=TEXT(RIGHT(B2,SEARCH(" – ",B2))-LEFT(B2,SEARCH(" – ",B2)),"h:mm:ss")

I wonder if the problem might be that my string of text has no "date" component in addition to the time. Is the only solution to being able to do the subtraction operation to "fudge" a date into the strings? Or is there another alternate approach, other than simply breaking down the hour and minute components individually and calculating the duration that way? I'd also like to compensate for any potential pm-to-am spans of time, such as 9:00pm — 12:00am if at all possible.

linux - Program SIGNIFICANTLY slower when used from the TTY


So I have a program written in C++.


It can tell me how long it took to do all the calculations and it does a lot of quite heavy, multi-threaded calculation.


I've just noticed that if I run the program on the exact same machine, it takes around 20-21 seconds to do all the calculations if started from the TTY, and only about 0.2 seconds if I start it from GNOME terminal.


What is causing that? It's literally the exact same file on the same machine.



Answer



Some background theory


Well, both what you work with after CTRL+ALT+F1 and GNOME Terminal are different implementations of the same concept: emulating a so-called full-screen terminal.


The former thing is called a virtual terminal (VT) in Linux, or usually just "console". It uses a special "text-only" video mode still provided by the hardware video cards on the x86-compatible platforms (those of the "IBM PC" heritage, that is). The latter is a GUI application.


Both provide applications running with their help a set of facilities such application expect from "a terminal device" (more details and further pointers—here).


The problem at hand


OK, now let's move to perceived slowness.


I'm sure the crux of your problem is that your program does so-called "blocking" I/O. That is, each time you do something like


std::cout << "Hello, world" << endl;

in your code, first the code of the C++ standard library linked to your application kicks in and handles outputting of the stuff sent to the indicated stream.


After certain processing (and most usually some buffering) this data has to actually leave the running process of your program and get actually output to whatever media your programs sends its output to. On Linux (and other Unix-compatible systems) this requires calling into the kernel—via a dedicated system call (or syscall for short) named write().


So the C++ stdlib eventually makes that write() syscall and then waits for it to complete—that is, it waits for the kernel to say back "OK, the receiver of the data told that it acquired it".


As you can deduce, the receiver of the data your program outputs is the terminal (emulator) running your program—either a Linux VT or an instance of the GNOME Terminal in your tests. (The full picture is more complicated as the kernel won't send the data right into a running terminal emulator but let's not complicate the description.)


And so the speed with which that write() syscall completes highly depends on how fast the receiver of the data handles it! In your case, GNOME Terminal is just does it way faster.


My take on the difference is that the VT driver dutifully renders all the data being sent to it, scrolls it etc while GNOME Terminal optimizes bursts of incoming data by rendering only the tail portion of it (whatever fits the terminal's screen size) and puts the rest in the so-called "scroll buffer" most GUI terminal emulators have.


The takeaways to do


The crucial thing to carry away of this is that as soon as your program performs any I/O along with calculations, and you measure the programs's speed of calculation using "wall clock" timer, you typically may well measure the speed of that I/O, not the speed of calculations.


Note that I/O is tricky: your process can be preempted (stopped with its resources handed over to another process) by the OS any time it's about to wait on some I/O resource to become available for writing—such as hard disk drive.


So the sure way to measure "raw" performance of calculations is to have some facility in your program to disable all I/O. If that's not possible or would be too ugly to implement, at least try directing all the output to a so-called "null device", /dev/null, by running your program like


$ ./program >/dev/null

The null device simply discards all the data passed to it. So yes, still each I/O round performed by the C++ stdlib will hit the kernel but at least you'll have almost constant (and alost instant) speed of writing.


If you need both measures and the data generated, consider creating a so-called RAM-disk and redirecting the output to a file located there.


One more on measuring: note that even on a seemingly idle system running a commodity OS (such as your Ubuntu or whatever), CPU never sleeps—there are always some tasks doing stuff in background. This means measuring computation performance even without any I/O or with sort-of "disabled" I/O (as explained above) will still produce different results on each run.


In order to compensate for this, good benchmarking means running your calculation with the same input data several thousands of times and averaging the results over the numbers of runs.


How to prevent Windows 10 from automatically adding keyboard layouts (i.e. US keyboard)


Update: this is a lengthy post, you can jump straight to the answer below




Note: The quick language list refers to the list in the screenshot below, accessible throught the shortcut Win + Space bar


I have two languages for windows spell check in my system, English (United States) and French (Switzerland), but despite both languages being properly configured with "Swiss French" input keyboard, US Keyboard input keeps appearing on this list:


enter image description here


Here's the settings for English (United States) language, you can see the only input is "Swiss French":


enter image description here


Same for Français (Suisse), the only input is "Swiss French":


enter image description here


In the Control Panel, both are also set as Swiss French:


enter image description here


All my settings are set to use "language list":


enter image description here enter image description here


Here's a few things that I already tried:



  • I already managed to remove it by some language configuration gymnastics, by adding and removing languages, it always eventually comes back

  • I have already done this: https://superuser.com/a/484595/168632

  • There's no mention of US Keyboard in my registry settings either:


enter image description here


Please help, I'm desperate, this is my third computer with Windows 10 and they all do the same thing.



Answer



To fix this issue, delete the Preload registry folder and sign out or restart the computer:


HKEY_USERS\.DEFAULT\Keyboard Layout\Preload

This folder seems to be some legacy remnant that contains non-user-specified keyboard layouts to be added to the list of languages when the user signs in. While the fix itself works through restarts, at time of writing there's things that bring back that pesky folder, here's a few that I bumped into personally:



  • Remote desktop to a computer with US layout

  • Using the same Microsoft account on another PC that still has this issue


Whenever the problem comes back, that registry folder needs to be deleted again.


Edit 2: Thanks to @Lu55's suggestion, here's a handy one-liner to use on a command prompt with admin privileges:


reg delete "HKEY_USERS\.DEFAULT\Keyboard Layout\Preload" /f

Edit: I have created a RemovePreload.reg text file with the following content, this way this fix can easily be re-applied every time without navigating the registry:


Windows Registry Editor Version 5.00

[-HKEY_USERS\.DEFAULT\Keyboard Layout\Preload]

To use this, save it in a text file and change the extension from .txt to .reg. Then whenever it comes back, you can just double click it and restart or sign out.


linux - Why is it I can't use my Windows installation both as a host and a guest?

I have Linux installed on my harddrive, sometimes I run it as the host operating system and sometimes run it as a guest in Windows using VirtualBox. It's a nice ability, I think.


I don't think it's possible with Windows though. Is it because your average distribution includes drivers for everything known to man? Are devices/drivers configured statically in Windows so when somethings changed it breaks?

worksheet function - Excel help to lock formulas from adjust on cell insert

I have a excel workbook where there is a hidden sheet that basically pulls data from other sheets in the same workbook just using the = formula.


The problem I am having is if I add a column or cells to sheet the formula is pulling data from it adjust the formula on the hidden sheet. I do not want this to happen.


If I insert a new column C and then add data to column C I still want the hidden data sheet to pull the info from that column. Right now it skips column C.


This is the basic formula I am using: ='OME6500 Commissioning '!C2


Is there a way to lock the formula so it does not adjust on cell insertions on the "OME6500 Commissioning" sheet.

comparison - Compare two excel files

I need to compare two Excel Spreadsheets to see if values of each user in a specific column were changed. The new Spreadsheet may have additional users that were added making the row old users updated.

Wednesday 25 September 2019

microsoft excel - Count cells based on a comparison with value in the same row of another column


There are many questions about counting cells based on conditions, but I can’t quite find a way to count cells when a value in another column, in the current row, is less than / greater than etc. the current cell. Example:


How many cells in column A (below) have a non-blank value AND that value is less than the value in the same row in column B?


A     B
-- --
6
2 1
3* 6
2
4* 6
4 1

The answer should be 2, which is the two I have added as asterisk to (asterisks are not normally in the data).


What I want to use is:


=COUNTIFS(A1:A6,"<>",A1:A6,"<"&cell in column B for whatever row Excel is currently looking at)

… but you can’t do that. Any ideas, preferably avoiding VBA?


NB If there is a solution, ideally it will still work when referring to column names in Excel tables. Using things like offsets is prone to future errors.



Answer



To avoid having to add counter column, I think you can use a SUMPRODUCT formula:


=SUMPRODUCT((A1:A6<>"")*(A1:A6


Excel count unique values if second criteria is also satisfied


I currently have a formula to count all unique values of a range, however I would like to expand this count all unique values, if a second column meets a second requirement, for example.


      A        B
1 Name Location
2 Tim Onsite
3 Tim Onsite
4 Ben Offsite
5 Lisa Onsite

In this instance the unique values of Name will return 3, for that I am using


=SUMPRODUCT(1/COUNTIF(A2:A5,A2:A5&""))

However when I try to use a COUNTIFS it always returns an error.


=SUMPRODUCT(1/COUNTIFS(A2:A5,A2:A5&"", B2:B5, "Onsite"))

Any ideas how to achieve this, so from my sample data, counting Onsite would return 2, (3 unique values, 2 of them satisfying the onsite criteria)



Answer



You need a bit more conversion:


=SUM(IFERROR(1/COUNTIFS(A2:A5,A2:A5&"", B2:B5, "Onsite"),0))


This is an array formula, so after inserting you need to press CTRL + SHIFT + ENTER


How to make a bootable windows USB in Kali Linux


When I tried to boot my PC into Windows 10 I got a screen with a sad face saying unmountable_boot_volume.


After searching it said I needed a Windows 10 USB or CD which I do not have.


I still have access to Kali Linux on my PC by booting up with my SSD.


How can I make a bootable Windows USB with a ISO in Kali Linux OS?



Answer



You can create a bootable usb using the command dd :


sudo dd if=/path/to/windows.iso of=/dev/sdx bs=4M
sync

example: the output of fdisk -l is /dev/sdb1 :


sudo dd if=/home/user/Downloads/windows.iso of=/dev/sdb
sync

windows 10 - Task Manager shows programs that are running - how can I see the ones that have been ended?

How do I find out what programs have been running on my computer even if they have been stopped to the extent that Task Manager can't show a thing?


I don't use my computer alone and am sometimes suspicious.

macos - MS Word: preserve hyperlinks when exporting to PDF

How can I convert a Word document to PDF and preserve all hyperlinks?


I have Word 2011 and Acrobat XI available on OS X. Save As -> PDF from Word doesn't preserve hyperlinks. Acrobat's File -> Create -> PDF... from the .docx file also doesn't preserve hyperlinks.


When testing this, please use a link whose text is not identical to the URL it is pointing to. Many PDF readers will recognize URLs and automatically make them clickable, even if the PDF doesn't actually contain hyperlinks.

linux - How can I call phones from my pc using a mobile phone connected to my pc?

I mean this question in abstract for usb/bluetooth connected featurephones and dumbphones. But also specially for this mobile phone:


Motorola RAZR V3i


I have computers running debian and ubuntu, can connect my phone via usb and/or bluetooth over AT. I tried every phone management software out of the repositories, but they only seem to manage SMS and PIM functions like contacts, calendar. Is there any software that can start and listen for (voice) calls using the phones line and the computers audio system?


UPDATE Still no luck but another question related.

Export podcasts from iTunes as OPML, or some other way?


I recently bought a new computer, and installed iTunes 9 on it, mainly to subscribe to podcasts. All my regular podcasts are saved as subscriptions in iTunes om my old computer.


Is there any way to save myself entering in all the subscriptions individually on my new computer, by maybe exporting the podcast list as an OPML file, or otherwise saving that list out of iTunes?



Answer



Right-mouse click on Podcasts (on the left side of itunes) and pick Export... Then change the Save as type to Podcast Subscription files (*.opml).


cpu usage - Windows 8 Task Manager: how to enable the "CPU Time" column in the Processes tab?

Up until Windows 7, the Processes Tab of the Task Manager would allow you to add the CPU Time column (see for instance Task Manager's possibilities you may not know):



to show it, choose theView menu, click Select Columns and check the CPU Time.



As of the Windows 8 Task Manager,



  • the Select Select Columns menu item is gone

  • the App History tab has a CPU Time column

  • the App History tab only shows Metro style apps (not all processes)


How (apart from using non-TaskManager tools like Process Explorer) can I get the CPU Time column back in the Processes tab?

Make reference in two Excel tables in order to automate a calculation

I have a table in excel. My tables stands several feature values for every month (from 1-44) The tables rows stands for the several features and the table columns for the months. I want to create a new table in which I will make a summary for every 6 months. What I want is to automatically when I change the values from the first month to change the values of the second month. A simple example of my tables are: the initial table and the summary table How can automatically make reference and sum calculation in the second table?


enter image description here The image is my initial table and I want to create a new table with columns the S1_15, S2_15, S1_16, S2_16, ... and the rows the same with the first table. The values of tale 2 will correspond to summary of every semester period.

windows 7 - What precautions should I take once defective RAM has been replaced?

I recently discovered that my RAM is faulty (MemTest86+). I am waiting for new RAM to be sent to me.  It was through sheer luck that I discovered something was wrong. I was copying a large amount of big files and decided to verify the copies by their checksums. I discovered strange discrepancies, and noticed that checksum computation for the same file was not consistent. Now, this is the only problem I have encountered; no BSOD, no crashes, no errors. In a sense this makes me more worried than if I would have had massive crashes. I have no idea for how long the RAM has been faulty, and I have no idea if corrupt bits have been saved into files on my hard drives. I do know the RAM was fine two months ago (tested it back then). I am a user of Adobe's Lightroom and I am worried that photos or the catalog itself could carry corrupt data.


Question: what should I do once new healthy RAM has been installed? Reinstall Windows (I'm using Windows 7, 64 bit)? Is there a risk that I will be presented with nasty surprises in the future if I don't? What about personal files? I have backups of some of the files but for newer files I'm not sure I can even trust the backups. It's going to take me many hard hours to manually replace files with older versions, or compare checksums.

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