What is scripting, and what is a scripting API?

Question: What is scripting, and what is a scripting API? Is scripting the process of writing the game program, and is the scripting API (such as the Unity scripting API) the API provided by the game engine, which we use to create games?
Answer: Some of the answers are very convoluted, so I will make it brief.
Programming languages can be divided in two categories: compiled and interpreted.
In compiled languages (e.g. C) the source code go through a compiler and produces an executable file that can be run on a compatible machine.
In interpreted languages (e.g. Javascript) the source code go through an interpreter at runtime, executing it on the spot.
Therefore an script is the source code for an interpreted language. That means that the code needs an interpreter to be run.
In the context of games, some engines provide an API that represents the language that you write to use the functionalities of that engine.
Answering your question, usually games are written in compiled languages, limiting the scripts to very specific behavior (e.g. AI).
Answer: The principal difference between a script or a program is that the script is completely dependent of the API its scripting engine exposes to it.
If I code a game in C++ using a C++ game engine, I'm not doing any scripting, my resulting binaries are standalone and are not limited by the engine's API. I can use the virtual filesystem (if any) of the engine to read files, or I can completely bypass it and use calls to the operating system API.
Usually, when the game engine support scripting, I only can do what the scripting language syntax + game engine API allow.
Given that definition, If I'm coding a game engine and I want to support scripting, simply distribute a Python installer with the game engine and an API to allow the scripts to interact with the game engine may not count as scripting, as a Python program can do pretty much what a standalone program can. To adjust to my definition of scripting, a modified version of Python may be required, with many modules removed or somehow not allowed to use, then you can say the user of the engine is doing scripting, and not a full program that interact with the engine.
The javascript running in your web browser is a better example of what I have for scripting. You can do almost everything with it but I challenge you to write/read a file to the filesystem or use any of the OS APIs. It is completely restrained to what the browser engine allows It to do. It results convenient to the developer and protects the user.
There are game engines that have their own scripting language and others that implements an existing one.
Answer: Scripting for games can range from simple operations with home grown languages to writing the entire game in high level languages like Lua or C#.
If we take a car analogy, a game engine is like a real engine, and scripts are everything else. Scripts are the fuel, body, wheels, steering, paint job and so on. Scripts are what make the engine run, and tell it how to run. Even though a car may have the same engine, they can drive and look completely different. Which is how we can have the same game engine under the hood, but have completely different games on the outside.
Scripting APIs are the connection points with the game engine that allow us to control it. API stands for Application Programming Interface. It's the interface between the game engine and the scripting language. These APIs go both ways, they allow us to get information from the game engine and allow us to provide information/instructions to the game engine.
Some engines are flexible enough that they give you the power to create an entire game with scripts alone. Some engines are just part of the solution and are available to build upon to create a game.
Comment: Good answer; Saying "Engines are powerful enough that you can create an entire game with scripts" is incorrect, you could say built flexible enough(?) or simply written that way. Any Engine might have a lot of "power", a lot of capabilities but it doesn't mean it can be manipulated by scripts.
Comment: @Zehelvion 'Powerful enough' can be taken to mean many things. Clearly in this sense, I'm talking about the power to create an entire game.
Comment: http://dictionary.reference.com/browse/powerful?s=t
Comment: @Zehelvion I'm familiar with the meaning of the word. Since I knew what the word meant already, linking the description does not change my answer or comments. Perhaps you can learn something from it? Try applying the 4th definition to my answer.
Comment: Honestly it's like saying that some cars are powerful enough that you can operate the Engine without using the clutch. If you think it's proper English and refuse constructive criticism and then go and close a question in suspiciously high temporal proximity to the event, all the more power you you. ;) Btw I agree the question should have been closed but I suspect it wouldn't have been if I hadn't pointed out you could improve the wording of the answer.
Answer: First, what are our goals?
We want a lot of people to use the engine as effectively and as quickly as possible to prototype and make full blown games.

Ease of use -> We need to abstract complexity
Time needed to add and test a change -> We would like to avoid compilation
Debugging -> We don't want people to touch our tested code; we need them to write their code separately from ours.
Learning curve -> We may not want our users to need to know C++ for various reasons and prefer they'd use a simpler language.

I think a more precise metaphor would be this:
The Engine, the body, the lights of the car and all that stuff you probably should never touch (if all you want is to get somewhere) are the Engine.
The API is the keyhole in the starter, the wheel, the break pedal, the stick, the gas pedal, the clutch and little plastic handle that you use to turn on the lights and the one for the windscreen wipers and air-conditioner's knob and the radio buttons are the API.
You don't need to know anything about the Engine, air-conditioning, radio signal or the light bulb in your headlights to get the car running, playing music, air-conditioned and functioning really well enough to get yourself from point A - to point B. You also don't need to build anything new or modify any of the parts of the car itself.
So the car is like the Engine, the Scripting API is like all the controls you take for granted when you ride the car that help you forget how complex the technology behind them is, abstraction.
So in short, a scripting API is an hopefully easy way, to control a very complex system you possibly have little to no knowledge of by the use of abstraction, a preferably easy to learn interface and sparing you the need to build these services yourself.
You can however still modify things "inside" with some Engines depending on the contract between the company (creator) and the end user.
Comment: So scripting is not a must for game programming from engine and is only an added advantage? @Zehelvion
Comment: @CelerCube Lets look at [Box2D](http://en.wikipedia.org/wiki/Box2D), a physics simulator engine. In it's native version (C++), you could use it by writing C/C++ and compiling your code. Scripting is definitely advantageous because the less you need to know to use something proficiently, the more value you get for a smaller investment, right? Compiling is another issue, compilation could become a time consuming process; if you don't have to compile to test your changes, that is a considerable advantage.
Comment: So Can I program in c++ in UDK?
Comment: @CelerCube hmm... I don't use UDK, I am using Unreal 4 atm.. I think you could buy the Engine, and program in c++ to utilize the engine. You can do that "out of the box" with Unreal 4. Of course, some products / companies "hide" the Engine on purpose for secrecy and support reasons. Supporting an Engine where you could modify the source may become very unmanageable task and exposing code (even if it's copyrighted) might cause a company losses in the long run. Some aspects of the code are never copyright protected. Design principles,  Patterns etc.
Comment: I am not into prfoessional game programmiong atm.I am a complete beginner with lots of doubts.I did visit as much as youtube vids and pages to clear my doubts but all they said was write this code use this etc.
Comment: @CelerCube Everyone starts at that point, game development can be very hard and I think that sticking to the necessities is important especially in the beginning. You could learn a tool like Game Maker that intentionally takes a lot of the workload off your hands.
Comment: I am not able to convey my doubts properly here.I can do it in one on one talking.can you help?only some small doubts...
Comment: @CelerCube Got fb? I'm Arthur W. White
Comment: Are u Arthur Wulf White??@Zehelvion
Comment: Yeah, that is correct. But the name that appears on my Facebook account is Arthur W. White.
Answer: If a game uses scripting, it means it has a system of reading in a secondary language and converting that code into something it can run. For example Legend Of Grimrock, the main engine is written in C/C++, but it uses Lua as a scripting language to manage in-game events and monsters.
The main purpose of scripting is to be able to change a game's behaviour without having to recompile the game itself. This is especially useful for things such as monsters' stats - you wouldn't want to recompile the entire game engine every time you changed a spider's attack stat.
A scripting API (application programming interface) is the way a scripting language interfaces with a game engine. The game engine exposes functions that can be called from the scripting language to do things like spawn monsters, give the player items or just display messages for the player to read.


Does anyone know where "crack down" comes from?

Question: There's crack up, crack down, and crack on (?). I am curious about the origin of the phrase crack down. Also,  what does it literally mean?
Answer: The image comes to mind of a slave-driver cracking a whip down at the feet of a slave to induce, through fear, a particular behavior or quality of behavior. Use in other contexts is by analogy to the slavery model.
Comment: This is close to what comes to my mind as well. We know "cracking down" on something, in modern times, is often associated with getting results, where the same could be said for most outcomes from, and the use of a whip when cracking it at something, be it a horse, or some other beast of burden.
Comment: Evidence though? This seems like a myth.
Answer: From http://www.etymonline.com:

crackdown (n)
  also crack down; 1935, from the verbal phrase (1915), from crack (v.) + down (adv.); probably from the sense of "to shoot at" (1913).

Of course now we need the etymology of crack:

crack (v.)
  Old English cracian "make a sharp noise," from Proto-Germanic *krakojan (cognates: Middle Dutch craken, Dutch kraken, German krachen), probably imitative. Related: Cracked; cracking. From early 14c. as "to utter, say, speak, talk," especially "speak loudly or boastingly" (late 14c.). To crack a smile is from 1835, American English; to crack the whip in the figurative sense is from 1886.
crack (n.)
  "a split, an opening," mid-15c., earlier "a splitting sound; a fart; the sound of a trumpet" (late 14c.), probably from crack (v.). Meaning "rock cocaine" is first attested 1985. The superstition that it is bad luck to step on sidewalk cracks has been traced to c.1890. Meaning "try, attempt" first attested 1830, nautical, probably a hunting metaphor, from slang sense of "fire a gun."

From the action of making a cracking sound we get the various associations.  When you crack down on something you are shooting it down as if with a gun that makes the cracking sound when fired.
Answer: Ngram viewer suggests it was first written as one word, in a book around 1898 to 1905

Does anyone know where “crack down” comes from?


Collaborative album on Facebook

Question: Is there any way I can let specific people add photos to my album on Facebook? The way it is, right now; If I have some photos of an event and my friend has some; then we need to collate before either of us creates a complete album.
Tagging helps to some extent. Still..
Answer: Go to the Groups Facebook App, create a new group, (fill out the info, etc), on the screen after you fill out your group info, you'll see a lot of permissions. One which enables Photos and allows you to control who uploads photos to it. Click the box which says something like "Only allow Admins to edit photos". Finish your group, add your friend as an admin and you should be set.
Comment: Also, don't forget to invite the people to join the group.
Comment: So there's actually no way to collaborate with just an ordinary fb page. To allow people to contribute photos, I need to create a separate group!
Comment: I can't say authoritatively, but **as far as I've seen**, this is your best (and only) bet.
Answer: Use google picasa web albums. It has the ability allow others to contribute photos.
http://picasaweb.google.com
Comment: use picasa for a while, then upload the album to FB when you're done
Comment: I need to use Facebook albums. How about all those people who aren't on Picasa and only see the FB feed.
Comment: Does Picase let you upload directly to FB? I doubt that.
Answer: I do not think so. This sounds like it will add an extra layer of complexity to the privacy settings. People will need to authorize access to photos ... What happens if one person does not like what the other has posted ? Who has control over it ? What will be the version control ? I like the idea but I do not see it happening in the near future.

If the event is listed as a Facebook Event, it is still accessible even though the event is archived.
Select Events in the sidebar then Past Events
Scroll to the event.
Now from here there are two ways to do this

Be appointed as an admin (Say in the case where you have photos to add in batches)
Post a single photo at a time to the Event's wall

Pre-Facebook design change one was able to scroll to past events since 2008, I am not able to vet if this is still possible. So you will want to do it to recently archived events. I know for some people they use Past Events as spam.
Now the reasons why I think this is best for your scenario

Provides all those who have attended with highlights of the event.
Attendees are able to add and tag photos ( removing the need for authorization and admin appointment)

Collaborative album on Facebook


Do planetary nebula block the absorption spectrum from a white dwarf star

Question: So if we were to view the visible spectrum of a white dwarf star. Would the planetary nebula essentially block what would be an absorption spectrum? If so, would we all just see emission lines. I'm not too versed in this topic so forgive me.
Answer: I think that planetary nebulae are "optically thin" at almost all visible wavelengths. That means a photon emitted from the white dwarf will pass through the planetary nebulae with little probability of absorption. Thus the visible spectrum of a white dwarf at the centre of a planetary nebula will look just like the spectrum of a "naked" hot white dwarf, except it will have some superposed (forbidden) emission lines arising from optically thin gas in the planetary nebula. Even then, any emission from the planetary nebula is easily distinguished from absorption lines in the white dwarf atmosphere, because the latter are pressure-broadened by the high surface gravity to large widths, whereas planetary nebula emission lines are very narrow.
An exception might be in the early phases of planetary nebula development when they can be thick to ionising radiation (basically in the UV region though).


What are the steps for configuring gitosis?

Question: Looking for setup steps for gitosis after installing from apt-get.
Answer:
apt-get install gitosis
a. The gitosis repo directory is: /srv/gitosis
b. The gitosis user is auto created and named: gitosis
Init gitosis with your public key:
sudo -H -u git gitosis-init < id_rsa.pub
Now you can clone to your local repo:
git clone gitosis@[SERVER]:gitosis-admin.git
Answer: If I remember correctly, Progit has an excellent chapter on that one.
Answer: I suggest looking into this page. It gives clear instructions about how to do the setup for Debian based (like ubuntu) systems.
First you create a new repository, then you check that out using the git client. This check out can be used to configure the server. But that is all very nicely explained on that page.
Good luck!
Answer: Ok, so apt-get install gitosis should have created a new user on your system called "gitosis". Gitosis works by creating an admin repository in this users home folder, and to administrate git you clone that repository, make the changes you want and then push the changes back to the original repo.
To make gitosis create the admin repo, you probably need to create an ssh key pair and tell gitosis to use it for user authentication. Try ssh-keygen -t rsa to create the key pair and copy the public part (id_rsa.pub) to a folder on the server that the gitosis user has read access to (/tmp should work). After that you can run sudo -H -u gitosis gitosis-init < /tmp/id_rsa.pub to make gitosis initialize the admin repository.
When the admin repository has been created, you use the private part of the previously generated ssh (most probably called "id_rsa") key pair to authenticate your git client when cloning the admin repo.
To clone the admin repo, the following command can be used git clone git@[servername]:gitosis-admin.git.
Now you can add the public keys for anybody that is supposed to have access to the git repositories to the admin repository.


What is a bitcoin wallet?

Question: I do not understand how addresses and wallets are related. I see that you are advised to generate an address for every transaction and, furthermore, use (multi-in multi-out) tumblers to maintain anonimity. This will create a hell amount of (unspent) keys+addresses. How do you manage them all and handle complexity? How do you remember that this was a simple transaction from that wallet to mine and the rest is just intermediate activity. Is a wallet just a collection of (unspent) addresses so that you can simply merge different (wallets of) bitcoins by just gathering these keys/addresses? I understand that to have a coin means that you know which address has some unspent bitcoins and you have a key to demonstrate that it is your coin/address in the next transaction. But what if you share same coin addresses between wallets and one wallet will think that there are still money while you spent them (peahaps partially)? What about compatibility of various wallets, is there a strandard/converter? Am I right that the thing that you must keep in mind is the list of addresses plus corresponding keys and the wallet is such a record?
Comment: related: [Wallets vs Addresses](http://bitcoin.stackexchange.com/q/7807/5406), [What's the difference between a wallet an an address?](http://bitcoin.stackexchange.com/q/13059/5406)
Comment: Please focus on one question per post. Your array of topics turns out to be a composite of duplicates to about half a dozen questions already answered on this site. Additionally to the above those include: [What information does a wallet contain?](http://bitcoin.stackexchange.com/q/3173/5406), [Can wallets be shared by different machines?](http://bitcoin.stackexchange.com/q/4904/5406), [Is it safe to reuse a Bitcoin address?](http://bitcoin.stackexchange.com/q/20621/5406)
Answer: You are asking a lot of questions in one post but to answer the question in your title concisely:

A Bitcoin wallet is loosely the equivalent of a physical wallet on the
Bitcoin network. The wallet actually contains your private key(s)
which allow you to spend the bitcoins allocated to it in the block
chain. Each Bitcoin wallet can show you the total balance of all
bitcoins it controls and lets you pay a specific amount to a specific
person, just like a real wallet. This is different to credit cards
where you are charged by the merchant.

From Bitcoin.org.
A wallet contains any number of public/private keys.  You can easily create new wallets or new public/private keys in your existing wallet.
I'd recommend breaking down anything still unanswered into their own specific question.
Answer: It will be classified as double-spending and won't suceed
Quoted from https://en.bitcoin.it/wiki/Double-spending :

...Bitcoin protects against double spending by verifying each
  transaction added to the block chain to ensure that the inputs for the
  transaction had not previously already been spent.

===============================================================================
Take the keys and addresses as a bank card, I'd say. Each bank card has it's code, so as Bitcoin.
Those keys are somewhat localized(thus a private key is needed for wallet transferring)
blockchains only works as a transaction recording platform.
===============================================================================
Bitcoin is using Secp256k1
===============================================================================
"Such a record" is needed as this identifies you on network. A good way is keep it on a paper and lock into a safe.
===============================================================================
More info: Private key
Comment: Ok, what is a wallet? Do you keep the private key of your wallet? Do you see that I point out that you need a new address for every transaction? Why do I ask that? Are you saying that it is ok that a new paper added into your wallet with every transaction?
Comment: A wallet is just a thing for you to store your bitcoins. You should keep your private key or you will lose access to your wallet(quite obvious). No, you don't. You can generate as many address as you like and paper record it then label it like "My Wallet", "Other Transactions" etc. or you can just do 1 key and have it in your mind or in a paper, too. Thus the next question and the last question is invalid.

What is a bitcoin wallet?


How would I implement a following drone with a camera using GPS?

Question: As the title states, is there any way to make a following drone that tracks a GPS unit, and follows/orients camera to that? Similar to this
Answer: I assume that you will have GPS on your drone in addition to the GPS unit you will want to track.
You will make heavy use of the Haversine formula, which will tell you the bearing between 2 lat/lon (GPS) coordinates.  This will come in handy in the following ways:

Using the current and previous coordinates from the target's GPS, you know what direction the target is moving.
Using the drone's coordinates and target's coordinates, you know what direction to aim the camera.

Once you know where the target is and what your orientation should be to it, you can calculate the drone's desired position based on the desired following distance.
Comment: Fantastic answer. However, I forgot to mention that I know nothing about RC in general...how would I relay this to my not-yet-existent drone? What modules would I need?
Comment: You should ask this question separately after you have a drone -- until then, it's too broad for anyone to give you a good answer.


org-agenda-prefix-format change file name

Question: Can you change categories based on their files? For example there is a file todo.org in an orgzly folder and another todo.org in a local folder. Could you change org-agenda-prefix-format (or something else) so that entries in these org files show up in org-agenda as orgzly and local instead of both showing up as todo?
Comment: Add `#+CATEGORY: orgzly` at the top of the first one and `#+CATEGORY: local` at the top of the second one.
Comment: Keywords have global scope, no matter where they are defined. But it's best to keep them visible, so adding them to the beginning of the file is recommended.
Comment: Thanks @NickD, that worked. Strange, I always append new entries to the beginning of the .org file in orgzly (to have them show up at the top instead of scrolling to the bottom), so I thought that adding `#+CATEGORY: orgzly` will get overwritten by the subsequent entries. It turns out it gets picked up by org-agenda even if it's added in the middle. Good stuff!
Answer: Execute C-h v org-agenda-prefix-format RET in Emacs, you will find
the answer. Actually, you will find that you can use any elisp
expression you want:
  %(expression) Eval EXPRESSION and replace the control string
                by the result

Based on that, you can use the below expression to replace %c there,
it will serve your need:
%(file-name-nondirectory (directory-file-name (file-name-directory (buffer-file-name))))
Comment: That's not enough to do what is asked: you  have to conditionally make the category `orgzly` or `local` depending on the pathname. But as mentioned in my comment, it is simpler to set the category of each file explicitily.


Are there any good version control programs for a Windows box that do not have to be installed?

Question: On my work machine, I do not have the permissions to install anything, and astoundingly, there are not any version control software packages set up. I am using VS2008, and was hoping to work around depending on SourceSafe. I've talked to the network admin, and all I could get was "We don't have any version control set up." Are there any good ways of going about this, or do I have to just bite the bullet?
Answer: The real way of going about this is to make the case to management (your management, not IT administration) that source control is a vital component to any software development effort.
Comment: I think it's a shame this is the highest-voted answer - it's not answering the question. I understand that this is the "righteous" thing to do, but sometimes people just need solutions, and this isn't a solution.
Comment: I agree that not having VCS is more than a problem, but since I am not tied to the company, I don't feel it necessary to make it my crusade. Sometimes the temp hacks are vital if for nothing else than adhering to personal standards.
Comment: I'm in a temporary six month contract, and battling the bureaucracy looks like it will be too slow in this context, sadly.
Comment: Development w/o VCS can't work and an developer creating some applications to be run on other machines should be trustworthy enough to run software on his own box ... else something is clearly wrong in the relation between the company and the workers...
Comment: @johannes: He did say it's a temp contract though, maybe the permanent workforce have more permissions but just don't care about source control. Being a contractor seem to often mean that you have to tell yourself "shut up and think of the money", when as a perm you might have argued with management.
Comment: Sometimes temporary hacks are not just enough... having no vcs in today's world is a joke.
Comment: -1 for answering the wrong question. There are cases where you have access to a PC and have no file system privileges (because of admin-nazis, security policies, etc) and having a USB-stick or web-based-only implementation is necessary.
Answer: This question covers running git on Windows from a USB stick.
Comment: Thank you, that will do! I didn't come across this question when I was searching, but it is exactly what I was looking for.
Answer: I used http://subversion.apache.org/ for a long time and I don't recall it needing to be installed. Just extracted and set a .bat file in my startup. I think the one by collab was what I used before.
Answer: I've run Perforce from a flash drive.
Answer: I'm in exactly this situation and so in the end I just zip up all the files in the project whenever I would normally have checked it in and then put a new zip on a network drive and rename them to the current date + time + a comment of what's been done. That together with WinMerge or some other diff tool sort of works.
But TFS will be setup any moment now I'm sure (maybe even before the contract finishes :)).
Comment: That isn't a terrible plain either. Best of luck to you, and hopefully the next spot will be more flexible (or better structured).
Answer: there's a portable version of msysgit
Answer: I think people are approaching this the wrong way. You should try VS add-ins. A quick search yielded several free SVN add-ins. You probably have some for others as well.


Excel Interop + MVC

Question: Is it safe to use Excel Interop inside MVC app?
Answer: EPPlus
EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx).
It does not require Excel to be installed on the server.  It doesn't use Excel libraries, it is just an API interface to the Open Office XML format (xlsx).  XLSX is actually just a a zip file with a folder structure and xml files inside to describe the layout and data of the spreadsheet.
epplus.codeplex.com.  The codeplex site has tons of examples plus here's an additional blogpost with more.
Just putting this here as an Actual answer.
Comment: Does EPPlus work with calculations in cells? Also does it require Excel to be installed on the computer? The documentation on their website doesn't answer these questions.
Answer: Assuming you mean ASP.NET MVC trying to run Excel on the server, the answer is that it's not recommended. Excel is really designed as a desktop app, so running it on a server can cause some problems, as described on in this MSDN article.
If you can target Excel 2007/2010, a good alternative is to use the Open Office XML libraries to create, read or modify Excel workbooks without instantiate and Excel instance. Take a look at www.openxmldeveloper.org
Comment: You can also use Epplus (http://epplus.codeplex.com/).

Excel Interop + MVC


The three houses going down on the right are marked as not valid, whats wrong with them?

Question: I am having a problem with housing --- NPCs won't move into the houses on the right. I have already tried making them bigger, but it didn't help. What is wrong with these rooms?
Comment: Try making them smaller (less wide in this case).   I would shave off 1 or 2 blocks on the right side.  There are [size limits](http://terraria.gamepedia.com/House#Size) to houses, and those might be too wide (or possibly too tall for the width in which case, lower the ceiling).
Comment: @TimmyJim those appear to be smaller than 20x20 (by a good deal) and 20x20 only has an area of 400 tiles. The maximum limit for a house area is 750 tiles. If it were a height issue, then the ones to the left would be affected as well. As for width, well, I've made houses way wider than those successfully. I'd suggest double checking that every single background tile is covered. Due to the way background tiles can overlap, sometimes an area can appear covered when it's not.
Answer: The houses on the right are too close to the corruption. Try removing all corrupted stuff for some distance.
If you are in hardmode you can throw hallowed stuff around to turn it into hallow and fight the corruption that way, otherwise you'll have to use purifying powder (that you can buy from the dryad). Or bomb/mine it all away.
Make sure the corruption cannot creep back again after you've cleared it, or the houses will be invalidated again. (For example by digging a four wide tunnel around the part you want to defend, and line the walls of the tunnel with non-corruptible blocks. (for example all sorts of bricks work for this)


IR module sensor query for Line Follwer Robot

Question:
Are the IR sensors used in Line following Robot and Obstacle avoidance Robot with Arduino UNO different ? If yes , where do we buy these parts online ? I used the following sensor in my Line Follower and am not getting result as it's detecting obstacle instead of black line .
Answer: The sensor you have used is fine. There is a potentiometer on the sensor PCB that is used for the range. For the line following robot you would want the range small, between 1-4cm. However, for the obstacle avoidance robot you would want to set this for a much larger range, say 10-45cm.
To make an effective line following robot you need at least 2-3 sensors.
Here is one using 2 LEDs either side of the line:

And here is a 3 sensor robot:

Notice that one LED stays on the line.
And finally a 5 sensor robot:

The following websites have good step by step guides where they explain the various techniques:

https://www.learnrobotics.org/blog/how-to-build-a-mobile-robot-using-arduino-part-4/
https://circuitdigest.com/microcontroller-projects/line-follower-robot-using-arduino
http://www.robotc.net/wikiarchive/Tutorials/Arduino_Projects/Mobile_Robotics/VEX/Using_the_line_tracker_to_follow_a_line

When I made my line following robot I used 2 of the following sensor:

These sensors were great as they pointed in towards each other, making a focal point. You can do this to your sensor by bending the LEDs slightly towards each other.
Answer: For obstacle detection you would usually use a different IR sensor, yes. The IR sensors usually used for line following only work at a very short range (typically <1cm). For a robot detecting obstacles you want a sensor that detects an obstacle further away, say at a 30-60 cm distance, so the robot can evade the obstacle before it runs into it.
Common IR sensors for obstacle detection look like this:

The IR sensor you showed probably send a 0V or 5V, true or false value to a digital input of your arduino. The IR distance sensor shown above sends an analogue value (range 0-5v) to an analogue input of an arduino. They come in different ranges. Ranges go from ± 10 cm to ±5m (rough indication).
But personally I prefer to use the common HC-SR04 ultrasonic distance sensor instead of infrared ones. They have a larger usable range, a less noisy signal and detect more different types of objects. That's my personal experience from side-by-side comparison.

I'm reluctant to mention online shops on where to buy them. They're very common sensors.


An ssl server as a reverse proxy to a regular server

Question: If I have a server, secured with ssl, which is setup as a reverse proxy to another server, will the traffic still be encrypted?
Answer: Simple. The traffic between the visitor and the reverse proxy will be encrypted, assuming the server is properly set up. The traffic between the reverse proxy server and the unencrypted server will of course not be encrypted. So you probably won't want this traffic to go over the Internet.
I sometimes use SSL-encrypted reverse proxies to give outside access to webmail servers inside an intranet. So the traffic between proxy and webmail server stays within the local network. A VPN between the two servers would also be a good solution.
Comment: So end of the day, if the traffic is going over the internet, and not internally, its not a good idea.
Comment: I guess it is still better than nothing, while certainly not an ideal situation. At least your users will not have their data snooped by malicious Wifi-operators and such.


What happens when the probability of either one of the policies is 0 in Importance Sampling?

Question: I have a general question about the methods that use importance sampling in RL. What happens when the probability of either one of the policies is 0?
Comment: Can you be more specific? Can you provide some formulas? You can use mathjax.
Answer: Background: Importance sampling is used in many off-policy RL algorithms when the data is generated with one policy, yet it is being used to update another policy. The policy generating the data is usually called the behavior policy and the policy being updated is the target policy. Since the distribution of data that is generated by the behavior policy is not necessarily the distribution of data that would be generated by the target policy, using the data from the behavior policy might lead to inaccurate estimates when updating the target policy. To mitigate this issue, it is common to introduce the importance sampling ratio
$$\rho_{t:T-1}\ \dot{=}\ \prod_{k=t}^{T-1} \frac{\pi(A_k|S_k)}{b(A_k|S_k)},$$
where $\pi$ is the target policy, $b$ is the behavior policy, $t$ is the current time step, and $T$ is the terminal time step. For further questions about this derivation and how the importance sampling ratio can be used to update the target policy, see the discussion near equation 5.3 in Sutton & Barto.
(Case 1) Target Policy is 0: In the case where one of the terms $\pi(A_i|S_i)$ is $0$ in the numerator of the above importance sampling ratio, then the entire product is $0$. Intuitively, this sample should have minimal influence in updating the target policy since it has zero probability of being generated by the target policy. As an example, in weighted importance sampling (see equation 5.6), this data sample will have no effect on the estimate.
(Case 2) Behavior Policy is 0: In the case where one of the terms $b(A_i|S_i)$ is $0$, the above product would be undefined. Intuitively, if the behavior policy was used to generated the data, then the data must have a nonzero chance of being generated by the behavior policy in the first place; otherwise, we reach a contradiction that results in the undefined product. See Section 5.7 of the same reference for a discussion regarding the design of useful behavior policies to mitigate this and other issues.
Answer: Very simply, one of the requirements of off-policy RL to converge, is that the behavioral policy $b$ has at least the same support of the target policy $\pi$, thus:
$$
\forall s \in S \forall a \in A \,\,\,\,\,\,\,s.t\,\,\,\,\, \pi(a|s)>0\Rightarrow b(a|s)>0
$$
Thus, you must have a policy that would do at least everything that your knew policy would do
In the case $\pi(a|s) = 0$, then you just don't learn anything


Is there another term for "motivate" with a negative tone?

Question: For example, there's someone at work that I really don't like, and she's good at her job. She makes me want to work harder and outdo her. Can I say, "She really motivates me"? To me, it sounds a little like she motivates me in a good way when it isn't. Is there another word that I can use? Or can "motivate" be used here?
Answer: I'm not sure if there's a word that combines annoyance with motivation, although I'm sure someone will post it if there is!  But you could just say that wanting to beat her motivates you, or something along those lines - it's the competition that inspires you, or the outcome you're looking for.
There are words for this kind of relationship though, like rivalry. Also the word drives has a less positive feel than motivates - it's not necessarily negative, but it can be associated with something that controls you and pushes you in a certain direction.
Answer: I feel that having "She" as the subject of the sentence isn't going to work. "She" isn't doing anything, except being there and doing her job. Instead it is "I" who is finding motivation in this situation.
It sound like you are competing with her. You want to beat her, you could also use "better" as a verb.

I'm really competitive, and I just want to beat her.

If you prefer to use "She" as the subject:

She makes me competitive...
Comment: I wasn't trying to express that.  You would naturally say that separately "I really dislike her, and this makes me competitive.  I just want to beat her.
Comment: This solution fails to express  the idea that the speaker strongly dislikes their co-worker. For whatever deep seated reason, the OP  feels compelled to out-perform her .
Comment: But it  is their dislike (or distrust) the reason for they wanting to beat the co-worker. I think that is a key aspect.
Comment: I don't think there is such a word in everyday use. You could say that the Nazi Party's policies motivated you to leave Germany, or that Buffalo Bill's Wild West Show motivated you to move to Wyoming. The verb is (or used to be) essentially neutral, implying nothing about the speaker's feeling about the source. I blame all these damned 'motivational' books and videos for creating the idea that motivation is mainly associated with positive or goal-oriented things. Even 'spurred' can be from a good or bad feeling, although maybe it would do here, spurs being sharp and often drawing blood.


trackpad non functional for newest hp pavilion dm4

Question: I have a newest generation hp dm4 (the trackpad and mouse buttons are separate, unlike in the previous generation). The trackpad works fine in windows, but in Ubuntu the mouse is erratic and non responsive. By going up and down on the trackpad, I can sort of get the cursor to go left and right, and thats it. I think there is some software or driver problem, but that is the extent of my knowledge. I hope someone can help.
Comment: Do you get this problem in Ubuntu only?
Answer: From the hp support forum
Re: Problem with touchpad brand new Pavilion dm4-2015dx
Options
07-15-2011 11:22 PM

SOLVED!!  Here's what you do.   Reboot. Login. Go to Device manager and roll back the mouse driver to PS/2.  the problem is with the ALPS Driver.   You will loose  some functionality (just bells and whistles) but the touchpad and mouse will work without freezing up.   (You don't have to screw with the bios or any of that rubbish).  Enjoy your new laptop folks!
Answer: Have you tried changing any of the mouse settings? You can read some of the info here and see if it helps Synaptics Touchpad or if that doesn't help there's some more advanced debugging techniques here to find out what's wrong Debugging Touchpad Detection


Are FIFO, pipe & Unix domain socket the same thing in Linux kernel?

Question: I heard that FIFOs are named pipes. And they have exactly the same semantics. On the other hand, I think Unix domain socket is quite similar to pipe (although I've never made use of it). So I wonder if they all refer to the same implementation in Linux kernel. Any idea?
Comment: From the answer below I realized my question is sort of ambiguous and it's hard to be answered. It's likely no one could know so many details of implementational stuff in the kernel (even for kernel developers). If someone can confirm that Unix domain socket, pipe and FIFO they all buffer the data being sent in shared memory under Linux, my question is solved. Well... partly solved.
Comment: FIFO = named pipes != pipes. FIFOs can be bidirectional like a socket pair. Regular pipes are unidirectional. All have the file interface and file semantics. Why does implementation matter to you?
Comment: I know pipes are circular buffers, and that with the STREAMS system, these can have shared implementation, however Linux doesn't use STREAMS by default. I believe Linux hardcodes these IPC channels. I don't feel like checking, though. :D Why don't you? The code is publicly available.
Comment: If they all share the same implementation, their efficiency should be close to each other. And, to me, kernel code is too hard to understand.
Answer: UNIX domain sockets and FIFO may share some part of their implementation but they are conceptually very different. FIFO functions at a very low level. One process writes bytes into the pipe and another one reads from it. A UNIX domain socket has similar behaviour as a TCP/IP or UDP/IP socket.
A socket is bidirectional and can be used by a lot of processes simultaneously. A process can accept many connections on the same socket and attend several clients simultaneously. The kernel delivers a new file descriptor each time connect(2) or accept(2) is called on the socket. The packets will always go to the right process.
On a FIFO, this would be impossible. For bidirectional communication, you need two FIFOs, and you need a pair of FIFOs for each of your clients. There is no way of writing or reading in a selective way, because they are a much more primitive way to communicate.
Anonymous pipes and FIFOs are very similar. The difference is that anonymous pipes don't exist as files on the filesystem so no process can open(2) it. They are used by processes that share them by another method. If a process creates pipes and then performs, for example, a fork(2), its child will inherit its file descriptors and, among them, the pipe. (File descriptors to named pipes/FIFOs can also be passed in the same way.)
The UNIX domain sockets, anonymous pipes and FIFOs are similar in the fact they provide interprocess communication using file descriptors, where the kernel handles the system calls and abstracts the mechanism.
Comment: "UNIX domain sockets and FIFO may share some part of their implementation" ... the point is "some part of" ... I just realized my question is sort of ambiguous and it's hard to be answered. It's likely no one could know so many details of what parts they share in the kernel (even for kernel developers). Nevertheless... could anyone confirm that Unix domain socket, pipe and FIFO they all buffer the data being sent in shared memory under Linux? If it's confirmed, my question is solved. Well... partly solved.
Comment: Well, yes, there is a buffer managed by the kernel. For example, with FIFOs, yoou can kill the writer and the reader can still what was sent into the pipe before the death of the writer. With sockets, it's a bit more complicated because they function with a connected protocol. But if you send, say, an int to the socket, and then get out of scope so that the int is cleared from the sender stack, the receiver can still read it. So, there is clearly a buffer somewhere.
Comment: Re-reading the comment, not sure I'm clear here... Let me know if there still is something unclear.
Comment: Your comment is clear to me.
Comment: There is also the `socketpair()` function that returns a pair of mutually connected sockets without any listener being established.
Answer: There's quite a good discussion of this here: http://www.slideshare.net/divyekapoor/linux-kernel-implementation-of-pipes-and-fifos
So far as I can see (both from the presentation slides, and the source at http://lxr.free-electrons.com/source/fs/pipe.c) FIFOs are implemented as wrappers around pipes, while pipes themselves are implemented via the pipefs virtual filesystem.
@lgeorget - The pipes appear to use kernel memory for the buffers between the readers and the writers (as opposed to 'shared memory') and copy memory between user and kernel address spaces (e.g. pipe_read calls pipe_iov_copy_to_user, which in turn calls __copy_to_user_inatomic (or copy_to_user). __copy_to_user_inatomic calls copy_user_generic, which is one of several ASM implementations.
Answer: A "FIFO" and a "named pipe" is the same thing - though it's quite different from how a shell handles a "pipe" (|) between two commands on the command-line.
A named pipe (FIFO) is a single "file" shared by two programs, where one writes to it and the other read from it...  A socket on the other hand is a "connection" between two "files" - which may use a network and be on separate computers - where one program read/writes to one "file" and another program read/writes to the other...  I don't think they're that similar...  On the other hand both sockets and named pipes - as well as files, devices, symbolic links - all uses inodes, and they all implements some common features (like read and write).
Comment: Yes, Unix domain socket is kind of socket, so it's API is similar to other socket APIs such as TCP or UDP, etc. However, Unix domain socket can only be used as "local" IPC. And the way it transfers data is in first in first out manner, pretty much like FIFO & pipe. So I think it's possible Unix domain socket's API is just another encapsulation of identical implementation so we use it as if it were a socket. I think it's possible they all share the same [internal](http://lwn.net/Articles/118750/) in the kernel ... I want to confirm if it's true or not.
Comment: what does that '"connection" between two "files"' even mean?
Comment: For named pipes (FIFO), two processes shares *one* file - one process writes to the FIFO, and the other reads from it.  For a socket, the processes got one "file" ("Everything is a file") each, and a connection is established between them - which of course really happens through network ports.  That said, I'm amazed that you with your stellar reputation, bothered to down-vote my answer and leave a rhetoric comment, when you could just as easily have *edited and improved* my answer - or written a better answer yourself!
Answer: I don't think so Justin.  If I'm not mistaken, and I quite possibly am, I think FIFOs use a file on disk, and Unix Domain sockets use kernel memory.
Also, as an addition to the poster above who mentioned that Unix domain sockets are bi-directional, that is only the case when using a SOCK_STREAM socket.  SOCK_DGRAM Unix domain sockets are, in fact, uni-directional, and can only send() from the code that called connect(), to the code that called bind().
Of course, the code that called connect() must also call bind() to create it's own endpoint, but that has nothing to do with your question.
Comment: Welcome on StackExchange, and thank you for posting. A few remarks...
1) If you're "quite possibly" mistaken, you should double-check before answering ; this site is not a forum nor a chat.
2) Thank you for your precision on datagram oriented sockets
3 ) There is no need to post something that has "nothing to do" with the question.
:)
Comment: I can't find anything in the man pages to support the statement that unix domain datagram sockets are unidirectional. You should be able to call `sendto()` and `recvfrom()` with them just like with UDP sockets, even without `connect()`ing. (I think you need to `bind()`, though.) That's what e.g. `UNIX-SENDTO:/tmp/foo1.sock,bind=/tmp/foo2.sock` with `socat` seems to do.
Answer: My 2 cents...FIFO and UNIX socket are both bi-directional (similar) but socket have a star topology while a FIFO is just a queue (and hence cannot replace each other), yes their implementation may share code internally.
**
char * myfifo = "/tmp/myfifo";
mkfifo(myfifo, 0666);
fd = open(myfifo, O_RDWR);   //so that you can read/write to it
 ...
write(fd, buff1, sizeof(buff1));
getchar();//wait till some one reds this and writes something else
int sz=read(fd, buff1, sizeof(buff1));  //read that something**

Comment: FIFO is bi-directional?
Comment: FIFOs are not bi-directional, they're one way _pipes_ (FIFO queue is their general name outside of *nix terminology).


How Drupal 6 module "Webform Protected Downloads" Configured

Question: Hi all I am using Webform Protected Downloads module for Drupal 6. I am facing the problem that when i go to "protected download" tab it gives me the message "You need to attach files to this node before you can configure protected downloads." Where can I attach a file to configure the "Webform Protected Downloads" module?
Answer: Go to the default drupal edit page of the given node and upload at least one attachment. Check the private checkbox for every attachment that you want to protect. Then go back to the configuration page for protected downloads. The warning should be gone now.


How do I remotely control another Ubuntu desktop from Ubuntu?

Question: How do I remotely control another desktop (both are Ubuntu 12.04) from my client machine?
Is it possible to use Remmina Remote Desktop Client?
Comment: i don't see a solution for controlling one ubuntu remotely from another when both are on different networks :(
Answer: Overview of Solution
You need to change some settings on your host machine (to enable desktop control) and create a Remote Desktop Client profile on your client machine in order to connect to the host machine and ultimately view and control the host machine's desktop.
And yes, it is possible to use Remmina Remote Desktop Client on your client machine.
Enable Remote Control of Host Machine
Do the following on the host machine:
vino-preferences

vino-preferences also in Dash under Desktop Sharing

Tick Allow other users to view your desktop
Tick Allow other users to control your desktop
Tick Require the user to enter this password
Enter a difficult to guess passphrase
Close

Create Remote Desktop Client profile on your Client Machine
Do the following on the client machine:
remmina

remmina also in Dash under Remmina Remote Desktop Client

Ctrl+N or Connection > New

Fill in your IP address [18.104.22.168] where it says Server
Connect

View and Control Host Machine
On the client machine, when asked for the VNC password, enter the passphrase you previously entered into the host machine.
If successful at this step, you should now be viewing and controlling the host machine's desktop from your client machine.
Comment: what if the computers are on different networks?
Comment: If the computers are on different networks, the standard solutions are (1) either put them into the same VPN or (2) configure port forwarding and Dynamic DNS. Both are not exactly simple to set up.
Answer: First, you need to allow the compter you want to remotely control to be controlled. Launch Remote Control Preferences, and allow Ubuntu to be remotely controlled. You can also set a password if you want. You can now control that computer remotely from another Ubuntu computer. Make sure to choose the VNC protocol when connecting to the computer. If you would like to control Windows 7 from Ubuntu, you need to choose the RDP protocol (You will need to have remote control allowed on the Windows 7 computer).
Comment: How do I launch "Remote Control Preferences"? Thanks.
Comment: @AlikElzin-kilaka Look for "Desktop Sharing" in the menu bar
Comment: @phil - if you are happy with the answer, please click the tick button next to the answer to close the thread.  Thank-you.
Answer: I have been using Remmina, and I'm very happy with it.  Remmina is able to display and control a remote desktop session.  If you don't have it installed you can do so from the USC

Ubuntu remote desktop access is based on technology called (VNC)
Comment: Remmina is really awesome if you are controlling more than one computer at the same time.
Comment: @Mitch , Is it possible to control a Ubuntu 12.04 machine using Remmina with VNC, which on different network? If so how?
Answer: Some machines will ask whether you want to allow connections on the server, during the client connection, live, such that if you don't actually see it happening, it might not work.
Secondly, if you plan to connect Ubuntu and Windows 7 machines, you must select the RDP option, otherwise, eg, Ubuntu to Ubuntu connections will use VNC.
Finally, depending on how your network is set up, you might have to use host names, IPs or FQDNs. Check them all before freaking out, as this will save you some time.
As an added bonus, there is also a trick to connect remote desktop connections behind networks where port forwards are needed to connect to machines behind the entry point. For example, if you have an access point of host.domain.com and it connects to a server on the network, you can set up a port forward using SSH, and then specify the RDP or VNC post like so (in putty for RDP on WIndows 7, this would be the example):
Source: 8585 (or whatever port you want)
Destination: 192.168.x.x:3389 (where x.x is your network)

Then, when using RDC in Windows, for example, you would use localhost:8585 as the server name and voila. This can work on Linux too, with a command like:
ssh -i /path/to/key -L 8585:192.168.x.x:3389 firstname.lastname@example.com


Where is the Bluth Company model home located?

Question: In Arrested Development, which is set in Orange County, CA, the model home is shown visibly in a undeveloped area. This area specifically a residential development called Sudden Valley. Where in O.C. is the model home located? From the locations listed on the show the family appears to be somewhere in Irvine or Newport Beach but the location of the model home doesn't seem to be stated on screen.
Comment: I see this as a trivia question, as learning the precise or general location of the model home (it may not be real-- it's a fictional show after all) probably will not improve your understanding of the the show. That said, I'm not downvoting or voting to close, cuz I want to see what other people think first.
Comment: @stevvve (Holt!) There are also no outside shots of the house (the one exception I can think of is when Gob thought he crushed George under the house), otherwise we only see the often reused image of the house in the undeveloped plot. It's very likely that this house wasn't up for the entire length of the show and the same shot was reused.
Answer: From the Arrested Development Wiki:

A map of Sudden Valley shows its location northeast of Mission Viejo
  and Las Flores, putting approximately in the location of Rancho Santa
  Margarita, Orange County, California.


problems adding Google Maps to my app

Question: i wanna use Google Maps with my app. i downloaded the SDK and read the Starting Guide and applied it to my app. i added the libraries needed (double-checked them, or maybe a dozen), created my API key and added it to my app, and then added the code to add a map view. when i run the app i received the errors:
Unknown class GMSMapView in Interface Builder file.

+[GMSCameraPosition cameraWithLatitude:longitude:zoom:]: unrecognized selector sent to class 0x32d670

so to solve the first error: i checked that the storyboard views are well connected and my views had the right classes connected to. however, it didn't work. i search over here about similar problems and most of them were like "try to product>clean to the app then rerun". i tried it and didn't work even deleting the app from the simulator didn't help.
to solve the second problem, i also searched for it and most of the solutions were to add the -ObjC at the Other Linker Flags in the "Target" and not in the Project. so i did that plus changed the Architecture to armv7 (as also stated by Google). however, i received a bunch of 8 errors concerning the Match-O Type
Undefined symbols for architecture i386:
  "_FBTokenInformationExpirationDateKey", referenced from:
      -[PFFacebookTokenCachingStrategy cacheTokenInformation:] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy expirationDate] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy setExpirationDate:] in Parse(PFFacebookTokenCachingStrategy.o)
  "_FBTokenInformationTokenKey", referenced from:
      -[PFFacebookTokenCachingStrategy accessToken] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy setAccessToken:] in Parse(PFFacebookTokenCachingStrategy.o)
  "_FBTokenInformationUserFBIDKey", referenced from:
      -[PFFacebookTokenCachingStrategy facebookId] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy setFacebookId:] in Parse(PFFacebookTokenCachingStrategy.o)
  "_OBJC_CLASS_$_FBRequest", referenced from:
      objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
  "_OBJC_CLASS_$_FBSession", referenced from:
      objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
  "_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from:
      _OBJC_CLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
  "_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
      _OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

i wanna note that i'm also using Parse data backup in my app, and the errors are somehow pointing to them and i don't know why! so after that i tried to change the Architecture to armv7 and the other Linker Flags to -ObjC in the Project and not the target (as Google advised). The match-o type errors disappeared but the errors i originally stated are still there.
Please, somebody help me out with this!! i want it to work so bad and i've tried all iterations of solutions. i also downloaded a sample code uploaded by google demoing how to add google maps using storyboarding (which works). i imitated it also it didn't help. Btw they added the -ObjC in target and it's working!! so it Parse doing the problem? i can't exclude it from my app, i'm heavily using it to back up the users data.
Answer: What are you seeing are issues related to the Facebook SDK and not Google Maps... Which can be solved with this: Parse for iOS: Errors when trying to run the app

problems adding Google Maps to my app


How do I compete in search engines when my competitors are paying for backlinks?

Question: I have built a site for a client that does tiling, the site I have created is optimized for Google and in very good shape even with Google quality content. I find most of the competition have poor sites with little if any content. but they are always not only on the first page of organic search but the second and third page all at the same time. It is only when I did search on clients backlinks did I discover they are paying for backlinks. I understand one can report this to Google,
https://www.google.com/webmasters/tools/paidlinks?pli=1
This is something I have not done before, can anyone add some advice as to doing this, and will I need to do it every day until Google acts. What is the normal time scale Google acts on things like this, my client is prepared to pay for adverts but, all in all the competition has paid for hundreds of backlinks and it is a waste of my clients money just paying for adverts aka one click where as competition for far less are availing from the backlinks.
Comment: Your competitors are running a risky business.  Google will probably catch them eventually.
Comment: Buying links is a gross violation of Google's recommendations https://support.google.com/webmasters/answer/66356?hl=en .  You can report this to Google https://www.google.com/webmasters/tools/paidlinks
Answer: Nothing beats authentic backlinks and fresh unique content.
This takes longer than paying for backlinks but in a year or so you will have real traction instead of purchased and at that point you will be winning.
One main benefit for this (among many benefits) is the relationships you will build with others online from you reaching out and them coming to you due to fresh content. And these relationships will work in your favors later when you ask for help or trade backlinks.
Also, don't be afraid to get the ball rolling with some Facebook advertisements. This is a a very cost effective way to start building you brand and getting the word out.
Remember you're building a reliable and trustworthy brand. You want authenticity and value. It takes time to do this as you build up your reputation in your niche of choice.
That said, with enough money you can potentially buy your reputation and speed up the process but only if you have the knowledgeable staff to backup the claims. This happens in Silicon Valley all the time. But it costs quite a bit of money. So if your rich go for it. Otherwise slow and steady wins the race.


Try to do something vs. Try doing something

Question: Is there any differences between

Try to do

And

Try doing

Thank you in advence.
Answer: Try to do is an effort to do something which you already know.
For example.
I tried to open the door.
I tried to call her.
Try doing is an effort based on more of a guess work.
For example.
Try hitting it with hammer, it might come off.
An elaborate post here.
Answer: Dictionary.com's first 2 definitions of 'try' are:

to attempt to do or accomplish:
to test the effect or result of

To my (British English) ear, 'try to do' implies usage of the first meaning here, whereas 'try doing' implies the second.
Answer: "do" has different meanings.  One is like "achieve something" and another is like "perform an action".
Both "try to do" and "try doing" could mean either of these, but "try to do" has a stronger connotation of the "achieve" meaning and "try doing" has a stronger connotation of the "perform an action" meaning.


How did they get the baby actor in Tootsie to repeatedly turn its head away from food?

Question: In Tootsie, they have a scene where the baby keeps turning it's head away as a spoon is brought close to it's mouth. Usually the only role for a baby in a movie is crying but this seems more complex so I don't know how it was done. Can someone suggest any ideas?
Comment: Put food on the spoon that the baby doesn't like... try to feed it when it's not hungry... Any number of possibilities.
Comment: Maybe they hired a kid which do that normally...!
Comment: Probably off camera sweets or shinies.
Answer: Hoffman successfully fed the baby at least once, per the publicity still below, apparently from deleted/unused footage.

Since the baby refusing food wasn't in the screenplay which just says...

Dorothy feeding Amy applesauce (they are both covered with it). Amy still cries.

...we can reasonably assume that they just filmed him feeding the young 'un for a half-hour or so, then used the best footage, which included the head-turning. It doesn't take much for a baby to become distracted by the bright lights and film crew.


Is storing common static pages in a database bad practice?

Question: I am wondering whether it is bad practice to store commonly used standard static webpages such as the home page, 'contact us' page, login page, etc. in a database instead of as static files saved on the server?
In particular, if so, does this extend to when the static webpages share a reasonably large amount of style with dynamically generated webpages?
I suspect the answer is that it is all bad practice due to loading times increasing from the database connection and retrieval, but I've not performed my own benchmarks and cannot find any answers one way or the other online, so I thought it best to check.
Comment: If you think about it, this is practically how *all* dynamic sites are run. Via database calls that is. And dynamic sites are still pretty prevalent and fast. But this all depends on the efficiency of the server. So you basically have static data being called like a dynamic site would be.
Comment: @Bigbob556677 I do have other parts of the site which are dynamic, which is why I have the database set up already, but I was unsure of whether using it needlessly was bad practice.
Answer: Speed is always of the essence, so there is nothing wrong with delivering pages that do not require a database query. Best case scenario you have some caching in place (i.e. Browser, E-Tag or Application-Level caching). So yes, you are right to minimise or avoid any database query on static pages such as about-us, privacy/cookie policy, ToS, and other pages. The page will score high in terms of user experience - from a speed perspective. Everything else needs to be optimised as well. For example, the standard SEO on-page stuff, as well as making sure the site is user-friendly across all user devices.
The only thing I am a bit concerned when reading your question is - what do you mean you store static pages on your server? You mean, you want to store "about-us.html" file somewhere in your 'www' folder and then link to that page? If so - my answer is no.
I have little experience in terms of CMS. However, if you work with systems like Wordpress, Joomla, Typo3 or Drupal, the contents of your pages will be stored in a database. There's no way around this and generally speaking if you are after performance, stay away from Wordpress & Co.. This is a very subjective opinion by me - a grumpy, nerdy developer :P.
We usually develop our applications and sites for clients in Web Application Frameworks, i.e. Rails, Django. There are plenty, and it depends on the use case to decide what the prefered framework is going to be. The bottom line here - you can then create controllers for views that do not access the database but display the content you place in the corresponding view. Ergo - making it static.
On top of that, you can cache the content. Wo when the request comes in, the application sends the page right back without starting to process anything at the application level — making it super fast and efficient.


State of Spin 1/2 particle in a magnetic field

Question: I am trying to solve this. But I got confused in part b because the particle is now in the up state so I was wondering what effect a magnetic field will have on the state? In other words, will the past state have an effect or I just compute the Hamiltonian and write the new state as a superposition of stationary states without any reference to its past state?
Consider a spin 1=2 particle. At time t = 0, the particle is in the state |+>
(a) At time t = 0, we measure Sx and find a value 1/2 h bar. What is the state vector
immediately after the measurement?
(b) At the same instant of the measurement, we apply a constant magnetic field
B = B_0k ^ on the particle and allow the particle to precess for a time T. What is the
state of the system at t = T?
(c) At t = T, the magnetic field is very rapidly rotated so that it is now B = B_0^ j.
After another time interval T, a measurement of Sx is carried out once more. What
is the probability that a value 1/2 h bar is found?
Answer: The magnetic field $B_0 \hat{k}$ couples to the spin operator $\hat{S_z}$ and the system evolves with the hamiltonian $H \propto B_0 \hat{S_z} $ for time $T$. Now calculate what the unitarty evolution operator looks like at time $T$ and apply it to the state you get right after the measurement.


How do I mock the filesystem in Python unit tests?

Question: Is there a standard way (without installing third party libraries) to do cross platform filesystem mocking in Python? If I have to go with a third party library, which library is the standard?
Comment: Would the [tempfile](http://docs.python.org/2/library/tempfile.html) module be of help?
Comment: The concept `filesystem` is too broad.  It could be anyting. What exactly do you want?
Comment: @Leonardo.Z: Any interaction with the file system. I am mostly concerned about **creating**, **opening** and **deleting** files and directories. In other languages the whole file-system can be mocked.
Answer: pyfakefs (homepage) does what you want – a fake filesystem; it's third-party, though that party is Google. See How to replace file-access references for a module under test for discussion of use.
For mocking, unittest.mock is the standard library for Python 3.3+ (PEP 0417); for earlier version see PyPI: mock (for Python 2.5+) (homepage).
Terminology in testing and mocking is inconsistent; using the Test Double terminology of Gerard Meszaros, you're asking for a "fake": something that behaves like a filesystem (you can create, open, and delete files), but isn't the actual file system (in this case it's in-memory), so you don't need to have test files or a temporary directory.
In classic mocking, you would instead mock out the system calls (in Python, mock out functions in the os module, like os.rm  and os.listdir), but that's much more fiddly.
Comment: An important note on [compatibility of pyfakefs](https://github.com/jmcgeheeiv/pyfakefs/#compatibility): "pyfakefs will not work with Python libraries that use C libraries to access the file system. This is because pyfakefs cannot patch the underlying C libraries' file access functions--the C libraries will always access the real file system. For example, pyfakefs will not work with `lxml`. In this case `lxml` must be replaced with a pure Python alternative such as `xml.etree.ElementTree`."
Comment: Anyone ever got pyfakefs working with behave? For me, all the stuff in `os` does not get patched as soon as I run the script using behave.
Comment: As I just saw this - `pyfakefs` does indeed not play well with `behave`, see [this issue](https://github.com/pytest-dev/pyfakefs/discussions/854). Also re: third-party in the answer- the third-party had been Google, who created the project, but they had copied it to GitHub and it has been maintained by the community since about 2015. Nowadays it its part of the `pytest-dev` organization.
Answer: pytest is gaining a lot of traction, and it can do all of this using tmpdir and monkeypatching (mocking).
You can use the tmpdir function argument which will provide a temporary directory unique to the test invocation, created in the base temporary directory (which are by default created as sub-directories of the system temporary directory).
import os
def test_create_file(tmpdir):
    p = tmpdir.mkdir("sub").join("hello.txt")
    p.write("content")
    assert p.read() == "content"
    assert len(tmpdir.listdir()) == 1

The monkeypatch function argument helps you to safely set/delete an attribute, dictionary item or environment variable or to modify sys.path for importing.
import os
def test_some_interaction(monkeypatch):
    monkeypatch.setattr(os, "getcwd", lambda: "/")

You can also pass it a function instead of using lambda.
import os.path
def getssh(): # pseudo application code
    return os.path.join(os.path.expanduser("~admin"), '.ssh')

def test_mytest(monkeypatch):
    def mockreturn(path):
        return '/abc'
    monkeypatch.setattr(os.path, 'expanduser', mockreturn)
    x = getssh()
    assert x == '/abc/.ssh'

# You can still use lambda when passing arguments, e.g.
# monkeypatch.setattr(os.path, 'expanduser', lambda x: '/abc')

If your application has a lot of interaction with the file system, then it might be easier to use something like pyfakefs, as mocking would become tedious and repetitive.
Answer: The standard mocking framework in Python 3.3+ is unittest.mock; you can use this for the filesystem or anything else.
You could also simply hand roll it by mocking via monkey patching:
A trivial example:
import os.path
os.path.isfile = lambda path: path == '/path/to/testfile'

A bit more full (untested):
import classtobetested
import unittest

import contextlib

@contextlib.contextmanager
def monkey_patch(module, fn_name, patch):
    unpatch = getattr(module, fn_name)
    setattr(module, fn_name)
    try:
        yield
    finally:
        setattr(module, fn_name, unpatch)

class TestTheClassToBeTested(unittest.TestCase):
    def test_with_fs_mocks(self):
        with monkey_patch(classtobetested.os.path,
                          'isfile',
                          lambda path: path == '/path/to/file'):
            self.assertTrue(classtobetested.testable())

In this example, the actual mocks are trivial, but you could back them with something that has state so that can represent filesystem actions, such as save and delete. Yes, this is all a bit ugly since it entails replicating/simulating basic filesystem in code.
Note that you can't monkey patch python builtins. That being said...
For earlier versions, if at all possible use a third party library, I'd go with Michael Foord's awesome Mock, which is now unittest.mock in the standard library since 3.3+ thanks to PEP 0417, and you can get it on PyPI for Python 2.5+. And, it can mock builtins!
Answer: Faking or Mocking?
Personally, I find that there are a lot of edge cases in filesystem things (like opening the file with the right permissions, string-vs-binary, read/write mode, etc), and using an accurate fake filesystem can find a lot of bugs that you might not find by mocking. In this case, I would check out the memoryfs module of pyfilesystem (it has various concrete implementations of the same interface, so you can swap them out in your code).
Mocking (and without Monkey Patching!):
That said, if you really want to mock, you can do that easily with Python's unittest.mock library:
import unittest.mock

# production code file; note the default parameter
def make_hello_world(path, open_func=open):
    with open_func(path, 'w+') as f:
        f.write('hello, world!')

# test code file
def test_make_hello_world():
    file_mock = unittest.mock.Mock(write=unittest.mock.Mock())
    open_mock = unittest.mock.Mock(return_value=file_mock)

    # When `make_hello_world()` is called
    make_hello_world('/hello/world.txt', open_func=open_mock)

    # Then expect the file was opened and written-to properly
    open_mock.assert_called_once_with('/hello/world.txt', 'w+')
    file_mock.write.assert_called_once_with('hello, world!')

The above example only demonstrates creating and writing to files via mocking the open() method, but you could just as easily mock any method.
Comment: It says `AttributeError: __enter__` for me.
Comment: @antony-hatchkins @weberc2 You will need to add the `__enter__()` and `__exit__()` functions to `open_mock` to use the `with open_func()` syntax: See https://realpython.com/python-with-statement/#the-with-statement-approach for details. Also see https://docs.python.org/3/library/unittest.mock.html#mock-open or my answer for an off-the-shelf version of this
Comment: @SarahMesser As a matter of fact, I'm aware of how it can be done. I just want the answer to be complete and self-sufficient. Thanks anyway. )
Answer: The standard unittest.mock library has a mock_open() function which provides basic mocking of the file system.
Benefits: It's part of the standard library, and inherits the various features of Mocks, including checking call parameters & usage.
Drawbacks: It doesn't maintain filesystem state the way pytest or pyfakefs or mockfs does, so it's harder to test functions that do R/W interactions or interact with multiple files simultaneously.


How to open existing sqlite DB in QspatiaLite plugin?

Question: Using QspatiaLite plugin in QGIS I'm able to create a new database and work with it (load/edit/import/export data). But how can I add a connection to an existing database?
How to add an existing database to the drop-down-menu of the available database connections?
Answer: You just use the same "New DB" button. If you mouse-over the button the tip says "(you can also load an existing one, just ignore the replace)".
It's very non-intuitive, and should be changed, but it works. When you point to an existing DB a warning pops up that the DB already exists and you must click "Replace" (despite the warning) then the existing tables load.
Comment: Thanks! I did not notice the tooltip. I tried to use the 'New DB' button but I stopped going on when popped-upthe alert saying "A file or folder with the same name already exists in the folder sqlite. Replacing it will overwrite its current contents.". Another way to add a connection is loading a sqlite layer from the sqlite DB, using QGIS Layer > Add Vector Layer. I found this adds a new item in the drop-down menu of the plugin. Maybe a more intuitive UI would help. It's a very useful plugin!


UEFI but not booting directly

Question: I was playing around with my partitions finally now it doesn't boot directly. For it to boot I need to go to HP boot menu and then choose EFI file to boot to load the OS. Something like EFI partition is there but not active boot. However when I checked the flags the drive has boot flag set. Not sure what's wrong. If I don't press F9 while booting and choose EFI file it simply halts saying no OS found.
Answer: You may be able to fix it using bcdedit in Windows, as described here:
Windows 8 changes boot order
Unfortunately, many HPs have a known firmware bug that prevents them from working correctly. If you've got this problem, you'll have to rename your boot loader files so that the firmware thinks it's booting Windows when in fact it's launching GRUB (or rEFInd, or gummiboot, or whatever else you prefer to use as a boot manager). If you're using Ubuntu or a related distribution, the Boot Repair tool can do this job semi-automatically, using an option on the Advanced menu to "back up and rename boot loader files" (or words to that effect; I don't recall the precise wording). Boot Repair might even work on distributions unrelated to Ubuntu, but the odds are better the closer it is to Ubuntu. See this section of a page of mine if you prefer to do it manually.

UEFI but not booting directly


Will CS6 run on Yosemite OS on a new MacBook Pro?

Question: I have been running CS6 on my 4-year-old MacBook Pro with Maverick OS. I will replace my computer with a new MacBook Pro with Yosemite OS. Will CS6 run on Yosemite on that MacBook?
Answer: Photoshop CS6 runs fine on Yosemite, no issues with it that I've encountered, though I don't use it as much since I have CC. It's there as insurance. Your hardware isn't going affect this.
I would suggest looking at the CC 2015 update, though, because there are some really very useful speed improvements that can take advantage of the newer hardware much better than CS6 can. I realize that not everyone likes the CC option, but there's a trial that you can use and see if it makes a difference worth it to you. Even then, you can choose to save edits in a backwards compatible way for the most part, so you can create a safety net if you ultimately drop the subscription. Besides, keeping the original raw files is always a wise idea.


Expectation of residuals in linear regression

Question: Consider a linear regression model
$$ Y=X\beta + \epsilon, $$
where $Y\in R^n$, $X = (x_1,...,x_n)^T\in R^{n\times p}$ are i.i.d. $p$-dimensional observations, $\beta\in R^p$, and $\epsilon = (\epsilon_1,...,\epsilon_n)\in R^n$ are i.i.d. Let $\hat\beta$ be the estimator of $\beta$. Then the residuals are $\hat\epsilon = (\hat\epsilon_1,...,\hat\epsilon_n)= Y - X\hat\beta = X(\beta-\hat\beta) + \epsilon$. We consider both $X$ and $\epsilon$ are random. Is it correct that
$$ E(\hat\epsilon_1) = \cdots = E(\hat\epsilon_n) = E\left(\frac{1}{n}\sum_{i=1}^n \hat\epsilon_i \right)? $$
Answer: Yes, if the expectations exist (I suppose if they don't exist they might still be regarded as equally non-existent)
The $\hat\epsilon_i$ are exchangeable (the subscript order is arbitrary) so all the $E[\hat \epsilon_i]$ are the same if they exist.  The expectation of the average is the average of the expectations by the linearity of expectation, so it's also the same.
In addition, if the model has an intercept then these expectations are all zero, since the sum of residuals is identically zero by the definition of $\hat\beta$.
[Of course, the conditional expectations given $x$ may well not be equal]


Are there any words describing normal breathing?

Question: I am not sure but I can't find any words that describe normal calm breathing. Something that describes the exhale of a breath or blowing air out from your mouth. Not frantic or puffed breathing just relaxed sounds like a sigh. But a sigh describes what the person is doing... not really the actual sound... Are there any English words for this?
Comment: **Sigh** is also a sound. ("to make a sound suggesting a sigh" OR "the act or sound of sighing.")  Source: https://www.dictionary.com/browse/sighed
Comment: Not sure if there's a one word term for this. I think most would just say *regular breathing* or a regular rhythm of breathing
Comment: Just *breathing* itself. (Or *breathe* or *breath*, depending on how it's used.) Any other word would be used for something *unusual*. But if you have to draw a contrast with an adverb, then *regular* or *normal* as suggested.
Answer: The most common word for breathing is "respiration" which is often broken down by definition into two actions - to inhale and exhale. There is also the technical term for normal breathing which is "eupnoea". However, the word "breathing" itself would seem to be descriptive enough for most usages.
If you are searching for an onomatopoeic word for the (sound of) regular breathing, I did find "susurration". It is a noun mostly used for a low, indistinct whispering sound. I found this online descriptive usage - susurration
[a soft, whispering or rustling sound] of the breeze
in the wayside grasses. However, it could be used as descriptive of breathing sounds as well - e.g. normal/calm/slow/indistinct breaths could be replaced with "susurrations" (the inhalations/exhalations of normal breathing in context). It can also be used in the adjective form "susurrous" - e.g. susurrous respiration/breaths/sounds.
https://www.thefreedictionary.com/respiration
https://www.thefreedictionary.com/inhale
https://www.thefreedictionary.com/exhale
https://www.thefreedictionary.com/eupnoea
https://www.thefreedictionary.com/susurration
Comment: Yeah but i'm trying to find a word that describes the sound that breathing makes not a word for the actual thing itself. Thanks tho!!
Answer: I can tell you that, from the standpoint of someone administering first aid, the way to express what you're trying to express (the sound of normal breathing) is "calm breathing". This, however, would be clarified with a respiratory rate in terms of breaths per minute, because "calm" would depend on multiple factors: age, elevation, weight, and they would all correlate to a respiratory rate. Knowing the respiratory rate would be the best measure of normal breathing.
Now, it also sounds like you are trying to capture a sound to calm breathing, and this is merely a matter of perception. A medic would likely comment on the sound of breathing by noting audible elements: a rasp, a wheeze, a hiccup,  which might indicate an abnormality. Or, they would note nothing abnormal at all, which is to say, stable breathing with no signs of a disturbance. And this would be noted as "calm breathing". That is to say, there is no single sound associated with calm breathing. We all breathe differently if you get down to the sounds we make.


How can I disable sound for incoming calls but NOT for notifications?

Question: I don't know why but a lot of spammers have my phone number and I'm getting called every day. I can't block their phone numbers because they use a new one every day. However, I use my phone with Slack and PagerDuty for work and I want to be able to hear notification sounds from those. How can I disable all sound for incoming calls (ideally, allowing certain known contacts to get through) while allowing certain apps as well?
Answer: One way would be to get a silent ringtone and set it as the default, then set another ringtone with actual sound for the contacts you want to hear calling. There are plenty of silent ringtones available to buy in the iTunes Tones store, but it would also be a simple one to create yourself.


Mirrors into Infinity

Question: Could someone please name the phenomenon regarding the stretch of reflections into infinity between two opposing mirrors, and also explain why the reflections curve away instead of meeting at a perspective point within the reflections?
Answer: The effect you note - the curving off instead of converging to a point at infinity - is due to the imperfect alignment of the mirrors. While they may be nearly parallel, they will always be off by some small angle $\theta$. This angle gets added up reflection on reflection: if the angle between the two mirrors is $\theta$, then the angle between mirror 1 and its first image in mirror 2 will be $2\theta$, its image inside that first image will be angled at $4\theta$, and so on. This then causes further reflections to shift off to one side (or up, or down) until they are no longer visible.
In the image below, each 'mirror' is off from the vertical by $\theta=2^\circ$, the image of the room in each successive mirror is out by an extra angle of $\theta$, and this quickly accumulates.

As an application, by placing your head at the top of one mirror and counting how many copies of the room are visible, you can estimate the tilt angle between the mirrors. Say the room has width $L$ and the mirrors are a height $h$, and you can see $n$ copies of the room. Since the vertices in the image are part of a (quasi) regular polygon, the bottom of the $m$th reflection of the right mirror is at a height of $R(\cos\theta-\cos(2m+1)\theta)$ above the original, for $\tan\frac\theta2=\frac L{2R}$, and when this passes $h$ you get $n=m$:
$$L(\cos\theta-\cos(2n+1)\theta)=2h\tan\frac\theta2,$$
or its small-$\theta$ version
$$ 2n(n+1)\theta=\frac{h}{L}.$$
Why am I going into so much detail? Notice that the dependence on $n$ is quadratic whereas the equation is only linear in $\theta$. This means that to see twice as many copies of the rooms, you need the alignment of the two mirrors to be four times as good. This reflects something known well to experimental phycisists: aligning optics is hard. Hence the fact that mirrors casually mounted on walls are very rarely aligned well enough that you can see more than five to ten copies of the room.
Comment: + Nice, and you get a similar effect if you have 1) a TV camera, connected to 2) a closed-circuit TV monitor, and 3) the camera is looking at the monitor. In the 70s this was an example of electronics "freaking out".
Comment: What a great explanation, with mathematical evidence. Superb, this was the type of technical answer I was looking for.
Answer: I do not know the name of the phenomenon (maybe there is none), but assuming that you are standing at some distance from the centre of 2 mirrors perpendicularly away from the line joining the 2 mirrors, you can see that after each reflection the mirrors would form the mirror both perpendicularly away as well as away from the center which appears to be curving away.
Suppose the distance between mirrors is 2 m and you are standing 2 m away from the line joining their center, the first set of images would be formed 4 m away from you and 1 m inside each mirror, the next set of kmages would be even further from you, and each would be 3 m inside the mirrors, this would continue and the images would continue to go both away from you and more and more  inside the mirrors, this seems like curving away.
Answer: A simple point: If your head or eye level is higher than the mid point of the mirrors, immediately a small angle comes into play. Now if the mirrors are spaced far apart, the visual effect of curving gets magnified, which further increases with subsequent images. It is plain geometry actually. Draw two parallel mirrors and place an object between them such that it is slightly higher than the midpoint of the two mirrors. Draw the resulting images and you will get your answer.

Mirrors into Infinity


If I delete Pokémon GO and then reinstall it, will I have to start over at level 1?

Question: I am curious, does Pokémon GO have its data saved on the phone, or is it stored on the web somewhere?
If I were to delete the app and reinstall it, would I have to start from the beginning again at level 1?
Answer: Pokemon Go is a client server based application, so you can reinstall the app as necessary.
This means that all the data is stored in the 'cloud' not on your device. Because of this, you can safely clear the data, remove the app or do whatever you need to (reset your phone to factory settings) and still be able to log back into the game and have your current game status right where you left it. In fact, in the first week of Pokemon Go being released I had to clear the application data several times on order to log back in to the game (it seems to be a lot more stable now though).
To back this up, here is a link to the server status' for the currently available Pokemon Go servers as per their region http://www.mmoserverstatus.com/pokemon_go
Answer: You can safely clear the data.
All game data outside of very immediate transactions is stored on the servers.
I've cleared my personal data several times but I don't think it does anything except reset options and credentials.


I've lost SuperSu

Question: I have a rooted nexus-5 but the only problem is I don't have the SuperSu application on my device. I have tried to re-flash the zip but that doesn't do anything. Its in my application list in the settings but It's not in the app drawer. It was there before but somehow it just disappeared. Please help. Thanks.
Comment: The binaries should still be there so just install it again. Updates sometimes make the icon vanish, but it's still there. Do you have the APK file anywhere or is it purchased?
Answer: eu.chanfire.supersu.mainactivity-xxxxx
(xxxxx would be the SuperSU icon you picked).
If that activity is disabled/restricted it will remove the icon from the app drawer.

Since rooted you should use the app My Android Tools to check.

From menu select Activity
Select the System tab
Scroll down to SuperSu app
Select it and look for disabled main activity
Enable the activity

It is safe to enable this activity for just this instance. Don't go through the list of apps and start enabling and/or disabling things without understanding what they do. You can brick your device. You do so on your own. And always make a backup before changing anything
As I stated above, if the MainActivity-xxxxx is disabled it will remove the icon from your app drawer. This is the cause of the disappearing icon.

I have checked this myself on each of my devices. Disabling and enabling activity for SuperSU, then checking app drawer for the icon each time.
Answer: If you see it in applications but not in the app drawer just reinstall it from the playstore. Also make sure your launcher isn't hiding the app icon, which is a possibility depending on what launcher you use. Also in the supersu app under customizations launch icon, there is a setting to hide the icon. If you want to make sure the binaries are still there you can always check easily with an app called Root Verifier.
Answer: Try opening dialer then type *#*#1234#*#*
If you cannot see the asterisks, please read below:
(Asterisk, hashtag, asterisk, hashtag, one, two, three, four, hastag, asterisk, hashtag, asterisk)
It should open SuperSU
Then Change SuperSU icon on the SuperSU settings

I've lost SuperSu


Sentence using "hamartia"

Question: Can any one tell me how to use the word hamartia in everyday writing? I have searched a lot but failed to find any sentence using this word. Any help would be appreciated.
Comment: How to use "hamartia" in daily life: **don't**. The word is a specialized literature term, and you have no reason to use it in everyday conversation (unless you regularly converse about Greek tragedy).
Comment: Hamartia?  Isn't he a pitcher for the Cubs?
Answer: From what I understand, "hamartia" can be used more generally to refer to a tragic or fatal flaw. There is also a medical definition that seems to be about abnormal tissue growth (though it is not a tumour). So you could probably use "hamartia" when referring to a fatal flaw, but I suspect most people who have not studied medicine or Greek tragedies will not get the reference.
In conclusion: Don't do it (unless you want to completely confuse your audience).
I think example will work (since you insisted):

The web application's hamartia was failing to sanitize input on the user sign-in form. This allowed the database to be compromised and credit card  numbers to be stolen.
Answer: From Wikipedia http://en.m.wikipedia.org/wiki/Hamartia I quickly found two examples of usage:
In Greek tragedy, stories that contain a character with a hamartia often follow a similar blueprint. The hamartia, as stated, is seen as an error in judgment or unwitting mistake as applied to the actions of the hero.

Sentence using "hamartia"


Why was the Solidity compiler removed in geth 1.6.0?

Question: Why was the Solidity compiler removed in geth 1.6.0? What is the procedure to deploy a contract in geth 1.6.0?
Answer: Here is the discussion where it was decided to deprecate eth_compile.
To summarize, it's not really geth's responsibility to compile code. Or parity's. Or any other node's. Continuing to support in-node compilation would force nodes to host compilers written in other languages. In addition, the interface to compile was poor, as there are many more complexities to a compilation process than a single function call could provide. By removing it, several potential cans of worms were preemptively closed.
How do we go on from here?
A simple method is to use remix, which can connect to a geth node. Alternately, some frameworks have a built-in toolchain. I personally use a home-brewed gulpfile to automate compilation.
If you really need solc in your JS code, a JS version can be found here.


Good book references for physics and math for electronics

Question: Next year I'll join an engineer school in Dijon, France in the field of Electronics (Embedded Systems). I am currently taking a 2 years general IT education and my main problem is that I am very bad in math and I have no real basis in physics. So I'm wondering if you can help me with some book titles to get me started. I used to be good in math but I made the mistake to take one year of law (I know...) so I forgot everything. I really need a book that explains concepts very thoroughly and that features exercises & their correction. If you can think of books other than math and physics that could help me, feel free to propose. Thanks in advance for your help.
Answer: I would strongly recommend "The Art of Electronics" to you.  Very gentle on the math and very thorough.  https://en.m.wikipedia.org/wiki/The_Art_of_Electronics
Math is your friend in electronics but maybe you'll begin to enjoy it.  That is the difference between being good and not
Comment: It's not that I don't like math, I would love to be good in it. But I need to start slowly and make sure I fully understand each concept I come across. Since I have lost connection with the subject during a year, I feel my current classes are going too fast. But thank you for your recommendation.
Comment: Look at: Stroud, 'Engineering Mathematics'


Why are Neumann Boundary conditions imposed weakly?

Question: let's consider a mixed boundary problem $-\Delta u = f$, $u=0$ on $ \Gamma_D$ and $\nabla u \cdot n = 0 $ on $\Gamma_N$.
Then the weak formulation is to find $u \in H^1_D = \{u \in H^1 | u = 0 \text{ on } \Gamma_D\}$ such that $\int_\Omega \nabla u \cdot \nabla v = \int_\Omega f \ v $ in $\Omega$. That means the Neumann bc were imposed weakly. Why is it not possible to look for a solution in the space $H^1_{D,N} = \{u \in H^1 | u = 0 \text{ on } \Gamma_D\ ,\nabla u \cdot n = 0 \text{ on } \Gamma_N\}$?
Comment: Just try to make sense out of $\nabla u \vert_{\Gamma_N}$. Does this exist?
Comment: $\nabla u$ is not well defined on the boundary as the trace of an L² function is not well defined. But is $\nabla u \cdot n$ well-defined? If not how can we then talk about the problem $\nabla u \cdot n = 0$ on $\Gamma_N$?
Comment: I will write an answer later
Answer: This is a rather techincal issue. A priori, we can not talk about $\nabla u \cdot n$ in an $H^1$, i.e. trace-sense. If our domian $\Omega$ has $C^2$-boundary, we can say that our weak solution $u \in H^1_0$ (that we are granted by Lax-Milgram-Lemma) even lives in $H^2(\Omega)$. This is Gilbarg and Trudinger Theorem 8.12. It is sometimes referred to as Friedrichs-shift-theorem.
Then, traces can be defined for $\nabla u$, and we can make sense of the Neumann BC.
So we only choose $H_0^1$ as test and solution space, because no further regularity is needed.
Since Neumann-BCs are integrated into the weak formulation (in our case, since the Neumann-values are $0$, they do not appear), they are often referred to as natural BCs or do-nothing BCs.