How to create a more professional looking watch photo?

Question: I reached out here 2 years ago when I was using a lightbox for my watch photography and have come a long way (I hope). After some advice I received, I started using 2 strobe lights on either side of the watch and also use translum paper as a diffuser to spread the light evenly across the watch. I then use photoshop to insert a white background. Results are far superior than before. Now I am trying to get to the next level with my photos/editing to try and compete with the professionals (watchbox.com). 1st photo is watchbox's. 2nd and 3rd photos are mine. What can I do to achieve a similar result to watchbox photos? Any help/advice is much appreciated!
Comment: Get/use tent to diffuse the light even further and to make it surround the object.
Comment: See also: [B&H article on watch photography](https://www.bhphotovideo.com/explora/photography/tips-and-solutions/20-tips-photographing-watches-and-timepieces) and Ming Thein's series on the basics of watch photography: [Part 1](https://blog.mingthein.com/2012/03/05/watch-photography-part-one-introduction/), [Part 2](https://blog.mingthein.com/2012/03/06/watch-photography-part-two-using-what-youve-got/) and [Part 3](https://blog.mingthein.com/2012/03/07/watch-photography-part-three-getting-serious/).
Answer: Avoid meaningless brights
The brights should give character to the photograph, never be a decorative element or even less a stain. A good exercise in creating highlights is to think of them as objects, like paint blobs. In drawing classes, one of the premises is to start from the shine towards the object, this is an easy way to give them character.

On the left the first photo highlights/ On the right the second photo highlights
Highlight all the little details
The biggest difference I see between the blue watch photo and yours is that the first one clearly shows all the white silkscreen as if it were a vector drawing applied on top of the photo. Each fine line can be counted by pointing to it independently. In your photo, all the little details merge into brightness, shadows, and blurs.
Homogeneity
Try to keep the flat elements with the same brightness, hue and saturation, unless the set has a special light input. In the photo, all the black elements (numbers, hands, Cartier) are made up of a wide range of grays
Emphasize color accents
I would start from the maximum saturation and regulate it from there
Maximum contrast to the corporate
Cartier and Swiss Made can never be dim/dirty gray
Forget Photoshop
At least when you take the photo. Photoshop should be a retouching tool, not the camera. The retouching in the image below, the most relevant are extracting the black channel from a CMYK image to saturate the shadows and creating a duplicate of the image in Hard Light mode with medium opacity to give greater contrast.
Answer: Your diffusion is too small/too far away...
The rectangular highlights are the edges of your diffusion; they should not be visible. And the other areas are reflections of the ambient environment... the only thing the watch should be reflecting/seeing is continuous diffusion.
Placing the light source/diffusion closer allows you to use a reduced power, which causes the highlights on the glass to be more transparent... i.e. truer colors/contrast show through.
Use a physically/effectively larger sheet of translum from closer to the watch. Use your lights from a greater distance to light it evenly, from closer to create gradients, or some combination (best).
Once you get that sorted you will also probably want to add negative lighting (black flags to create harder reflected shadows).
Answer: Shooting

Check reflections (top left and bottom left of case/dial), hard to fix in post prod. Might require a polarizing filter.
I would expect more sharpness on hands and dial.
Check for dirt (rightmost screw on bottom row)
Bottom of button is dirty (or there is a weird reflection)

Editing

Don't use GIF as a format if you want quality output
Cut out of case at top left is incorrect (possibly some algorithm was fooled by an area of the case that is almost as bright as the background).
Abrasion of the band against the case (bottom right) could be  edited (or not).


default browser

Question: Some softwares are needed to open IE so that I can use their help/documentations.I set my default browser as google chrome.
 Currently when I click on help/Docs a page is automatically opened by google chrome but it doesn't show the information unless I copy & paste the path on IE again.
  How can I made that software using IE without changing my default Browser ,Any idea?
Comment: Are you talking about a file on your PC?  How are you getting to the "help/docs" page you are referring to?
Comment: nope,I've got a software,then on Help tab ->documentation it tries to open those help/docs pages ( the address is like: file:///C:/Program%20Files/OPNET/16.0.A/doc/modeler/wwhelp/wwhimpl/js/html/wwhelp.htm#href=Tutorials/basic_mdlr_tut_splash.html#1079840 )
Comment: What does the help content look like in Chrome?  Is it completely unusable?  Do you see an error message of some kind?
Comment: no error message,just a blank page divided by a vertical line.
but when I copy/Paste above link address in IE it shows information nicely.
Answer: With the push of a button you can switch to an IE Tab inside Chrome.
Comment: preferably I want not using add-ons softwares.
Comment: @user44509: I think perhaps you are being a bit picky.  You want Chrome as your default browser except for a single use-case, a buggy HTML help file.  Chrome, Windows, IE, these are not to blame, it is the third party software which is to blame.  Since you can't modify that, modifying Chrome seems like the easiest alternative.
Comment: Indeed, the add-on doesn't have any negative impact...
Answer: You don't need a new program if it is a local file on your PC.  You can associate IE with html files and STILL have Chrome as your default browser.  Chrome will open links and IE will open files.  Just change your file association on .html files to IE.
Find a file, right click, open with, choose program, select IE and check the box for "Always use the selected program..."
Comment: that s an alternative,but I gotta go through a long path through program files to open it,
the thing I want is be able to open file in such software as normal routine when I click on it.
Comment: No, what I am saying is if you do this ONCE, it will open your html files through IE `PERMANENTLY`.  You only need to do this process one time to update it.
Comment: I tried this process and marked ''Always use the selected ..." but the problem still persists
Answer: Try BrowserMaster: http://browsermaster.codeplex.com/releases/view/34262
It gets set as the default browser and allows you to choose which browser you want opened when you click or try to open something. I recommend setting the timer to 10 seconds.
Answer: The software in question is almost certainly just opening an HTML help file without reference to a particular browser - the equivalent of double-clicking on the HTML file in Windows Explorer.  If that is in fact the case - unless the program has an option to change this behaviour - you're out of luck, since it would otherwise require changing the program.
Comment: The thing is as I set my default explorer Chrome,software would call chrome,but it seems information could not be fetch by chrome correctly.
Comment: Chrome doesn't yet have the kind of support enjoyed by IE and Firefox.  Same problem with Opera.  I'd use either Chrome or Opera exclusively if either of them worked properly with everything.  Note that this is more a problem with web sites and developers than with those browsers.

default browser


A PHP function to prevent SQL Injections and XSS

Question: I am tring to make my PHP as secure as possible, and the two main things I am trying to avoid are

mySQL Injections
Cross-Side Scripting (XSS)

This is the script I got against mySQL Injections:
function make_safe($variable) {
$variable = mysql_real_escape_string(trim($variable));
return $variable;  }

http://www.addedbytes.com/writing-secure-php/writing-secure-php-1/

Against XSS, I found this:
$username = strip_tags($_POST['username']);

Now I want to unite the two into a single function. Would this be the best way to do so? :
function make_safe($variable) {
$variable = strip_tags(mysql_real_escape_string(trim($variable)));
return $variable; }

Or does the mysql_real_escape_string already prevent XSS? And lastly, is there anything else that I could add into this function to prevent other forms of hacking?
Comment: There is no magic wand, just constant vigilance.
Comment: You and [PDO](http://php.net/manual/en/book.pdo.php) should become friends!
Comment: I don't really understand what the two of you are saying ;)
Comment: You should find some useful info in the answers to [this SO question](http://stackoverflow.com/questions/568995/best-way-to-defend-against-mysql-injection-and-cross-site-scripting) and [this question](http://stackoverflow.com/questions/129677/whats-the-best-method-for-sanitizing-user-input-with-php).
Answer: mysql_real_escape_string() doesn't prevent XSS. It will only make impossible to do SQL injections.
To fight XSS, you need to use htmlspecialchars() or strip_tags(). 1st will convert special chars like < to < that will show up as <, but won't be executed. 2nd just strip all tags out.
I don't recommend to make special function to do it or even make one function to do it all, but your given example would work. I assume.
Comment: Might be good to mention `mysql_real_escape_string()` is deprecated and has been replaced by `mysqli_real_escape_string()`.
Comment: And can't I use only strip_tags(), making htmlspecialchars() redundant?
Answer: This function:
function make_safe($variable)
{
   $variable = strip_tags(mysql_real_escape_string(trim($variable)));
   return $variable;
}

Will not work
SQL injection and XSS are two different beasts. Because they each require different escaping you need to use each escape function strip_tags and mysql_real_escape_string separatly.
Joining them up will defeat the security of each.
Use the standard mysql_real_escape_string() when inputting data into the database.
Use strip_tags() when querying stuff out of the database before outputting them to the screen.
Why combining the two function is dangerous
From the horses mouth: http://php.net/manual/en/function.strip-tags.php

Because strip_tags() does not actually validate the HTML, partial or broken tags can result in the removal of more text/data than expected.

So by inputting malformed html into a database field a smart attacker can use your naive implementation to defeat mysql_real_escape_string() in your combo.
Comment: So I use mysql_real_escape_string() when adding data to the database, but not when comparing user input with database entries (like when loggin in)?
Comment: @user, You use `mysql_real_escape_string()` **always**, on every query, be it select, update delete or insert.
Answer: What you should really be looking into is using prepared statements and PDO to both provide an abstraction layer against your database as well as completely eradicate SQL injection attacks.
As for XSS, just make sure to never trust user input. Either run strip_tags or htmlentities when you store the data, or when you output it (not both as this will mess with your output), and you'll be all right.
Comment: I've never heard of PDO. What is that?
Comment: PDO is a database abstraction layer included with PHP. Have a look here for an introduction: http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/


how do i create spiral vortex with texture or by modeling

Question: hi i need help to creating spiral vortex something like this it would be great if you help me
Answer: What you could do is create a vertical edge, move it away from its origin, give it a third vertex next to the bottom. Give it a Screw modifier. Apply it. Give it a white material. Select the face loop that was created between bottom and second vertex and give it a second material (black). Give your object a Subdivision Surface modifier.

If you have a more complex texture pattern (example: Image Texture), you could just keep one segment, unwrap it, give it the texture, then duplicate on the Z axis.


Which group is bigger, the one of things we can write about, or that we can feel?

Question: Which group is bigger, the one of things we can write about (in any language (including programing)), or the one of the things we can feel through our senses (including those things that machines help us to feel, such as a microscope)?
Comment: How would you measure the size of each group?
Answer: There are more objects that can be spoken of, or conceived, than there are objects that can be experienced, or that we could have direct physical evidence of.
Consider God. God doesn't exist in time, but our experiences take place in time, so we cannot possibly experience God. Yet we can plainly talk about God---we're doing so right now.
You might not like this example, especially if you don't believe in God. In that case, try what it is like to be a bat. Presumably it is like something to be a bat. You don't know what it is like to be a bat, because you are not a bat. You can't see a bat seeing things, only its head and eyes moving. Maybe one day we will be able to experience life as a bat. (I don't think so, but I suppose it's not inconceivable. The words are certainly sayable.) But if you did experience batness, you still wouldn't experience experiencing batness. You don't see seeing or hear hearing, you just see and hear.
We know about God and the internal experience of bats not through sensing but through thinking (in combination with sensing, in the case of bats). I think that's the only way to gain knowledge of non-experiential objects.
Comment: I understand your point, but, another matter emerges from it. ¿Is the group of things that we can experience finite? If that's true, then we can write more than we can experience, but if not, and if there are infinitly small things that we are not able to see right now, aswell as infinitly big, then meaning (or the things we can write about) would be a function of what we can experience, even the things god can do!  So… is the universe finitly big and small at the same time?
Comment: This tail helps to understand http://www4.ncsu.edu/~jjsakon/FunestheMemorious.pdf
Comment: I'm not sure if there are finitely many experiential objects, nor if there are finitely many things we can conceive of. But it doesn't matter. God's not an object of experience, and we can still speak meaningfully about God. Meaning is based on conception, not experience.
Comment: Well, that is a matter of faith, I belive that if it exists, we haven´t been able to experience it. Some people claim they have though. In any way, what god can do is to play with the universe, or something like that. So we add meaning to the movemnts of the universe, lets say is god, that is a word that we can´t feel, or just by being alive can´t we feel it? Isn´t god everywere? Isn´t everything?
Comment: I don't think you'll find any good arguments for the material existence of God---that's not a reputable view nowadays. So while I can't say what those people have experienced, I can be pretty sure it wasn't actual God. Some kind of incarnation at best. Anyway, the key point is that we don't detect God with our senses, even if we "feel it" emotionally.
Comment: Ill give you that one, thats one case of something we cant experience but we can name, and it has sence. What about the rest of the material world? what if we had a very good memory such as Funes? www4.ncsu.edu/~jjsakon/FunestheMemorious.pdf
Answer: I claim that the number of possible emotions that can supervene on a brain is at most the number of states that brain can occupy.
For any possible partitioning of a brain, a unique string can be assigned to each partition.  Let's do this at t = 0.  Now lets have the brain cycle through every possible state, and at each step, concatenate a unique string to the previous string that was assigned to each partition.  There will be a unique string for every possible partition in every possible brain state.  Now take any of the sets of strings for any brainstate and add a character to one of the strings.  This new set of strings will be different from all of the set of strings generated thus far therefore the statespace of strings is greater than the state space of brains which is at least as large as the set of possible emotions.
Lets say the character space of the aformetioned strings is the English alphabet. Lets assign unique prime numbers to each character.  By the fundamental theorem of algebra, the sum of the primes corresponding to the characters for each of these unique strings is also unique.  Lets say that each set of strings 'means' a pile of bananas equal to the sum of it's assigned primes.  Therefore, we have a set of unique strings assigned unique meanings that exceed the number of possible emotions.
Comment: I agree, but when I ment "feel", I was talking about the material world, and "we" as the things that can feel. A brain has a finite capacity, yes, but the things that are experiensable are greater than those we can say? Lest supose you create new words when new experienciable things emerge... which group is bigger? the words that are posible to create or the new things that can be named?
Comment: Here's the problem with your argument (which is correct as far as it goes): semantics. Assuming the brain corresponds to some finite automaton, then the cardinality of its state space is clearly finite, whereas the cardinality of strings (of any length) is counatbly infinite. But when the op says "write about", that wouldn't include nonsense strings. They have to mean something, to have some denotational semantics, space-of-strings-->space-of-meanings. And then you're right back to brain state space, i.e., the cardinality of the space of meanings can't be larger than the brain state space.
Comment: You're right. Lets say I get very angry at any mention of bananas, and the more bananas  that are mentioned I get incrementally angrier.  In that case, I would have a unique emotion to corresponds to every POB. In this case I would have as many distinct emotions (degrees of anger) as I do POBs and therefore possible strings.


Acrobatic manuever and blocking

Question: If I block a 5/5 attacked with a 2/3 during my blocking step, could I then bounce my blocker with Acrobatic Maneuver and prevent it from being killed, while also having the 5/5 blocked? If so, why?
Answer: When a creature becomes blocked, it stays blocked and blocked creatures do not (normally) do damage to the player.

509.1h An attacking creature with one or more creatures declared as blockers for it becomes a blocked creature; one with no creatures declared as blockers for it becomes an unblocked creature. This remains unchanged until the creature is removed from combat, an effect says that it becomes blocked or unblocked, or the combat phase ends, whichever comes first. A creature remains blocked even if all the creatures blocking it are removed from combat.

Lore-wise, think of the blocker as having delayed/distracted the attacking creature long enough for it to not reach you.

Acrobatic manuever and blocking


Keep game but lose its owner's account on second hand PS3

Question: I am looking at a used PS3 that has a digital game, but I don't want the PSN account. Is there some way I can keep the game and have my own PSN account?
Answer: No. Purchasing a PSN game inextricably ties it to the account on which it was purchased.
You can, however, leave that user on the PS3, still linked to that online account, and any other local users on that PS3 (whether linked to a PSN account or not) will still be able to play that game and have their own separate saves and trophies. But if you do this, that PS3 will continue to count against that account's limit of 2-5 (depending on the game) allowed devices, which the original owner may not care for.
If the original owner is willing to give you his PSN account, there's no issue here; make sure you get the password and so on, leave the PS3 linked to that account via its local user, and set up your own separate user on the PS3 linked to your own PSN account if you wish.
If the original owner wishes to keep his PSN account, he should almost certainly disconnect that PS3 from his account and you won't be able to play the game.
Answer: Unless the game was pre-installed on the PS3 as part of a deal or special offer, it isn't possible to use a different PSN.


Where does energy go in the death of the Universe?

Question: So I thought that energy can't be destroyed or created but can only be transformed into another kind of energy. I read something about the Universe dying because all the stars will burn out and the Universe will "die due to hypothermia". Now, if there isn't any thermal energy left, where will all the energy have gone?
Comment: The energy doesn't disappear, it just gets diluted away as the universe expands i.e. the energy per cubic metre decreases asymptotically towards zero.
Comment: And from what John said, this is because of the 2nd law of thermodynamics, which states: That heat cannot flow from a cold system to a warm system without work, and since work requires movement of energy Q, these equations might be informative.

$$ dS = \frac{dQ}{T} $$

$$ \frac{dS}{dQ} = \frac{1}{T} $$
Comment: sounds like you know what you're saying. Thanks for informing me :)
Answer: This is known as the "Heat Death" of the Universe which is based on the Second Law of Thermodynamics which says that Entropy will increase in an isolated system (and, we assume the Universe is isolated).
So, as Entropy increases over time then ultimately every part of the Universe will be at the same temperature and same level of maximum Entropy such that no Energy transfer of any sort can take place.  Thus, no dynamics in the Universe.
Thus, the death of the Universe.  So, the total energy of the Universe is still there but it is equally and evenly spread out over the entire Universe and all that Energy is sort of useless as previously mentioned.
There are lots of sources for delving deeper into the idea of the "Heat Death" and Google can find many of them.


How to create user with High Volume Portal User profile

Question: I am setting up communities in my personal org.
But I am not able to create users with High volume Portal Profile.
How to make this profile available for user creation?
Answer: You will need to add this into the community .THis can be done using administrative settings found under community
Follow these sign boards

Click on administrative settings

click on the members and assign high volume portal and if you click manage contact for partner it will ask you to assign this profile to you


Need a good ASP.NET menu

Question: I am looking for a good menu to use in an ASP.NET. I am currently using the asp menu. I need
it to work in IE 6,7,8, Firefox and Safari. I also need it to not add a lot of overhead to the page client-side. I need to be able to load it from the database.
Answer: Write your own Server Control which implements the asp.net menu control but go one step further and implement the CSS friendly adapters which will give you standards compliant code instead of the usual garbage html tables that asp:menu creates.
You can read more here: http://www.asp.net/cssadapters/Whitepaper.aspx
Answer: You can use this code as inspiration: http://trac2.assembla.com/GiusCms/browser/trunk/Controls/Controls/Menu.cs
This control is able to use any SiteMapDataSource. Or you can simply customize it as you want. Use CSS to hide and show inner submenus.
Answer: I came to this post because I was experiencing the whitespace issues using IE8.
If anyone else is after a quick fix for this try to manually set the z-index property of the Menu item's DynamicMenuStyle property, here is what I did for the css for it.
<code>    .HorizontalMenu_DynamicMenuStyle
{
    font-family: Verdana;
    font-size: medium;
    background-color: #FCFCFC;
    border: solid 1px green;
    z-index: 100;
}
</code>
And have a look at this
http://blogs.msdn.com/giorgio/archive/2009/02/01/asp-net-menu-and-ie8-rendering-white-issue.aspx
http://weblogs.asp.net/bleroy/archive/2009/03/23/asp-menu-fix-for-ie8-problem-available.aspx

Need a good ASP.NET menu


qgis (segment (link) start node and end node id's extraction from shapefile )

Question: I have been dealing with a lot of shape files editing tools last month..
I tried to get two dbf files from shape file (one for nodes and one for links) in an appropriate format (node_id,x,y for nodes and link_id,start_node_id,end_node_id,...for links)in order to create  an oracle spatial network.
I got the dbf for nodes..
I want now to get the attribute table from a loaded shape file containing polylines (roads) and I want to split each polyline to its segments containing their start and end node id's besides their geometry..
Every help accepted..
Answer: You might want to clarify your question slightly, but it sounds like you want to get the details of each point in a polyline from a shapefile so that you can define segments.
I wrote an example of how you can do this using Python here:
https://gis.stackexchange.com/questions/40798/how-to-split-shapefile-per-feature-in-python-using-gdal
Specifically, pay attention to the lines:
<code>line = geom.asPolyline()
        # all points in the line
        for point in line:
</code>
You should be able to achieve your goal using a variation of this basic example.
Dan


Loops in Loop Quantum Gravity

Question: Am I correct in understanding that in Loop Quantum Gravity, loops are somehow interconnected with each other or interact, or is there some form of quantum entanglement between them? And if so, can we assume that there was no connection between loops before the appearance of space-time?
Answer: In LQG, loops are not physical objects but mathematical symbols we use to label the states of quantum spacetime. They don't interact in the usual meaning of that word.
Comment: @АрманГаспарян why do you want something to interact so badly? Again, loops are a system of labels we chose to use to denote the quantum states of spacetime. LQG is a theory of quantum spacetime, not interacting loops.
Comment: @АрманГаспарян I encourage you to read up on LQG. Currently your questions don't make a lot of sense, unfortunately. I have no idea what you mean by "single" or "indivisible", in general such epithets do not carry much meaning. LQG is a very specific mathematical model that will answer all of your conceptual questions way better than a metaphor would. Like with everything in physics, if you want to understand LQG, your best bet is to study the mathematics of it.
Comment: And what interacts? Space-time is not composed of interconnected elements?
Comment: That is, space-time is something single and indivisible?

Loops in Loop Quantum Gravity


Measure Points to Coastal lines?

Question: I would like to measure the shortest distance from multiple points to a any part in a coast line of three different costs.
How do I do this with QGIS or with SAGA GIS?
Comment: In QGIS the tool to get distances between features in two layers - your points and coast lines - is called "Distance Matrix...", and you can find it from top menu under Vector / Analysis Tools.
Answer: You can achieve this with the Join attributes by nearest algorithm in QGIS. It returns not only the join of attributes (which costline is the nearest) but also the distance between the input geometries (shortest line between points and lines/polygons). It also yields the X and Y coordinates of the nearest point on the coastline which could be used for visualizing the shortest line or calculating ellipsoid based distances.
Answer: I now found the easiest solution for me to be the Qgis-Addon NNjoin.
Comment: Hi! GIS.SE is a little different than other help sites. Please post comments using the 'add a comment' button as soon as you have enough reputation and don't post it as answer. If you found the answer useful, you can accept it by clicking the green check symbol below the vote counter.

Measure Points to Coastal lines?


What are the two types of Woge?

Question: In Grimm there appear to be two types of Woge, one that normal people can see and one they can't.  What is the difference between the two and what are they called?
Answer: There is no separate name for the varying levels of Woge, though it has been called a full-on Woge when normal humans are able to see the transformed states of Wesen.

A "lesser Woge" can only be seen by a Grimm or other Wesen. It can be a reflexive response triggered by fear or surprise. It is a split second display.
Woge can occur in different degrees, a higher degree of woge yielding a more complete transformation. In the Woge state, the Wesen has access to it's animal form abilities, including strength, speed or other unique abilities.
A particular Wesen, the Jägerbar, has even been observed in a complete transformation into a grizzly bear after first removing her clothes. Most Wesen will only partially transform for a limited time.
The Woge state is a transformation without a complete explanation, since injuries achieved in the human state don't always transfer to the Woge state and vice versa. It is also possible to lose the ability to Woge or lose the ability to retract the Woge state remaining permanently in the transformed condition.

Many Wesen have been observed partially transforming, and most known Wesen have been observed transforming only to a degree detectable by a Grimm. Blutbaden, Coyotl, Drang-Zorn, and Balams have demonstrated being able to shift partially by localizing the woge around their eyes. Blutbaden's eyes turn into a fiery red, Drang-Zorn's turn green, Balam's eyes turn amber, and Coyotl's eyes glow bright yellow. ("Bad Moon Rising") ("The Bottle Imp") ("La Llorona") Others have only partially woged before, such as Doug Shellow, a Mellifer, morphing only his arm. ("Beeware")** --Grimm Wiki > Woge
Answer: From what I've seen, such as when Bud had accidentally Woged for Juliette (Bud seemed embarrassed at his accidental full-woge) near the end of season two, I believe that the Woge is an emotional response, and if a Wesen does not retain focus, they can be seen by anyone. Monroe also said to Hank that the two versions of Woge are

Emotional agitation.
Heightened anger.

I'm pretty sure that an intentional Woge requires the control of one's emotions. For example, since there would be no practical reason for, say, Baron Samedi, to Woge if he isn't spitting, it might be a matter of Wesen making their emotions 'believe' that they need to be Woged (Try to think of Wesen as actors who needs to make themselves cry for a specific purpose, which could be done by thinking of very saddening things).
Comment: Good answer, and welcome to the site.
Answer: That was not what I understood from what was said on the series. My interpretation is that a Wesen can change but he needs to chose to be recognized or can "loose control" of the transformation and be seen anyway.
The fact of injuries when on Wesen form are not transferred to human form, for me was a plot error or budget problem (Wesen are visual effect, makeup, etc) and human are not.
Also I think that the "degree" is only related to the abilities the other factors degree of transformation shown, etc are survival instinct as they are weaker the others.

What are the two types of Woge?


EGA proof verification: universally schematically dominant morphisms and induced morphisms on fibers

Question: I am reading EGA IV.3, Theorem 11.9.16 about universally schematically dominant morphisms, which states the following. The meaning of schematic dominance is at the end of this post.

Let $X$ be a locally Noetherian $S$-scheme, $f_{\lambda}\colon Z_{\lambda}\to X$ morphisms, $\mathscr{F}$ a coherent $O_X$ module, $\mathscr{G}_{\lambda}$ quasi-coherent $O_{Z_{\lambda}}$ modules flat over $S$, and $u_{\lambda}\colon\mathscr{F}\to (f_{\lambda})_*\mathscr{G}_{\lambda}$ morphisms. For all $s \in S$, let $i\colon X_s\to X$ and $j_{\lambda}\colon (Z_{\lambda})_s\to Z_{\lambda}$ be the inclusion of fibers, and $(u_{\lambda})_s\colon i^*\mathscr{F}\to (f_{\lambda}\times _S \operatorname{Spec} k(s))_*j^*\mathscr{G}_{\lambda}$ be the "fiber" of $u_{\lambda}$ composed with a base change map. In these settings, the index $\lambda$ runs through the same set $L$.
Then, $(u_{\lambda})_{\lambda}$ is universally schematically dominant w.r.t. $S$ iff for all $s \in S$, $((u_{\lambda})_s)_{\lambda}$ is schematically dominant.

The Only if part is clear. For the if part, first the proof tries to show that schematic dominance instead of universal one. We may assume $S = \operatorname{Spec} A$, and $X = \operatorname{Spec} B$ are affine, and $f_{\lambda}$ are identity, and when $\mathscr{F} = \tilde{M}$ and $\mathscr{G}_{\lambda} = \tilde{N_{\lambda}}$, want to show for $t\in M$ that $t = 0$ if for all $\lambda$, $u_{\lambda}(t) = 0$. (This part is EGA IV.3, 11.9.3, etc.)
Then, because $t = 0$ iff for all maximal ideal $\mathfrak{p}$ of B, $t_{\mathfrak{p}} = 0$ where $t_{\mathfrak{p}}$ is the image of $t$ in $M_{\mathfrak{p}}$, the proof says that we may assume that $B$ is local by base changes via $B\to B_{\mathfrak{p}}$. I do not understand this part as schematic dominance of $((u_{\lambda})_s)_{\lambda}$ might not be preserved. Thank you for any kinds of advices and comments in advance.
Notes on definitions
In this post, schemes mean usual ones, which are called preschemes in EGA.
In the above setting, $(u_{\lambda})_{\lambda}$ is schematically dominant if for all open subset $U\subseteq X$ and $t\in\mathscr{F}(U)$ with $u_{\lambda}(t) = 0$ for all $\lambda$, $t = 0$. $(u_{\lambda})_{\lambda}$ is universally schematically dominant w.r.t. $S$ if for all $S$-scheme $S'$, the base change of $(u_{\lambda})_{\lambda}$ via $S'\to S$, obtained in the same way as $((u_{\lambda})_s)_{\lambda}$, is schematically dominant.
EGA IV.3 is available here, for example.
Comment: I've improved your formatting by using \operatorname{Spec} to format $\operatorname{Spec}$, which produces better spacing.
Comment: Thank you for your help! I will try to remember that tip.
Answer: I think I got an easy answer that the schematic dominance for fibers is preserved when substituting $B_\mathfrak{p}$ for $B$. For all $f,f'\in B$ and the image $\mathfrak{q}\in\operatorname{Spec}$ of $\mathfrak{p}$,
$$
\bigcap_{\lambda} \ker\left(M_{ff'}\otimes_A A_{\mathfrak{q}}/\mathfrak{q}A_{\mathfrak{q}}\to (N_{\lambda})_{ff'}\otimes_A A_{\mathfrak{q}}/\mathfrak{q}A_{\mathfrak{q}}\right) = 0
$$
by definition. Here, take the filtrant inductive limit of this equation over $f\in B\backslash\mathfrak{p}$ to get the desired result.


how to use frontal camera in portrait view with Android Native OpenCV

Question: I am trying to use native OpenCV (the latest version: OpenCV-2.4.7-android-sdk) in Android. All the samples provided by OpenCV use back camera and landscape view. I need to do such following changes:

frontal camera
portrait
record video

First I add the code "mOpenCvCameraView.setCameraIndex(1);" to use frontal camera. It works but the image showed on the screen is rotated (head down). I have to use flip function in OpenCV to let it show correctly. However, the image data will also be flipped. That is if I want to do image processing. I have to do transpose and flip operation. I tried these step. It is really time-consuming. Even I do nothing else, the video is not real-time.
Second, to avoid flip process, I try to use portrait view by modify the XML file by "android:screenOrientation="portrait"". It also works but here is the problem, only part of the image can be showed on the screen. It looks like the image is cropped. This problem is very common. I googled a lot but still cannot find a solution. I found if I use CameraView class in Android, it will use the default camera App. it is fine but I don't know how to manipulate the image data by OpenCV since I am new to Jave/Android.
Finally, I would like to save the processed images into a video. I noticed that OpenCV does not provide this function.
Anybody can help me to solve this problem? Thanks.
Answer: you can look at my solution here.
I just manipulate the image after enter to "onCameraFrame" event.
In short explanation: I transformed the input matrix, flip it and change the size to fit the screen.
Hope it was help.
Comment: As I mentioned above, I tried this method. But the video is very slow. I am not sure if it is in debug mode?


Claris 2400 rear derailleur paint touch up

Question: I was planning to do a touch up paint for my 2400 claris rear derailleur. Does anybody have an idea on what palette of paint closely resembles this particular rear derailleur?
Comment: On my own Claris RD, I just use my normal black touch-up paint can. There's no point spending $20 on a specific paint color for a $25 derailleur or whatever.
Answer: The cheap and easy option is to drop the derailleur off the bike, and take it to a big-box hardware store, and in the paint section will be hundreds of colour swatches.  Compare until you find something close enough, and ask for a "test pot"  that will cost less than a 4 or 10 litre and even a 100 or 200 mL test pot is going to be heaps.
If you want a colour match, there are automotive paint companies that will mix paint to precisely match your sample.  I paid $90 for some paint in aerosol cans, 15 years ago.  Its not cheap, a new mech would be cheaper.

Personally and honestly?  Paint it all one colour and you're sorted.  Its not a valuable antique, exact colour doesn't really match.
You have two main options -

Full disassemble, clean, sand/key, prime, ( sand, paint, wait) ^2, (light-sand, clear-coat, wait) ^2, and finish with some buffing compound, then reassemble and refit.  OR
Drop the chain out, wipe it clean, sand it, mask behind with some cloth/newspaper/cardboard, and put a light coat on from a rattlecan.  Remember to spin the jockey wheels so they get coated all round.

As for colour choice, you could go with plain options like:

Plain flat matt black
High gloss black
some mid grey vaguely similar to the original

Or you could get creative

Paint it the same colour as your frame, bars, saddle, pedals
...chrome (actually very hard to do well)
...bright white, because I've never seen a white derailleur
...mud-coloured so it doesn't ever need cleaning (maybe not)
...artistically random - alien acid, blood splatter, or icecream ripple

A third option is a wrap - these tend to work better with large flat areas.  You might find book wrap (coverseal) works, or perhaps coloured heatshrink.
Lastly, a water transfer might suit you, putting darn near anything on it.  Takes practice to do well and then you have to clearcoat it.
Oh and the null case is do nothing   There's little chance of the paint chips causing problems - rust is your biggest danger and that will take years to do anything more than cosmetic.
Good luck and have fun personalising your bike.
Comment: Don't take it to a hardware store, take it to an auto parts place.  They have racks of touch-up paint in small bottles with brushes in the cap.
Comment: Thoughts on adding a clear coat layer on top of the paint?
Answer: Most likely, the derailleur is made of aluminum.
Aluminum parts are typically anodized whenever they have a coating, with the exception of bicycle rims that have to endure such great forces in so rapid manners (one force occurrence per every wheel rotation) that anodizing would be a good place for cracks to start, thus reducing the fatigue life of the component. For this reasons, good rims are not anodized but powder coated. Powder coating is like paint but consists of tiny electrically charged particles that are attracted to the rim and then melted in a hot oven to cause a uniform coating to form on the rim.
Your derailleur doesn't have to endure as great and rapidly occurring forces as bicycle rims, so anodizing works well there.
It is impossible to match the surface look and feel of an anodized part by any paint, either a liquid paint or a powder coating.
I think you will be disappointed by the result.
Comment: This is a good point - OP was talking about existing paint chips, so its probably painted, but there's a fair chance it has some other surface treatment like powder coating or something not-paint.   The solution here is to not colour-match and simply paint the whole thing.
Comment: The paragraph about anodizing aluminum rims is misinformation. *Hard* anodized rims are prone to cracking, but this process produces a thicker oxide layer than the cosmetic anodizing that is used on most aluminum rims these days. Brandt wrote a post about this issue in 1998, when IIRC many rims were polished silver and not anodized. These days, most aluminum rims are anodized black, and they don't crack. https://www.sheldonbrown.com/brandt/anodized-rims.html
Comment: According to Shimano's spec page, a Claris derailleur body is painted steel.


Ladies Western Flyer

Question: I have a great vintage Western Flyer, Ladies bike, that I am trying to find a few parts for. I need to replace the rear Altenburger Synchron brake and I want to replace the seat and pedals back to something original. I can't even figure out where to find parts. This is a great bike and I want to get it back to as close to original as I can.
Comment: What's the question here? Are you just looking for a place to get parts?
Answer: I know there are a few web pages devoted to the Western Auto bikes, if you look around.  That would probably be the best place to ask.

Ladies Western Flyer


symfony1.4-like symfony2 installation

Question: symfony1.x followed a good standart that the whole framework lies somewhere outside and is available to any project. Today I started to read symfony2 documentation and actually downloaded the 'with vendors' 2.0.1 package which is presented on download page. After opening the package I was a bit surprised of what I've seen. But after looking around the package I found that the only folder I need is 'vendors' one - so I copied its content to my '...\lib\vendor\symfony2' folder (near '...\lib\vendor\symfony' and '...\lib\vendor\ext'). I added it to include path and proceed reading documentation. And then I found a problem - a command listed 'php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml' produced simple questions. Did they miss to explain how to generate a project (structure, preconfiguration, command-line files, etc)? And what about '.bat' and '.sh' files?
Answer: Symfony2 is very, very different than symfony 1 - especially when it comes to the directory structure. You can't simply drop in the vendors dir and expect it to work. This page explains how to setup a new Symfony2 project.
Comment: Actually it shows how to add some functionality to a precreated default project... what about creating an absolutely new one from the ground? There is no way to generate the base dir structure via command line tools?
Comment: Everything you need to know about setting up a Symfony2 project is in the docs - http://symfony.com/doc/current/book/installation.html
Answer: I recommend you to forget Symfony... and to think with Symfony2 about another think completely different than S1.
Installation is really simple and you will need some advanced PHP knowledge just to understand how it works... But if you have worked with S1, I expect you will have not much problems :)

symfony1.4-like symfony2 installation


copper plate came with raspberry pi

Question: I was wondering I got two heat sinks and a copper plate what the hell is the copper plate for ? When I bought the raspberry PI 2 it came with green and black and copper.  Green was the big heat sink and the black small and copper was a plate
Comment: A picture and the URL for the part you are asking about would help. Please edit your question and add these details.
Comment: ...look under the PCB and at the pictures in http://www.banggood.com/-p-975867.html may help too...
Comment: I have a little pile of those heatsinks now, I've been thinking of making them into earrings or something. I'll need a few 1/2" square piercings though...
Answer: There is exactly a picture showing how to use the coper plate from the link you given. It seems it's placed under the CPU at the back of the board, and be careful there is a plastic plate between the pins and the copper plate.
According to Raspberry Pi Foundation, you don't need a heatsink, if you use it normally, that is not overclocking. So I think it will be fine if you don't use it.

copper plate came with raspberry pi


Interesting tag cloud implementations

Question: What is the most interesting tag cloud implementation that you know? I'm searching for something easy to work with but somewhat non-standard. I know of WP-Cumulus 3D tag cloud, I'm interested in an interesting implementation - not necessarily in visual terms (as an example, a semantic grouping tag cloud can also be interesting).
Answer: Form over Function disease!
The tag cloud concept is to show tags and their frequency, typically with proportional font size
The Cumulus 3D and similars are just special effects and do not show frequency very well, or at all!
Stick to the basics and your users will love you
Colour coding tags into groups is the simplest improvement without distorting the nominal function. Show the colour legend if possible
I personally also like colour intensity to indicate the recent usage of tags. A popular tag that has no recent posts will be in a large font size, but in a low colour intensity so that it fades away and looks less important. e.g.
Comment: Well, he says he is interested not only in the visual stuff (which is why I favourited and upvoted the question).
Comment: Thank you for the idea - it's a perfect example of what I'm looking for.
Answer: The most interesting tag clouds are probably those by Jeff Clark.
Shaped word clouds

(source: neoformix.com)
Word Portraits

(source: neoformix.com)
Clustered word clouds

(source: neoformix.com)
Comment: @anonymous, if you vote me down, please add why so I can fix it.
Answer: Personally I don't like tag clouds. A sortable tag list make more sense, since you'll still get the same information, AND you'll be able to find anything you might be looking for. Preferably sortable by tag name as well as frequency.
Comment: A tag cloud delivers the same message as a sortable tag list, but has tremendously more impact because of its visual nature: one quick glance at a tag cloud and you know what's the site about. Combine this with a solution such as the one provided by user TFD in his answer and you can gain even more information from a quick look - no more sorting and reading, just visualizing.
Answer: Quintura search engine (About) is an interesting implementation of tag cloud

Interesting tag cloud implementations


Google Maps directions link icon

Question: I would like to know how to embed a Google map on a page, so that the the "directions" icon is showing. I had previously used the Simple Gmap module, but it doesn't provide the icon which I need.
Comment: try https://drupal.org/project/getdirections
Answer: You could create a custom region in your theme, then include a block with unaltered text that directly makes a call to the Google Maps API. This allows you the most flexibility since you work directly with the API - however this is only practical with a static location. If you are using something like a geo location module to assign destination parameters or other, you will need to adjust this.
EDIT:
in hindsight, depending on your needs, you probably don't need to create a dedicated region in your theme.
To create an unaltered text area (D7):
1) goto admin/config/content/formats
2) 'add text format'
3) Name: unaltered, Roles: Administrator ONLY! - giving others access to this has MAJOR security issues, so make sure it is admin only.
4) Save, and move it to the bottom of the list, Save Changes (this makes sure it's not the default
Get the google maps API address:
1) go here: https://developers.google.com/maps/web/
2) setup a google developer account (all google api's require this - its free).
3) goto Google Maps Embed API on that page
4) read the page, and setup your api call as you want.
5) copy the code
In admin/structure/blocks:
1) 'Add block'
2) title: < none > (with spaces removed) or as desired
3) Body: paste code from google API - adjust the dimensions as desired (width and height as given by the API call)
4) Text format: unaltered
5) save
6) put the block in the appropriate region
Comment: Thank you. Unfortunately my lack of experience in Drupal does not allow me to fully understand how to implement your solution. Your answer is valuable though and I hope that I will eventually find a desfription of the proces. If you could provide some hints to start with, I'll then dig into the problem more in depth. Thank you in advance.
Comment: I made an edit to my answer with further instructions

Google Maps directions link icon


Filesystem kernel API

Question: Assuming that all filesystems are specific, how tools like ls, touch, cat, etc interacting with them? I suppose that 'ls' doesn't know specifics about btrfs for example, but it reads directory entries anyway. When some process writes a file, it doesn't to know about block allocator's specifics for particular filesystem, but anyway, file is successfully writen.
Is there some kind of kernel API that hides underlying filesystem implementation from the processes? It's not too complex to design a custom simple filesystem for academic purposes, and write a programs for manipulating it (mkfs, fsck, etc), but how to tell kernel about filesystem implementation, so other processes can use it?
EDIT:
I understand syscalls in user space, but what I am really interested in is what's happening after that, in kernel space.
Comment: look up `fuse`.
Answer: On any POSIX system, the interface between applications and the kernel is a few function calls: open, read, write, close, etc. An application such as cat calls those functions; it doesn't care how the functions are implemented under the hood.
On Unix systems, those functions are actually system calls: the application calls the kernel. Inside the kernel, a typical architecture is to have a VFS layer, which handles tasks that are independent of the filesystem format (such as locating the proper filesystem, permissions, locking, etc.). Once it has determined which filesystem the file is located on, the VFS layer passes the operation on to the proper filesystem-specific driver.
You can observe the interface between applications and the kernel with a tool like strace on Linux or its equivalent on other Unix platforms (trace, truss, …). Example (omitting the part of the trace corresponding to the startup and the final cleanup of cat):
$ strace cat foo
…
open("foo", O_RDONLY)                   = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=6, ...}) = 0
fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
mmap(NULL, 139264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b9ea14000
read(3, "hello\n", 131072)              = 6
write(1, "hello\n", 6hello
)                  = 6
read(3, "", 131072)                     = 0
munmap(0x7f8b9ea14000, 139264)          = 0
close(3)                                = 0
…

You can see cat calling open, read and close on the file. It also calls fstat and fadvise64, I think only for performance optimizations.
The interface between the VFS and the filesystem driver can't be spied on so easily.
Programs like mkfs and fsck don't go through the kernel's filesystem interface, because they don't work on files, they work on storage areas. They access the block device containing the filesystem directly.
If you want to add support for a new filesystem, you need to write a driver for it. There are two ways to go about it.

You can write a driver that runs in the kernel; this gets you the best performance, and it's the only way to implement some feature (e.g. fine-grained access control). But it's also harder to debug (if your driver has a bug, you'll probably need to reboot; if you're lucky you may be able to view an error trace and perhaps even delay the reboot until you've saved your data — better do that in a virtual machine). Look up the documentation of your Unix variant's kernel to see what interface you need to implement.
Alternatively, you can use FUSE, which is a filesystem driver that forwards all requests back out of the kernel, so each filesystem driver is implemented as a process. If the filesystem is buggy, just kill the filesystem driver process and the rest of the OS survives. To learn how to write a FUSE filesystem, see the examples and read tutorials such as Sumit Singh's.
Comment: This is very good answer, and it's candidate for the best, for now.
Answer: The Unix/Linux system offers the POSIX system calls open(2)/close(2)/read(2)/write(2) and stat(2) and some higher-level functions like opendir(3)/closedir(3)/readdir(3), which are enough to write the tools stated (it is easier using the C wrappers). Part of the hard job of the kernel is precisely to make them work on the various filesystems offered, and make the whole work on whatever device they might be residing.
Comment: That part of the job you mentioned is what I am interested, not regular syscalls from userspace.
Answer: For most tools, the underlying layer is the C Standard Library ("libc"). libc provides a number of low-level file handling routines, such as open, read, and write. These routines in turn interface to the filesystem layer in the kernel, which sits on top of the kernel's block device layer, the device drivers, and finally the hardware.
One implementation of libc is the GNU C Library ("glibc"). You might want to take a look at the official documentation, which describes the low-level file functions of glibc in more detail.
Comment: Call `fd = open('/etc/fstab',O_RDONLY)` should open file /etc/fstab, but how it finds data and meta blocks of that file? How libc calls know which filesystem is there and how to interpret bytes on media?
Comment: @BobanP. It doesn't. libc translates the open call (or other low-level file functions) into system calls to the kernel. From that moment on, it's entirely the kernel's job to deal with a file's location/filesystem, block format etc. Read also more about [syscalls](http://en.wikipedia.org/wiki/Syscall), the [linux kernel](https://en.wikipedia.org/wiki/Linux_kernel), and an overview of [linux syscalls](http://www.kernel.org/doc/man-pages/online/pages/man2/syscalls.2.html).
Comment: 'From that moment on, it's entirely the kernel's job to deal with a file's location/filesystem, block format etc.' ... and that's exactly what I want to know, not about syscalls.

Filesystem kernel API


Is a sound toggle button relevant today?

Question: I'm building a game which will be playable on desktop browsers and mobile devices. This game will have sounds for various actions. My question is whether including a sound on/off toggle is nowadays relevant, and especially in the context of a game. Is there a possibility that this is not needed anymore because users know exactly what to do in order to adjust the volume on desktop or mobile, or even completely mute a desktop browser tab in case they need to?
Comment: Do you have any reason to believe that there is a substantial number of desktop users who know that they can mute individual browser tabs?
Answer: It's generally good practice to keep users inside of the app, anything related to your app should be configured inside of it.
There are many advantages to having ability to adjust the sound inside of your game environment:

People might want to keep listening a different audio while playing
People might not know the mute button on browser tabs
When there are so many tabs open on modern browsers, the tab size shrinks so it's harder to mute from there.

I'd suggest having a adjustable volume bar inside of the game.
Answer: When you design anything you should always keep in mind the "new comers", the section of the population that have little to no experience in working with technology, this section is referred to by "the next billion user", these are the people adopting technology in the near future and need more straight forward actions on the screen.
so yes, adding the switch would be helpful and relevant
Answer: There is a difference between toggling sound off for a particular application vs for the whole device. A user may want to listen to songs on Youtube and play the game on mute. Thus, the sound toggle is a great way to make it visible and clear to the users that just the game can be muted.


Elastic properties of graphene by using DFT (Quantum espresso)

Question: I am a Ph.D. student. I am using Quantum Espresso to calculate the mechanical properties ( in-plane stiffness ) (undergo uniaxial strain). I calculated the strain energy of each applied strain. The problem is how can I employ the data to get in-plane stiffness. I fitted the curve into a second-order polynomial by using Excel as shown in the figure. What is the next step after this figure? how can I calculate the in-plane stiffness?
I hope you can help me. best wishes.
Comment: What is the y axis and its unit? In my post (https://mattermodeling.stackexchange.com/questions/10809), I write the equation related to the elastic stiffness, $(E-E_{0})/A_{0}=\frac{1}{2}C_{j}\epsilon_{j}^{2}$. You can see that this formula appears in many articles( https://pubs.acs.org/doi/10.1021/acsomega.0c01676, https://link.springer.com/article/10.1007/s11426-009-0244-3). What you need to do is obtain energies per area, fit these with the strain and investigate the 2nd order coefficient.
Comment: @ahmedhassan Okay. So now you have $x = \epsilon$ and $y=E-E_{0}$, right? The relationship between $x$ and $y$ would be $y/A_{0}=\frac{1}{2}Cx^{2}$ according to the above formula. Indeed, your data show the quadratic relationship. And the above equation can be written as $y=\frac{1}{2}CA_{0}x^{2}$. So, the number of $C$ will be approximately $C\approx 2\times(460.05)/ A_{0}$.
Comment: @ahmedhassan I think you can neglect it. The function also can be written as y = 460.05(x-0.00045)^2 -0.00005. The displacement 0.00045 is much smaller than the order of strain $x=\sim 0.01$. Thus, $y \approx 460.05 x^{2}$. This means that the undeformed structure (at $x=0$) is indeed a local minimum.
Comment: @Patche please write an answer, since comments are "[temporary post-it notes](https://meta.stackexchange.com/help/privileges/comment)" and when they get deleted no one is informed of it.
Comment: What was the area of the supercell/unit cell of graphene that you used in your calculation?
Comment: I used a 2x2x1 hexagonal supercell of graphene
Comment: The y-axis represents the energy of each deformed structure and the x represents the uniaxial strain along the x-axis.  I am using the same formula C= (1/A0) (E-E0/ ε2). My question is how can I obtain this term (E-E0)/ε2.
Comment: Thank you Mr. Patche, I really appreciate your comment. how about the second term in this equation ( y = 460.05x2 - 0.4173x + 4E-05)?
Comment: Thank you so much, I appreciate
Answer: The elastic stiffness $C_{j}$ with respect to each $j$ direction mediates the energy $E$ at a deformed structure and the mechanical strain $\epsilon_{j}$ as follows [Mir, S. H. et al. ACS Omega. 2020, 5, 24 & L. Tang at al. Sci. China,
Ser. B: Chem. 2009, 52, 10].
$$
\frac{E-E_{0}}{A_{0}}=\frac{1}{2}C_{j}\epsilon_{j}^{2}
$$
Here, $E_{0}$ is the energy of the structure at the local minimum, and $A_{0}$ is the surface area.
The figure of the original post presents $x$ as $\epsilon_{j}$ and $y$ as $E-E_{0}$, and the data exhibit a quadratic behavior that aligns with the above equation.
Neglecting the lower-order terms, the fitting function can be expressed as $y/A_{0} \approx \frac{1}{2}C_{j}x^{2}$, or $y=\frac{1}{2}C_{j}A_{0}x^{2}$. Therefore, the number of $C_{j}$ will be $C\approx 2\times(460.05)/ A_{0}$.
Comment: Thank you, Mr. Patche, I really appreciate that


weak variational formulation of Poisson equation with some restrictions.

Question: The variational formulation of Poisson equation
$$
\begin{cases}
-\Delta u = f & \text{in } \Omega \\
u = 0 & \text{on } \partial \Omega
\end{cases}
$$
is that: Find $u\in H_0^1(\Omega)$, such that $a(u,v) = (f,v),\  \forall v\in  H_0^1(\Omega)$.
If I add a restriction $u\geq 0$, it seems that the weak formulation is that: Find $u\in K:=\{v\in H_0^1(\Omega), v\geq 0\}$, such that
$$
a(u,v-u) \geq(f,v-u), \  \forall v\in  K
$$
I don't know how to derive this variational inequality in a strict way, and especially why the test function space alse has to satisfy $v\geq 0.$
Answer: It's essential to observe here that "add the restriction $u\geq 0$" is a statement which is ambiguous, or lacking in meaning. Solutions to this Poisson equation are unique; they might or might not satisfy $u \geq 0$ (depending on $f$), but one cannot simply produce solutions which do satisfy $u \geq 0$ for a given $f$ at will.
What you are doing here is actually the following: note that the Poisson equation has a Dirichlet principle; the solution $u$ is characterized as the unique minimizer of
$$
\{\int \frac{|\nabla u|^2}{2} - f u : u \in H^1_0(\Omega)\}.
$$
It is certainly possible to restrict the class of $u$ we are minimizing over here. I mean, you can minimize this over whatever set you like, if you can show the minimum is attained. One choice is to minimize over all $u \in H^1_0(\Omega)$ with the pointwise constraint $u \geq 0$. It is elementary to show that the minimum is attained over this set.
When you do this, you change the PDE which minimizers satisfy. You can attempt to compute the PDE in the same way you do for Laplace equation, by considering competitors $v$ with $v \in H^1_0(\Omega)$ and $v\geq 0$. Using $u + t(v - u)$ as a competitor for $t \in (0, 1)$ (this is a convex combination of $u$ and $v$), in particular, leads to
$$
t\int \nabla (v - u) \cdot \nabla u -  f(v - u) \geq - \frac{t^2}{2}\int |\nabla v|^2,
$$
so dividing by $t$ and sending it to zero leads to the variational inequality you stated. In fact the converse is also true: any function satisfying the variational inequality is a minimizer to this functional over all $u\in H^1_0(\Omega)$ with $u \geq 0$. Actually so far this has very little to do with PDE or the function spaces; these kinds of variational inequalities are what you get as optimality conditions for minimizing convex functions over convex sets, in any context that these concepts make sense.
So this gives a kind of Euler-Lagrange equation, but is perhaps unsatisfying (it's not a pointwise property and only an inequality). One thing you can note is that if $h \geq 0$ and say $h\in H^1_0(\Omega$, then $v = u + h$ is a valid competitor, so plugging it into the variational inequality gives
$$
\int \nabla h \cdot \nabla u - h f \geq 0,
$$
i.e. $u$ is a (weak) supersolution, $- \Delta u \geq f$. If we assume that $u$ is continuous, then on the interior of $\{u > 0\}$ we will have that $u$ actually solves this PDE, because for an $h$ compactly supported on $\{u > 0\}$ we will have, for very small $t$, that $u - t h \geq 0$, which then gives the subsolution inquality when used as a test function. On the interior of $\{ u = 0\}$, well, $u = 0$, it's not solving $-\Delta u = f$ except by accident.
The behaviors of $u$ on the interiors of $\{ u > 0\}$ and $\{ u = 0\}$ do not fully specify a PDE for $u$, because $u$ could have a variety of behaviors along $\partial \{ u > 0\}$ in principle (try it in 1D). However, the conditions $-\Delta u \geq f$ weakly (notice how this holds "along" the boundary just fine) and $u \geq 0$ turn out to be enough to characterize $u$ completely: they amount to an extra condition that "the normal derivative of $u$ along $\partial \{ u > 0\}$ vanishes," roughly speaking, so $-\Delta u = f 1_{\{u > 0\}}$ weakly. Notice how this is a nonlinear PDE: the dependence on $u$ on the right-hand side is not linear in $u$.
To get back to the question asked: the test function space is what it is because you chose it to be this; this was the starting choice. You could have started with the PDE, but not with your PDE: with my PDE, $-\Delta u = f 1_{\{u > 0\}}$, if you knew that this was the right PDE to begin with. The variational inequality is the Euler-Lagrange equation to a variational problem, and because everything is convex here it is equivalent to that variational problem. Since the variational problem is a fairly natural constrained minimization, it is a good place to begin.


How do I bend my rear derailleur hanger (part of frame) back into place

Question: Somehow I bent my rear derailleur hanger, how would one suggest bending it back into line? In my case the rear derailleur hanger forms part of the frame and therefore if I snap it when bending it back, I could write off the bike.
Comment: The other approach is to take a standard "Crescent" style adjustable wrench, tighten it onto the hanger, and use the wrench to bend.  (The wheel would probably need to be removed while doing this.)  This approach lacks subtlety, however.
Comment: If all else fails, the thread of hole for the derailer bolt is the same as a standard hollow axle, in most cases, so you can get an old axle and several matching nuts, screw in the axle and thread the nuts tight against the hanger, and then use the leverage of the axle to bend the hanger.  While there are special tools to get it exact, you can come pretty close by eye, if you take your time.
Comment: Sure, you might break the hanger bending it back into position. But how much use is the bike if you can't fit a derailleur? Trying to get 8 seed derailleur working with a cheap bolt-on derailleur is doable, but it won't shift very well and you'll likely need to replace your QR axle with a solid, nutted one to make the derailleur work at all.
Comment: Related - HOW did you bend it in the first place?  What can you do to stop it bending again?  As others have pointed out, repeated bending will break it.
Answer: There is a tool specifically for this. For example, by Park Tools. Might that help?
Comment: One of the most used tools I have in my toolbox. If you have a lot of bikes it is worth it's weight in gold.
Comment: The tool is the best option, but you'll need to pay a shop to do it for a few bucks (iirc, the tool is about 75-100 dollars).
Answer: As I said in comments, the real question here is: do it yourself or pay someone else. You can't really ride the bike as it is, so you don't have a lot to lose if it turns out to be unfixable.
A simpler approach if you don't want to buy the expensive tool just for this is to use something else to bend the hanger straight. I normally use a large adjustable wrench. Clamp it tightly to the hanger and twist cautiously. I'd do it in two or three movements, first the vertical alignment, then twisting it, then possibly re-doing the vertical. You will have to remove and re-fit the derailler a couple of times, and you will probably struggle to get it exactly right. But 8 speed isn't too sensitive (with 10 or 11 speed you're probably not going to get it accurate enough by eye to shift reliably).
An old m10x0.1 axle with nuts can also work if you have one. The important thing is that you have nuts or washers with a surface area as large as the flat on the hanger, because you really don't want to be twisting the hanger using the threads - that is likely to ovalise the hole and damage the threads. So you really need a cone and some washers, but ideally an m10x0.1 nut.
That bend isn't too bad IMO, it should be simple enough to get it working again. My main caution is that if you find yourself in your third round of bending it, give up and get someone with the right tool to do the job. Bending it back and forth is how you will break it off.
Comment: A (rear) wheel with a non-quick-release axle is a good tool. It allows you to check that the two rims are parallel meaning that the hanger is correctly aligned.
Comment: Only if the axle is an m10x0.1mm axle. Otherwise trying to do that will just damage the threads in the frame, if you can get it in there at all. And you can only check two points, which isn't enough


Can I program in C# on a Mac?

Question: I want to learn C# for Unity and my personal computer is a MacBook Air. Can I program in C# on a Mac?
Comment: UPDATE: [Unity game development with Visual Studio for Mac](https://blogs.msdn.microsoft.com/visualstudio/2017/05/10/unity-game-development-with-visual-studio-for-mac/). So now you don't merely have C#, you have Unity, as requested, running in VS mac!
Comment: investigate if mono will do the thing for you, that's the only way
Comment: @GrantWinney Mono MDK or Mono MRE?
Comment: You can even use Unity on your Macbook (if your graphics card is up to it).
Answer: Your first option is Microsoft Visual Studio for Mac which was released in 2017. If you're used to VS ide then I suggested you download this.
If not then you can have a look into MonoDevelop. You can download from here
MRE = Mono Runtime Environment
MDK = Mono Development Kit.
MDK = MRE + Extra tools, libraries, .NET PCL (Portable Class Library) profiles, etc.
If you have an application that you want to run that needs Mono you can install just the MRE.
If you are doing development, writing C# applications, whilst you can sometimes get away with just having the MRE installed, you may hit some missing features such as not having the .NET PCL profiles. So I would install the MDK if you are doing development. Reference
Comment: **Visual Studio for Mac** should be at the top of your answer. By far the easiest way to achieve this
Comment: @KolobCanyon Updated as per requested
Comment: UPDATE: [Unity game development with Visual Studio for Mac](https://blogs.msdn.microsoft.com/visualstudio/2017/05/10/unity-game-development-with-visual-studio-for-mac/). So now you don't merely have C#, you have Unity as OP desired, running in VS mac!
Answer: Yes, it is. Microsoft has released Visual Studio Code 2017. It works on Windows, Mac OS, and Linux; It is quite nice development text-editor. It works similar to the full-version, available on Windows - with a few draw-backs, and it will allow to write programs, as well as run and test them right on your Mac.
Microsoft Docs offer a quick getting started tutorial and a Hello World program out-of-the-box with the Visual Studio Code.
You will need to install a few dependencies, however. Which may sound kinda of obvious:

Visual Studio Code
.Net Core SDK
C# extension from the marketplace.

I had good luck getting started and Visual Studio got all of the dependencies for me; so I simply went into the program, opened the integrated terminal (View > Integrated Terminal) and ran the command dotnet new console, and boom, a few seconds later I had a Hello World program, written in C#, running on my MacBook Pro.
Comment: It took me literally couple of minutes getting everything working!:) Thanks!
Comment: But I still didn't understand how can I run the Program.cs file?
Comment: Glad I could help @Mar
Comment: For ongoing development, Visual Studio for Mac (mentioned in another answer) probably makes the most sense. To quickly test-drive a code snippet, VS Code and the CLI work nicely - thanks! However, the above instructions seem a bit incomplete. I followed the instructions here: https://learn.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio-code?pivots=dotnet-6-0
Answer: There is now a Visual Studio for Mac available as a free community version as well as professional and enterprise versions by subscription.
JetBrains also has an IDE for C#, called Rider, that runs on the Mac. If you use IntelliJ or any of their other products you might like it - it feels better to me than MonoDevelop or Visual Studio for Mac. It is a commercial product but JetBrains offers very generous license terms (as in free) for students and open source projects. They also have a substantial discount for startups.
Answer: It is possible, but you won't be able to use Microsoft's tools, you'll need to use a third-party program like Xamarin Studio (MonoDevelop).
Edit
at the time of this answer there wasn't a Microsoft tool/IDE that could be used for developing .net / C# programs on a Mac.  Now there are two:

Visual Studio Code
Visual Studio for Mac
Answer: Note that while everyone mentions Mono and Xamarin, which you should absolutely look into for C# development, Unity works on Mac directly, specifically Mac OSX 10.6+
while both use the C# language, some of the paradigms espoused by Unity are a little different from standard C# development. I personally recommend learning both.
ADDENDUM: Note that MS has recently announced that they'll be moving the standard .NET implementation cross-platform, and are doing so with the help of the Mono team, so while there's currently a confusing dual set of tools, it'll be shifting away from this in the future
Answer: It is entirely possible, if you install a version of Windows using Bootcamp you can switch between the two at start up and have the full functionality of both by installing Visual Studio on the Windows partition. Alternatively, you could use VMware such as Virtual Box and use Windows within your Mac OS.
Comment: This is completely unnecessary compared to Mono or Unity

Can I program in C# on a Mac?


How do I customize my kits between matches?

Question: It doesn't seem like it's possible to customize your kit, except for when you are playing or in the main menu (i.e. not between matches). Or am I missing something?
Answer: It's currently impossible to change any settings outside of a match. This includes kits.
However it's a highly requested feature to let us customize kits on Battlelog, and a DICE employee has stated that they're going to look into it, however that doesn't mean it's going to happen.
Comment: Why is this the accepted answer? I can change my kits between two matches on ps3 at least (see my answer below). Or am I misunderstanding the question?
Comment: @IsakSavo You misunderstood the question, he's talking about the period from the time the scores start showing up, to the time that the new map has finished loading.
Comment: Ah I see.. Then I agree with you
Answer: You have a period of time between matches when you can customize your kit and that's when the new map has been selected and the countdown timer hasn't reached zero. I'm talking about the time where you deploy but you cannot move around (only jump, switch weapons or drop boxes).
If you don't deploy, you can hit square (on PS3 - it's the "reload" button) and go into the customize kit menu.
One thing I've noticed about this is that you can only customize kits that are relevant to the current map. So for instance, you won't be able to customize the Jet kit when the map is "Operation Métro" (rush) because there are no jets on this level.
If I remember correctly, you can also access this menu when you are dead and haven't respawned yet.


Why Linear bounded automata requires Nondeterministic Turing machine ? Why not Deterministic Turing machine?

Question: Going through the topic of LBA, i.e., Linear bounded automata. I found that LBA requires the NTM with some constraints on tape. I found the same information from different sources. But I did not get why all the sources mentioned that it needs a NTM. I am not getting why I need a NTM for LBA? We also know that any NTM can be converted to DTM. Therefore, I can take a DTM and put those tape constraints for building a LBA. I think that with a tape constraints DTM would be converted to LBA! Please make me correct and kindly tell me why I need an NTM for an LBA?
Answer: The conversion from nondeterministic Turing machine to deterministic Turing machines doesn't conserve space. The best known construction, known as Savitch's theorem, converts a nondeterministic Turing machine using space $s(n)$ to a deterministic one using space $O(s(n)^2)$, and this is suspected to be tight in general; see for example this question on cstheory.
Linear-bounded automata correspond to a class of grammars, context-sensitive grammars, in the following strong sense: a language can be described by a context-sensitive grammar iff it is accepted by some linear-bounded automaton. We only know how to prove this result if the linear-bounded automata are allowed to be nondeterministic. Indeed, assuming that $\mathsf{DSPACE}(n) \neq \mathsf{NSPACE}(n)$ (a conjecture which is much weaker than the tightness of Savitch's theorem), there exists a context-sensitive language which cannot be decided by a deterministic linear-bounded automaton.
Answer: From Savitch's theorem:
A nondeterministic L(n)-tape bounded Turing machine can be simulated by a deterministic $[L(n)]^2$-tape bounded Turing machine, provided $L(n) \geq \log_2 n$.
Thus, in particular, every context-sensitive language can be recognized within deterministic storage $n^2$, where $n$ is the length of the input.
The context-sensitive languages are precisely those sets accepted by nondeterministic Turing machines within storage $L(n) = n$. Then Every context-sensitive language is accepted by some deterministic Turing machine within storage $n^2$.
Conclusion:
So, this is all about a matter of storage, that is why we use NTM in the LBA as it requires less storage over DTM. As an interesting aside, there remains an open problem to do with LBAs in the realm of complexity theory: does a deterministic LBA have the same power as a normal non-deterministic LBA or, equivalently, does NSPACE(n) = DSPACE(n)?
N.B:  Please make me correct if I misunderstand the concepts. If it is satisfactory then you may please give me an upvote.
Ref:

Savitch, Walter J. "Relationships between nondeterministic and deterministic tape complexities." Journal of computer and system sciences 4.2 (1970): 177-192.

https://www.cs.auckland.ac.nz/~nies/Students/Bax380project2010.pdf


why does Laravel 4 gitignore composer.lock

Question: Why does the default laravel4 have the composer.lock file included in the .gitignore repo?
It seems to contradict composers recommendations to commit this file into VCS.  I was wondering if there was something I didn't know that justified this?
Comment: I just typed "laravel gitigore composer.lock" in Google , tada https://github.com/laravel/framework/issues/1412 -- "It is recommended for your own apps, not for frameworks."
Comment: I see, I see - make your response an answer and I'll accept it for ya!
Answer: According to the author of Laravel here https://github.com/laravel/framework/issues/1412:

It is recommended for your own apps, not for frameworks.
Answer: It's not clear from the question if you meant the framework or the app. Instead of asking for a clarification, I decided to write this instead for future confused users.
The problem is, it's ignored not only in the framework but in the app too. The app is what you get when you install Laravel as a project (i.e. not for the purposes of developing it and sending pull requests but for using it in a project of yours).
In contrast, the Symfony project makes a distinction here and doesn't include the lock file in the .gitignore of the the Symfony Standard Edition distribution (the app) unlike the Symfony framework.
There are already at least two issues and one pull request regarding composer.lock: issue 1696, issue 2293 and PR 2591.


Differentiation of a continuous bilinear form

Question: Let $E_1, E_2$ and $F$ be $3$ Banach spaces. Let $B: E = E_1 \times E_2 \to F$ be a continuous bilinear form. Show that $B$ is differentiable at every point $a = (a_1,a_2) \in E$ and its differential is:
$$dB_{(a_1,a_2)}(x_1,x_2) = B(x_1,a_2)+B(a_1,x_2)$$
We need to show that:
$$B(x_1,x_2)-B(a_1,a_2) - [B(x_1,a_2)+B(a_1,x_2)] = o(||x-a||_E)$$
The LHS should be in some form of $B(x_1-a_1,x_2-a_2)$, then as $B$ is a continuous bilinear form, there exists $C > 0$ such that: $B(x_1-a_1,x_2-a_2) \leq C ||x_1-a_1||_{E_1} ||x_2-a_2||_{E_2} \leq C \displaystyle ||x_-a_||^2_E$, if we define the norm on $E$ by $||x = (x_1,x_2)||_E = \max(||x_1||_{E_1}, ||x_2||_{E_2})$.
However, when I calculate the LHS, it gives:
$$B(x_1,x_2)-B(a_1,a_2) - [B(x_1,a_2)+B(a_1,x_2)] = B(x_1-a_1,x_2) - B(x_1+a_1, a_2) \text{  (?!)}$$
Where did I get wrong?
Answer: Well, i think that you can try better with this expression: $B(x_1+a_1, x_2+a_2)-B(x_1,x_2)$.


how to repair corrupted pendrive

Question: My pendrive is hp c350 with 16gb memory.
It was working quite well before few weeks.
One day after improper ejection it was not working properly.
Whatever file I put into the pendrive is becoming corrupted. And many times pendrive shows gb's of memory used without any files in it. I tired formatting it with many options on windows and on many PC's. I tried using diskpart clean command and cmd format and normal format, nothing is working. Could you guide me into getting my pendrive to normal working state?
Comment: Throw it away & get a new one. They're not worth fighting once they start to fail.
Comment: Assuming you have deleted and recreated the partition table, I agree with previous commenter to replace it... at well under $6 USD for 16GB USB 3.0 drive, throw it away and buy a new one because it's not worth the hassle. The device has already exhibited a failure, do you want to trust it with any data?
Comment: Are you **safely removing** the drive after using it, every time? If you're writing files then just yanking it out, you could be corrupting the files yourself. Sometimes write caches haven't finished writing. `fsck` / `chkdsk` should fix the filesystem if it's a one-time error, but formatting should "reset" it...  And testing it on different hardware (as you say you've done with "many PC's") is a good way to verify that it's the drive itself that's bad, and not just a bad USB port or cable etc.
Answer: If it's a hardware failure, there is nothing you can do.  Throw it away.  If it's a filesystem failure (which, based on your description, it could be), you should do a byte-level write-all-zeroes erase and then reformat it and see if it will behave.  You can use a tool such as Lowvel to do the erasing.  It may also show you if there are bad blocks (but it may not since pendrives work a bit differently with failures).
As noted by @Tetsujin & others in the comments, if it's even remotely possible that it's a hardware failure and not software, your best option is to discard the device and replace it.  If it's still under warranty, return it to the place you purchased it and ask for a replacement.
Comment: now I tried lowvel, still the same problem persists.
Comment: Then it's most likely a hardware failure.  If it's still under warranty, get a replacement.  If not, throw it in the garbage.
Comment: Ok. Then I got to get a new one. Thank you for your answer @Mekki MacAulay

how to repair corrupted pendrive


Simultaneous yaw damping and sideslip control of aircraft with rudder?

Question: Yaw damping is achieved by using the rudder to generate a yawing moment that opposes any yawing motion. Also, rudder is used to correct sideslip by applying a rudder input in the opposite direction of the sideslip.
My question is how to simultaneously fulfill yaw damping and zero side-slip/yaw acceleration requirements? More specifically, should both requirements be controlled independently and resultant rudder is the sum of two or yaw damping should be made inner loop to sideslip/yaw acceleration control?
Answer: It's all a single activity.  Yaw dampers provide a single function; provide an active automatic rudder input to keep the airplane aligned in the airflow when the airplane's static yaw stability, its "weathervaning" tendency provided by the vertical fin, is insufficient.
The system detects sideslip for any reason and applies rudder to take out the side slip, within its range of authority (usually around 1/3 of rudder travel). It's normally a separate always-on channel, not connected to the autopilot.
Think of it as a separate person you hired to sit with his own set of rudder pedals, and instructions to watch the slip/skid ball and do whatever it takes to keep the ball centered at all times.
This means that displacements in yaw from turbulence or gusts are automatically controlled, as well as adverse yaw induced by aileron displacement.
When an airplane turns, the turn is generated by the bank created by aileron, which causes sideslip toward the low wing. The vertical fin provides the yawing action to coordinate the turn; a big weathervane (as the bank steepens, more and more of the turn rate is coming from elevator, but for simplicity we'll assume very shallow turns where that is minimal). Rudder inputs are only required for turns because of adverse yaw from aileron displacement, or gusts that excite yawing movements.
On an airplane with a yaw damper, you put your feet on the floor after takeoff and never touch the rudder pedals during normal maneuvering in the air. The yaw damper does all the corrective inputs to keep the ball centered for you. Outside the take off and landing phases, you only need to get on the pedals for situations that require more input than the yaw damper has authority to correct. Namely, engine failures.
Comment: Sir, in case of yaw damping, we measure yaw rate and try to apply rudder so as to bring yaw rate to zero, while in case of sideslip control, we measure sideslip or lateral acceleration and try to bring it to zero by applying rudder. Are not these two different processes meaning performing yaw damping in this sense can't provide sideslip control automatically and vice versa. Kindly clarify.
Comment: Yaw rate, the speed of the rotational motion about the yaw axis, only comes into it in determining the Y/D's response characteristics, how fast it responds, how much input to make, etc. In the end it's doing its thing to eliminate lateral acceleration - slip/skid. You have a lateral acceleration, or you don't. If you are just looking at the skid ball, it's centered, or it's not and you're slipping or skidding, whatever you're doing at that moment. If it's off center, you'll apply rudder to center it. If the Y/D is engaged, it will do it for you.
Answer:
the resultant rudder is the sum of the two.

If you want to fly a straight path, yes.
Sideslip is the result of an uncoordinated yaw.  A yaw damper is required when the aircraft's natural damping ability is insufficient.
Exacerbating factors are high altitudes, high weight to surface area ratio, and swept wings.  A paper airplane does not need a yaw damper, a 747 flying at high altitudes does.
In design the vertical stabilizer and fuselage surface area behind the center of gravity control yaw.  This is known as longitudinal stability.
The need to actively apply rudder to eliminate unwanted sideslip and/or damp yawing oscillations indicates the aircraft is more unstable in the regime it is flying.
Interestingly, in the design of very large aircraft, a yaw damping system may prove more economical than an extremely large tail fin.  However, larger fins are virtually foolproof safety insurance.
Answer:
More specifically, should both requirements be controlled
independently and resultant rudder is the sum of two or yaw damping
should be made inner loop to sideslip/yaw acceleration control?

Except when operating near the stall -- and striving to avoid a spin-- applying rudder inputs as needed to keep the ball centered will always give satisfactory results.  Assuming that the pilot (or the automatic flight control system) is able to keep the ball truly centered, this statement holds true even in parts of the flight envelope where an aircraft (typically a swept-wing aircraft) has a self-sustaining (undamped) "Dutch roll" yaw-roll oscillation mode.


Jquerymobile: touch event slower in Android than in iOS

Question: I created a simple web app with jquerymobile and google maps JS API: http://www.mastercomunicazionestorica.it/geo//botteghestoriche4.html  (the buttons functions are not yet implemented). On iOS (iPhone and Ipad) no problems while panning the map, but when I pan the map on Android touch devices the responsiveness is extremely slow: what could be the reason and how is it possibile to solve the problem?Thanks!
Giac
Answer: I dont think that this something that depends on the operating system, but instead, it might be the problem of the phone you are using. It might have low end processor or random access memory which might be the reason behind the slow responsiveness. And just to let you know, the link you gave works perfect on my HTC HD2 with android 2.3.3 :D


Only test when necessary in agile software development: good or bad idea?

Question: When taking an agile development approach, it is obvious to only implement features when necessary. My question is: can the same be applied when it comes to testing, i.e. creating test cases and only test when necessary, or is that a bad idea?
Comment: That's not how it works. Tests are part of the features. If the features are not tested then you don't have releasable features
Comment: This depends on how you define "necessary". So what do you understand by saying a "test case is (not) necessary"? Please give an example.
Comment: All tests check things which you *think* but can't *know* you've done correctly. Therefore it's not possible to judge which tests are "necessary" or not - they all are.
Comment: @KilianFoth: I understand perfectly what you are trying to tell the OP, but there can be indeed "unnecessary tests" - like obviously redundant ones, or tests for missing features which are not going to be implemented in a reasonable time frame. OP were actually not clear enough about what they have in mind by "necessary".
Answer:
My question is: can the same be applied when it comes to testing, i.e. creating test cases and only test when necessary, or is that a bad idea?

I don't think that necessary is a good choice of words here, whether you're talking about tests or features. Very often, features aren't added to software because they're necessary, they're added because they're useful or valuable or desirable. Features are added because they make the product better by some metric that's important to the stakeholders.
The same is true of tests, and to an even greater degree. Tests are separate from the product being tested, so they don't directly impact its functionality at all and they're certainly not necessary to the operation of the product. Tests are just tools that help developers and other stakeholders to maintain a consistent level of quality. Tests can help ensure that the product meets requirements; they can detect failures; they can save time and money; etc. In short, tests are often useful, valuable, and desirable, even if they're not actually necessary.
The idea with agile development is to build a minimum viable product and then iterate on that to improve it in whatever direction the stakeholders decide is most important. You can apply the same philosophy to tests: start with a basic set of tests that give you the most benefit, and then iteratively improve in the direction of the most benefit.
Often, tests will be developed in parallel with new functionality, because the tests can be a useful tool during development. For example, an important idea in agile development is to have a common understanding of what it means for a task to be done, and tests are one way to establish the definition of done and to demonstrate that you've met the requirements. But tests can also be developed later — perhaps to demonstrate a bug, or to increase confidence that the product behaves consistently.
Answer: Please note, I am biased as a tester.
I would say AT LEAST establishing a basic test plan early in the development process is very important, and testers should be involved in the discussion of new features to help be ahead of the game when it comes to implementing how these features will be added into the test plan.
The earlier you can begin testing, the earlier you catch the bugs that seem like edge cases but a few thousand lines of code later become difficult-to-pinpoint mammoths. It's easier to solve these issues when they're isolated rather than when they're connected to other methods, objects, or whole features.
Answer: A pragmatic answer:
When developing new features, TDD (test driven development), can speed up development:

Develop (using unit tests) the technical functionality in isolation.
Not every secondary method, and not heavily integrated, but as easily combined independent aspects. As otherwise an other approach in coding, small redesign as required by the actual non-test code would require rewriting tests.
Then write the non-test code.
And add unit tests as API / use-case examples.
Complete the high-level code with tests.
The use-cases should cover border cases, errors too. These unit tests should better be done last, to not hinder the development impetus. They should not be forgotten though.

This leaves some methods of the low-level aspects not tested. However there is a good chance that the high-level use-cases cover the testing of the functionality of thoses aspects already.
Last but not least: if one uses integration builds with say Jenkins, then a code analysis tool like SonarQube will admonish a missing test coverage. Then
one probably should either arbitrarily accept say 85% coverage as "optimal" performance/cost ratio, or work sub-optimally and do a total test coverage.
To recap:

as unit-tests are nobodies favorite work, test driven development may alleviate some of the towering work and allow fast results.
TDD should be limited to basic functionality.
Unit tests on several layers testing the same code actually is redundant IMHO.
Answer: Absolutely. Only test when necessary. But slow down: Testing is always necessary.
Seriously, the very latest point in time where you need to test your software is after you think one task is finished and before you start the next task. Because that's the point where newly introduced bugs come from the feature that is fresh in your mind, so the number of possible causes is limited, and the causes are easier for you to examine.


how to grab the value from landing page

Question: i have  one landing page with two text box I want to grab the values in the text box entered by customers into another landing page.
How can I grab value of  text box passed from the "form" on the First landing page to the second landing page.
Answer: There are multiple ways two best of them are as follows:
1) send value as url parameter(&value1=abc&value2=xyz) and get values and display in second page by using apexpage.getparameter method
2) use same controller & same variable for both pages.
Answer: There are 2 languages (Server Side JavaScript "SSJS" and AMPSCRIPT) and 2 methods of posting form data (GET and POST).
Part I - LandingPage1
Using the HTML you have 2 choices to pass the form data
a) For "GET" method
<form id="" method="GET" action="#">

b) For "POST" method
<form id="" method="POST" action="#">

So if you wish to use "GET" method your form would be
<form id="" method="GET" action="landingpage2">
      <input type="text" name="a">
      <input type="text" name="b">
</form>

If you chose "POST" method your form would be
<form id="" method="POST" action="landingpage2">
     <input type="text" name="a">
     <input type="text" name="b">
</form>

Part II - LandingPage2
1) Server Side JavaScript on LandingPage2 for receiving the data passed from LandingPage1
Based on the method you chose in
After declaring variables for capturing the form values passed
var a, b
a) GET:
a = Request.GetQueryStringParameter("a");

b) POST:
a = Request.GetFormField("a");

2) AMPSCRIPT on LandingPage2 for receiving the data passed from LandingPage1
After declaring variables for capturing the form values passed
var @a, @b
a) GET:
set @a = QUERYPARAMETER("a")
     or
set @b = RequestParameter("b")

BOTH QUERYPARAMETER and RequestParameter functions work for querystring parameters
b) POST
set @a = RequestParameter("a")

AmpScript's RequestParameter function is special in that returns the value of a parameter passed either as a query string of a landing page URL or passed via a form post provided that the form is set to a method of "post" and not "get".

how to grab the value from landing page


Do these trees/overgrown shrubs growing close to the house need to be cut?

Question: There are five trees/shrubs around this house that are planted very close to it. Should they be removed? If so, what would be an appropriate method for removal? Would cutting them short be enough?
Tree 1

Tree 2

Tree 3

Tree 4

Tree 5
Answer: It depends on what the owner wants. Certainly none is large enough to cause structural damage if it fell. If there are some leaves and twigs rubbing painted surfaces ,that could be a problem. I would, and do ,prune any that may rub paint. Also any  branches that may fall on aerial wires; eg. electric , phone, cable, etc, although none are apparent.
Comment: Don't trees planted so close present problems other than structural damage by falling? Some that I had concerns about:
1 - roots altering the foundation, especially when trees grow larger (if I need to cut the tree down in 5-10 years, I would rather cut it now and plant a new one further away).
2 - need to trim a lot on one side (facing the building) and very little on the other side of trees, making it unbalanced and, potentialy, unstable.
Are those valid concerns?
Comment: Cut down whatever you want if it is your house. I have cut 3 and 4 " roots at the foundation and it made no difference to large oak or southern pine trees. I doubt if heavy pruning on one side of trees that size would make any difference. I plant any trees over 4 ft. from the foundation and they still require more pruning than I want to do.