Change QT5 theme

Question: I am using i3wm on Ubuntu 15.10.
I was wondering on how to change the QT5 theme?
With old QT4 it was possible to change it with qt4-config. There is however no qt5-config as of yet.
I have tried using qt-config-tool, but it segfaults on launch.
There is also lxqt-config, but it is only in xenial repositories, and I need it for willy.
So is there an elegant way to change QT5 themes with Ubuntu 15.10?
Also, what is the package name of the KDE system settings, so that I try to apt-get it? Will it pull all of KDE to my system or just some qt libs?
Comment: QT5 has only one theme: Fusion. You can launch QT5 apps with "-style=fusion" argument to see it.
Comment: I was hoping for a more elegant solution.  Can't I install other themes?
Answer: The package/app you're looking for is qt5ct which is the new and much better version of the old qt(4)config for qt5.
With it you can customise almost every aspect of your qt5 apps. You can set fonts, icon theme, colour schemes and widget styles, other small interface feauters and Qt style sheets (qss) to be applied globally to all qt5 apps. And you can save your colour schemes with different names and easily change between them.
As to the widget styles you can install qtcurve, kvantum and virtuality (in addition to the preinstalled GTK+, Windows and Fusion).
Comment: While your answer may be valid it lacks on content, please provide proper steps and aswll have a look at [Editing Help](http://askubuntu.com/editing-help) to see how you can format your post nicely

Change QT5 theme


What does Sartre mean with that existence precedes essence and how is it related to the earlier existential philosophers' thoughts?

Question: What does Sartre mean with that existence precedes essence and how is it related to the earlier existential philosophers' thoughts?
Existential philosophers like Kirkegaard, Heideggers and Friedrich Nietzsche?
Comment: Is there any chance you could share a little more about why this might have become an interesting or important problem in your study of philosophy? What hypotheses have you formed and what has your research turned up so far?
Answer: Existence precedes essence means human beings are not defined by an a priori nature.  Rather, what's fundamental about us is that we exist. This stands in contrast to traditional philosophies and theologies which claimed people had an essence (e.g. man is a reasoning animal, man has a divine spark, etc...).
Bare existence lacks meaning, as such we are faced with dread, awe, and to believe in something greater requires a leap of faith (Kierkegaard), for we don't have the comfort of "knowing" what to do.  Additionally, the lack of meaning invites nihilism, atheism, iconoclasm and of course freedom and its implications on morality, and this is where Nietzsche comes in.
Furthermore, bare existence is about consciousness, and as such about being in the world, phenomenology, how we relate to time.  Heidegger figures prominently here.
Answer: What Sartre means is that first we exist as free beings that have absolute freedom to do anything, and then we can retrospectively assign essence to ourselves.
The key concept here is freedom. Sartre was 100% for free will, and he rejected any kind of determinist argument (regarding human agency, not nature) as 'determinist mythology'. If we have an essence, it would mean that we are determined by that essence.
Believing that essence precedes existence leads to 'bad faith', which you can clearly observe in people who associate too much of their being with their job. They start to act unnaturally, and it often comes off as weird, annoying and pretentious. For example, I am a software developer, most people in this field are highly intelligent and quite nice, but very frequently they behave in this autistic manner that really annoys me. Usually a guy might tell you to 'refactor the API endpoint to fix a bug', even though he knows perfectly well that you have no idea what the **** he is talking about.
Bad faith is fake, it is inauthentic, but is is a natural human tendency because freedom makes us feel anxious, think about the last time when you were at the grocery store and could not decide between pistachio and strawberry ice creams.
Kierkegaard also thought that freedom makes us anxious. For Kierkegaard, anxiety is a part of our existential condition and it is not directed at a particular object, unlike fear.
Heidegger agreed with Schelling that we have free will, and he had several seminars on Schelling.
Nietzsche did not explicitly address the free will / determinism argument. He thought we should create our own standards for greatness and be masters of our fate, he was a free spirit kind of thinker.
Answer: It's part of a sea change of philosophy from idealism to materialism. Before Sartre, essence was seen to precede existence. Thus essence was seen as ideal and not material. For examlle, a man's soul. After Sartre, existence was seen to precede essence and thus essence was seen to be also material. Thus soul, was also material. It's where all this blather of neuro-philosophy and its like derives from.
As @CriglCragl doubted the substance of my reply above, I'm adding a quote from Wikipedia's Existence Precedes Essence:

The idea originates from a speech by Schelling delivered in December 1841. Søren Kierkegaard was present at this occasion and the idea can be found in Kierkegaard's works in the 19th century, but was explicitly formulated by philosopher Jean-Paul Sartre in the 20th century. The three-word formula originated in his 1945 lecture "Existentialism Is a Humanism", though antecedent notions can be found in Heidegger's Being and Time.
Answer: Sarte, as I see it, is saying we're free to define our lives any which way we want to. There's no predefined essence that could, against our will, chart the course of lives. "We're condemned to be free" ~ Sartre. His philosophy seems premised on the existence free will and the nonexistence of nature.


Mixed effects model with between subjects dependent variable

Question: I've got a dataset where I try to predict a between-subject dependent variable (continuous), the average number of times a participant made a mistake on a cognitive task, with a within-subject predictor (categorical), hard vs easy trial, and a between-subject predictor (continuous), mean activation in a brain region for this trial. There are approximately 3000 observations, with approximately 70 observations per participant. I am not sure whether a mixed-effects model is the right approach or whether there is a better way to approach this? Does someone have any suggestions?
Comment: Could you elaborate a bit and explain exactly what is your dependent variable, and what are your predictor variables? It would be good to know how many observations there are per person, and what are your research questions
Comment: edited the information
Comment: Hi Sebastian, given your description of the data, a mixed-effects model seems to be a great way to work with these data. Please see this vignette from package "afex" which might help you understand why it could help https://cran.r-project.org/web/packages/afex/vignettes/introduction-mixed-models.pdf. Many neuroscientific studies with many trials per participant have used lmms recently, and as some other papers show, it is a great way to deal with the non-independence of these types of data.
Answer: As mentioned by Craig in the comment, mixed-effects model is appropriate. In short, multiple observations per participants = hierarchical data.
On another note, your outcome variable (DV) is unlikely to be normally distributed, so you should not really run a linear mixed-effects model assuming a normal distribution. You stated that you are taking an average of counts (i.e., number of times participants made a mistake on a cognitive task) -- aggregating data should be avoided as it artificially lowers the variance. Treating the outcome as counts and running a mixed Poisson model is likely to be more appropriate given your data.


What determines the interest rate on an ARM mortgage?

Question: I have a 5/1 ARM (2.8% interest rate) that started in May 2016.  So I'm in my final year of the fixed rate period.  What determines the rate the ARM will go to after the fixed period ends?
Comment: In the US the lender is required to send a notice of what the new interest rate will be some time in advance of the adjustment.  You can check their calculation with the mortgage, but it is likely to be correct.  Given the low level of interest rates, you might look into refinancing to a new mortgage.  It may give better terms than you have right now.  As in 2016, you may have the option to get a long term fixed rate mortgage at slightly higher rates than an adjustable.  You have to guess what will happen to interest rates over the long term to know which is best.
Answer: This depends on your mortgage agreement. The rate is generally a published index plus a margin. Exactly which index is used and what the margin is will vary based on lender, or even between loans from the same lender. The only way to know how the rate is determined for your mortgage is to read your mortgage agreement.
In addition to the index and margin, there are generally limits to both how much the rate may change each period, and how much the rate may change overall across the life of the loan.
Comment: "The rate is generally a published index plus a margin."  What is that index?  Are there common indexes that are used?
Comment: It varies by lender, but some examples are US Treasury rates, LIBOR, etc.


Word for describing the act of praise for self interest

Question: I read it about a relationship of two men, where one praised the other extensively for solely his own benefit.
Answer: The question requests a verb: "the act of..."
The verb is "flatter". Example:
Joe flattered his boss constantly so as to win the coveted promotion.

The noun expressing the act of flattering is "flattery", as in
Flattery will get you nowhere.

In the above sentence the speaker is saying that he/she is immune to flattery.
By the way, in my experience almost no one is immune to flattery. Try flattering your boss, your date, or your banker when applying for credit; you'll be pleased with the results.
Answer: Someone who is a self-serving flatterer is a sycophant
From https://www.vocabulary.com/dictionary/sycophant:

A sycophant is a person who tries to win favor from wealthy or influential people by flattering them. Also known as brown-nosers, teacher's pets or suck-ups.
noun. a person who tries to please someone in order to gain a personal advantage
Comment: Hi faustus, it's great that you're contributing potentially useful answers, but the system is rightly flagging them for deletion as "low-quality because of its **length** and **content**." An answer on this site is expected to be *authoritative, detailed, and explain why it is correct*. You can [edit] your answer, at the very least adding a definition for *sycophant* linked to the source. For further guidance, see [answer].  :-)


In what economic systems, other than capitalism, do patents exist?

Question: Patents exist in capitalist systems. Do other economic systems have patents and, if so, what is their purpose in those systems?
Answer: Check out the Wikipedia article on the Patent Cooperation Treaty (PCT). It includes search authorities from countries including China and Russia.
Also, you can search Google Patents for patents from around the world which are often countries with different economic systems (China and Russia as major examples).
Finally, Cooperative Patent Classification (CPC) is a classification system that has been agreed upon by both Europe and China to improve access to Chinese patent documentation.
And there are initiatives using machine translation to improve cooperation with Russian and Eurasian regions.
Answer: Patent system existed in Soviet Union but IP was owned by the state.


Glitch: Can't become vampire lord

Question: I let Serana back to her home, and after proceeding through the conversation, I chose to become a vampire lord, and once I made the choice, Harkon bit me, but rather than becoming a vampire lord, I just die, and start back from when I last saved. How do I fix this?
Answer: If you are playing in PC:
BEFORE talking to Harkon, open the console type
"setstage DLC1VQ02 40"  and followed by
"setstage DLC1VQ02 180"
If you do this he will say you have forsaken the gift, he will offer you the gift again,
accept it and you will not die when you are biten
If you are playing from PS3/XBOX:
Go behind a table before getting bitten. He won't reach you in time if done correctly, and the screen should fade to black after a short period of time. Following this, everything should continue normally.
Answer: I dont know if this helps, but I glitched the same way. I had vampirism disease, happened the same way, i just died. Maybe the game glitched because I was already diseased? Try to see if you're not infected, if not just reset the quest.

Glitch: Can't become vampire lord


How can I stop Oracle Shutdown command?

Question: I used Shutdown normal, instead of Shutdown immediate.
Now I want to stop the process, because its taking too long.
How can I do it?
Answer: It seems like the obvious answer is that you can't stop a shutdown that is happening, but you can do either a shutdown immediate or shutdown abort from a different session if you did a shutdown normal. As long as you have enough online redo log groups and each group has a log that is large enough, then you can recover from either a shutdown immediate or shutdown abort. If you ask someone what is the exact risk that someone faces for doing a shutdown abort, they may struggle to answer you. On shutdown immediate transactions are rolled back as sessions are killed. On shutdown abort, all transactions are rolled back when the database is started up. Hence the same thing should be happening in both cases, just in a different order. Once you start a shutdown normal, either ask everyone to log out, or just do shutdown immediate in a different session. Either way, Oracle won't allow a database to open, if it isn't in a consistent state.
Answer: ps -ef|grep oracle

if you see any process with the oracle <defunct> kill that process with kill -9 PID
for eg:
oracle    7427  7426  0 09:34 ?00:00:00 [oracle] <defunct>

kill the above process.

How can I stop Oracle Shutdown command?


Change UID and GID of default user pi

Question: In my network environment I already have a user with the same UID (user id) and GID (group id) than the default user pi on Raspbian. This conflicts with user rights on my network, so I have to change these ids. How can I do this?
Comment: Anyone with this issue should consider whether in context it is really an [XY problem](http://meta.stackoverflow.com/a/66378/212479) before jumping to the conclusion that they need to change the user ID. File archiving tools like `tar` usually have a simple option to map ownership, and the same goes for remote mounted filesystems.  These are more secure solutions since they can be applied to any source id (as opposed to relying on a system where the ids must match across a network). Put another way, if you are relying on identical uids across a network maybe you are doing something dubious ;)
Comment: Why not just create a new user and disable the Pi logon?  It's a two minute job to add the new user to the security groups and sudo as needed. In fact it's better to start with limited rights and build up only those needed.  Am I missing something?
Comment: @goldilocks I have expected those reservations ;-) But I have a [Single sign on using SSSD against OpenLDAP server with Kerberos SASL/GSSAPI](https://serverfault.com/a/1005226/4584739) together with NFS4 encrypted mounts. And yes, before deciding to change uid/gid I had a look at mapping ids, e.g. with `/etc/idmapd.conf` and name query order in `/etc/nsswitch.conf` and other things.
Comment: @goldilocks Because I always have to manage the problematic device, I decided to change uid/gid to have a consistent setting all over my network and not to loose the overview what I have fiddled on different devices to match the network conditions.
Comment: @Andyroo That's exactly what I want to do. As noted in my comment to *@goldilocks* I don't have just one RasPi to manage standalone. I remotely logon to the RasPi and on first logon it creates its home directory automatically. Then I want to manage the services that user **pi** can use (e.g. use vlc to watch TV). So to be on the save side I like to preserve its local account. pi does not have a centralized account on the network. It's only used for the local services. Later when I have got more experience I may change it and manage local services when first login.
Answer: This is what I do.
Warning:  Use at your own risk as making a mistake may require a reinstall.

log in as the pi user and add two more users with sudo adduser name1 and sudo adduser name2.  The name2 user is a safeguard in case you make a mistake.  Give both users the same password.
IMPORTANT.  Now give the pi user the same password as used for the other two users.  Use the passwd command to set the password.
Add both the new users to the sudo group.  sudo adduser name1 sudo and sudo adduser name2 sudo.
Login as the new users in turn an check they can use sudo, e.g. sudo ls.
Login as name2.
Edit /etc/passwd and /etc/group.  Swap all occurrences of pi to name1 and vice versa.  Be careful.
Last step.  Change the home directory ownerships.  sudo chown pi.pi -R /home/pi and sudo chown name1.name1 -R /home/name1.
Comment: Nice solution and I like it ;) But it doesn't help in my situation. 1) It doesn't solve the problem with the running process with old users rights. 2) It doesn't change user rights on files outside the home directory (ok, no problem to do that). 3) You still have an account, now with name1, with the old uid and gid. Because of single sign on with an ldap directory for user accounts I must not have that.
Comment: Yes, my answer is for the situation when you freshly install  a Pi and want another user to have the 1000 uid and 1000 gid assigned to the Pi user.
Answer: You can use usermod to change the user id UID and the group id GID of a user. But it is not all done with it. All files that are owned by the user has his id stored as metadata, so we have to scan all files and change its ids also. And there is another issue with the user pi on Raspbian. If you try to change his uid you get an error message that prevents changes:
rpi ~$ sudo usermod -u 65532 pi
usermod: user pi is currently used by process 608

And no, it doesn't help to kill all the processes owned by the user pi with sudo pkill -9 -u pi. At least one process is restarted immediately. It only helps to chroot into the not running filesystem of the SD Card and execute the commands. For this we need a second SD Card with Raspbian (Raspbian Light is sufficient) that you use to boot the RasPi. Then attach the original SD Card with your Card Reader to it. I assume it is attached as device /dev/sda. Now modify its filesystem as follows.
Chroot into the filesystem:
rpi ~$ sudo -Es
rpi ~# mkdir /mnt/p2
rpi ~# mount /dev/sda2 /mnt/p2
rpi ~# chroot /mnt/p2 /bin/bash

Change the ids and modify the files owned by user pi. It has uid and gid 1000. I will change them to 65532:
root@raspberrypi:/# usermod -u 65532 pi
root@raspberrypi:/# groupmod -g 65532 pi
root@raspberrypi:/# find / -group 1000 -exec chgrp -h pi {} \;
root@raspberrypi:/# find / -user 1000 -exec chown -h pi {} \;

Now check if its all correct:
root@raspberrypi:/# ls -aln /home/pi/
root@raspberrypi:/# id -u pi
root@raspberrypi:/# id -g pi
root@raspberrypi:/# grep pi /etc/passwd
root@raspberrypi:/# grep pi /etc/group
root@raspberrypi:/# find / -user pi -ls
root@raspberrypi:/# find / -group pi -ls

Clean up:
root@raspberrypi:/# exit
rpi ~# umount /mnt/p2
rpi ~# rmdir /mnt/p2
rpi ~# exit
rpi ~$

Boot the modified SD Card and use it. Most I have taken from How to Change a USER and GROUP ID on Linux For All Owned Files. Thanks to Vivek Gite. For more detailed information about the commands, look at his instructions.

Change UID and GID of default user pi


Finder windows show up in all my Spaces

Question: When I open multiple Finder windows in Mountain Lion, I find that, no matter what virtual desktop I go to in Spaces, all the Finder windows remain where they are. However, when I open, say, Skype, for example, the window only stays in one of my virtual desktops, as expected. When I 4 finger swipe to another Space, the Skype window disappears. Why doesn't Finder do this? It's really bugging me.
Answer: You just need to ctrl + click on the Finder Icon in the Dock. Go to the Options, and choose how the finder windows show in Desktops

All Desktops

All Window show in Desktop Spaces

This Desktop

All Window show Only in the current Desktop Space.
When your are in another desktop space it will jump to the one for finder when you open folders into windows or switch to the finder.

None

Each finder windows will stick to the desktop space you open them in.
Comment: Thank you so much! This worked perfectly :D I can't believe I never thought of that!
Also +1 for the screen shot :)
Comment: This was annoying me to no end, thank you! I selected "None" and now it works as expected!
Comment: Note to those considering this fix: it will allow you to assign a specific finder window instance to a space, but it will also assign your Desktop to one space only. New finder windows automatically open on that specified space too.

Finder windows show up in all my Spaces


Preventing reverse-engineering of client application

Question: I have a web service which is used by a Flash client. Both the service and the Flash client is produced by me (read: my company). The Flash client communicates with the server over HTTPS.
One of the issues we have seen lately is that people decompile the Flash client and then create their own clients to interact with the server. This is not a huge issue, since the server has a lot of "controls", but it is annoying.
I know about Flash obfuscation, but my question is a bit more generic: Assuming you distribute client software to work with your web service, what measures would you take to limit the risk of people tampering with your client software?
Answer: Obfuscation might look as the first obvious step, but obfuscation has to protect something in the code and that something cannot be webservice functionality because that is reverse engineered by intercepting the traffic even if it is SSL encrypted. Certificate pinning can prevent simple SSL interception by trusting a predefined certificate.
You can symmetrically encrypt communication data and store the key in the client then use obfuscation to make access to that key and encryption algorithm harder. And you can also protect the obfuscation by making decompilation harder. An example flash obfuscator and anti-decompiler is SWFencrypt and BISguard.
The previous are static source code protections but they don't guard against live/dynamic attacks. One way of protecting from these attacks is for the client to use integrity checks on memory and resources. There are also some anti reverse engineering techniques that can make live debugging harder.
The other way to prevent against live attacks is to use software that looks for any system tampering that may be used for client software tampering. This is the realm of rootkit-like anti-cheat engines like Punkbuster, Warcraft's Warden and Valve's VAC.
A different kind of protection is code signing and memory signing (down to the memory page) on closed platforms like iOS and Android. This way, you can limit static modifications to the client's binary and dynamic ones to its memory and the OS.
Even the old CAPTCHA can be used as protection against automation but it hurts user friendliness. You can also detect automation on the server, through user behavior and usage patterns then couple it with CAPTCHA to reduce false positives.
Aside from technical protections, you can use with legal means and even incentives. Provide the best client so users won't be inclined to hack yours or write their own. Or make it so that a custom or hacked client won't give the hacker a far greater advantage. Legal means are not my strength and will vary by country, but I've heard about lawsuits on reverse engineering. Legal threat might deter companies and individuals from selling or providing custom clients.
Finally, you can turn the whole problem on its head and make the webservice easily accessible through flexible APIs and protect against abuse on the server. You might also  charge small fees for the superior functionality your hackers are craving for. :)
Answer: Fundamentally you cannot secure your client. At best you can obscure and obfuscate in order to make it more difficult for an attacker to modify the client.
You mention that it is not a security issue because the server is properly secured, but merely an annoyance. It may be more annoying to try to obscure your client than to let a few modified clients make bad requests that are rejected by the server.
It really depends on your threat models. In most clients that I have worked on, I did not bother with any obscurity or obfuscation, since the server was fully secured and there would be nothing gained by modifying the client.
Now, if we are talking about trying to protect a client itself (i.e. because of IP concerns, you don't want someone stealing the client) it may make more sense to devote time to making this difficult to accomplish (while still keeping in mind that you will never be able to fully secure a client - at best you can cause unmotivated attackers to give up and delay motivated attackers).
Answer: None. If they don't decompile your app, they will just put it through a proxy with it's own SSL certificate. Your client can't provide security for your backend.
Comment: well unless you use Certificate pinning of course which might well be a good idea...
Comment: @RоryMcCune even then, there are still methods to reverse engineer the app. I used to do this with an app that used certificate pinning and it was surprisingly easy to bypass. You own everything that's on your computer.
Answer:
what measures would you take to limit the risk of people tampering with your client software?

There's a balance here that only you can measure.  Assuming your protection doesn't bother valid users, then you only have to balance the value, to you, of protecting the software against the value to the attacker of breaking the protection.
If you're talking about software or service that's not very expensive and the clients aren't the type to go beyond simple means, then obfuscation might be enough.
If you're talking about a service or software that's either very expensive, or is otherwise valuable if misused, and the clients are determined to use the service with their own software, then you're going to have to use much more rigorous means.
In the first case, tools already exist.
in the second case the best option is to use Adobe Air, which permits signed applications that don't run in the browser.  You can verify using public key cryptography that you are 1) talking to your application and 2) that the application hasn't been altered.  It's complicated if you have to thwart very diligent attackers (and, honestly, nothing is absolutely impenetrable) but with careful design and frequent forced updates you can eliminate the majority of attacks by simply making it a lot of work to attack.


Is it "I'm here" or "I'm there"?

Question: My girlfriend always says that I am wrong when I text her to say "I'm there". Is it correct to say "I'm here" or "I'm there" when I arrive at her house? Also why is that the correct way to state my arrival?
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/88676/discussion-on-question-by-smedleydslap-is-it-im-here-or-im-there).
Answer: Your girlfriend is right. If you are meeting her somewhere: at her house, at a theatre, at the mall—when you arrive at the designated spot, you say "I'm here." This is true whether or not she is already at that spot. If she's home and you're outside her house to pick her up for a date, you say "I'm here." If you're meeting her at the movies and you arrive before she does, you text "I'm here."
Few circumstances would call for "I'm there", and they all assume your girlfriend is not at the same spot, nor going to be. For example, if she were on the phone explaining to you where something is stored in her house and giving you directions to that exact spot, you might say "I'm there". Here's a hypothetical text exchange. Suppose she is not home, but urgently needs something that she left behind there, and wants you to pick it up for her. She starts off:

"I need your help! Can you go over to my house right now?"
[you agree, and drive over]
"I'm here. Now what?"
"Go to the kitchen and stand right in front of the cabinet to the left of the sink."
[you walk over to the cabinet]
"I'm there."

Notice the difference. The first is "I'm here", and the second "I'm there." This is a very specific use of "I'm there", and is not equivalent to "I'm here".
"I'm here" is the general way to announce presence at any given place. By contrast, "I'm there" is typically metaphorical or figurative. As Kevin's answer says, it indicates enthusiastic assent:

"Wanna come with me to Antarctica and cuddle some penguins?"
"I'm there!"

It can also be used to mean "I understand":

"It's been so rough breaking up with her, y'know?"
"I'm there, man. Totally there with you."
Answer: Your girlfriend is correct.  Here is where you are and there is someplace else.  You could have been there in the past, you might go there in the future, and somebody else might be there now but in the present, wherever you are is here (from your perspective).
Google's NGram Viewer shows that "I'm here" is about 10x more common than "I'm there"
Colloquially, "I'm there!" can be used to express excitement about the prospect of going someplace, as in "Foo Fighters are playing down town tomorrow night?  I'm there!"
Comment: @Clare In which case, you are still not there.
Comment: Except we say *I'm there* to indicate 'I'm  starting  on the way to being there'.
Answer: Everyone I can think of would normally use 'I'm there' to announce his arrival… certainly in speech and very likely in writing though it's hard to imagine a rule of grammar covering it.
Consider the kids in the back of the car, constantly whining 'Are we there yet?' They mean 'Are we yet at the place we're going to,' don't they?After minutes, let alone hours or days on the road, they think of the destination as 'there' and there's a clue, even though it's obscure. 'After' is the key word here.
For the duration of the journey, the destination is 'there'. After the end of the journey, the same place is no longer a destination; it's become their current location.
The question is, at what point does the journey end? Fairly clearly, arriving early or late can make no difference so that point is not in time but in space.
Consider being half a mile away from the destination. Do I ring you and ask 'Can you get the drinks ready for when I get here?' or '… there?' Try the same question 100 yards out.
Try it 25 feet from the door… and less… At some point it will no longer be 'When I get…' at all. It will have become 'Now that I'm here, have you got the drinks ready?' or 'I'm here. Have you got the drinks ready?'
Roughly, while I'm travelling to your house, I'm going 'there'. Of course from your point of view that's 'here' but who's doing the talking? Until the moment I step over the threshold, I'm still going 'there.' Only after I've actually walked through the door and entered the house am I 'here'.
Whether it's the threshold or the porch or the steps or the path or the lawn is rather subjective and either I'm travelling 'there' or I've arrived 'here'.
The difference between speech and writing, oddly, is simply that it's a lot difficult to write while still on the move. To be able to write a letter home saying 'Now that I'm here, I'm sure things will be just wonderful…' requires that I'm physically sitting at a desk, or some such. That necessarily means the journey is over, else how could I have started to do things which require being comfortably somewhere, rather than travelling.
I might write "I always wanted to visit Ruritania and now that I'm there, blah lah lah' and I might as easilyt say "… now that I'm here…"
Even if that wasn't just an introductory preamble, it would be subjugating meaning to strictly matched tense. The next sentence; the first real sentence, is going to say 'I'm staying at the Hotel Splendide and while I'm here, I want to visit the museum and the bazaar' is it not?
Comment: I'm a bit confused. Your first sentence says you'd say "I'm there" while the rest of your post appears to explain why, once you arrive at a place, "I'm here" is more correct and more natural.
Comment: Really, Emmabee? Even if that first sentence was confusing, did the rest set all straight?
Comment: Not really. I maintain that the first sentence is still misleading and perhaps flat out wrong. Everyone I know would say "I'm HERE" to announce their arrival (unless on the phone with somebody who was elsewhere), for all the reasons you've given in your own post. I would not say "I'm THERE" upon arriving and would certainly find it unnatural if another person said it. Your answer does a great job at explaining why "I'm HERE" is correct, talking about traveling vs. arriving, so I don't understand why at the beginning you say "I'm THERE" is preferred for arrival.
Comment: Emmabee, you were right to be confused, and I hadn't made that first part clear. Sorry, everyone.

Consider yourself travelling somewhere and just as as you're parking the car outside the destination, someone calls to ask where you are.

"I'm there…" will be most people's response… then, all that other stuff.

Is it "I'm here" or "I'm there"?


Locust.io send requests at an exact rate

Question: Is there a way in locust.io to set the rate at which the requests will be sent? I am using locust to see how my database will perform under increased load. I am not interested in the max request rate the database can take but rather the performance of the database when it receives a specific rate. For example I want to see the latency of the read operations under a specific write load.
Answer: I think You need to set min_rate and max_rate at the same value:
class MyUser(MyLocustExtendedClass):
    host = "myhost"
    min_wait = __VALUE__
    max_wait = __VALUE__
    ...

Answer: It is not possible to set locust to a specific RPS, also check reply on this post: specifying RPS
But you can attempt to reach a specific number with using this formula:
rps = wait time X #_users

Change wait time in the Locust class and number of users


Can I create a cloned system image and deploy it on a new machine?

Question: I am attempting to create a backup image of a system deployed on a machine now.  Then I would like to deploy this image on a different computer.  Despite driver incompatibilities is this possible/recommended?
Answer: There's a lot of subject matter on this topic. A lot more than can be covered in a single answer. I will neglect to link you to anything simply because of the sheer volume of information out there and the variety of ways this can be accomplished. (Use your Google-Fu.)
In a nutshell:
Using sysprep /generalize will mostly take care of the driver incompatibilities. You may want to inject the drivers later, or directly in to the image. You can do this by using Windows Deployment Services and a variety of other tools such as WAIK, MDT, and SIM.
I say mostly because of the Windows XP tag on your question. You'll need to pay attention to HAL when you prepare an image. If the HAL driver doesn't match you will have problems deploying the image.
It is definitely possible and recommended to create and deploy images. It's a great way to keep a consistent environment.
Comment: great I know about sysprep but have not used it.  Here is a great time.  Thank you!!
Answer: Yes, it is possible, and the only drawback that I can possibly think is about hardware compatibility, as you pointed out. But removing wrong drivers and installing correct ones shouldn't be too difficult.
Another consideration (maybe obvious, but obvious thing are the ones that are slipped most frequently) that you should make, is to be sure that the destination hard drives are big enough to hold the source cloned image; if you are unsure, you might want to reduce the source partition(s) to a minimal size, and enlarging them back once they will be deployed on the new machines.
My tool of choice for this kind of tasks is Clonezilla, you can get it on its own or bundled in a generic disk maintenance tool like Parted Magic.

Clonezilla can be used to clone entire hard drives or single partitions; cloning itself is a different process than a simple file based data backup.
When you perform a file based backup, basically you are copying files from a place to another (usually on another physical drive); you can think your hard drives as "boxes" where your files are "put inside" as "content" ; if you have a source 100 GB hard drive, which contains only 10 GB, and you perform a file backup, you are effectively duplicating just the "content", so the destination hard drive should be big enough to contain 10 GB of data, not 100 GB.
But when you clone an entire disk (or a partition) you are not just copying around files, the "content" as we said, but the entire "box". So in this case, the destination medium should be able to contain the full "box" size, in our example 100 GB.
Clonezilla itself is capable to proportionally resize cloned partitions to match the destionation drive size, but just if the destination is larger than the source. In other words, it can proportionally enlarge but not shrink them. That's why I suggested to manipulate your partitions before the actual cloning to keep them as smaller as possible, and re-enlarge them after the whole process to the desired size.
Comment: does it clone the entire drive?  including unused space?  does sysprep also package the entire drive with empty space?
Comment: Please see my improved answer
Comment: the 'improved' answer does not mention other images like those from windows backup or sysprep. It also does not mention that clones can be stored in compressed formats, or that smart imaging software can select only the used sectors.


Rails weird association sorting

Question: I have two models in a habtm association (Round and User)
I want to get all the users and sort the ones that belong to a certain round (current_round) to the top. I don't want to discard the other users though, they all need to be in the resulting array.
Answer: Since User belongs to Round, you can try Users LEFT JOIN Rounds like this:

User.all(:joins => "LEFT JOIN rounds ON user.round_id = rounds.id",
         :order => "rounds.id DESC")

That should pull all the users that belongs to a certain round plus all the users that do not belong to any round at all which will be at the bottom or top depending on how you order rounds.id (ASC or DESC).

Rails weird association sorting


Automatically using self signed SSL certificate

Question: I'm creating a launcher for a game I'm making. To gain access to the launcher's menu the user has to first create an account on the game's site, buy the game using it, and then login to the launcher using his credentials. I've set up a php script on the server which accepts a username and password MD5 hash parameter (in the URL), checks to see if the account is in the database and returns relevant information to the launcher.
Since I'm transferring sensitive (albeit encrypted) information over the Internet I've figured that using SSL would be the best way to go about doing this. Since I can't quite afford a legit third party signed certificate I've signed one myself. It's bundled in the launcher and added to the trust store programmatically so that I can use it to connect to that php script and login without any problems.
Now this whole system I've described works just fine, but I've heard from someone that using a self signed SSL certificate without the user's consent is illegal in some countries (namely Denmark, maybe others). I've tried looking this up to see whether I should add some sort of confirmation dialog to the launcher but I couldn't find anything.
I'm located (and developing the program) in Israel, the server is in the Netherlands.
Does anyone know what laws my friend was talking about, and what I should do to avoid breaking them, as well as online sources where I can read more about them?
Comment: This question appears to be off-topic because it is about law, not code.
Answer: Some countries have laws against using encryption. Check out Crypto Law Survey for details on each countries' restrictions. The Netherlands appears to have some restrictions, if so, you might want to consider moving your server.


Why .NET String is immutable?

Question: As we all know, String is immutable. What are the reasons for String being immutable and the introduction of StringBuilder class as mutable?
Comment: similar question: http://stackoverflow.com/questions/93091/why-cant-strings-be-mutable-in-java-and-net
Answer:
Instances of immutable types are inherently thread-safe, since no thread can modify it, the risk of a thread modifying it in a way that interferes with another is removed (the reference itself is a different matter).
Similarly, the fact that aliasing can't produce changes (if x and y both refer to the same object a change to x entails a change to y) allows for considerable compiler optimisations.
Memory-saving optimisations are also possible. Interning and atomising being the most obvious examples, though we can do other versions of the same principle. I once produced a memory saving of about half a GB by comparing immutable objects and replacing references to duplicates so that they all pointed to the same instance (time-consuming, but a minute's extra start-up to save a massive amount of memory was a performance win in the case in question). With mutable objects that can't be done.
No side-effects can come from passing an immutable type as a method to a parameter unless it is out or ref (since that changes the reference, not the object). A programmer therefore knows that if string x = "abc" at the start of a method, and that doesn't change in the body of the method, then x == "abc" at the end of the method.
Conceptually, the semantics are more like value types; in particular equality is based on state rather than identity. This means that "abc" == "ab" + "c". While this doesn't require immutability, the fact that a reference to such a string will always equal "abc" throughout its lifetime (which does require immutability) makes uses as keys where maintaining equality to previous values is vital, much easier to ensure correctness of (strings are indeed commonly used as keys).
Conceptually, it can make more sense to be immutable. If we add a month onto Christmas, we haven't changed Christmas, we have produced a new date in late January. It makes sense therefore that Christmas.AddMonths(1) produces a new DateTime rather than changing a mutable one. (Another example, if I as a mutable object change my name, what has changed is which name I am using, "Jon" remains immutable and other Jons will be unaffected.
Copying is fast and simple, to create a clone just return this. Since the copy can't be changed anyway, pretending something is its own copy is safe.
[Edit, I'd forgotten this one]. Internal state can be safely shared between objects. For example, if you were implementing list which was backed by an array, a start index and a count, then the most expensive part of creating a sub-range would be copying the objects. However, if it was immutable then the sub-range object could reference the same array, with only the start index and count having to change, with a very considerable change to construction time.

In all, for objects which don't have undergoing change as part of their purpose, there can be many advantages in being immutable. The main disadvantage is in requiring extra constructions, though even here it's often overstated (remember, you have to do several appends before StringBuilder becomes more efficient than the equivalent series of concatenations, with their inherent construction).
It would be a disadvantage if mutability was part of the purpose of an object (who'd want to be modeled by an Employee object whose salary could never ever change) though sometimes even then it can be useful (in a many web and other stateless applications, code doing read operations is separate from that doing updates, and using different objects may be natural - I wouldn't make an object immutable and then force that pattern, but if I already had that pattern I might make my "read" objects immutable for the performance and correctness-guarantee gain).
Copy-on-write is a middle ground. Here the "real" class holds a reference to a "state" class. State classes are shared on copy operations, but if you change the state, a new copy of the state class is created. This is more often used with C++ than C#, which is why it's std:string enjoys some, but not all, of the advantages of immutable types, while remaining mutable.
Comment: @IanBoyd Yes, but whether it's a good middle-ground or a worse-of-both-worlds middle-ground is another question. Not really one to get into in detail here, but http://drdobbs.com/cpp/184403779 has an interesting critique of how COW is used in the STLs string type. Interestingly enough the conclusion is that it could be better to have separate mutable and immutable types, which of course is exactly what we're talking about here.
Comment: String is immutable because the framework designers decided it should be. **Probably** because of the things listed in this answer.
Comment: @JonHanna This answer seems to explain the benefits of immutable types but doesn't really explain why String is immutable. Why aren't certain other .NET reference types immutable? Can you please go into more detail into why String itself is immutable?
Comment: Another advantage of immutable strings (and immutable classes in general, as well as plain-old-data structs) is that it there's no question of whether a routine which accepts an immutable string (or POD struct) is semantically capturing the value at that time it's called.  By contrast, if one passes a mutable object to a "SetAttribute" function and subsequently changes it, it may be unclear whether that change will not affect the attribute, will affect it in the "expected" manner, or will break it in some unexpected manner.
Comment: Note that the C++ standard explicitly forbids using COW semantics for `std::string` since C++11.
Answer: Making strings immutable has many advantages.  It provides automatic thread safety, and makes strings behave like an intrinsic type in a simple, effective manner.  It also allows for extra efficiencies at runtime (such as allowing effective string interning to reduce resource usage), and has huge security advantages, since it's impossible for an third party API call to change your strings.
StringBuilder was added in order to address the one major disadvantage of immutable strings - runtime construction of immutable types causes a lot of GC pressure and is inherently slow.  By making an explicit, mutable class to handle this, this issue is addressed without adding unneeded complication to the string class.
Comment: @Juliet: But you also trade off there -- you get O(1) concat and lg n substrings, but you lose constant time element access and you lose cache locality. There is a reason strings aren't typically implemented like ropes.
Comment: Will have to chime in here that immutability is not inherently slow, even if the particular implementation of the string class is. Strings don't have to be implemented as an array of chars, its wholly possible to implement strings as immutable ropes which have the interesting property of O(1) concats and O(lg n) substrings.
Comment: Give your strings to System.Reflection and friends, and we will see how much they are impossible to change.who says something like that in somewhere like this?
Answer: Strings are not really immutable. They are just publicly immutable.
It means you cannot modify them from their public interface. But in the inside the are actually mutable.
If you don't believe me look at the String.Concat definition using reflector.
The last lines are...
int length = str0.Length;
string dest = FastAllocateString(length + str1.Length);
FillStringChecked(dest, 0, str0);
FillStringChecked(dest, length, str1);
return dest;

As you can see the FastAllocateString returns an empty but allocated string and then it is modified by FillStringChecked
Actually the FastAllocateString is an extern method and the FillStringChecked is unsafe so it uses pointers to copy the bytes.
Maybe there are better examples but this is the one I have found so far.
Comment: See more on this in this blogpost https://blog.getpaint.net/2015/07/21/net-strings-are-immutable-except-that-theyre-not/
Answer: string management is an expensive process. keeping strings immutable allows repeated strings to be reused, rather than re-created.
Comment: @up: do you think passing ~100 MB (or even more large) string over stack would be good?
Comment: Ahh.. so that's why string is reference type either that value type.. actually it is a big question for me **if string is immutable why don't use value type..?** thanks anyway.
Comment: That's half the Java reason, but there's a half-dozen in .Net, security being another big, big one.
Answer: Why are string types immutable in C#

String is a reference type, so it is never copied, but passed by reference.
  Compare this to the C++ std::string
  object (which is not immutable), which
  is passed by value. This means that if
  you want to use a String as a key in a
  Hashtable, you're fine in C++, because
  C++ will copy the string to store the
  key in the hashtable (actually
  std::hash_map, but still) for later
  comparison. So even if you later
  modify the std::string instance,
  you're fine. But in .Net, when you use
  a String in a Hashtable, it will store
  a reference to that instance. Now
  assume for a moment that strings
  aren't immutable, and see what
  happens:
  1. Somebody inserts a value x with key "hello" into a Hashtable.
  2. The Hashtable computes the hash value for the String, and places a
  reference to the string and the value
  x in the appropriate bucket.
  3. The user modifies the String instance to be "bye".
  4. Now somebody wants the value in the hashtable associated with "hello". It
  ends up looking in the correct bucket,
  but when comparing the strings it says
  "bye"!="hello", so no value is
  returned.
  5. Maybe somebody wants the value "bye"? "bye" probably has a different
  hash, so the hashtable would look in a
  different bucket. No "bye" keys in
  that bucket, so our entry still isn't
  found.
Making strings immutable means that
  step 3 is impossible. If somebody
  modifies the string he's creating a
  new string object, leaving the old one
  alone. Which means the key in the
  hashtable is still "hello", and thus
  still correct.
So, probably among other things,
  immutable strings are a way to enable
  strings that are passed by reference
  to be used as keys in a hashtable or
  similar dictionary object.
Answer: Just to throw this in, an often forgotten view is of security, picture this scenario if strings were mutable:
string dir = "C:\SomePlainFolder";

//Kick off another thread
GetDirectoryContents(dir);

void GetDirectoryContents(string directory)
{
  if(HasAccess(directory) {
    //Here the other thread changed the string to "C:\AllYourPasswords\"
    return Contents(directory);
  }
  return null;
}

You see how it could be very, very bad if you were allowed to mutate strings once they were passed.
Comment: @ktutnik -In a multi-threaded scenario, you can change the contents of that string, *after* it's passed the access check, effectively bypassing it and accessing whatever you want.  This one one of *many* examples of security.  This answer doesn't address "what would you do *if* they were mutable?"...that's a different question, the question was "why aren't they mutable now?".
Comment: Yes i see the problem but I don't see any security issue about this.. and in fact if you already well known that string is mutable it easily solved by using clone either than just pass it like that..

am i missing something?
Answer: You never have to defensively copy immutable data.  Despite the fact that you need to copy it to mutate it, often the ability to freely alias and never have to worry about unintended consequences of this aliasing can lead to better performance because of the lack of defensive copying.
Answer: Strings are passed as reference types in .NET.
Reference types place a pointer on the stack, to the actual instance that resides on the managed heap.  This is different to Value types, who hold their entire instance on the stack.
When a value type is passed as a parameter, the runtime creates a copy of the value on the stack and passes that value into a method.  This is why integers must be passed with a 'ref' keyword to return an updated value.
When a reference type is passed, the runtime creates a copy of the pointer on the stack.  That copied pointer still points to the original instance of the reference type.
The string type has an overloaded = operator which creates a copy of itself, instead of a copy of the pointer - making it behave more like a value type.  However, if only the pointer was copied, a second string operation could accidently overwrite the value of a private member of another class causing some pretty nasty results.
As other posts have mentioned, the StringBuilder class allows for the creation of strings without the GC overhead.
Comment: Actually, string does not have an overloaded = operator, if you do string a = b then ReferenceEquals(a, b) and indeed, ReferenceEquals(a, a.Clone()). The point is rather that because of it's immutability, we can act as if = copies, even though it doesn't. We don't have to worry about a change to b affecting a, because no changes to b are possible.
Answer: Strings and other concrete objects are typically expressed as immutable objects to improve readability and runtime efficiency. Security is another, a process can't change your string and inject code into the string
Answer: Imagine you pass a mutable string to a function but don't expect it to be changed. Then what if the function changes that string? In C++, for instance, you could simply do call-by-value (difference between std::string and std::string& parameter), but in C# it's all about references so if you passed mutable strings around every function could change it and trigger unexpected side effects.
This is just one of various reasons. Performance is another one (interned strings, for example).
Answer: There are five common ways by which a class data store data that cannot be modified outside the storing class' control:
As value-type primitives
By holding a freely-shareable reference to class object whose properties of interest are all immutable
By holding a reference to a mutable class object that will never be exposed to anything that might mutate any properties of interest
As a struct, whether "mutable" or "immutable", all of whose fields are of types #1-#4 (not #5).
By holding the only extant copy of a reference to an object whose properties can only be mutated via that reference.

Because strings are of variable length, they cannot be value-type primitives, nor can their character data be stored in a struct.  Among the remaining choices, the only one which wouldn't require that strings' character data be stored in some kind of immutable object would be #5.  While it would be possible to design a framework around option #5, that choice would require that any code which wanted a copy of a string that couldn't be changed outside its control would have to make a private copy for itself.  While it hardly be impossible to do that, the amount of extra code required to do that, and the amount of extra run-time processing necessary to make defensive copies of everything, would far outweigh the slight benefits that could come from having string be mutable, especially given that there is a mutable string type (System.Text.StringBuilder) which accomplishes 99% of what could be accomplished with a mutable string.
Answer: Immutable Strings also prevent concurrency-related issues.
Comment: Why don't mutable arrays result in those issues?
Answer: Imagine being an OS working with a string that some other thread was
modifying behind your back. How could you validate anything without
making a copy?
Comment: What does the OS have to do with strings in .NET?

Why .NET String is immutable?


How are alveolar stops in Japanese articulated?

Question: I notice that I tend to pronounce the /t/ in Japanese laminally (at least I believe this is the appropriate term), especially when it follows /ɕ/ as in "した". Whatever it is, it certainly feels different from the /t/ in English, and I am wondering what the proper way to articulate /t/ and /d/ is.
Answer: It is. The WP article of Japanese phonology says:

/t d n/ are laminal denti-alveolar (that is, the blade of the tongue contacts the back of the upper teeth and the front part of the alveolar ridge)

If I may add something, the position of Japanese t, d, n normally varies from back of teeth to the border of teeth and alveoli. The completely alveolar (i.e. doesn't touch teeth) articulation of Standard English would sound unnecessarily heavy to Japanese ears.
A good way to simulate Japanese //t// sound is to put your tongue at th's (//θ//) position, then shift your tongue a little bit forward so that it touches upper teeth.
Though //t// sounds in many languages are often casually called "alveolar", the official IPA chart makes no difference between dental, alveolar, and post-alveolar stops, because few languages distinguish them internally (you can put diacritics if needed). English alveolar /t/ is relatively backward even compared to other West European languages.
Comment: I would add that if the question is "laminal vs apical?" opinions differ, but the general feeling in my understanding is that these stops are more laminal than the equivalents in English. Another often-encountered observation is that J consonants like /t/ and /d/ are aspirated, but not *as* aspirated as their equivalents in E, which would also contribute to a difference in sound.
Comment: Thank you brocolli and Matt! I think I have a better idea of how to pronounce the stops now.


Which patent is right?

Question: I am developing a cosmetics line and have come up with a unique packaging design. It's not just the look, the package actually opens in a different way. Would I need a design patent or utility patent.
Answer: The answer is maybe both. Design patents cover the ornamental design of functional objects. If you want to protect the look of the packaging then a design patent is a good way of doing it. Utility patents cover the function of the design. If your package actually works in a way distinct and new compared to previous designs, it may be able to get a utility patent. The patented functionality must be novel and non-obvious not just over cosmetic packages, but possibly other types of packages also.
In general, design patents are easier and cheaper to obtain but perhaps easier to circumvent. In any case, I would strongly suggest you discuss this with a patent attorney or agent. Since you can't disclose your idea publicly, you can't get definitive answers from Q and A sites like this.
Comment: @GeorgeWhite Thanks for the comment. I'm not sure I fully understand your thoughts, but tried to edit the answer accordingly. If I missed the boat, feel free to edit the answer.
Answer: It's probably faster, much easier and cheaper to get US design patent granted than US utility patent. Depending on your resources you may apply for both, design and utility patent. But design patent application may be sufficient.
But before making your decision you should always discuss it with patent attorney.
Answer: I would file for the design patent which as stated is much easier and cheaper to get, then file a utility provisional application (which is also cheap and easy & would at least allow you say you have a utility patent pending which you can abandon later or convert to a regular app if there is something patentable based on its functionality).
Unless there is some surprising or unexpected benefit, seems like it would be tough to overcome obviousness for the utility patent based on what you described.

Which patent is right?


First work to depict Mr. Hyde as superhuman

Question: In Robert Louis Stevenson's "Dr. Jekyll and Mr. Hyde", the latter character was depicted as, while vicious and sinister, an ordinary human in terms of physical strength and endurance. However later works tend to paint Mr. Edmund Hyde as someone with strength and endurance of superhuman levels more comparable to the Incredible Hulk- when did this trend start?
Comment: @MasonWheeler They say there are only 7 stories. If Disney doesn't own them Sony probably does.
Comment: It's interesting how the stories we tell ourselves remain so similar across ages.  Medieval Norse berserkers and English werewolves, Stevenson's Dr. Jekyll, and Marvel's Bruce Banner are all basically the same fundamental concept with different origins and settings.
Comment: @candied_orange And the 7th story is of the research it took to conclude that all previous stories fit into 6 categories. It's fairly dry and only of interest to experts.
Answer: Something of this idea is present in the original text of The Strange Case of Dr. Jekyll and Mr. Hyde (1886), with Jekyll's final account saying:

I became, in my own person, a creature eaten up and emptied by fever, languidly weak both in body and mind, and solely occupied by one thought: the horror of my other self. But when I slept, or when the virtue of the medicine wore off, I would leap almost without transition (for the pangs of transformation grew daily less marked) into the possession of a fancy brimming with images of terror, a soul boiling with causeless hatreds, and a body that seemed not strong enough to contain the raging energies of life. The powers of Hyde seemed to have grown with the sickliness of Jekyll.

This is in relation to their levels of energy rather than size or strength as such, and it's not suggested that Hyde has more physical capacity than a human. He is certainly described as smaller than Jekyll (the doctor's clothes are loose on him), but hairy and "ape-like" - therefore possessing a primitive and unrestrained strength that the civilized Jekyll lacks.
I think the first work to really seize on this was the League of Extraordinary Gentlemen comic by Alan Moore and Kevin O'Neill . In its first volume (issue 6; or p134 of the collated volume, 1999), Jekyll ruefully remarks that Hyde is currently too large to need a firearm, asking "Do you know, I was once taller than he was?" This Hyde is a towering gorilla-like figure. The reason is explained in the second volume (issue 8; or p121, 2000):

Hyde: I mean, when I started out, good God, I was practically a ****ing dwarf. Jekyll, on the other hand, a great big strapping fellow. Since then, though, my growth's been unrestricted, while he's wasted away to nothing. Obvious, really. Without me, you see, Jekyll has no drives... and without him, I have no restraints.

This is a development of what was happening at the end of Stevenson's original, if we imagine Jekyll/Hyde's survival and make his comparative strength more literal.
I think that most adaptations have been interested in Hyde's depravity in the context of his origin story, with League being unusual in putting him in something of a superpower ensemble that still draws from the themes of the original text. I also have the sense, from the way that Hyde is presented here, that Moore is expecting the reader to notice his size as unusual - it's not taken for granted that a super-strong Hyde is something that we're meant to recognize.
Answer: If you count the Marvel Comics version of Mr. Hyde, he made his first appearance in December 1963, and it was emphasised from the start that his strength was superhuman.
However, his alter-ego was Calvin Zabo rather than Henry Jekyll, and Robert Louis Stevenson's original novella was referenced as a work of fiction within the Marvel universe.

HYDE: He has no way of knowing that my strength has been magnified a dozen times, so that I am as powerful as any twelve normal human beings!

Journey Into Mystery Vol. 1 #99 (December, 1963)
Answer: I went through the list of films based on the Jekyll/Hide story on (German) Wikipedia.
Physical transformation seems to have been a part of the trope from the beginning, but more often towards a smaller/more "depraved" looking persons. Physical violence did not seem superhuman at first, but more a "berserker" type of thing (normal human strength enhanced by animal rage rather than any truly supernatural thing).
The first in that list that mentions a physical transformation into a creature of superhuman strength is the 1976 "Blaxploitation" movie "Dr Black, Mr Hide", in which the protagonist (named Mr. Pride, clearly alluding to Hide) changes into

a white-skinned Frankensteinian monster with superhuman strength and
invincibility

The English language wikipedia mentions an earlier Indian adaption of the story, Karutha Rathrikal from 1967 in which a medical doctor

develops a medicine, which transforms a person into a monstrous
creature

So at least as far as Wikipedia-worthy movie adapations are concerned, this seems to be the first one that unambiguously refers to superhuman powers. That is, unless we are allow to stray away enough from the source material to include cartoons - in the Looney Toons cartoon Dr. Jerkyl's Hide from 1954 Sylvester the cat is apparently transformed into a monster cat after he

accidentally ingests Dr. Jerkyl's formula (thinking it is soda pop)

That Warner Bros. parodied this suggests this was already a trope, so there might be earlier examples.
Comment: An even earlier cartoon would be the Tom and Jerry episode Dr. Jekyll and Mr. Mouse, from 1947. When Jerry drinks Tom's poisoned milk he doesn't not only become aggressive but also larger and superstrong.
Comment: Also from Wikipedia, [this one](https://en.wikipedia.org/wiki/Hyde_and_Go_Tweet) is from 1960.
Comment: @Bobson I found one even earlier (still  great find). If the Looney Toons made fun of it, there are bound to be even earlier examples.
Comment: Also Abbots and Costello's Hide (https://www.youtube.com/watch?v=Mp3JzuFtC2k) is certainly monstrous, but does not seem particularly strong, so I have excluded that.
Answer: For what it's worth, the original text specifically refers to Mr. Hyde as a Juggernaut, in Chapter 1 (Story of the door):

Well, sir, the two ran into one another naturally enough at the corner; and then came the horrible part of the thing; for the man trampled calmly over the child's body and left her screaming on the ground. It sounds nothing to hear, but it was hellish to see. It wasn't like a man; it was like some damned Juggernaut.
Comment: I think the "juggernaut" reference here is a metaphor for how he wasn't fazed or delayed by the collision, and just powered through without a shred of empathy.  I don't think it was meant to imply superhuman strength.
Comment: @CristobolPolychronopolis: Possibly, yes. I just wanted to mention it because all the definitions I've found for *Juggernaut* mentioned a very large size or strength. And this specific word might have steered the following interpretations of the text, e.g. in comics or movies.


Visual studio crash on startup

Question: I have a problem with running Visual Studio 2013 Ultimate. I start visual studio and wait to load Start page. It is ok. But when I move with mouse, visual studio crash without any error message. I tried run visual studio in /safemode, no change, the same problem. Then i try run it with /log parameter to look for errors in %appdata%/....., but the file doesn't constaints any error item. Reinstall didn't work. Anyone can help me? Thanks. (Sorry for my EN)
Answer: It is an normal problem i have seen in 2013 version, i would recommend you to use Visual studio 2015 professional instead, it's  much more useful with some extra features and more user friendly.Try downloading it.
Comment: I will try it. Thank you for now
Answer: Solved. Finally!!! Visual Studio have turned on HW acceleration on graphics card. Turn off the HW acceleration in visual studio solve the problem

Visual studio crash on startup


how to share objects between different classloaders?

Question: I need different classloaders to be able to unload classes. But i need to share objects between them (actually i am getting ClassCastException). So what are the solutions to deal with this?. Thanks
Answer: Objects from different classloaders can interact with each other through interfaces and classes loaded by a common classloader.
Comment: The two plug-ins sharing objects need references to the objects, and the objects need to implement a type that's loaded by a parent classloader. That could be done with the same interface used by the parent, or a different interface. The key point here is that the plugin classloaders delegate to their parents before loading their own copy of a class. So if you include the interface type in the classpath of the parent classloader, then both plugin classloaders should get the same class, via the parent classloader.
Comment: The one example that touches on this that I found in a quick googlesearch is from 1996, halfway down page 4: http://www.javaworld.com/javaworld/jw-10-1996/jw-10-indepth.html?page=4 .
Comment: i am getting your answer. But can i get the instance from an external object and save it to use directly? Or i need to use interfaces all the time to operate with other objects?
Comment: Andy is right on the mark.  A common (parent) classloader defines the interface.  Distinct classloaders load implementations of the interface (or common parent). Have your cake and eat it, too.
Comment: @Wyvern666, you can directly use the instance whose class is defined through another classloader, but only through compile-time types defined through a parent classloader.
Comment: I load the plugins in similar way like the ServiceLoader API. Currently the plugins implements a common interface, so the main application invokes methods of the plugins. The parent loader of the plugins classloader is the default SystemClassLoader that loads the main application. So maybe i need another method in the interface to use betwen plugins or i need another interface?. Can you show me some little expample of this approach?
Comment: @Andy Oh, now i understand. So i was near the right path. I have now an invoke() method to call methods from another plugins. The only problem is that when you want to truly share an object instance it must be loaded by te parent classloader of the childs classloaders like you say, so that makes more dificult the unloading process of the JVM.
Answer: One of the primary objectives of using separate classloaders is to prevent exactly the kind of thing that you are trying to do. Security and name conflicts are good reasons for keeping this isolation. Here are a few ways that you can circumvent this isolation.

Using the Common Class Loader
Sharing Libraries Across a Cluster
Packaging the Client JAR for One Application in Another
Application

Refer to this link for more details.
Comment: mmm let see, i have a plugable aplication, so i have a classloader per plugin. Is a bad desicion to share data between this plugins?
Comment: Depends if the plugins can be trusted or not.
Comment: Yeah, in fact, the plugins have acces to the main application classes, but what i cant do is that plugins "see each other".
Comment: I know for Oracle Application Server, there is a parent child relationship between the applications so, multiple child applications can inherit libraries from the same parent. Weblogic uses templates to extend the domain. Try exploring something similar in your container.
Answer: Will also mention that if you are using interfaces, you can use java.lang.reflect.Proxy to create an instance of an interface local to your classloader which, under the hood, makes calls with reflection to the "real" (foreign) object from a different classloader.  It's ugly, and if parameters or return types are not primitive, you will just be passing the ClassCastException further down the line.  While you can rig something up to make this work, in general, it is better to either have a parent classloader with some shared types that you want to be able to use across classloaders, or use a more... serialized format for communication (slower), or only share interfaces that deal in primitives.
Answer: In some situation it may be acceptable to 'switch the context' by for using a thread with desired classloader. For example you create SingleThreadPoolExecutor by a context you need and use that singleton instance to execute the code from different context.
Here was my situation: maven multi module web application deployed to tomcat. One web app registered error notification service bean, and DefaultUncaughtExceptionHandler for the whole JVM using the bean to deliver error by an email (with additional logic inside). When exception was thrown by web application which created the bean email was successfully sent, when exception was thrown by different web app, email functionality failed to cope with javax.mail classes (surprisingly not the exception itself). When I executed a method which send  email in an executor, both cases start to work.


Calculating derivative of error at point x with respects to weight w_j

Question: I don't know how the equation below goes from line 2 to 3 after the derivative term is moved inside the brackets.  Specifically, how is it calculating the derivative of log(y_hat)?  Also, if anyone can point to a good textbook or website to learn this stuff.  I've just started on this free course (option to pay for extras) at edx that is so far pretty good because it has easy-to-understand lectures and jupyter notebook assignments that get you coding:  https://courses.edx.org/courses/course-v1:Microsoft+DAT256x+1T2019/course/
Answer: Based on chain rule we have:
$$\frac{\partial \mbox{log}(f(x))}{\partial x}=\frac{\partial \mbox{log}(z)}{\partial z}\Bigr|_{z=f(x)}\frac{\partial f(x)}{\partial x}=\frac{1}{z}\Bigr|_{z=f(x)}\frac{\partial f(x)}{\partial x}=\frac{1}{f(x)}\frac{\partial f(x)}{\partial x}$$
More close to the notations used in the question:
$$\frac{\partial \mbox{log}(f_{\mathbf{w}}(\mathbf{x}))}{\partial w_j}=\frac{\partial \mbox{log}(z)}{\partial z}\Bigr|_{z=f_{\mathbf{w}}(\mathbf{x})}\frac{\partial f_{\mathbf{w}}(\mathbf{x})}{\partial w_j}=\frac{1}{z}\Bigr|_{z=f_{\mathbf{w}}(\mathbf{x})}\frac{\partial f_{\mathbf{w}}(\mathbf{x})}{\partial w_j}=\frac{1}{f_{\mathbf{w}}(\mathbf{x})}\frac{\partial f_{\mathbf{w}}(\mathbf{x})}{\partial w_j}$$
Now by setting $f_{\mathbf{w}}(\mathbf{x})=\hat{y}$, or $f_\mathbf{w}(\mathbf{x})=1-\hat{y}$, line 2 to 3 follows. For example for $f_\mathbf{w}(\mathbf{x})=1-\hat{y}$:
$$\frac{\partial \mbox{log}(1-\hat{y})}{\partial w_j}
=\frac{\partial \mbox{log}(z)}{\partial z}\Bigr|_{z=1-\hat{y}}
\frac{\partial (1-\hat{y})}{\partial w_j}=\frac{1}{z}\Bigr|_{z=1-\hat{y}}\frac{\partial (1-\hat{y})}{\partial w_j}=\frac{1}{1-\hat{y}}\frac{\partial (1-\hat{y})}{\partial w_j}$$
Note that input $\mathbf{x}$ to the network is constant w.r.t. changes in  $\mathbf{w}$. Also $x|_{x=y}$ means replace $x$ with $y$.
Comment: @flexitarian33 chain rule is only one rule. Only notations differ slightly. Here is a good link for practice http://tutorial.math.lamar.edu/Classes/CalcI/ChainRule.aspx
Comment: I see.  I'm going to try reading this other book https://www.manning.com/books/grokking-deep-learning because even with the edited answer, I still don't see how that first equality holds.
Comment: Of the three given, I think only the last one (the very right one) is applicable in the posted question.  Is that correct?
Comment: Actually, I cannot seem to be able to chain at all from left equation to middle to right.  That is what I'm supposed to do right?  I learned chain rule when studying RNNs and LSTMs but this seems different.  Can you link somewhere with all the different chain rules?
Answer: For those like myself who are not as mathematically astute, that Grokking book is very helpful.  It explains how multiplying the raw error (y_hat - y) by the input x has 3 effects:

stopping, ie. when the input is 0, prediction is 0 so there is no change in weight
negative reversal, ie. when the input is negative, the weight change will be negative so that it moves in the correct direction (adjusts so that next y_hat is closer to y)
scaling so when input x is large, the change in weight will be large but this is where alpha comes in to avoid overshooting.

Anyways, as it relates to my original posting, without the chain rule, I can find the partial derivative of y_hat w.r.t. the w_j which is equal to partial derivative of (w_j *x) w.r.t. w_j.  Basically it is just the input x.
So Grokking has a variable called weight_delta (the gradient of error function) which is raw error * input, ie. (y_hat - y) * x.  The input x happens to be the derivative of (w_1x_1 + w_2x_2 +...+w_nx_n) and since all other w_jx_j are constants, we get x_j left as the derivative.  In a one input model, that is just x.  As stated earlier we multiply the raw error by input for stopping, negative reversal and scaling.
So we end up with the last line of the equation, ie. (y_hat - y) * x = -(y - y_hat) * x
Udacity concludes the section with this:

If you think about it, this is fascinating. The gradient is actually a
  scalar times the coordinates of the point! And what is the scalar?
  Nothing less than a multiple of the difference between the label and
  the prediction.


YUI dialog does not scroll

Question: I am using YUI Dialog.But vertical scrollbar does not apper even after doing
overflow to auto.
It works fine if i give the height attribute while creating dialog
<code>Here is the  code http://jsfiddle.net/SNfcG/
</code>
Answer: I think you're going to need to dynamically set the height in order for it to get the scrollbar (so set height based on viewport size on page load, then reset it if the window is resized). I don't think that YUI2 panel does this out of the box for you.

YUI dialog does not scroll


Repeatedly seach site on google

Question: If i search my site repeatedly on google or other search engine by different keyword and click on result for my site, is effect on my seo in long time? my site rank increased ? or search result rank?
Answer: Click-through has always been in huge debate and no one actually knows for sure how much influence it holds, because its one of thousands of Google's secrets.
But what I can tell you is that Google will know its you doing the clicking therefore you are not as a treated as unique visitor. They know its you through cookies and your ip address.
Comment: I was picking a page that should never rank on SERP page 23 (or so) and watch it move to page 2 or 1. Then when I stopped it would go back to page 18 or 19 or whatever. I originally was studying certain web markets and how they make money. I hate most of these sites so it was a bit of stupid fun. BTW- I would sometimes check SERP performance from outside of my computers and network just to see and sure enough, it did make a difference. It was just one page though and it took one daily click over a long period. So it was nothing earth shattering. I just found it interesting.
Comment: Okay. This may sound weird. But for a long while I conducted an experiment by clicking once daily on a few specific domain/performance junk SEO websites after searching my domain. I would see them rise in the SERPs for my domain name. Then I would pick a few other saps and watch them rise and the others fall. I would search my domain name with and without site: just to see what is important and somewhere I thought I would have a bit of fun. So CTR even a small one for a search that is specific enough can move a page in the SERPs. I would not recommend this for you own site of course.
Comment: It may just seem that it does, rankings can drop and flux daily without any visible reason other than the fact you been clicking but may have nothing to do with it at all. I'd say clicks on a mass scale could have an influence, especially for 'BRANDS'.
Answer: Yes, clicking on a SERP result can change ranking. No, its not that easy and results won't stick [permanently] by spam clicking it via 1 endpoint because Google has very advanced abuse/proxy/tracking abilities. True you may see the SERP rise, but it is probably introvertive and could be due to you being logged into G+, G account, your browser signature, device key, past behavior, current behavior, or as triggered locality to another mysterious UID assimilation.
Every link presented in Google serps routes via their google.com/url router, redirect, masking, & insignts engine. To see this, right click a link, copy the url. Then paste it and deconstruct. For this example, I searched for bananas and copied the router url for the 4th result.
Here is the deconstructed URi:
https://www.google.com/url
?sa=t (unknown)
&rct=j (unknown)
&q= (this is the query, missing via HTTPS searches)
&esrc=s (this is the secure identifier)
&source=web (since I came via google.com)
&cd=4 (this is the SERP position of the link I clicked)
&cad=rja (looks to be an affiliate app style acronym)
&uact=8 (looks like the Google account type)
&ved=0CDsQFjADahUKEwjAs6GE2eLGAhXDez4KHa_pAdE (unknown)
&url=http%3A%2F%2Fnutritiondata.self.com%2Ffacts%2Ffruits-and-fruit-juices%2F1846%2F2 (the target URL)
&ei=DDypVcD9KMP3-QGv04eIDQ (unknown)
&usg=AFQjCNFCrjlY8WC45YqAu4IbvWjvkZYPIg (unknown)
&bvm=bv.97949915,d.cWw (unknown)

So true, no one knows for sure whether Google counts clicks towards ranking. But, why would they track so much if it didn't affect SERP performance? I will go on a limb against all arguments and say: Google absolutely uses click through data over time to mitigate ranking results. The reason they never admit to it is because of the same reasons they don't admit to all the other SEO factors - It would cause a **** storm of operator anger, blackhat abuse, trojan client bots, etc. In their eyes it's better to just leave it in an air of mystery.
EDIT 8-7-15: Stumbled onto this article talking about various Google patents such as US8938463 describing the predictability, reliability, and entity implications based on user intents->clicks. The abstract of the patent quite literally lays it out, although we still can only assume this behavior is present in Google search rank methods (emphasis is mine):

The present disclosure includes systems and techniques relating to
  ranking search results of a search query. In general, the subject
  matter described in this specification can be embodied in a
  computer-implemented method that includes: receiving multiple
  features, including a first feature indicative of presentation bias
  that affects document result selection for search results presented in
  a user interface of a document search service; obtaining, based on the
  multiple features, information regarding document result selections
  for searches performed using the document search service; generating a
  prior model using the information, the prior model representing a
  background probability of document result selection given values of
  the multiple features; and outputting the prior model to a ranking
  engine for ranking of search results to reduce influence of the
  presentation bias.

Repeatedly seach site on google


Loggin a user across different domains

Question: two years ago I had to design a system to share authentication data across multiple domains, all of them shared the same server/db. I was able to pull this off with a complex system of cookie sharing which, to date still works.
I'm now in the process of redesigning the system and I was wondering if there are better ways to achieve this without having to write cross domain cookies.
Basically the system MUST do this.
Once logged in one site the user must be logged in all of the other site seamlessly, not only following a link, but even by directly writing the domain name on the address bar.
To my knowledge the only way to achieve this are cross-domain cookies, if there are alternatives please tell me.
Thank you very much
Answer: My Idea would be to include a login-Javascript from a third domain which gets includet in all sites. This javascript sets and reads the session-cookie and calls the current domains server via ajax with the result. (No validation should be done in the JS - this simply sets and reads the cookie)
If cross domain AJAX does not work, you can still call the thirds domain server which acts like a proxy and calls the current domains server.
Answer: The StackOverflow sites have implemented something similar to this. Check out the details at the following links.
Here is a post giving an outline of how they did it.
And here is even more detail.
Answer: For this you do have to use cookies, but you can vary what you store in the cookie. The cookie doesn't have to contain user credentials but can instead contain something more like a token that you use to "centralize" your sessions.
Easies way would be to let all hosts share a single memcached server and use the content of the users cookie as your key.

Loggin a user across different domains


Second desktop other OS

Question: I want to Dual Boot Windows 10 and Kali Linux.
That is not a problem, but I don't want to turn off my PC to get into Kali Linux.
I want that if I'm on Windows 10, Kali Linux is in the second desktop.
Is this possible?
Answer: You can't run two operating systems at the same time unless one of the operating systems is installed in a virtual machine application such as VirtualBox.
VirtualBox, and VMware allow you to install multiple operating systems on the same host machine. Both VM applications allow you to:

Run more than one OS at the same time
Switch between the OSs by switching to/from the VM application window.
Except for logging out of the host OS, it's possible to start/stop/pause the OSs independently of each other.
File sharing between OSs
Allocate part of the hardware resources of the physical machine to the guest OS.
Backup and restore the guest OS to a choice of restore points using snapshots.
Answer: As @Karel said, provided you have a powerful enough system (4GB RAM & at least 2-cores) you can happily run Kali Linux as a virtual machine and have both systems running at the same time.
You have a few options when virtualizing Linux on a Windows host, VirtualBox by Oracle, VMWare is also another option. I think you can even get Linux to boot in Windows Hyper-V but I'm not entirely sure.
Remember though, You will not get full video acceleration for your virtual machine using a free virtualization tool.
For further reading, here is a great guide on how to get your system setup!
https://www.computersnyou.com/1626/how-to-install-kali-linux-in-virtual-machine-step-by-step/

Second desktop other OS


Solar heating of an object in air

Question: I need a solution to the heat equation that shows temp increase in an object, e.g. a cube or sphere, in sunlight.  The object is assumed to be exposed on all sides except one.  It is a solid object with a certain surface emissivity and heat capacity.  In other words, I don't care what is inside the object.  It absorbs some light from the sun and heats up, and heat is radiated and convected in air so that it reaches an equilibrium temperature.  The solution presumably uses the parabolic PDE and the Neumann boundary condition.  A Matlab formulation would be great!
Comment: Since you expect something very specific, you should give something specific - the mathematical formulation of the problem. Greets
Comment: ""and convected in air "" Is there some wind?
Comment: Typical separation of variables exercise, no? Though you'll need to be clear on heat inputs and losses to work out the boundary conditions. How is the sun assumed to be oriented? Straight above, or something more complicated?
Answer: To the extent that convection is important, LOL. Temperature differences drive the fluid flows, which drive the heat loss. It would be a lot easier with a sphere than a cube, but the real problem is relating surface temperature with heat loss. If you put it in a vacuum, so you only had radiative losses, it would be easily tractable.

Solar heating of an object in air


Leopard gecko's toe looks blackish purple

Question: My son's leopard gecko's toe doesn't look good. We thought it may have turned purple because of shedding. We've tried soaking it. Nothing seems to be working. Its toenail looks a bit black too. Does anyone know what is going on here?
Comment: Looks like a toe, in that photo... not much different from the next toe over. If the animal is gripping with it...
Answer: It's just from clogged up skin but your gecko could lose its toes due to blood circulation being cut off.
Just soak it in warm water for ten minutes then get a cotton ball and rub and pat gently till its clogged skin comes off. This process should remain gentle: do not force skin off with fingers.
To avoid this happening again keep your gecko in a cage with a moist environment and replace sand with a mat. Make sure his favorite hiding spot stays moist too.


how to find uniform continuity

Question: I have some questions on continuity. What is the difference between continuous and uniformly continuous function?
Please explain with this question.
Find $f(x)=x^2$ is uniformly continous on [0,$\infty$[ ?.
Is there any particular method to follow?
Answer: The difference is at the "$\delta$" level in the $\epsilon$-$\delta$ definition of continuity.
Let $f$ be a function on $(a,b)\subseteq \mathbb R$. Then $f$ is continuous on $(a,b)$ if
$\forall x_0\in(a,b),~ \forall \epsilon>0~~\exists \delta=\delta(\epsilon, x_0)~:~\forall x~:~|x-x_0|\Rightarrow |f(x)-f(x_0)|<\epsilon,$
while $f$ is uniformly continuous on $(a,b)$ if
$\forall x_0\in(a,b),~ \forall \epsilon>0~~\exists \delta=\delta(\epsilon)~:~\forall x~:~|x-x_0|\Rightarrow |f(x)-f(x_0)|<\epsilon.$
In the case of uniform continuity the parameter $\delta$ is independent of the chosen point $x_0$ in the domain $(a,b)$. Note that uniform continuity makes sense only on (sub)sets, while continuity can be defined on each point of a given (sub)set, as usual.
Moreover, each uniformly continuous function $f$ on a subset $(a,b)\subset \mathbb R$ is ivi continuous. The converse does not hold. An example:

$f(x)=x^2$ is uniformly continuous on $(0,1)$

Let $\epsilon >0$, $x,x_0\in (0,1)$ and $|x-x_0|<\delta,$ for some $\delta$ to be found. We want to show that $f$ is continuous and $\delta$ can be chosen s.t. $\delta=\delta(\epsilon)$ (no dependence w.r.t. $x_0$).
Then
$$|f(x)-f(x_0)|=|x-x_0||x+x_0|<\delta |x+x_0|;$$
using the triangular inequality $|x+x_0|\leq |x|+|x_0|$ and $x,x_0\in (0,1)$ we can write
$$|f(x)-f(x_0)|=|x-x_0||x+x_0|<\delta |x+x_0|\leq\delta(|x|+|x_0|)<2\delta;$$
then, choosing $\delta :=\frac{\epsilon}{2}$ we show uniform continuity of $f$ on $(0,1)$.
Comment: Please, let me know if you need more details concerning $f(x)=x^2$

how to find uniform continuity


Integral: $\int\frac{x^2}{\sqrt{4-x^2}} dx$

Question: So, I am really just having one issue with this integral, but I will go through the steps I have taken.
Consider $$\int\frac{x^2}{\sqrt{4-x^2}} dx$$
First, I set $x = 2\sin\theta$, found $dx = 2\cos\theta\space d\theta$ and plugged this back in, making $$4\int \frac{\sin^2\theta}{\sqrt{1-\sin^2\theta}} \cos\theta \space d\theta$$
Using $\sin^2\theta + \cos^2\theta = 1$, I canceled $\sqrt{1-\sin^2\theta}$ with $\cos\theta$, leaving  $$4\int\sin^2\theta\space d\theta$$
Using $\sin^2\theta = \frac{1}{2}(1 -\cos2\theta)$,  I simplified, ending up with $$4(\frac{\theta}{2} - \frac{\sin 2\theta}{4})$$
When trying to put the solution back in terms of $x$, $\sin 2\theta$ is giving me trouble. Using the relationship from before, I got that $\theta = \sin^{-1}(\frac{x}{2})$. I am able to obviously substitute this back in for $\theta$, but again I am lost what to do with $\sin 2\theta$.
Answer: Hint: $\sin(2\theta)=2\sin(\theta)\cos(\theta)$. Use this to get everything in terms of $\theta$ instead of $2\theta$.
Comment: Man, I hate these identities sometimes. Will give the checkmark in 12 minutes.
Answer: Hint
Just use that $$\sin 2\theta=2\sin \theta\cos\theta=2\left(\frac x2\right)\left(\sqrt {1-\frac {x^2}{4}}\right) =\frac {x\sqrt {4-x^2}}{2}$$


How does iPhone discover an external accessory via Bluetooth?

Question: How does an iPhone know to connect to an MFi device via Bluetooth automatically? Is the Bluetooth on iPhone constantly looking for a device to hook up to? What happens if there are a few MFi (all with Bluetooth support) around?
Answer: You import ExternalAccessory/ExternalAccessory.h in your .m file(implementation) so that you can use the libraries that contains the accessory information or get available accessories around. Using this, we can also open a session with the selected accessory.
I'm not sure if you can connect to multiple bluetooth devices that are detected.
Answer: The user must go to Settings/Bluetooth or Settings/General/Bluetooth (according to which version of iOS the device runs), and wait till the MFi accessory got discovered by the iOS.
Then the user must manually connect the device for the first time. The accessory usually remembers the pairing relationship and reconnect to the iOS automatically, if the user got so lucky when the bluetooth of iOS is on.
Though I have never tried to played with connection of multiple bluetooth MFi devices, Apple's documents suggested that after iOS 5, it is supported.