What would be the best character to use playing solo?

Question: I'm starting a new character. I'm not really sure what would be the best to use.
Comment: all characters are able to solo the content, it depends on your playstyle, i know people that find zero easier and i myself find maya easier. It all depends on your playstyle and expectations
Answer: There is none who is "made" for playing solo. Every character in Borderlands 2 can be played solo. They just have different fighting styles and therefore, some are better for soloing the game. Note that this only applies to the first 2 difficulties. Once you hit UHVM. The game will become harder. MUCH harder.
Axton:
Tactical fighter, uses mainly mid- or long-range combat weapons like assault rifles. Action skill is a turret which can deal huge amounts of damage or grant shield/ammo. Excels at extended fights or fights in narrow rooms. He is literally a walking tank if played with the rough rider and the skill crisis management.
Personal rating: Probably one of the best characters for playing solo.
Maya:
Assassinlike, can lock single enemies or deal huge damage to certain enemies (e.g. bosses). Prefers SMGs. Focussing on the right tree (elemental damage) can destroy waves of enemies within seconds, but lacking any valuable possibility to keep bosses at bay (e.g. terramorphous).
Also, a rough rider build on her is completely overpowered and makes her almost unkillable.
Personal rating: Good to play solo, but can become difficult in UHVM and farming legendaries with maya is not that easy.
Zer0:
Pure assassin, focuses on stealth, sniper and critical hits. Therefore, I don't have to mention that this guy is awesome in solo play. Unfortunately, snipers become futile in UHVM or above, so you can't play like that forever.
Personal rating: Good to play solo, but it's necessary to switch weapons and/or skilltrees in UHVM.
Salvador:
The rambo of the game. Standing out in the open with 2 weapons and shooting everything. While this may be easy in normal- and TVHM, this strategy will become almost impossible to play if you are not completely overequipped. You will die - a LOT. Salvador is best in a team where he can draw attention and get revived in emergencies.
Personal rating: Probably the worst character to play solo, except you use bugs
Gaige:
DT OP. I don't have to say anything else. Once you hit 5, the game isn't a challenge anymore except for some bosses. It becomes challenging again once you enter UHVM.
Personal rating: It's not a problem to beat the first 2 playthroughs without dying once.
Krieg:
Well, krieg is special. While many people may disagree with me now, saying that you get so much health back/dmg resistance while you burn that it's almost impossible to die, this was the hardest character to play through the game for me. I died more with krieg than with any other character. Maybe it's just because I suck with krieg (I hate his entire playstyle), but this character was purely made for teaming up with others.
Personal rating: NOT made for solo play in my opinion. Needs backup of a good team or at least a heal siren.
Comment: Just five cents from the other side: I'm one of the people who LOVE Krieg. I admit he's wildly different, an I'm just lucky to love the way of that. I had no problem in Normal and TVHM, though having a buddy does help in few situations (the better you play, the less). Didn't try UVHM, likely a team is mandatory.
Answer: With the caveat that I've mostly played solo so far:
I played my first game with Gaige and found she was a great solo character, especially pairing the Deathtrap with an elemental sniper rifle. I've definitely died more often than once though. :)
Right now I'm entering Eridium Blight on my first Siren playthrough, and using the Cataclysm and Motion trees (Converge + Chain Reaction). I got lucky with a Thunderball Fists drop in the Preserve, and that's been a very powerful means of dealing with WAR and badass loaders, especially when phaselocked. Barring a legendary, shotguns and scoped weapons make good phaselock pairings because you can crit more easily.


"Re"-download 10.8 After Purchase of a New Mac

Question: I recently purchased a new Macbook Air which obviously came with Mountain Lion. I am wondering if there is a way to download the installer for free onto another computer I have to create a re-install disk from, without having to pay the $20 to download from the Mac App Store.
Answer: You can download Apple's official OSX Recovery Disk assistant to create a flash drive with the capability to re-install OSX on an eligible Apple computer. A flash drive (it must be larger then 1GB) also enables you to easily re-install OSX on products such as the MacBook Air which don't have optical drives.
There is also a support document about the Recovery Disk Assistant.
Comment: But if you try to use this flash drive to install OSX on another computer, won't it check on-line and see that the compluter is not eligible?
Comment: @Gedgar, yes. It probably will. However, the OP mentioned he desired a "re-install" disk - which would indicate that the computer already had ML. It also seems that one should purchase one license per computer. So if the computer didn't already have a valid OS license, then it would be necessary to purchase a download.


Is it okay to ask for detailed feedback even after I got an offer?

Question: Is it okay to ask the hiring manager for feedback on myself even if I have already got the offer? I just really want to know how I perform, especially compared to other candidates. Also, I believe the feedback might be helpful as it might identify my weakness, etc.
Comment: If you got an offer that means you were either the best candidate or the best one that hadn't turned them down.
Comment: The best thing you can do to get a feeling for your relative performance is to spend some time being the interviewer rather than the interviewee.  You'll see what your competition is like in short order.
Answer: My recommendation is no, don't do this.  Why?  You're sending the message that you're already looking ahead to your next job interview.  This will give them the impression that you don't plan to stick around very long, which is not what you want to do when you're starting a new job.
As a comment says, you were the best candidate for the job - at least who hasn't turned them down (yet).  Consider this confirmation that you interviewed well.
If you accept the job, then once you've started - within conversations about how they want you do your job - it is probably okay to ask if during the interview they noted particular strengths they want you to utilize or weaknesses they want you to work on.
Comment: I think it can also show a lack of confidence in yourself, or even that you were "putting on a show" for the interview and want to know how good the show was. If they made an offer, just accept that you were the best candidate and don't solicit feedback that could be misinterpreted.
Answer: Play it cool. Dont appear so approval seeking. Instead wait for sometime and when you and your interviewer are in a good mood such as on a lunch out or happy hour or some company outing, you can broach the topic in a humourous way
Comment: Hi Jay, assuming you're answering within the context of someone who does land the job, you should expand your answer to explain how to broach the subject. Vague answers that don't explain why a solution is the best tend to attract downvotes on our site due to the nature of the topic. Please see [the Back It Up rule](http://meta.workplace.stackexchange.com/q/255/98) for more details. Hope this helps!
Comment: I guess so :). Will read the back it up rule


Schedule Class does not reach 100% coverage

Question: I created a schedule class to run an update for all leads created 5 days ago
On the test class, I do create a lead BUT I can't set the scheduler to run 5 days AFTER the lead was created (Today + 5 days)
How should I fix it?
Comment: How much %age covered? Can you share your schedule class as well?
Answer: Luckily Salesforce does provide us with an option for your scenario. You can use the Test.LoadData(..) method to insert test data with old created date values. The article below has all the details.
Setting system protected fields for test code coverage
Answer: In testmethods, it doesn't matter what the schedule time is, the scheduler executes as soon as the Test.stopTest() statement is encountered.

The System.schedule method starts an asynchronous process. This means that when you test scheduled Apex, you must ensure that the scheduled job is finished before testing against the results. Use the Test methods startTest and stopTest around the System.schedule method to ensure it finishes before continuing your test. All asynchronous calls made after the startTest method are collected by the system. When stopTest is executed, all asynchronous processes are run synchronously. If you don't include the System.schedule method within the startTest and stopTest methods, the scheduled job executes at the end of your test method for Apex saved using Salesforce API version 25.0 and later, but not in earlier versions.

So, you need to do your asserts on Lead after the Test.stopTest() statement.
Now, if you need to insert Lead test data with a createdDate in the past, you can do as @AAU suggested or, to avoid having to manage another resource in your system (that is, the StaticResource), you can create the Lead simply inline as follows:
<code>String fiveDaysAgo = System.now().addDays(-5).format('YYYY-MM-dd');
Lead l = (Lead) Json.deserialize('{"company":"foo", "lastname":"bar",' +
                                   '"email":"email@example.com", "createddate":' +
                                    '"' + fiveDaysAgo + '"}',
                                 Lead.class);
insert l;
system.debug(LoggingLevel.INFO,'lead (proof) =' +
       [select id, createdDate from lead where id = :l.id]);
</code>


How can I find SQL server instances over a network

Question: How can I find all the SQL servers installed in our network that were not installed by a DBA? Meaning, someone else has installed the SQL server and we need to get the details like SQL server version, instance name and port number so it can be added to our monitoring scripts.
Answer: Use a network scanning tool that has the ability to fingerprint a node based on the ports that are open and the responses that the node gives back on those ports. Something like nmap or the Microsoft Assessment and Planning (MAP) Toolkit. Plenty of other network scanning tools exist that can detect what services are running on nodes. From there you can evaluate if the servers that are discovered to be running SQL Server are in your inventory or not.
Answer: Scanning all the systems SQL ERRORLOG file is one way to get all the details, without needing to auth to SQL itself.
Log file monitors can do this. You can do log file monitors on the OS, or within SQL Server itself.


Android activity manager

Question: I guess, I have a generic logic problem. I want to logout a user after 15 if there is no activity. How do I find any "activity" in android. How should I go about it...
Experts please help...
Answer: You'll need to invest a little thought into exactly what your requirements are here, but from what I can tell, you want to keep track of the user interactions and if a time limit expires since the last interaction, perform some action, in your case logging them out of your application.
Firstly, you'll need some place that you can track when the last interaction occured, since you'll want this to be application wide you could use a singleton to hold this, or override the Application class, either way should do.
Next, you'll need to start tracking user interactions. From your activities, you can override the onUserInteraction method, this gets invoked anytime the user interacts with the application such as key event. Each time you hit this method, update your singleton and let it know something has happened, with a timestamp.
Finally, you'll need some kind of looping check to constantly check if anything has happened recently. Theres various was of doing this, you could have a continuous loop that compares current timestamp to the last recorded event, a bit of draft code :
<code>while(true)
{
   if (timeLastEventRecorded < (now - 15))
   {
      //nothing has happened in 15 minutes, so take corrective action
   }
}
</code>
Presumably you'll already have some code in your application that takes care of logouts, such as when the user clicks "logout", you should just be able to invoke that in the sample above.
Hope this helps
Answer: You should have all activities inherit from a parent activity that overrides onUserInteraction(). In that callback you should reset a static app wide timer that will perform your logout code when the time reaches the end.

Android activity manager


Finding the area of a triangle using fractions?

Question:
 To find the area of the triangle do you use Pythagorean theorem from what you have? Could this use similar triangles.
Comment: The image doesn't exist at the location you refer to.
Comment: Could you clarify?
Comment: @:LittleJon: As you already have an answer by AN who must have seen your image, I assume it was my antivirus that blocked the image location, so only a problem for me (I get 404 if I go to the location). So just ignore what I said.
Answer: Draw the line $QT$. Note that the area of $\triangle PQT$ is $\frac{3}{4}$ times the area of the big triangle $PQR$: same height, base $\frac{3}{4}$ as big.
Note also that the area of $\triangle PST$ is $\frac{2}{3}$ times the area of $\triangle PQT$. The argument is essentially the same. The two triangles have the same base, and the height of $\triangle PST$ is $\frac{2}{3}$ times the height of $\triangle PQT$.
Thus the desired ratio of areas is $\frac{3}{4}\cdot \frac{2}{3}=\frac{1}{2}$.
Remark: A more detailed analysis shows that we do not need to know that the line $QV$ is perpendicular to $PR$. The only advantage of perpendicularity is that it makes the fact that the height of $\triangle PST$ is $\frac{2}{3}$ times the height of $\triangle PQT$ obvious. But the relationship holds even without perpendicularity.
Answer: The area of $\triangle PST$ is the sum of the areas of $\triangle PSV$ and $\triangle VST$.
$$\begin{align}
\text{The area of }\triangle PSV &= \frac12 PV\cdot SV\\
&=\frac12 PV\cdot\frac23 QV\\
&=\frac13 PV\cdot QV,
\end{align}$$
$$\begin{align}
\text{and the area of }\triangle VST &= \frac12VT\cdot SV\\
&=\frac12 VT\cdot \frac23QV\\
&=\frac13VT\cdot QV.
\end{align}$$
\begin{align}
\text{So the area of }\triangle PST &= \frac13QV(PV+VT)\\
&=\frac13QV\cdot PT\\
&=\frac13QV\cdot\frac34PR\\
&=\frac14QV\cdot PR.
\end{align}
The area of $\triangle PQR = \frac12QV\cdot PR$.
\begin{align}
\text{So the ratio }\frac{\triangle PST}{\triangle PQR} &= \frac{\frac14 QV\cdot PR}{\frac12QV\cdot PR}\\
&=\frac{\frac14}{\frac12}\\
&=\frac12.
\end{align}


How do you sync Yongnuo YN600EX II with YN622C-TX Contoller?

Question: I recently bought Yongnuo YN600EX-RT II. I wanted to be able to use it off camera so due to recommendation bought YN622C-TX wireless flash controller. I cannot however get the flash to pick up the controller. I have set the flash to wireless slave mode and made sure that they are both on the same channel - beyond that I din't know what to do
Answer: Sorry, but you were given a bad recommendation. The YN622C-TX is not compatible with the YN600EX-RT II. See if you can return it, and buy the Yongnuo YN-E3-RT which is fully compatible with your YN600EX-RT II.
Yongnuo actually has three separate systems:
1) The first was a simple trigger system called RF-602, RF-603, RF-605 and was later upgraded to include remote manual power adjustment with the YN560-TX transmitter and YN560 III, IV and YN660 with built in receivers.
2) Next was the YN622 system wihich is a TTL system that is designed to operate with the YN622 receivers and the YN685 flash, but also has some limited backward compatibility with the YN560 system.
3) The YN600EX-RT is a clone of Canon's RT system and is not directly compatible with either of the first two systems.
Answer: The only way to control a YN600EX-RT II using a YN622C-TX is to attach a YN622 compatible receiver to the hot foot of the flash and set the flash as if it were mounted on a camera's hot shoe. The YN622C or YN622C II receiver will control the flash as if it were the camera's hot shoe. The radio receiver inside the YN600EX-RT II uses the Canon RT wireless radio protocol. This is a different "language" from the wireless radio protocol used by the YN622 system.
Answer: The YN-600EX-RT II's built in radio trigger is incompatible with the YN-622-TX radio transmitter.
Yongnuo has three separate, mostly incompatible radio triggering systems:

The 560/60x manual only triggers
The TTL/HSS 622 triggers
The Canon RT clone gear

Yongnuo really makes it a PITA to figure out what works with what and you are far from being the first person to make the error of assuming all Yongnuo flash gear would work together. (See also: What are the Yongnuo flash naming conventions?)
You can distinguish which Yongnuo gear is compatible with the YN-600EX-RT II by looking for RT in the device name. You need a transmitter that works in the Canon RT system, although it's probably best to stick to the Yongnuo YN-E3-RT or the Canon ST-E3-RT, since there are reports the Jinbei RT-clone system isn't compatible. Not sure about the Phottix Laso triggers.
So, you could swap your YN-622-TX for a YN-E3-RT. You could add a YN-622 transceiver to the foot of the YN-600EX-RT II to act as a radio receiver and use it with your YN-622-TX. Or you could swap the YN-600EX-RT II for a YN-685 which has a built-in YN-622 receiver in it and would work with your YN-622-TX.
You may want to consider looking at other flash systems where there's a single integrated radio system that lets manual and TTL gear work together. Godox's X system is very popular these days, because their gear is priced in the same neighborhood as Yongnuo's, everything's in the same triggering system, Godox supports mirrorless systems as well as dSLRs, and has bigger lights for future expansion. But if you really want compatibility with Canon's RT radio system, Jinbei's and Phottix's RT gear does that.


Making sense of residuals from a GLM with transformed response

Question: I wish to plot a continuous response variable (richness) against categorical predictors, but in doing so I need to control for a continuous 'nuisance' predictor (depth). My solution is to run a linear model of richness~depth, and then plot the residuals from the model instead of the raw data. However, in order to improve the model fit, I log-transformed the response variable. What implications does this have for plotting the residuals? Can I back-transform them? Would I be better to use an untransformed response and put up with the poorer fit?
Answer: Right, I think I've got this. My aim is to de-trend the data. In a model without transformation, this is  response value – fitted value = response residuals. When the model is fitted with the response variable natural-log transformed, this is equivalent to response residuals = exp(response value) / exp(fitted value). Therefore, in an untransformed model, the residuals are the difference between response and fitted values; in the transformed model, the residuals are the ratio between the back-transformed response and fitted values. This means that raw data values – exp(fitted values from log model) = difference between raw and fitted values. This is the de-trended data that I've been after: the value that remains once the influence of this predictor has been removed.


How to Enable Lock on Suspend in Xubuntu

Question: I'm using xubuntu and I cannot enable the screenlock when suspending the machine.
How do I enable the lock on suspend?
Answer: Xubuntu uses gnome-screensaver. First, you must replace gnome-screensaver with xscreensaver. The tool that locks the screen on suspend uses xscreensaver. On top of that, if you use an external monitor with gnome-screensaver on a laptop, and lock the screen, it will be delayed in switching to the external monitor's resolution, or not do it all, unlike xscreensaver (in my personal experience).
To remove gnome-screensaver run:
sudo apt-get remove gnome-screensaver

Then, install xscreensaver:
sudo apt-get install xscreensaver

Xscreensaver will be automatically added to your list of startup programs as the default screensaver program once gnome-screensaver is removed and it's installed in its place. If it's not, add the command xscreensaver -nosplash to your to your list of applications to be ran upon login. You can change xscreensaver's setting in the XFCE settings manager. To have all extra available screensavers for xscreensaver, run sudo apt-get install unicode-screensaver xscreensaver-gl-extra rss-glx xscreensaver-data-extra.
Next, you need to install xss-lock. This program will invoke the xscreensaver lock screen upon system suspend.
To do this, run:
sudo apt-get install xss-lock

Next, you need to run xss-lock on start and tell it to suspend the lid when closed. This part is weird, but follow me. I don't know exactly WHY you have to do this, but it won't work otherwise. You need to create an executable with the command to do this instead of just have it run that command on login. To do this, I created a file simply called suspendwhenlidclosed, and pasted the command in there.
That command is:
xss-lock -- xscreensaver-command -lock &

Next, give it permission to run as a program, in this example, the file suspendwhenlidclosed is in the home directory.
sudo chmod +x ~/suspendwhenlidclosed

Next, copy the file to /usr/bin so that it can be ran from the command line, for conveniences sake.
sudo mv ~/suspendwhenlidclosed /usr/bin

Now, add the command to list of commands to be ran upon login, you can do this from the XFCE settings manager. Open the program named Settings Manager in Settings category in the Whisker Menu, or the Application Menu if you use that, and from within the Settings Manager, open Session and Startup, and go to the tab Application Autostart. There is also a shortcut to Session and Startup in the Settings category. Click the add button and add suspendwhenlidclosed to the list like in the screenshot below.

Lastly, if you log in and out, another instance of xss-lock will be created for each time you do that, and each extra instance will have high CPU usage. To prevent this, you must run the command killall xss-lock during logout. To achieve this, create another file, in this example I call it killxsslock and it is also placed in my home directory.
Create the file killxsslock, copy this command into it, and save it.
killall xss-lock

Next, give it permission to run as a program:
sudo chmod +x ~/killxsslock

Move it to /usr/bin so it can be ran as a command:
sudo mv ~/killxsslock /usr/bin

To have killxsslock ran on logout so extra instances of xss-lock aren't created when logging in and out, you need to add two lines to your lightdm config file.
Open the file with:
sudo mousepad /etc/lightdm/lightdm.conf

Next, add these lines:
[SeatDefaults]
session-cleanup-script=/usr/bin/killxsslock

And save. Then log in and out. Xscreensaver will now be your default screensaver and your laptop will automatically run the lock screen upon suspend. I hope this helps someone! :D
OP had added this to their question - moved the content here as CW
Answer: Go to Session and startup > Advance and mark the Lock screen before sleep option

Don't worry.I am sure that it will work in Xubutnu as mint is made from it.


Lion: Task switcher icons are badly discolored

Question: when I press command-Tab to get the task switcher icons, to let me change the foreground program, I am seeing that after a little while, the icons are badly miscolored. Anybody else seeing this bug? Thanks.
Comment: could you add a screen shot for records?
Comment: Does this happen after running any particular apps? Think about any graphics-heavy apps you might be running, such as photo editing apps or games.
Answer: Yes, I'm seeing the same problem on occasion. For me it happens mostly often when I connect an external display - the switcher looks as though it's underneath a semi-transparent black overlay. Restarting Dock.app (which runs the application switcher, as far as I know) doesn't help, but rebooting the laptop with the external display still attached does.
I've reported the issue to Apple (using their bug reporter) and have been informed that it's a known issue. Hopefully there will be a fix soon.


How can i compile a DLL so it works with VS2005/2008/2010

Question: I have a C++ dll. Is there a way to compile it so that it can be used with VS2005/2008/2010 instead of me having to do 3 different builds?
Thanks
Comment: What do you mean "so it works"?
Comment: this question doesn't really make any sense anyway!
Answer: You can generally "use" a C++ dll with any version of Visual Studio, if you're just linking to it.
However, when your dll is compiled, it will be targetted to a specific version of the C++ runtime, so end-users of your program will need to have that runtime (Visual C++ redistributable package) installed on their PC. So if you use a dll built by VS2005 and an exe built by VS2010, your end user will have to install both the 2005 and 2010 redistributable packages. The same generally goes for other libraries if you use them (MFC, etc)
If you do this, you will also have to be careful about memory allocation - memory allocated in one runtime version cannot be safely deallocated by another. So anything that your dll allocates must also be deallocated by the dll, and anything allocated by your exe must not be deallocated by the dll.
As a result, most people will rebuild the dll with the same version of VS as they build the rest of their program in, to minimise the compatibility issues - ultimately it's much easier to build in each verison of VS than to sort out all the issues involved in not doing so.
(Hint: You can run VS from the command line and get it to build a project/solution, so it's a 5 minute job to write a batch script that will automate building all three variants in one go)
Answer: The version of visual studio in use doesn't make a difference as to whether a given assembly can be referenced.
The only thing that matters is what version of the framework the assembly was compiled against.. Assuming it's a .net assembly anyway.
Regardless, it's common practice to provide versions compiled against each framework rev (2.0, 3.5, and 4.0) anyway.
However, if you are compiling an unmanaged c++ dll; then just provide a 32 bit and a 64 bit version of that dll.  In this case the .net version in use (and visual studio version for that matter) is immaterial.


How to transfer tokens from metamask to myetherwallet

Question: Can't seem to find a "send tokens" button on metamask. Does anyone know how to do it?
Answer: You could just export your metamask account to myEtherWallet.

Select your account on Metamask. Click Export Private key.
You can copy the private key or save it to file.
Open MyEtherWallet --> View wallet info tab.
There you could access your metamask account in myEtherWallet without needing to transfer it.
If you wish you to transfer, you could do it from myEtherWallet to any account (including that of MyEtherWallet).


Payment using Paypal buy now and IPN

Question: I have a feature on my website which I want to enable after user pays for it. I am using Paypal buy now button and Instant Payment Notification. When user clicks on buy now button, user is taken to paypal website to pay and by IPN asynchronous call is received by my jsp file when transaction is complete.
My question is how can I keep track which user has paid if the user uses different email ids while subscribing on my website and while paying on paypal website.
Answer: Use the "custom" parameter. You can send this along in the initial request to PayPal, and it will be returned to you along with all other data in the IPN POST from PayPal.
For Website Payments Standard, use:
<input type="hidden" name="custom" value="your custom data here">
For Express Checkout or Website Payments Pro, use:
    CUSTOM=xxxxxxxxx
It will be returned as "CUSTOM=xxxxxxxxx" in the IPN POST data.

Payment using Paypal buy now and IPN


What is the difference between document.location.href and document.location?

Question: What is the difference  between document.location.href and document.location?
Is it the same across browsers?
Comment: Everything is an object. I think what you mean is that unlike `location.href`, it isn't a simple string.
Comment: @Max Shawabkeh yes location.href is a string
Comment: document.location is an object
Answer: document.location is a synonym for window.location that has been deprecated for almost as long as JavaScript has existed. Don't use it.
location is a structured object, with properties corresponding to the parts of the URL. location.href is the whole URL in a single string. Assigning a string to either is defined to cause the same kind of navigation, so take your pick.
I consider writing to location.href = something to be marginally better as it's slightly more explicit about what it's doing. You generally want to avoid just location = something as it looks misleadingly like a variable assignment. window.location = something is fine though.
Comment: `document.location`. It's no longer deprecated in HTML5 now, for what it's worth.
Comment: Does it `document.location` or `window.location` which is deprecated?
Comment: This thread is ancient but I want to point out that they mean different things, in part because the `window` object can contain more than one document. In a web page rendered in a browser, the value of `window.location` will typically match the (potentially read-only) `document,location.href` property, but it's the former -- `window.location` -- that should be considered mutable and suitable for triggering navigation.
Comment: They are defined to all work the same, yes. `location` is the same reference as `window.location` as long as you haven't defined a local variable with that name; it's not clear whether the spec requires that `document.location===window.location`, but it does in current browsers.
Comment: who else is here because typescript 2.0 made `document.location` a readonly property and your code doesn't compile anymore ;-) [the answer of course is `document.location.href` instead]
Comment: So... in HTML5, nothing is deprecated. And `document.location` is the same than `window.location` is the same than `location`, aren't they?
Answer: The document.location is an object that contains properties for the current location.
The href property is one of these properties, containing the complete URL, i.e. all the other properties put together.
Some browsers allow you to assign an URL to the location object and acts as if you assigned it to the href property. Some other browsers are more picky, and requires you to use the href property. Thus, to make the code work in all browsers, you have to use the href property.
Both the window and document objects has a location object. You can set the URL using either window.location.href or document.location.href. However, logically the document.location object should be read-only (as you can't change the URL of a document; changing the URL loads a new document), so to be on the safe side you should rather use window.location.href when you want to set the URL.
Answer: typeof document.location; // 'object'
typeof document.location.href; // 'string'

The href property is a string, while document.location itself is an object.
Comment: The dot-notation alone clarifies this
Answer: document.location is an object, while document.location.href is a string. But the former has a toString method, so you can read from it as if it was a string and get the same value as document.location.href.
In some browsers - most modern ones, I think - you can also assign to document.location as if it were a string. According to the Mozilla documentation however, it is better to use window.location for this purpose as document.location was originally read-only and so may not be as widely supported.
Answer: document.location is deprecated in favor of window.location, which can be accessed by just location, since it's a global object.
The location object has multiple properties and methods. If you try to use it as a string then it acts like location.href.
Answer: As of June 14th 2013 (HTML5), there is a significant difference
Browser : Chrome 27.X.X
References: document.location, window.location (MDN)

document.location
type: Object
The object when called by itself document.location return its origin + pathname properties concatenated.
To retrieve just the URL as a string, the read-only document.URL property can be used.
ancestorOrigins: DOMStringList
assign: function () { [native code] }
hash: ""
host: "stackoverflow.com"
hostname: "stackoverflow.com"
href: "http://stackoverflow.com/questions/2652816/what-is-the-difference-between-document-location-href-and-document-location?rq=1"
origin: "http://stackoverflow.com"
pathname: "/questions/2652816/what-is-the-difference-between-document-location-href-and-document-location"
port: ""
protocol: "http:"
reload: function () { [native code] }
replace: function () { [native code] }
search: "?rq=1"
toString: function toString() { [native code] }
valueOf: function valueOf() { [native code] }

document.location.href
type: string
http://stackoverflow.com/questions/2652816/what-is-the-difference-between-document-location-href-and-document-location?rq=1

Answer: Here is an example of the practical significance of the difference and how it can bite you if you don't realize it (document.location being an object and document.location.href being a string):
We use MonoX Social CMS (http://mono-software.com) free version at http://social.ClipFlair.net and we wanted to add the language bar WebPart at some pages to localize them, but at some others (e.g. at discussions) we didn't want to use localization. So we made two master pages to use at all our .aspx (ASP.net) pages, in the first one we had the language bar WebPart and the other one had the following script to remove the /lng/el-GR etc. from the URLs and show the default (English in our case) language instead for those pages

But this code isn't working, replace function just returns Undefined (no exception thrown) so it tries to navigate to say x/lng/el-GR/undefined instead of going to url x. Checking it out with Mozilla Firefox's debugger (F12 key) and moving the cursor over the curAddr variable it was showing lots of info instead of some simple string value for the URL. Selecting Watch from that popup you could see in the watch pane it was writing "Location -> ..." instead of "..." for the url. That made me realize it was an object
One would have expected replace to throw an exception or something, but now that I think of it the problem was that it was trying to call some non-existent "replace" method on the URL object which seems to just give back "undefined" in Javascript.
The correct code in that case is:


installing centOS as second OS on laptop

Question: I am going to install CentOS 5.6 by bootable dvd and I arrive at the Installation Method stage that forces me to choose one item to identify CentOS packages. My CentOS iso file exists on my hard drive and I dont know which one to choose?
Comment: I don't understand the question. Can you word it more clearly? Try using short sentences, with punctuation.
Answer: If i understand you correctly, installation method depends on the source of the system you will install. In general, your choice is between local (from the CD/DVD/USB that you've inserted or from NFS share in your network) and remote (ftp, http). Just choose "DVD/CD-ROM " as method and follow the prompts. This has nothing to do with coexistence with Windows.
Stage, where you decide on coexistence is partitioning. You have to make sure to retain your current NTFS partition, so don't choose 'automatically remove all partitions on disk'. And don't remove it manually. Installer will automatically find that you have second OS in later stages and give you option to boot either CentOS or Windows from the boot manager (GRUB)
Also, take a look at the Installation Guide. It may be a great help for you.
Comment: Don't move your NTFS partition either, since it is really important to Windows that C:\, which contains the \System directory, is the first partition.
Answer: Consider nuking your Windows partition, after archiving all of its content, and reinstalling Windows as a virtual machine.  I've had fairly good experiences doing this with Windows 7 on Xen on Debian Squeeze (stable; I confess that the Win7 on Parallels on OSX is much nicer to use, but that is likely not an option given your stated hardware).  I see the Xen wiki has a writeup for HowToXenWindowsOnCentOS5, for WinXP.  For either, you need to do a little configuration of the Windows guest OS:

http://www.virtuatopia.com/index.php/Installing_and_Running_Windows_7_as_a_Xen_HVM_domainU_Guest for Win7; or
http://www.virtuatopia.com/index.php/Installing_and_Running_Windows_XP_or_Vista_as_a_Xen_HVM_domainU_Guest for WinXP.

A particularly nice thing about virtualisation is that sharing filesystems becomes painless: Xen will mount your Linux filesystems as drives on your Windows guest, so that you can use the same home directory for both Linux and Windows.  And you can install Windows from an ISO image file, rather than needing physical media.
If you must go the separate-boot on separate-partitions route, the process I recommend goes so:

Archive your Windows drive; you will nuke existing partitions with this installation;
Start installing your preferred flavour of Linux;
Choose GRUB as your boot loader;
Make the first partition large enough for Windows and complete installation of Linux to your second partition.  Oh, and it is probably good to have a third Linux rescue partition.  Consider also having a FAT32 partition for painless-to-get-going sharing between Linux and Windows;
Format your first partition to be NTFS.  You might not need to do this, since the Windows installation usually is able to do this itself, but sometimes it won't, and sometimes it is not respectful of other partitions;
Install Windows.
Tell GRUB about Windows.

Several of these steps might give you trouble: feel free to come back and ask for help if they do.


Difference between push pull and half bridge

Question: I don't understand well the difference between push-pull and half bridge. Someone told me it was totally different but as I understand it, half bridge is a generic name where we have 2 switches and a load connected in the middle. So I guessed that push-pull circuit is just a kind of half-bridge. Is that correct?
Comment: I would consider a half-bridge to have a more limited scope than a push-pull driver. But if you hang only on the point about being able to source and also sink current, they are similar. A half-bridge usually carries a "switch nature" to it, in that you will either switch the high side or the low side (or neither, but never both.) So a half-bridge doesn't usually imply a linear operation. A push-pull driver might very well be designed for and provide linear operation and not just switching. But I'm a hobbyist. So I'll let the professionals give you the gospel. It's their turf.
Answer: A half-bridge is a specific style of push-pull stage where the two active elements are in series across the supply and they alternately conduct to supply current to the load. The name usually refers to a switching output stage rather than one with linear control or only low power output.
The term push-pull refers to any type of circuit where there are two active devices that each drive one half-cycle of the signal - one pushes and the other pulls.
The devices can be in series across the supply or both be between the supply and ground and use a transformer to combine the two halves.  They can be be used in linear mode for analog signals or just on/off for switching purposes.
The active devices can be any type of device such as FETs, electron tubes (valves), bipolar junction transistors etc.
Here are some examples:
Half-bridge:

Transformer coupled push-pull:

Complementary push-pull:

TTL output stage:
Comment: Emitter is marked "collector". Shorts out my mind.
Comment: But what do you mean by "output stage"? Does it mean you cannot use a push pull in a middle of an electronic circuit? You can just use it in the output?
Comment: It can be used anywhere but is most common where significant power is required.
Comment: @GregoryKornblum - thanks I didn't notice that on the image I snagged from the web - corrected.
Answer: I have always felt push pull was a bit of a misnomer as the two active switches are generally connected to the same polarity, which would give a push push (if switching negative) to the center tap ( positive). And a bipolar supplied output stage would be a push pull.


Disable WordPress accessing WordPress.org to check for updates

Question: My ISP having trouble accessing Wordpress.org through SSL connection, thus I am facing performance issues.
How Can I entirely block WordPress admin trying to access Wordpress.org to check for latest updates and other things ( By other things I mean any reason that WordPress wants to connect to wordpress.org through SSL ).

Thanks.
Answer: There is a feature that you can use in wp-config that relates to disabling plugin and theme updates.  You can try it out and see if it helps.
define( 'DISALLOW_FILE_MODS', true );

You can learn more about this feature in  the codex.
Answer: I hope below code fix your problem-
function the_dramatist_remove_update_check(){

    global $wp_version;
    return (object) array(
        'last_checked' => time(),
        'version_checked' => $wp_version,
    );
}
add_filter('pre_site_transient_update_core', 'the_dramatist_remove_update_check');
add_filter('pre_site_transient_update_plugins', 'the_dramatist_remove_update_check');
add_filter('pre_site_transient_update_themes', 'the_dramatist_remove_update_check');

Place this code in your functions.php or anywhere that executes. It will prevent you WordPress from checking updates.
Comment: Still having the problem
cURL error 28: Operation timed out after 6000 milliseconds with 0 bytes received. cURL error 7: couldn't connect to host.
Answer: Perhaps very hard solution, but you can modify ( if you have access to ) your /etc/hosts file and add a line like:
127.0.0.1 wordpress.org
Your server is going to answer with a 404 very fast in comparison.
Just a little trick, not very serious, but perhaps it works for you.
Do not forget to remove this line from your /etc/hosts file everytime you plan to update.
[NOTE] This solution doesn't require to restart Apache/nginx server nor other restarting issues, you put it and it works from the first time.
[NOTE 2] This solution makes 'believe' your server that wordpress.org is located in your localhost, and will ask for it in local, and your web server should answer with a 404 not found or 500 error.
Answer: When WordPress makes calls to api.wordpress.org, it sets the https scheme using set_url_scheme() depending on whether wp_http_supports() responds that ssl transport is available. See for example in wp_update_plugins() (Line 302 in wp-includes/update.php).
There is a filter in set_url_scheme() which can be used to switch back to http scheme for the api calls.
function wpse245334_set_url_scheme( $url, $scheme, $orig_scheme ) {
    if ( 0 === stripos( $url, 'https://api.wordpress.org/') ) {
        $url = preg_replace( '/^https/i', 'http', $url, 1);
    }
    return $url;
}
add_filter( 'set_url_scheme', 'wpse245334_set_url_scheme' );

Like this the calls to the API should all be made without using SSL. This is not as safe, but should still be better than not making the updates. Keep in mind that in case of a failing connection, WordPress might output error messages about failing to establish a secure connection.


What is the Quantum Transition Time for Photon Emission?

Question: When an electron in an atom changes energy states to emit a photon, how long does the process take? Is this question even meaningful?
Comment: Maybe related to this question: http://physics.stackexchange.com/q/141685/
Comment: It is just as meaningful in classical physics. If we want to measure the frequency of an oscillator or a wave with perfect precision, we need to have an infinite aperture. Quantum mechanics didn't improve on this limitation of classical measurement.
Answer: Both the ground state and the excited state are eigenfunctions of the time independant Schrodinger equation. That means they are also time independant so the excited state will never decay to the ground state i.e. the transition time would be infinite.
However the excited state doesn't decay to just the ground state, it decays to the ground state plus a photon, and the oscillating electric field of the photon is not time independant. The electric field of the photon has to be included in the Hamiltonian, and when you do this the Schrodinger equation is no longer time independant and the excited state is no longer an eigenfunction. There is now a non-zero probability for the excited state to decay, so the decay rate will be greater than zero and the (average) transition time will be less than infinite.
Strictly speaking the presence of the photon makes this a relativistic system, and we should calculate the decay rate using quantum field theory. There are some comments about this in the answers to the question Why and how, in QED, can excited atoms emit photons?. However for most purposes we can calculate transition rates using Fermi's golden rule. There is a detailed discussion of the calculation in the question Interpretation of "transition rate" in Fermi's golden rule and the answers to it. If you're interested in seeing worked examples, e.g. for the hydrogen atom, a quick Google will find you lots of articles on the subject.
Comment: Hmmm... the coupled QED Hamiltonian is still time independent, it's just a system that, after it is initially prepared will decay once and never go back to its excited state. To include the time dependent field of the photon sounds like some perturbative approximation to me. Can we explain it to the OP using a non-relativistic time independent Hamiltonian? Maybe using a potential that has a local minimum but that also has an energetically lower flat area that extends to infinity?
Comment: @CuriousOne The standard description of this process in quantum optics goes via the Jaynes-Cummings model, which is time-independent. Talking about the time-dependent field only makes sense when the light field is in a semi-classical (e.g. coherent) state. In the full quantum treatment the role of the oscillating electric field is replaced (formally speaking) by the oscillatory time dependence $e^{-iEt/\hbar}$ of the photon states. Nevetheless, the Hamiltonian is time-independent; the point is that the interaction mixes the $n$-photon and atomic eigenstates so transitions occur between them.
Comment: @CuriousOne BTW, the purpose of my comment was simply to point out that the Jaynes-Cummings Hamiltonian is easy to understand but also gives extremely good agreement with experiments at optical frequencies, so no need for a contrived model Hamiltonian. I think [this answer](http://physics.stackexchange.com/questions/29401/a-two-level-system-absorbs-a-detuned-photon-where-does-the-extra-energy-go/29414#29414) gives a nice exposition of the relevant details.
Comment: @MarkMitchison: I understand the system, I am just not sure that the answer goes to the heart of the OP's question. The time-Energy uncertainty exists already in classical mechanics and it has nothing to do with time dependence of the Hamiltonian that shows up in the semi-classical treatment.
Comment: @CuriousOne To be clear, I was agreeing with you; time dependence is not the explanation. I was just pointing out that the Jaynes-Cummings model is a good place to start along the lines you were suggesting. And indeed that the answer I linked already contains a lot of the necessary elements.
Answer: Perhaps it is now only a curiosity, but there is a classical answer to this question that can give order of magnitude estimates that are close to the answers provided by quantum mechanics in many cases.
If an electron is in a circular orbit (i.e. thinking of the now obsolete Bohr theory), then if we look at it from a
direction that is in the orbital plane, the electron appears to
execute a sinusoidal oscillation, with amplitude equal to the
electron radius in the atom, and frequency given by the circular motion
angular frequency.
$$
 m_{e}\, r\, \omega^{2} = \frac{Z\, e^{2}}{4\pi \epsilon_{0} r^{2}}\, .
$$
If the orbital plane is the x-y plane, and we observe from the
y-direction, then we see a sinusoidal oscillation in the
x-direction of the form $x= r \sin \omega t$. Differentiating
twice with respect to time, we can show that the mean acceleration squared is
$0.5\, r^{2}\, \omega^{4}$, and this value can be put into Larmor's formula
for the amount of power radiated by an accelerated charge.
$$ P = \frac{e^2 < \ddot{x}^2 >}{6\pi \epsilon_0 c^3}$$
(in SI units).
The kinetic energy of the electron is given by $m_{e} r^{2} \omega^{2}/2$, so if we take the ratio of KE to power
radiated, we have the lifetime of the state.
$$
\tau = \frac{m_{e}\, r^{2}\, \omega^{2}}{e^{2}\, r^{2}\, \omega^{4}}\,
6\pi\epsilon_{0}\, c^{3} = \frac{6\pi\, \epsilon_{0}\,m_{e}\,
c^{3}}{e^{2}\, \omega^{2}}\, ,
$$
(again, all in SI units) which is the reciprocal of the classical damping constant and sometimes known as the classical radiative lifetime.
Putting in some numbers we can see that, for instance the lifetime of
the ground state of hydrogen is going to be very short (like
$10^{-8}$ s), so something is clearly wrong and this is one of the things that motivated the search for a better atomic theory.
However, this formula does give the right sort of order of magnitude for the radiative lifetimes of transitions that are allowed by electric dipole transitions, where $\omega$ would be given by $\hbar \omega = E_2 -E_1$.
A proper quantum mechanical treatment will involve Fermi's golden rule and a more correct calculation of the transition probabilities. These result in "oscillator strengths" that modify the classical radiative lifetime.
In many cases though we have transitions that are "forbidden" by electric dipole transitions. That is, the change in quantum numbers results in zero transition probability. In which case radiative transitions may proceed via magnetic dipole or electric quadrupole routes with much lower probabilities and the classical calculation utterly fails.
Thus the timescales for atomic transitions vary enormously, both because of the frequency dependence of the classical lifetime and the quantum mechanical selection rules. e.g. The radiative lifetime for spontaneous emission in hydrogen atoms can vary from as little as $2\times10^{-9}$s for Lyman alpha, through to 10 million years for the forbidden magnetic dipole hyperfine transition responsible for 21 cm radiation.
Answer: If we want to study the decay of an excited atomic state, the atom must be coupled to the radiation field. This can be done (and usually is) non-relativistically. The overall Hamiltonian then consists of the sum of a free atomic part, a free field part and their interaction. Now the atomic excited states are no longer bound states but turn into "resonances". The latter can be characterised by complex energies where their imaginary parts (their width) determine the decay rate of the excited atom. They can be approximately calculated using golden rule type expressions.


How to prevent trash bins from falling by placing apart or side-by-side, on a windy day?

Question: How can you secure trash-bins at the end of a sloped driveway, on a windy day?  Is side-by-side placement recommended to stabilize bins or should they remain apart as generally advised by sanitation company?  Thanks!
Comment: Welcome to the site.  Your question doesn't appear to be about home improvement, and might be a better fit on another Stack Exchange site like [Physics.SE](http://physics.stackexchange.com/).
Comment: I get that, but depending on the level of answer you want, this might not be the best site.  If you want to understand the physics behind your question on a detailed level I wanted to make sure you knew there were better Stack Exchange sites for that.
Comment: The automatic grabber is an amazing time saver, but it cannot work on cans that are too close (grabber needs to get on each side of can).  So the driver has to climb down off the truck and reposition your cans.  You really need a flat place to put your cans, landscape accordingly.
Comment: This question does not appear to be about home improvement within the scope defined in the help center.
Comment: The objects are everyday household objects, but the expertise needed to answer the question (forces caused by cars rushing by stationary objects) is definitely in Physics.SE.  If you were to change this question by asking how you can secure trash bins at the end of a sloped driveway, it would be a good fit for this site.
Comment: I'm not sure if this applies, as it depends on your area, but I believe most sanitation companies now prefer space between the cans for those who use the automated trucks. I'm sure the space only helps them out and makes their jobs easier.
Comment: [This answer](http://diy.stackexchange.com/a/1576/38195) suggests placing a few cinder blocks snug around the *outside* of the can.  They're short so they wouldn't interfere with the pick-up mechanism.  The machine probably won't be able to place the can back inside of the blocks, i.e. the can would tip over, but would you care?  The objective (I believe) is to keep the cans upright so they can be picked up, and you don't care what happens after that.
Answer: Placing the bins close to each other has nothing to do with them tipping over or not. The reason they tip over is because of the relation of the "point of rotation" in its relation to the direction of wind.
When the "point of rotation" (the wheels) are placed on the leeward side, then it takes significantly less effort to rotate (tip over) the bins. So, if the bins can be rotated 180 degrees so the wheels are on the windward side, it will be much more difficult to tip the bins over, (because the fulcrum point is moved a couple of feet against the wind.)
Likewise, if the bin is set on a slope, it will be "more difficult" or "less difficult" depending on which side the point of rotation is placed in relation to the wind. So, if they won't let you rotate the bins, you could place a small object (like a wood block, etc.) under the wheels. This will move the center of gravity towards the wind and thus make it more difficult to tip the bin over.
Comment: I don't understand the point of rotation argument. The bottom edge of the bin is just as good of a fulcrum as the wheels. In fact, wheels on the leeward side should make it *harder* to tip the bin, since as the bin begins to tip, the force of the wind will cause the whole bin to start rolling and counteract the tilt. If it starts to tip on an edge instead of a wheel, the force of the wind just provides torque to tip the bin, as none gets "bled off" by moving the bin translationally.
Answer: In my area the problem with the sloped driveway is solved by simply placing the bins along the curbing to the side of the driveway. The roadway surface is typically sloped down a small amount toward the curb and this helps to keep the wheels of the bin squarely against the curb. This in my experience offers more support for the bin in high wind conditions by trying to place them directly adjacent with each other.
The negative factor with placing bins directly together is that the trash company driver will often bypass pickup at your location if you do this. And you can expect to get the bright orange warning sheet taped to your bin if you persist in doing this.
Answer: According to my friend who is a medical doctor and mechanical engineer, the best way to position garbage-bins during a windy-day — without supporting materials to anchor — is to situate them side-by-side exactly as I've pictured in the posted-question; boundary conditions explain the stabilizing-effect achieved: a very large, single-file line of trash-bins will efficiently resist forces during windy-conditions and more effectively than if they were otherwise arranged spaced-apart.


Today there is privacy.resistFingerprinting.letterbox which prevents Firefox/Tor from Leak the screen resolution of the computer

Question: Is today resizing the tor window make it easier for governments to track Tor users?
When privacy.resistFingerprinting.letterbox is on, is it possible to resize the tor window to the maximum without the government/advertising site/Facebook/etc... being able to track me as a person seeking privacy?
What is Letterbox?
Letterbox is a feature that prevents a special resolution like: 1091x949 by adding empty space around the site to round the resolution to 1000x900 and thus prevents a user from making himself special. A resolution of 1091x949 is a very specific number and if a site sees that only one person uses this resolution then it will be easy follow him but if the resolution is 1000x900 then it will be more difficult to follow such a person with a thousand people who have the same resolution.
(in any case changing the resolution does not affect your connection to the site you will still be protected and no one can know who you are The browser is well built, YOU are the one who will cause yourself to leak information Like your first name or your IP address or even your email. If you change the resolution when Letterbox is running then in any case when you close the browser the resolution resets to the default settings so I can't figure out how exactly it will matter what the Browser size is if everyone starts Letterbox and opens the window Tor in full window so everyone will have the same resolution which makes tracking a Tor user a bit harder )
Am I right?
**The only reason I think that tor should not be increased to full window is the possibility of a site to identify, despite the letterbox, on which computer the browser is opened, because there is a difference in the resolution of a laptop and a desktop computer, and Windows is usually because Windows increases the size of applications and text on laptops so that laptop users will be comfortable use the laptop but it can be solved! Simply that Tor will oblige the laptop user to change the "Scale and layout" settings from 120% or any other number to 100% and that way sites will not be able to tell if the Tor user is using a laptop or a desktop computer
Answer:
Is it possible to resize the tor window to the maximum without [THEM] being able to track me as a person seeking privacy?

There is no 100% guarantee if you resize to the maximum, nor if you don't resize at all.


How do I add jquery animation to the pagination in Matrix?

Question: How do I add jquery animation to the pagination in Matrix? I got help from P&T Support and they showed me how to add pagination to Matrix in Expression Engine. I was wondering how to add jquery animation/fade/slide to the Matrix row changes?
Comment: Welcome! Please consider showing some more effort in your question. What have you tried? What stumbling blocks are you hitting? Show your work!
Answer: If you want animation for the pagination, you should use jQuery. Here are 10 jQuery Pagination Plugins to look at.


IR rays over carrier frequency of 34Khz?

Question: How is IR rays that have carrier frequency of ~1014 Hz generated by GaAs in remote control carried over carrier frequency of 34Khz to the sensor?
Answer: There are two different frequencies, in two entirely different contexts, involved.
The infrared light generated by an infrared LED is in the 300+ GHz range, this is correct. For instance, the TSAL5400 IR LED often used in remotes has its radiation peak at 940nm wavelength, i.e. 318,930 GHz.

However, IR remote controls do not output continuous infrared light. The LED output is "chopped" via control circuitry into pulses of a given frequency, such as 34 KHz, 38 KHz, 40 KHz or 56 KHz.
The IR sensor at the other end filters incident IR at the specified frequency, and ignores any IR that does not conform to this chopping frequency or modulation. This ensures that stray infrared light, such as from sunlight, heat sources, or incandescent lamps, is ignored by the sensor, and only the correctly modulated incoming IR is acted upon.

This block diagram illustrates the operation of the classic, and now obsolete, TSOP17xx family of IR receivers, with the bandpass stage shown. This part, for instance, offers the following versions by chopping frequency:

TSOP1730 30 kHz
TSOP1733 33 kHz
TSOP1736 36 kHz
TSOP1737 36.7 kHz
TSOP1738 38 kHz
TSOP1740 40 kHz
TSOP1756 56 kHz

There are multiple different such chopping frequencies supported by standard IR sensors for remote controls, so that two different remotes do not interfere with each other.
The above chopped (modulated) IR signal is further switched on and off in a binary pulse stream, to convey the actual remote control commands, of which several different standards exist. That goes beyond the current question, a bit of searching will provide additional information.

UPDATE: Adding an analogy to explain the concept of how this all works...
Consider several pairs of people standing on opposite sides of a deep valley. People on the north side have bright green flashlights, with which they are to signal their respective partners on the south side.
In order to make sure that each south-sider only bothers with signals from their own partner on the north side, ignoring everyone else, each pair decide on a flashing (strobe) frequency... The first pair agree upon a pattern of 5 flashes a second. The second pair decide on 11 flashes a second. The third pair, 17 flashes a second... and so on.
Now, if the first south-sider sees a green light flashing at 5 flashes per second, they sit up and pay attention. If the flashing is more rapid, or less, they ignore it.
Next: How does the north-sider communicate a specific message over to the south-side partner? Merely indicating that they exist, by flashing their light at the agreed upon frequency, is not enough. So they agree upon Morse code, with a dash being 2 seconds of activity, a dot being 1 second of activity, and gaps of half a second between each two symbols.
So, to send the letter "D", the first north-sider flashes the light 5 times a second, for 2 seconds, then a gap, then again flashes for 1 second, then a gap, then another 1 second, then stops.
On the other side, everyone except the partner of the first person ignores the flashes, since they flash rate is not their agreed 11 or 17 flashes a second. The first partner however picks up the "D" message. Everyone looks up their Morse code reference booklets, and the game continues.

In this analogy,

The green flash light is like the infrared itself - its spectral composition (electromagnetic wavelength) is irrelevant to both parties, other than merely that it is visible to the other side, the sensor.
The 5 or 11 or 17 strobes a second are the "baseline modulation", like the 34 or 38 KHz.
The durations of 1 or 2 seconds that the flashing is done, for each symbol, are like the code modulation Drummond referred to. During the 1 second "high" period, the flashlight is rapidly strobing, at the previously mentioned flash rate. During the "low" period, all is dark - or others up north could be flashing their lights at 11 or 17 times a second, which is of no interest to south-sider #1.
The Morse code protocol mentioned above is the equivalent of the Sony or other remote control protocol used by your TV.
The person on the north is the sending microcontroller, their partner on the south is the TSOP1738 sensor.

I hope this makes things a bit clearer. If not, someone else will have to try explaining.
Comment: Forget about the Thz, that is just light. That light is modulated (switched on and off) at (for instance) 36 kHz, and that modulated stream is switched on and off (not by a square wave, but at a frequency of around 0.5-1 kHz) by the information that is transmitted.
Comment: Additional note : the first domestic "wireless remotes" were ultrasonic, with little (probably piezoelectric) transducers at each end. When practical IR LEDs came along, they were simply plugged into essentially the same electronics working at the same ultrasonic frequencies. This worked well enough that nobody has ever bothered to come up with another modulation scheme!
Comment: @starblue Visible: 790 THz - 430 THz, Infrared: 430 THz - 300 GHz, Microwave: 300 GHz - 300 MHz.
Comment: @sk1 Please see the update to my answer above, with a detailed analogy.
Comment: @AnindoGhosh I just fell in love with your explanation. It helped me understand the reason behind the process and the process itself. Thanks for the wonderful explanation.
Comment: Should I understand it uses shift-keying techniques in which the modulated signal is of Thz frequency but the pulses are of frequency 38Khz?
Comment: The frequencies of infrared light are in the 300THz range.  300GHz is the upper end of microwave.
Comment: @Wouter I didn't understand why the modulated signal at 36Khz is again modulated at 0.5-1Khz? Also what modulation scheme is used for both of them.
What I have understood is the IR rays are chopped into bursts at a rate of 34000 such bursts in 1 sec each lasting for some time. This I see as Amplitude shift keying. Now I have 34000 Bursts/Pulses of signal having frequency 300Thz. Now what is the need of modulating it again at 0.5-1Khz? Is it in lieu of the commands and information carried, like frames and all?
Comment: @sk1 in case Anindo's explanation is not enough: imagine that I am blowing on whistle in morse code. The whistle creates let's say a 2 kHz tone, which is keyed on/off accoerding to the morse code.
Comment: @Anindo Ghosh My comment wasn't meant as a precise explanation of IR wavelength, I just wanted to prod you to fix your answer.
Answer: To restate Anindo's answer more briefly,
In an IR system like this, you have a data signal with a few kHz bandwidth.
You use that to modulate an electrical carrier in the range of 35 - 50 kHz.
You then use that electrical signal to modulate a ~100 THz "carrier" by switching an LED on and off. Because of its high frequency, this 100 THz carrier has a lot of special properties, so we normally talk about it as "light" instead of "rf".
Answer: To clarify the relationship between the frequency of the infrared "light" and the so-called "carrier":
Technically, in modern IR remotes, the infrared "light" is the carrier, and the so-called "carrier" in the ultrasonic range is actually the sub-carrier, with the command data modulated onto the ultrasonic sub-carrier.
The reason that the ultrasonic frequency is referred to as the "carrier" is that in the first wireless remotes, the commands were actually carried on an ultrasonic "sound" carrier.  The first wireless remotes had a few ultrasonic tuning forks, which would be rung to control on-off, channel, sound, etc.  Have you ever heard an old person refer to the remote as "the clicker"?  The reason for that is that when you pushed one of the buttons, it would ring one of those ultrasonic tuning forks.  You couldn't hear the ultrasonic frequency, but you could hear the click.
Further, if you had a parakeet, it could hear and repeat those ultrasonic "chirps" and randomly change the channel on you, which could be annoying.
The infrared remote of today is a big improvement over the ultrasonic remote.  The channel doesn't change whenever the bird chirps!
Comment: Welcome to EE.SE, Robert. Your answer is somewhat confused. Infrared is neither sonic or ultrasonic, both of which require a physical medium through which to transmit sound waves or vibrations. Infrared is electromagnetic. Note that the accepted answer was written five years ago.


Why are there exactly 2$^\omega$ perfect subsets of the real numbers?

Question: How can you proof that there are $2^{\omega}$ perfect subsets of the real numbers?
Comment: If $\omega$ is the cardinality of the integers, then this is not the case.  Or by $\omega$, do you mean the cardinality of the reals? If so, then how do you define $2^\omega$ anyway?
Comment: @Omnomnomnom: $\omega$ is the cardinality of the integers, and the assertion is correct: there are $2^\omega$ perfect subsets of $\Bbb R$.
Comment: 2$^\omega$ is defined as the cardinality of the reals (as is \omega the cardinality of the natural numbers)
Comment: @BrianM.Scott I misread the "perfect subsets" part of the question, and then I said something stupid. Thank you for the correction.
Comment: @Omnomnomnom: I wondered if that's what had happened. You're welcome.
Answer: Let $C$ be the middle-thirds Cantor set, and for each $x\in\Bbb R$ let $C+x=\{y+x:y\in C\}$ be the translate of $C$ by $x$. Clearly each $C+x$ is perfect, and $C+x\ne C+y$ if $x,y\in\Bbb R$ with $x\ne y$, so $\{C+x:x\in\Bbb R\}$ is a family of $2^\omega$ perfect subsets of $\Bbb R$. This shows that there are at least $2^\omega$ perfect subsets of $\Bbb R$.
By definition a perfect set is closed, so to finish the argument it suffices to show that $\Bbb R$ has only $2^\omega$ closed subsets. Since there is an obvious bijection between the closed sets in $\Bbb R$ and the open sets, we need only show that there are just $2^\omega$ open sets in $\Bbb R$. $\Bbb R$ has a countable base $\mathscr{B}$ (e.g., the family of open intervals with rational endpoints). For each open set $U\subseteq\Bbb R$ there is a $\mathscr{B}_U\subseteq\mathscr{B}$ such that $U=\bigcup\mathscr{B}_U$. There are only $\omega^\omega=2^\omega$ subsets of $\mathscr{B}$, so there are at most $2^\omega$ open sets in $\Bbb R$ and hence at most $2^\omega$ perfect sets.
Thus, there are exactly $2^\omega$ perfect subsets of $\Bbb R$.
Answer: There are at least $2^{\aleph_0}$ perfect sets, namely those of the form $[0,a]$, for $a$ a positive real. So it is enough to show that there are no more (by the Bernstein-Schroeder theorem).
But a perfect set is closed, and a closed set is the complement of an open set, so it is enough to check that there are at most $2^{\aleph_0}$ open sets.
Now, an open set is a countable union of open intervals with rational endpoints. There are countably many such intervals, so at most $\aleph_0^{\aleph_0}=2^{\aleph_0}$ open sets.

A very similar idea, coupled with something like transfinite induction, shows that in fact there are $2^{\aleph_0}$ Borel sets, see for example here.
Moreover: The Borel $\sigma$-algebra admits a natural stratification (or hierarchy) as $\bigcup_{0<\alpha<\omega_1}\mathbf\Sigma^0_\alpha$. Here, $\omega_1$ is the smallest uncountable ordinal, and:

$\mathbf\Sigma^0_1$ is the collection of open sets. Their complements (the closed sets) form the $\mathbf\Pi^0_1$ sets.
$\mathbf\Sigma^0_\alpha$ ($\alpha>1$) is the collection of countable unions of the form $\bigcup_{n=1}^\infty A_n$, where each $A_n$ belongs to some $\mathbf\Pi^0_{\beta_n}$ with $\beta_n<\alpha$. The complements of these sets form the $\mathbf\Pi^0_\alpha$ sets.

One can check that $\mathbf\Sigma^0_\alpha\subsetneq\mathbf\Sigma^0_\beta$ whenever $\alpha<\beta<\omega_1$. And a more refined argument than the one above shows that, for each $0<\alpha<\omega_1$, $|\mathbf\Sigma^0_\alpha\setminus\bigcup_{\beta<\alpha}\mathbf\Sigma^0_\beta|=2^{\aleph_0}$, and the same happens replacing each $\mathbf\Sigma$ with $\mathbf\Pi$. That is, it is not just that there are continuum many perfect sets: We also have that each level of the Borel hierarchy adds continuum many new sets.
(For a deep extension of this result in the choiceless context of determinacy, see here.)


Raise and Rise revisited - But what if it's a noun?

Question: I come to you again from the cooking site. I see this: What is the difference between "raise" and "rise"? and it comes close to answering my question, but not quite. In my world of the cooking obsession, the words in question (or at least one of them) can also be a noun, as in "the bread's second rise". This is a quote from my most recent answer on the cooking site, "When you're ready to bake, punch down the dough again (if necessary), shape, and allow to rise as if it had never taken its little nap in the refrigerator. Of course this raise is going to take longer than non-refrigerated dough as it reaches room temperature." Those lines are clumsy as hell, but are they grammatically correct?
Comment: I'm British, and I'd use 'rise' on the last line too. Looks like a typo or mistake to me.
Comment: I see on this board that in the UK one gets a pay rise, which sounds odd to me, a Yank. I've always received a raise. FWIW, my question refers to American English.
Comment: I used to think the culinary world had its own "English" not very like the one we know in any one part of the world. Be globally understandable to be a writer on cooking. Recipes do not know AmE & BrE. Good luck.
Comment: @Kris That's a nice way to look at the challenge. :)
Answer: I think the problem is that raise and rise are being used as a noun and a verb, respectively.
Rise as an intransitive verb means to move upward, to become higher, to slope or extend upward. Rise as a noun means an increase in amount, number, level, etc.; an upward movement; or the act of advancing to a higher level or position : the process by which something or someone becomes established, popular, successful, etc.
However, curiously, when rise (n) means an increase especially in amount, number, or volume, the dictionary states that the British say raise.
Raise is a transitive verb (one can raise the dough, but the dough rises), but as a noun, it's very limited in meaning an increase in amount of of a bet, a bid, wages or salary. Not volume.
To allow the dough to rise (v) makes sense, but the 'rise' in "of course this raise" might be 'raise' because the author is British.
This is the only way I can explain it. Is your source British?
raise
rise
Comment: There is no source really but my own history as a cook. The lines I quoted above are mine, I just used rise and raise in the manner that felt right. It wasn't until I cursorily proofread my answer that I was struck by its awkwardness. I'm American and have only recently been immersed in the international cooking community that is the cooking site here on SE. Lots of Brits, lots of Americans, lots of ESL.
Comment: The idea that *raise* as a noun is British seems to be contradicted by [this Google Ngram](http://www.oxforddictionaries.com/definition/english/raise?q=raise). Also, [Oxford Dictionaries Online](http://www.oxforddictionaries.com/definition/english/raise?q=raise) restricts the noun *raise* to games like bridge and poker, and to salaries (salaries only in North America). Which dictionary says this?


Does Omega retain some of its boss form abilities as party member in the non-Japanese versions?

Question: I saw in some videos that are in Japanese that sometimes when there are lots of enemies he uses his lightning shock from his Adena and his flamethrower, but I haven't seen either of those two skills being used in any version out of Japan.  I am just asking to make sure if they exist also in non-Japanese versions.
Comment: I don't know what this is, but it sounds great.
Answer: They do exist, must be with Noel and Serah on Rav and have the paradigm on wide, while Omega is the only com.


"Which stage is most desirable?" or "Which stage is the most desirable?"

Question: Which sentence is correct? Should I put "the" before "most"?
Comment: We really need a bit more information.  To what "stage" are you referring?  Is it a "stage of life," as in childhood, young adulthood, middle age, old age?  Is it the stages of love, or friendship, or intimacy, or intellectual growth?  Give us more information, please.
Comment: I was talking about the "product life cycle" in marketing. There are five stages, and I wanted to ask students, "which stage is most desirable?". I know that "which stage is the most desirable stage?" is a correct sentence, but what if I do not want to add "stage" (noun) at the end of the sentence. Can I still say "which stage is the most desirable?" or "which stage is most desirable?"
Answer: You must remember that the is a definite article. Quoting the explanation from Wikipedia,

A definite article indicates that its noun is a particular one (or
  ones) identifiable to the listener. It may be something that the
  speaker has already mentioned, or it may be something uniquely
  specified. The definite article in English, for both singular and
  plural nouns, is the.
The children know the fastest way home.
The sentence above refers to specific children and a specific way
  home; it contrasts with the much more general observation that:
Children know the fastest way home.

Which stage is most desirable?
Which stage is the most desirable?
When you ask me the first question, I do not have the concrete options to answer your question. But when you ask me the second question, we are already talking about stages and you are expecting an answer from a concrete set of options. I hope that I answered your question correctly. :)
Answer: "Most" without the definite article is an adjective meaning "very", but more emphatically, such that "it is not possible that you could be more welcome", e.g. "You are most welcome", or "it is most likely that it will rain before Friday".
"The most" refers to one choice out of a definite set of choices numbering more than two: "the most desirable solution is that which costs the least".
For a set of precisely two specific choices, "the more" is used instead of "the most"; e.g. "of the wrists upon which one might expect to see a watch, the left is the more likely".
To address your explicit example, though, both forms are grammatically correct - they just ask different questions...
Three young ladies, all having been complimented with the expression "You are most charming", might playfully ask "which of us is most charming?" to which the best answer is "why, all three of you, of course!". No gentleman would dare to answer the question "which of us the THE most charming?" !
You are probably asking your students to select one and only one answer, in which case "the most" is correct.


Linux Mint 19 no login screen

Question: I have just created a bootable Linux USB and added three accounts: My Account, My brothers account and a Guest account. every time i boot Linux up it used to log me straight into the "mint" default account. I changed it so it would log into mine hoping that a login screen would show up since all the others accounts require a password. But it logs me straight into mine. I would like a logon screen to show up when i boot into Linux but this doesn't occur. I can switch users after it log's me in to another and it shows the logon screen there but not when i first boot it up. Is there is a way for a logon screen to show up after booting into Linux Mint 19 on a bootable USB?  Also would there be any way to disable the "mint" account. I am using Linux mint 19 Cinnamon.
Comment: What shows up in your System Settings -> Administration -> Login Window? (Or if no login window, then mdm or lightdm, etc)
Answer: On install there is an option when creating your username to autologin or manual login.  To change this after install you need to:
menu --> Administration --> Login Window
Click the "Users" at the top, then delete the user that is in the "Username" box under Automatic Login.  Close and reboot and you should be presented with a list of users to login with.
Comment: there is no mdm file but there is a lightdm file. in it it says: [SeatDefaults] allow-guest=false allow-login-guest=false autologin-user=mint autologin-user-timeout=0 [seat:*] greeter-show-manual-login=true greeter-hide-users=true atologin-user=dextron.
Comment: I cannot edit the lightdm file even when I'm an admin
Comment: Edited answer above.  Did that work for you?
Comment: I have Linux on a live USB so I'm assuming I actually have to install it on a USB to use Linux properly
Comment: Yes, changes will not persist from reboots on a live USB.  Best way for you to do this is to do a full install of Mint on to a USB drive.  There are many ways to do this, one is to dd the image to a USB drive and another is explained here https://forums.linuxmint.com/viewtopic.php?f=46&t=186040&p=963551#p963551

Linux Mint 19 no login screen


How do I root my galaxy S 9 +

Question: I need help, I have tried a few things like towlroot, but  it wont let it install. I download  the apk file then on the permissions i clicked ok then install this is protected by Google play. Then if i keep trying to install it, it just keeps saying app not installed
Comment: What do you mean with "won't let it install"? Could you describe what you saw to us?
Answer: 1.Enable Developer Option (settings - about phone - Software information - Tap 7 times on build number to activate developer option in settings menu)
2.Enable OEM Unlock from developer option (Currently no workaround for those who doesn't have this option)
3.Download and copy G965F_root_OEM_issue_devices_V* .zip to Ext SD card
4.Download TWRP for S9+
5.Switch Off device
6.Press Vol down + Bixby + Power to reboot to download mode, press volume up when asked to continue to download mode
7.Download Odin and open it, Disable 'Auto reboot' from option menu of Odin
8.Select TWRP (tar image) with AP tab of Odin and Start
9.Once Successfully flashed, you will see 'Passed' in Odin tab
10.Disconnect device and hold Vol down + power till screen goes off, Now immediately press Vol Up + Bixby + Power to reboot to TWRP
11.Select to allow modification
12.From TWRP, Select WIPE menu - Then FORMAT DATA - You need to type 'yes' to perform wipe. WARNING : This will erase all data including Int SD storage from device
13.Once format device completes, go back and select REBOOT' Menu and then - 'RECOVERY', This will reboot to TWRP again
14.Now select Install and navigate path to Ext SD card - N965F_root_OEM_issue_devices.zip, you have copied earlier, select desired root method and select 'OEM Patch' option if your device have OEM issue. If you are not sure about this then better select 'OEM Patch', this will prevent losing OEM unlock option and so prevent 'custom binary error'

Select one of rooting method in aroma (superSu/Magisk)
For SuperSU to work select kernel option (patch stock kernel)

17.Once flash successfully finish, Reboot to System
If you have selected Magisk then Magisk app may appear in drawer after one reboot.
Open settings - Developer option - Look for OEM Unlock option. If it is there, it is safe to reboot device.

How do I root my galaxy S 9 +


If I do not want to join the shared lunch every day, how to do this nicely enough?

Question: The members of my team always go "for lunch" all together and invariably always to the same shop nearby, just to grab the cheap sandwich and then eat in the office. I would strongly prefer to eat more normal food, there are completely affordable public canteens nearby, slightly more expensive (not even twice). Is it possible to disengage from the team without creating tensions of the kind "he does not like us"? What is the best, most professional phrase to say I am going on my own?
Comment: I already left an answer, but one clarification that may help -- is your issue that you don't want to eat the same food they are, or that you don't want to socialize with them over lunch? You might get different responses depending on the issue.
Comment: Does this answer your question? [How can I politely decline a team lunch?](https://workplace.stackexchange.com/questions/645/how-can-i-politely-decline-a-team-lunch)
Answer:
just to grab the cheap sandwich and then eat in the office

"Thanks team, I think I'm going to eat _____ instead. I'll meet you back in the cafeteria/break room/etc."
There's no obligation to eat the same food as them, and since they bring it back to the office anyways, you can still be a part of the group (if you desire).
Comment: @Jack across multiple companies and social circles in each I'm not sure if I've ever had someone get personally offended over what I chose to eat or not. If that was someone's reaction then OP probably would benefit from avoiding those coworkers anyway.
Comment: This is gonna backfire.  "Oh so Joe's Sandwich shop isn't good enough for you now?"
Comment: It's a status thing.  The OP mentioned that the only reason they go is because the sandwiches are cheap.  This is implying the OP is better than them and would not eat that cheap drivel which would likely offend the co-workers.
Comment: @Jack I disagree. I believe OP meant "cheap" to be a proxy for low quality meals vs "more normal food", and even stated it was not that much more expensive (so it is not the "I only dine at Michelin restaurants while you plebs eat your sandwiches" situation).
Comment: It's perfectly reasonable to want something more substantial than a sandwich for lunch. I seriously doubt people would hold it against you. I've worked places where most people go to a cafeteria, and where most eat lunch in the break room that they've brought in. And either way, not everybody does the same or holds it against others. The downside is likely to be feeling less of a part of the company and not catching up on all the gossip.
Answer: One option is to find another takeout place and meet with the rest of the team after each gets their own takeout. You would still eat with the team.
Or if you want to go someplace else, that's fine too, as long as you make sure that you seperating from the team is simply because of the food choice and everybody understands that.
Just be proactive and ask the others to join you.

Hey guys, I heard there is a nice place just around the corner, it's called X. I'd really like to try it out, you want to join me? I though about lunch today, but we can make it tomorrow or even friday if that's better.

Now the ball is in their court. Maybe they don't like the place, maybe they don't want to change their routine, but that's on them. You certainly tried.
If the team is large enough, they might even split up depending on personal choices. We always had the daily menus of the canteens around us and would decide based on what people wanted to eat. If someone really craves asian food today, I'm not going to hold that against them. Next day it might be a burger we both want and the day after maybe I'm in a hurry and just have a sandwich and they go get a lasagna. There is no need to spent the lunch break together, it only gets akward if it's not about food choices.
Comment: This would probably be the best - if the social part is not an issue but the food choice is, one can make an entire team or a part of it switch to a supposedly better option. If the social aspect is problematic, one can simply decline an invitation or say something along the lines of "I'll be following my own routine" - in a few occasions I had to experience this, there was not a single time they'd follow up with something negative.
Answer: Since they return to the office, you can occasionally join them upon their return, and see how it goes.  Maybe you can go with them every so often.  Don't make a big deal about where they go, just share some camaraderie with them


Why didn't Walt use a sniper rifle to assassinate Gus in S4E12?

Question: Rewatching the episode, the rooftop spot seems like the perfect place to set it up. Walt could have used it himself or just hired somebody. Why not?
Answer: Sniping is a skill. One that takes many years to master. The show has shown many times that Walt is not very good with a hand gun, so it would be very unlikely he could use a sniper rifle.
And finding someone he could trust to hire with this skillset would be very difficult, if not impossible in the limited time frame. He doesn't have the connections to the underworld that Gus has. Even if Saul "knows a guy who knows a guy", he would still have to set up the meeting, and make the plan all before the window of opportunity arises.
EDIT:
I happen to be binging through Breaking Bad, and on S4E7, Walt actually asks Saul about hiring a hitman. I can't recall the exact quotes, but Saul mentions that he knows two guys. Both of which know Mike because Mike is the one that referenced them. And if, "And that's a big if", they could find a guy, he'd still have to contend with Mike who seems to know how to prepare for everything.
So basically, Sniping was out of the question.
Comment: Exactly my thoughts. Walt is good at planning schemes and chemistry. He played exactly to his major skill sets.
Comment: Minor niggle: not every hitman is a sniper.


Website not coming in Google local listing?

Question: so i have a website which comes up in Google local listing for the keyword "plastic surgery in mycityname" but does not come up when i enter "plastic surgery mycityname". Notice the missing word "in". Though the website comes up in organic search at 1st and 2nd position. What could be the reason for that? Is this algorithm driven or am i missing something?
Answer: Now a days local listings are all about Google My Business. Have you set it up, verified it, etc?
In case you have not, this would help a lot.
Comment: I have and i also have lot of reviews. By local listing i mean Google my business listing.