Zikula add block to topnav position in Bootstrap Theme

Question: When I add the search block to the topnav in Bootstrap Theme, the login button is "broken"
ZK2.0.13 with Bootstrap Theme. When the block is added, the user login appear in a new line (example)
I expect see topnav in a single line.
Answer: I found an answer for you. What I did was set up the page as you had it and then viewed it in Chrome. The app has some really nice dev tools for experimenting with css. Choose View->Developer->Developer Tools (Cmd-Option-I on a mac). From there right-click on the search box and choose inspect. You can then see on the right panel all the css that is affecting your element and see how the html gets laid out. I noticed that the search box was wrapped in a div with an input-group style so that was the one I wanted to mess with. I found if I added the below code it does what you want:
.input-group {
    position: relative;
    display: table;
    border-collapse: separate;
    float: right !important;
    width: 200px;
    padding-top: 6px;
}

The last three css commmands are the change that makes the difference. To fix the Bootstrap theme I went to themes/BootstrapTheme/Resources/public/css/style.css and added the above code to style.css. Don't forget to delete the cache folder in /var/cache (either prod or dev) before you test it out.
One concern I have with this solution is that .input-group might get used elsewhere and this may interfere. A quick inspection didn't show it being used anywhere else except the search box. If it is somewhere else, you will have to create your own theme (not hard) and manually write some code.
Comment: `.input-group` is a commonly used class in Bootstrap, so this _could_ have harmful affects elsewhere. you could override the search block and alter the html to add a unique css class, then add the above css as needed. This would minimize the impact elsewhere.
Answer: Thanks Paustian. It's working.
I have edited the file: Resources\ZikulaSearchModule\views\Block\search.html.twig in order to change the css class to "myInput-group". Then I have edited Resources/public/css/style.css and add your changes to the file.
Thanks for all guys.


Firewall Being turned off

Question: Is it possible for an application to close my OSX firewall? Several times I have opened the security pref and I find FireWall off while I do not remember turning it off. For antivirus I use ClamXav which doesnt have a firewall so it should not be it... Is there a way to check if some application is closing the firewall ?
Answer: Check /Applications/Utilities/Console.app after the firewall is turned off.
There might be a message about the change.
Answer: If you give an application your administrative password (during e.g. a software installation or update) it can indeed change your system settings. An application running on the system that have been granted administrative rights can also turn it off. Try turning the firewall on, rebooting the machine, and see if it's then turned off when you boot it. Should help troubleshoot if it's a local program that causes this.
I'd actually suspect that you do it yourself or someone else who have access to the machine does it. In any case, had Apple enabled the firewall by default you could be more certain that either you, a piece of local software, or another user is turning it off for you.
As for ClamXav, it does not provide a competing firewall service nor does it have any interest in disabling your firewall. Nor would any code-signed application (from the Mac App Store or signed using an Apple Trusted Certificate from the wider internet) have any incentive for turning off the firewall. These applications are given access automatically, so they would not need to interfere  with it either.

Firewall Being turned off


What does it mean to "Index a page"?

Question: For example in the sentence: "This tells Google how to index the page" what does Index the page mean in the grand scheme of things. Why would a page have an 'index.' What is it useful for?
Comment: Indexing, regarding google, is adding your page to the database, so it shows up in google search results.
Answer: Google servers are constantly visiting pages on the Internet (crawling) and reading their contents. Based on the contents Google builds an internal index, which is basically a data structure mapping from keywords to pages containing them (very simplified). Also when the crawler discovers hyperlinks, it will follow them and repeat the process on linked pages. This process happens all the time on thousands of servers.
In general, the term indexing means analyzing large amounts of data and building some sort of index to access the data in more efficient way based on some search criteria. Compare it with database indexes.
Answer: i guess you are asking the question of whats the need for indexing with google? Here it is why?
After creating a website that is very beautiful and have all good features. But as i guess You would have know that web is all about connecting the Webpages! And you have created a site, in which you can only look at it. If the world want to know about your site, the next step will be hosting! After that obviously you have to do index your webpage to any search engine, say for example google. Now your site will be indexed according to the google bot, i cant explain how bot works! And if the person searching your site name in any engine then that engine with the help of indexing can retrive your page as the result :) This is how you connect to the WEB!
Answer: This simply means Google is reading your page, figuring out what content is on it (via the page structure, links, etc.) assigning a page rank to it, among other things, and adding it to their database.
There is no specific terminology here.
See Web Crawler:  http://en.wikipedia.org/wiki/Web_crawler
Answer: In short Index page this is page that originate from table of content that help to search  materials in older to access data or information within the given basket of data that can be book or web-page easily.

What does it mean to "Index a page"?


Website Backup and Download

Question: How to download the whole website in general and *.blogspot.com in particular? Note that I don't necessary have admin access to that website. In fact I am just trying to download a third party website just in case it goes into flames...
Comment: I hope you're not trying to download every page of every subdomain of blogspot.com...
Comment: see also http://superuser.com/questions/14403/how-can-i-download-an-entire-website
Answer: I've found httrack (http://www.httrack.com/) very useful for this in the past.
If you use any tool to try download an entire site (not just httrack), make sure you show a little consideration to the site. See httrack's "what not to do" page for some pointers on that.
Comment: +1 because httrack creates a local mirror that you can browse.
Answer: you can use wget to mirror the website [ provided it does not have flash or javascript based navigation ].
look here or just check command's manual. wget is available for unix systems and windows.
Comment: the first link doesn't make sense
Answer: wget I believe will crawl a page for you
the option -r I believe is what you want. Note in the following snip the part about converting links for offline viewing. Since you said you want to have this page just in case it "goes up in flames" this will allow you to browse it locally.
from the man page
Wget can follow links in HTML and XHTML pages and create local versions of remote web
sites, fully recreating the directory structure of the original site.  This is sometimes
referred to as "recursive downloading."  While doing that, Wget respects the Robot
Exclusion Standard (/robots.txt).  Wget can be instructed to convert the links in
downloaded HTML files to the local files for offline viewing.

Comment: While backing up a blog with wget, I found it useful to add the "--span-host" option for the links/images that are not hosted in the same domain.
Answer: If you don't have admin access to the site to use the backup tool for the site then you could backup the HTML contents of your pages, from viewing the source the source, or if you just want the actual written content of articles, copy that. You can also download your images and other attachments from the site. This article gives you details of how you could do that in a more efficient way.
You can also use wget if you have it to get hold of the site information.
Bear in mind though that this will not give you the info you need to just take your blog and run it somewhere else, there is a whole PHP backend behind blogspot that is loading your sites etc.
Answer: If you want something a little more advanced that wget, take a look at Black Widow
Answer: In case this helps someone. SiteSucker is a super Mac OSX app that does what you want. wget doesn't always do what you'd expect especially with JS based menus, etc, even with its plethora of options. And httrack is not a visual tool on Mac, it's installed with homebrew. SiteSucker is by far the simplest and the most reliable tool for local download of all html and assets, as if you're running a full static version of that site.

Website Backup and Download


Latin dance family in block cipher

Question: Is it secure to use Salsa20/ChaCha as the key schedule for a 512-bit block cipher using a public permutation in Even-Mansour construction?
Comment: So you have a public permutation (unrelated to Salsa20/ChaCha?) and are now asking whether it's (probably) secure to use the keystream generated by either of these stream ciphers to perform the pre- and post-whitening?
Answer: If you define one round of your Even-Mansour cipher as: $$c \leftarrow P(\operatorname{Salsa20}(k, f(\text{nonce}, \text{round})) + m)$$
Where $P$ is your public fixed permutation, $f$ is some function that ensures the combination of nonce and round number don't lead to repeating nonces, and $\operatorname{Salsa20}$ is the Salsa20 stream cipher.
And assume that:

Salsa20 is a secure stream cipher
The Even-Mansour cipher uses one round
The permutation is the identity permutation

Then the proposed Even-Mansour cipher is secure. To see this, simply drop the permutation and round counter altogether and get $$c \leftarrow \operatorname{Salsa20}(k, nonce) + m$$
If $\operatorname{Salsa20}$ is assumed to be secure, then the above is secure.
The latter two assumptions of a single round with the identity permutation are the worst case scenario. More rounds and an alternative permutation should not make the design weaker.
However
This also demonstrates that there is little benefit to using more than one round and an additional permutation.
Note also that with more than one round, the $f$ function needs to be designed to ensure that the combination of nonce and round counter never leads to the generation of repeated key streams. It is conceivable that failure to do so could lead to an Even-Mansour cipher that is trivially broken despite Salsa20 being secure, e.g. a 2 round variant where rounds 1 and 2 result in the same key stream being generated, leaving the plaintext message unaltered.
If Salsa20 is secure, then there is no real benefit from embedding it inside of another encryption algorithm. The extra complexity could lead to something that is broken, despite Salsa20 being secure.

Latin dance family in block cipher


What things would/should you like to monitor for a web application

Question: In building a web application (not built on any specific framework) I'd like to build a "complete" set of tools for monitoring it.
There are obviously some great tools out there for monitoring the DB or the Web Server, or App Server... but I'd like to build a dashboard that lets admin users monitor the overall health/status of the system.
I've noted the following things to monitor but I'm sure there is more that I may have overlooked.
For the record the app in question is built on a LAMP stack, and beyond the index page is only accessible to registered users (100 - 5,000?).  Additional tables/logs either contain (or will contain) the data needed to report the following.
Items considered so far:

Users: (Active, Registered)
Business Objects: (counts.... e.g. # of contacts, # of accounts, # of managed services)
Registrations: (# of landings, # of signup attempts, # of signup successes, # of account removals)
Lost Password: (# of requests, and for which user)
Login attempts: (# of failures) (possibly userids to see if dictionary attacks are in progress)
Emails: (# sent (by the system/by users)) (e.g. catch if system becomes a spam engine)
HTTP 404 errors: (# of errors, which pages)
HTTP 500 errors:
Hits: (# of by IP/Referer, by page) (e.g. get a feel for any upcoming DOS attacks/slashdotting)
DB queries: (# of queries, # of tables)

What else is missing or would be helpful?
Comment: There's some great answers on this available via searching... I answered a few myself. :)
Answer: Have some kind of bug-tracking system to log any errors or warnings that are called.


Is this the same construction as "make object adjective?"

Question: Obama said, "remake the world as it should be" but it is the same construction as "make the world better?"
source
Answer: A strict reading of your question asks only about grammatical construction. In this narrow case, the answer is yes, they have parallel structures:

[transitive verb in the imperative] [object] [adjectival description of the object's state after verb-ing]
  [Remake] [the world] [as it should be]
  [Make] [the world] [better]

In the imperative voice, the sentence's subject is often ellipted, as is the case here.
However, the two sentences possess significantly different semantics.

Make the world better.

Making the world better means adding to or altering the world's existing state (you are not literally creating the world) to make a more preferable one. Better means improvement of some kind, but degree of change, method of action, evaluation metric and particular quality of betterment are not specified. Because of this vagueness, even if the speaker has a particular meaning of better in mind, the precise action to take is left to the listener to determine. One person hugs a friend who's feeling sad, another cures a deadly disease, and a third paints a beautiful landscape; all three would say they had made the world better.

Remake the world as it should be.

Remake means dismantle and then create anew; this sentence contains an instruction to unmake the world as it currently stands. This also isn't strictly literal (you would probably not destroy and recreate the physical planet Earth), but it does mean that life as we know it would be ended. The implied degree of change here is massive; if it were only a small change, the existing world would not need to be unmade.
As it should be also need not be an improvement. It means possessing the exact attributes the speaker (and those who agree with him) thinks the world ought to have. This is the case here even though those qualities are not specified, because it's nonsensical  to suggest (even rhetorically) that the world be remade into multiple different states simultaneously. If some maniacal super villain so remade the world, perhaps everyone would become slaves, toiling away in underground mines. Indeed, this particular sentence is exactly type of dramatic rhetoric I'd expect to hear in comic book dialogues.
I doubt that Obama is a cartoonish super villain, so the use of remake the world as it should be ought to be viewed as political grandstanding. If you possess the same values as Obama and you grant him rhetorical license and you think the present state of the world requires radical alteration in order to improve, including the elimination of substantial negative aspects, then maybe these two statements approach each other in meaning.
Answer: Yes, it is the same. "As it should be" is an Adjective phrase, meaning a phrase that acts as an adjective. It means the same as "Like it should be".


IMO complex number geometry problems

Question: I've been trying to master complex number geometry for some time and now I'm having a hard time finding problems suitable for complex numbers. Can anyone suggest some IMO or other olympiad problem examples, for which complex number geometry would be useful or efficient?
Comment: A good source is the book **Complex Numbers from A to...Z** by Andreescu and  Andrica.  Chapter 3 is Complex Numbers in Geometry, Chapter 4 is More on Complex Numbers in Geometry, Chapter 5 is Olympiad-Caliber Problems and Chapter 6 is for Answers, Hints and Solutions.
Comment: IMO problems come from areas included in "math curricula at secondary schools", that's why topics like calculus, complex numbers or solid geometry are excluded in general (though they appeared in few exceptional cases).
Comment: If you want something more advanced (way more!), try **Geometry of Complex Numbers** by Hans Schwerdtfeger. It concentrates on circle geometry, Moebius transformations and non-Euclidean plane geometry, but it kind of exhaust those topics.
Answer: My favourite source for learning olympiad-caliber techniques for complex number geometry that also has a great selection of problems amenable to complex number geometry is Euclidean Geometry in Mathematical Olympiads by Evan Chen. The author is a recent IMO gold medalist and he frequently (used to?) post complex number solutions to olympiad geometry problems on a different online math forum, so he has a lot of practical experience in this area of math. The one downside of the book is that it is rife with typographical errors, but this is largely remedied by the list of errata posted on the author's website. I emailed the author to ask if he would publish a corrected version of the book in the near future, and he replied in the negative while expressing regret over not being more careful when he wrote the text.
As already mentioned in the comments, Complex Numbers from A to ... Z, 2nd edition by Andreescu and Andrica is a fantastic resource. However, it is a bit encyclopedic and it can be hard to differentiate without experience between what is is essential knowledge and what should exist in the periphery of your mind.

IMO complex number geometry problems


How to initialize the weights of neural networks so that sum of probabilities at output layer adds up to 1

Question: I have been randomly initializing weights for my neuron layers. I did some calculations on the paper and realized at least for the initial few iterations the probabilities might not add up while summing the results from the output layer. Is it acceptable or there should be weight distribution from the initial iteration itself so that the probabilities add up to one. If so how to initialize the weights for the neural networks.
Answer: You don't need to hack the initial weights. You may need to revisit the architecture of the neural network. For example, add a softmax layer as a final layer so that the output can be interpreted as probabilities for classes.
Answer: Softmax function is the one you are looking for. Place this function in the output layer. This function is defined as
$\sigma(o)_i = {e^{o_i} \over \sum_{v=1}^{V} {e^{o_v}}}$ for $i=1...V $. Here $V$-dimensional vector $o$ is normalized to a $V$-dimensional probability vector $\sigma (o)$ that sums up to 1. You do not need to bother about the initial weights of the neuron.


When to use 'advent' and 'arrival'?

Question: I wanted to know when to use the word advent and arrival in the sentence. Please provide examples and explanation for it. Thanks in advance.
Comment: On its face, I'll accept that some research went into this question. Dictionaries won't necessarily make clear the nuanced differences. **advent** is usually understood to mean the  emergence of some thing bringing with it a major good or benefit: "With the advent of modern antibiotics...." whereas **arrival** is neutral, and could be used with good or bad. "With the arrival of smallpox in the New World..."  We probably wouldn't say "With the advent of plague..."
Comment: as often as we would say "with the arrival of plague"
Answer: As nouns the difference between arrival and advent is that arrival is the act of arriving or something that has arrived while advent is coming; coming to; approach; arrival.

Advent - arrival that has been awaited (especially of something momentous)

  "the advent of the computer"

  The season including the four Sundays preceding Christmas:

church calendar, ecclesiastical calendar - a calendar of the Christian year indicating the dates of fasts and festivals
season - a recurrent time marked by major holidays; "it was the Christmas season"
Advent Sunday - the first of the four Sundays during Advent

Arrival -

The act of arriving:
  advent, appearance, coming.
One that arrives:
  comer, visitor.
The achievement of something desired, planned, or attempted:
  success, successfulness.

When to use 'advent' and 'arrival'?


Young adult science fiction novel set on Mars. Teenage romance between girl and guy with odd name

Question: I read this book in high school, and it was fairly new, so published (approximately) between 2000 and 2004. From what I remember, there were two teenagers on Mars, a boy and a girl. The boy had an odd name and I think it started with a J. There was a romantic relationship between them. I know that's not much to go on but it's all I can remember...
Comment: Was it written between 2000 & 2004 or was that just when you read it. If the latter, when was it written (approximately). Can you descrive the cover? Anything else?
Comment: Hopefully more will come back to me but at the moment, that's all I remember. I think I read it in 2001 and it was fairly new so it must have been published close to then.
Comment: I think the cover was red and blue...
Comment: Was the girl named Nanoannie?
Comment: I can't remember her name.
Comment: Thank you all for your help - I really appreciate it.
Answer: This sounds similar to a series of young adult novels that I read years ago. The series is called Mars Diaries.
It's a series of 10 short novels that were published between 2000 and 2002 by the author Sigmund Brouwer. The main character's name is Tyce, he's a teenager that grew up in an experimental community on Mars. A teenage girl named Ashley arrives on Mars early in the series, she is introduced in either the third or fourth book.
Comment: I don't think it was part of a series.


What factors led to the US government issuing nutrition guidelines in 1916?

Question: This timeline from the Washington Post says that the United States Department of Agriculture issued its first food guidelines in 1916 for children, and then did one in 1920 for adults. My question is, what were the surrounding conditions that led to the federal government deciding it need to tell people what to eat?
Answer: The most important appears to be scientific discoveries related to nutrition that were being uncovered rapidly by the beginning of the twentieth century, from Chapter 2 of the Agriculture Health Bulletin No. (AIB 750) entitled "Dietary Restrictions and How They Have Changed Over Time",

When the U.S. Department of Agriculture (USDA) published its first
  dietary recommendations in 1894, specific vitamins and minerals had
  not even been discovered. Since then, researchers have identified a
  number of vitamins and minerals that are essential to health, and
  have determined the minimum levels required to prevent nutritional
  deficiencies such as scurvy and beriberi. Food policies such as
  iodine fortification of salt and the enrichment of flour products with B-vitamins together with consumer education, have eliminated
  many nutritional deficiencies in the United States.
  With the elimination of many nutritional deficiencies and improved
  control over infectious diseases, chronic diseases such as heart disease, cancer, and stroke have become more prevalent causes of death.
  Nutrition research began to focus on the connection between excessive consumption of certain dietary components fat, saturated fat,
  cholesterol, and sodiumand the risk for chronic health conditions.
  More recently, research has expanded to other dietary components
  such as dietary fiber and antioxidants, and the role that low consumption levels of these may play in the development of certain chronic
  diseases. [Davis, Saltos 1999]

The last two sentences are important as much of the success of the nutritional guidelines came from both their utility (much of which, such as the food grouping remains unchanged to today), but initially also from food industry support.

USDA publications explicitly encouraged consumers to choose
  foods from the full range of U.S. farm products, believing that increased consumption of U.S. agricultural products would improve the health of the general public. For nearly 35 years, the USDA received full support from the food industry when it came to the guidelines...Food industry support began to taper off in the mid-1950s to early 1960s when the focus of
  dietary recommendations began to shift from avoidance of nutritional deficiencies to prevention of chronic disease.

Obviously American farmers and the agricultural industry particularly liked the idea of "you need to eat all kinds of our products".  When food became more plentiful after WWII and obesity more of a problem, health advice from the USDA started to change to reflect this (something that as a member of the millennial generation I find hard to understand.  A government agency bucking private interest for the public good, what?).
The big motivating factor in the study of nutrition in the US was the world war, from military-nutrition.com a website maintained by the U.S. Medical Research and Material Command

The formal history of U.S. military nutrition research dates back to 1917, when the Surgeon-General's Office established a Food Division for the purpose of "safeguarding the nutritional interests of the Army." In the face of a possible world shortage of food during World War I, there was a need to conserve food. The U.S. Food Administration had received complaints from civilians who had observed food wastage at military training camps. In response, the Food Division instructed that nutritional surveys should be conducted to assess food requirements and economy...Military nutrition research effectively came to a stop during the years between WWI and WWII. However, the League of Nations, first established in 1919, became actively engaged in the study of nutrition after World War I (Harper, 1985).

So from what I can tell there are several motivating and interacting factors:

Military interest in developing efficient foodstuffs for supplying a large army far away from the homeland.  This extends as well to ensuring that the working population in the homeland during wartime is healthy despite food shortages.
The economic interest of American agricultural companies and farmers many of whom stood to gain from a more diversified American diet.
The national interest in having a healthier and more productive population that leads happier lives with less medical costs.
Comment: " A government agency bucking private interest for the public good..." under the auspices of the so-called World War II generation. This is most likely to happen when your Millennial generation becomes the "establishment" in about 20 years (the Millennials are sometimes considered the new 2w2s.)
Answer: According to "Generations" by (the late) William Strauss and Neil Howe, an important factor was the concurrent birth of the so-called World War II generation (1901-1924). Elders of their day, in connection with the new century, wanted to create a better nourished, protected, (and educated) group of children than what they themselves were, using the latest nutritional technology discovered in the 1890s. The result was that this generation grew nearly an inch taller (on average) than their parents, giving them a height advantage over the Nazis (and Japanese) in World War II. This concern, in turn, had been stoked by America's fear of war stemming from World War I.
A second impetous was the publication of Upton Sinclair's 1906 book, "The Jungle", about Chicago meat-packing plants that was "aimed at America's heart and hit its stomach instead." This and other publications got America to thinking about the quality of its food, just about the time other early "environmentalists" like President Theodore Roosevelt got America to thinking about the quality of the air and water. In any event, all of the above was the product of a "turn of the century" reform movement.


ActiveXObject in Firefox or Chrome (not IE!)

Question: I am trying to create an ActiveXObject (to use FileSystemObject) but it's only supported in IE.
Is there a way I can make it work in Chrome or Firefox? I need to read all the files in a specific given folder, and list those.
Well, is there another way to do it?
Answer: ActiveX is only supported by IE - the other browsers use a plugin architecture called NPAPI. However, there's a cross-browser plugin framework called Firebreath that you might find useful.
Comment: Since September 2015, NPAPI support was permanently removed from Chrome ([link](https://blog.chromium.org/2014/11/the-final-countdown-for-npapi.html))
Comment: On 202002, chrome has a addon called "IE Tab" which can view the file with activexobject.
Answer: No for the moment.
I doubt it will be possible for the future for ActiveX support will be discontinued in near future (as MS stated).
Look here about HTML Object tag, but not anything will be accepted. You should try.
Answer: ActiveX is supported by Chrome.
Chrome check parameters defined in : control panel/Internet option/Security.
Nevertheless,if it's possible to define four different area with IE, Chrome only check "Internet" area.
Answer: ActiveX resolved in Chrome!
Hello all this is not the solution but the successful workaround and I have implemented as well.

This required some implementation on client machine as well that why is most suitable for intranet environment and not recommended for public sites. Even though one can implement it for public sites as well the only problem is end user has to download/implement solution.

Lets understand the key problem

Chrome cannot communicate with ActiceX

Solution: Since Chorme cannot communicate with ActiveX but still it can communicate with the API hosted on the client machine. So develop API using .Net MVC or any other technology so that through Ajax  call it can communicate with the API and API communicate with the ActiveX object situated on the client machine. Since API also resides in Client machine that why there is no problem in communication. This API works as mediator between Chrome browser and ActiveX.

During API implementation you might encounter CORS issues, Use JSONP to deal with it.

Pictorial view of the solution

Other solution : Use URI Scheme like MailTo: or MS-Word to deal with outlook and word application. If your requirement is different then you can implement your customized URI Scheme.
Comment: Please do comments for additional information you require or facing difficult to understand.


Storm logviewer page not found

Question: I'm able to submit a topology job in the multi-tenant cluster. The job is running. However, the logviewer page is not available. Is there any way to solve this issue?
Comment: I see in Storm UI that logviewer.port=8000, but when I access that port on the target machine only a page with "Page not found" will be displayed
Comment: do you mean to say you are not able to see the logs from the storm ui? kindly put some more details whats exactly you are doing.
Comment: For us, it was an issue with public & private IP addresses. When you get to the "page not found" URL, try changing the host to the public IP or public host name.
Answer: you need to start the logviewer before you click on topology port to see logviewer.
To start logviewer run:
$ storm logviewer same as you run $ storm list
Answer: I faced the same issue for logviewer's home page, but directly navigating to a particular log file that exists in the logs folder works. Try this:
MachineIP:8000/log?file=worker-6700.log

Storm logviewer page not found


What are the benefits of following Brahmcharya?

Question: What are the benefits of following Brahmcharya ? What is mentioned about it in scriptures ?
Comment: There are no benefits in following life-long brahmacharya unless you are a sannyasin; in fact, grihasthasramis are expected to produce virtuous children. See https://hinduism.stackexchange.com/questions/18551/is-there-any-advantage-for-a-person-dying-as-virgin
Answer: In yogic and especially Shivam Tantric schools Brahmacharyam is one of the limbs in Yoga which is very similar to Patanjali's 8 limb Yoga. The list is mentioned as a part of Saura Puranam. In performing Brahmacaryam, especially by Males, results in retaining their Tejus which convert into Ojas. A similar concept is also given in the Shaktism school for women. Similar phenomenon also happens with Ghee (Clarified Butter) from a specific breed of cows, which is preserved in the Earth (underground) for over a century. This approach is discussed in Ayurveda as well. Ojas is a type of radiance that envelopes each cell of the body. There is no similar term in English for this, but many use the term, Ora. If one might notice, Shiva, Krisha, and Devi are depicted with certain Ora enveloping them, it a very vague approach of depiction yet the intent is clear. Yoga is tightly coupled with Ayurveda, they go hand in hand. It's stated clearly in both these schools that the last Dhatus (elements with which a physical body is constructed) is Tejus (Semen), hence exhausting it frequency will result in putting a strain upon the body which in turn becomes an impediment to Yogic lifestyle. The purpose of Male Tajus is not to trash it for pleasure, but for the progeny (creating a new life). Nature's association of pleasure with its exhaustion is to create a conducive and inviting experience towards creating new life. Assume if this experience was very painful and awkward, the driving force towards life-making would have been put away by many. This topic is common across all Schools of Sanatana Culture and is also included in Buddhism and Jainism.


Flexible eCommerce and social networking solution

Question: Im currently developing website that will contain e-commerce part and social networking part.
Social networking part might have following options:

Users

Edit profile
Upload photos / videos
Manage friends
Select favorite product (+review)

Groups
Forums
Videos
Photos

So, basically it is a merge of regular ecommerce store and social elements. And what im trying to do: find flexible CMS that can provide such features. I don't really know which one to choose, because it is really complex project. But i need to find the best matching solution.
Can anyone who had succeed with something like that recommend CMS for this project?
Language: PHP
Update:
Primary part of the projects is eCommerce. After integrating the store i will do social network.
I checked out Drupal system, it is quite powerful for such stuff. Tons of modules.
Answer: Elgg is one of the best open source social networking engine.. you can try the link..


Is maral root useful as a companion plant?

Question: I was looking at rarer plants to grow for natural pesticide purposes and I was wondering how maral root fares. What conditions does this plant need to grow? At what temperature, water amounts, soil conditions, etc. can this plant grow in, is it hardy or highly sensitive? Also, will it interfere with other plants?
Answer: Assuming you mean Rhaponticum carthamoides, which is commonly known as maral or maral root, it does not seem a suitable subject to use as a pesticide; extractions from the root of this plant are used in herbalism in various parts of the world, as a way to build muscle and for various other effects. There is also no information regarding any allelopathic effects it has on other plants when grown nearby, which suggests it has none.  Grows easily and well in cool regions (zones 2-4), can be grown up to zone 7 with care, needs fertile soil, doesn't do well in warmer areas, and the root needs complicated processing prior to use as a supplement. Also difficult to get rid of once it establishes itself because it produces thin, wiry roots as well as a taproot; because of the fragility of these roots, if you want to harvest them, best not grown in clay soil.  Further information here http://www.floralencounters.com/Seeds/seed_detail.jsp?productid=99540
Comment: I was planing on using Maral for its 20-hydroxyecdysone, which should be useful as a pesticide. From wikipedia: "R. carthamoides is high in 20-hydroxyecdysone, one of the most common molting hormones in insects, crabs, and some worms and 20E can disrupt their molting and reproduction."
Comment: Yes, I just read something about that in a scientific paper, not on wikipedia (which I don't particularly trust) - but there it said it speeds up molt rate and maturation of insects, acting a bit like a 'steriod for insects', which could just as easily mean it just makes bigger, stronger insects... Unfortunately, most detailed information is in regard to its use as a supplement for humans. You could try some if you have suitable growing conditions


Giving shocks to students

Question: My son's science teacher had 15  fifth grade students stand in a semicircle holding hands. The student at each end held an electrode connected to some kind of variable contoller. The teacher  increased the voltage until they could "feel" the electricity. He also had one student in the middle let go to demonstrate a "complete circuit"
Is this dangerous?
Comment: I hope that the demonstration was done with a __Van de Graaff__ generator but that's not at all obvious from the question. If the teacher used a variac or something similar he'd better have a damn good lawyer.
Comment: Why would anything else be assumed?  These sorts of demos have been done for at least three generations in classrooms.
Comment: Search for "van der graaf safety" to get the real story.   This is actually very low risk.
Comment: What concerns me is the phrase "some kind of variable controller". My recollection of VDG machines is that they typically are just on/off devices. "Science" teachers have done crazier things...see, for example, John Freshwater.
Answer: These sorts of experiments are safe so long as the teacher takes care to follow standard guidance such as Van der Graaf Generator Safety which goes into some detail.

The electrostatic energy stored by the sphere should not exceed 0.5 J.

...

An enquiry to CLEAPSS has revealed no recorded incident of direct injury caused by shocks from the correct use of school Van de Graaff generators.

and so on.
Answer: From memory, I believe a current value of 65mA passing through the human heart has the potential to kill. According to Hyperphysics, 1 mA is the Threshold of feeling, 10-20mA causes a "can't let go response" where the muscles contract, and 100-300 mA can cause Ventricular fibrillation, and can be fatal. The linked pdf stats that 6mA for a woman is enought to cause a painful shock. For the sake of safety, let's say we do not want to go beyond 3 mA.
 A typical resistance between two body parts is 1500Ohms  Hyperphysics claims 100kOhms for the human body. Ohm's law dictates that if I held a potential difference of 300V across my hands, that the current could be dangerous.
The class was standing in series, so it would take 15*300V = 4500V to kill pose risk to the students. I would hope the teacher wasn't using a source anywhere near that value, which is not exactly the most accessible either.
From Wikipedia, it is said that 5mA is enough to feel, as opposed to 1mA.
In short, I'm sure the experiment was safe, but extreme caution should always be exercised in regards to electricity. Also the above values that I explained should not be interpreted to find absolutely safe zones when dealing with current.
[1] http://hyperphysics.phy-astr.gsu.edu/hbase/electric/shock.html
[2] http://www.hubbellpowersystems.com/literature/encyclopedia-grounding/pdfs/07-0801-02.pdf
Comment: Both the safe current limit and typical resistance values are not correct.  Safe current is about an order of magnitude lower, or microamps for microshock, and resistance may be much higher.
Comment: I'm not surprised my values were off. Luckily others will see your comment and realize the importance of researching the topic and approaching the situation with caution. I'll make an edit
Comment: Much better.  You should never exceed let go.
Comment: Assuming that the situation is safe if 15 students stand in series is incredibly dangerous. What if student number 2 leans against the plumbing on the lab bench? This kind of experiment should __never__ be done.
Comment: Then some of the students might not feel the shock.
Answer: The plural of anecdote isn't data. Just because 100 of us answering the questions have done similar experiments doesn't mean that it's safe or recommended. I've personally received shocks in the hundreds of thousands of volts range (at very low current) and have been set on my ass from much lower voltage but higher current shocks and survived. It doesn't mean that what I survived was therefore safe or recommended. It means I was lucky, if anything. Now that I'm older and wiser I don't go out of my way to experience shocks, even if I'm sure they're safe. (The only thing I do still do is briefly tap a 9V battery to my tongue to see if it's got any juice left in it, but I've found that 9V batteries will "bubble out" on the bottom when they're dead and tend to trust that instead.)
In fact, I'd be very concerned about having students stand in a circle conducting enough current that they feel a (mild) shock. You never know if one of those students has an undiagnosed heart condition. Sometimes the damage caused by electric shock can take several hours to manifest, and it's doubtful that the people taking the victim to the hospital would connect the dots in such a case.
If the teacher wants to demonstrate the concept of a circuit he can do so with a moderately high frequency, low voltage AC signal and a sensitive detector which lights an LED. It'd be way safer than anything that you might actually feel and get the point across just as easily.
Comment: I agree, it wouldn't matter how sure I was. I wouldn't feel comfortable having students line up in a circle like that! Perhaps the teacher was simply more confident than I.

Giving shocks to students


Ferrite ring vs ferrite choke interchangeable?

Question: I am assembling a Gimbal controller that needs "Ferrite rings".  Can I use Ferrite clamps instead?  Do they do the same thing?
manual requirement:

What I want to buy:
Comment: As the schematic says they're optional, I doubt it will matter all that much exactly what you use. They appear to just be common-mode chokes, and those ferrite beads should do the same job just fine.
Answer: It should make no difference either way, as long as it is only a single pass through the center of the core. This filters out-of-band HF harmonics. Multiple passes through the same or 2 cores may start to affect signal strength.
Note that at very low bit rates (Kbps) you could add extra turns (better filtering) through the core but you would be locked out of a shift to a much higher bit rate. Mbps is only possible with just a single turn (pass) through the ferrite toroid or clamp-on.
Comment: edited wrong link.oops ..undo
Answer: The clamps are better for raising the CM impedance thus reducing the EMI interference so that forward and return currents can cancel out better from a distance.
They offer higher inductance for a feedthru.  This becomes important when sensors pick up the stray current flux from current spikes from emitters like motor drivers. Since sensors are already high impedance, they benefit more from twisted pairs and/or shield pairs.
Unlike inductors where X reduces the Rs rises so this means it also becomes an absorption loss to noise in the bands where the load does not need this energy but can interfere with logic and analog signals.

A better design will include CM chokes on the board where CM chokes can increase the uH in a smaller size with lower cost and smaller size but depend on the max motor surge current.


How to respond to an unofficial PhD offer?

Question: I applied to 10 schools and have heard formally from 3, 2 rejections, 1 admission. I just received an email from another school (a very good one) saying that they are seriously interested in me, but would like to know if I am still interested in them. While I am very interested in this program, which is in my top 4, since I have not heard from the other 6 schools, I am not ready to make a decision. Does saying yes now mean I am committed to accepting their offer?
Comment: Saying that you are still very interested in them does not represent at all that you are committing to them.
Comment: Give them an unofficial "yes". Only when their offer of admission becomes official can your answer be official.
Answer: If they are still "seriously interested" in you, then that is not an offer on their side.
If you are still "seriously interested" in them, then that is not a firm commitment from your side.
Decisions are not binding until the ink is dry.
Comment: +1 to this, and unfortunately, some less-than-scrupulous institutions/individuals will actually fail to honor commitments even after the ink has dried!  Reputation means a lot.
Answer: The department in question most likely just wants to make sure you haven't accepted an offer somewhere else - or received an offer you will definitely accept over them; saying that you are still interested is not a commitment from you at all.
Some applicants will wait till the last moment to decline offers from departments, even ones that they know for sure they will not accept (e.g. if they have been accepted by a better department (in their estimation) already). The department is just trying to find out whether you are in that position. (To students in that position, don't do this! Decline offers as soon as you know you won't be accepting, your fellow applicants will thank you!)
In your position I would write an email saying that you are still interested and also indicate that it is among your top choices (as you have said in your question).
Comment: Here is what I wrote back in the day (I make no claims about this being good): "Thank you so much for offering me admission into your graduate program. I was very impressed by [[University]] [[other details like faculty/students I had talked to, etc.]] and so I had a difficult decision to make regarding which graduate program to choose. After a lot of careful thought, I have decided not to accept your offer. I will mail the response form to you as soon as I can, but I wanted to let you know my decision now, since it may affect applicants on your wait list. [[Thank you so much again, etc.]]".
Comment: Letting schools know will not only make fellow applicants happy, it make the admissions committee members life easier too.
Comment: I'm curious how you would word a letter like that. Declining an offer without the "excuse" of accepting one somewhere else. Should you mention the offers you have?
Comment: In fact now that I look at it, I cringe a bit, but oh well, it is done now. As a non-native speaker I think I get some latitude from people about wording and style of such things (or perhaps this is merely wishful thinking on my part).
Comment: Sometimes I got a note back asking if I had chosen a different program (usually with the comment that it helps them to know their competition); for me this only happened for the last set of schools, so I did have a specific name to tell them. If it had happened earlier I would have told them the schools (four for me) which I was choosing among at the time.
Comment: I would suggest making such replies as terse as possible, while still being polite. After all, to some extent you're just another piece of paperwork in the pile to get through. They are not interested in your reason for declining, unless you were in particular negotiations with potential advisors.
Answer: Now that you have an admission offer, it is reasonable to contact all (or at least most) of the other schools you have heard from. Any school that you would not attend, email them and say that you have an offer from X and are no longer interested.
Email any school that you want to attend instead of X and tell them you have an offer at X, but would rather attend their school (give a good reason that is not simply their ranking). Tell them the deadline you need to let school X know by. If one of those schools Y gives you an offer and none of the other ones do, you tell X no and Y yes and there are no issues. If a couple of those schools Y and Z accept you, you tell Z yes and X no. You need to tell Y that since the offer you also got an offer from Z that is too good to pass up. This way they will see you were not wasting their time.
The difficult case are the schools you are not sure about. If only school Y accepts you after you tell them about X, then turning them down for X is not ideal. So while it is not ideal, things happen, and no one will hold it against you for long.


Recommendations for introductory online analysis books

Question: Can someone please recommend me books for mathematical analysis that can be found online? I need chapters about some pretty basic stuff like sets, absolute value, supremum, infimum, functions, relations. I also need examples of problems. I've tried searching it online but all the stuff I found were too advanced for me.
Comment: The citation should be "Thomson/Bruckner/Bruckner."  Don't forget Andy, or was it Judy you forgot?
Comment: Have you looked at Thomson/Bruckner, *Elementary Real Analysis*? It's available as a free (legal) PDF: http://classicalrealanalysis.info/documents/TBB-AllChapters-Landscape.pdf It's also published as a book, check the reviews at Amazon: http://www.amazon.com/Elementary-Real-Analysis-Brian-Thomson/dp/143484367X I think it's a very good introduction.
Comment: No, I haven't seen it before. I think that it will be of great help to me. Thank you very much.
Answer: One site that many students and instructors find useful is the American Institute of Mathematics (AIM) open source textbook collection. Here is a link.
We have put our Elementary Real Analysis textbook there.  (Thanks Mr Bungo for the plug.)
I think the future will bring many more free textbooks, especially for mathematics.  Our original motivation for making the text free was the familiar narrative of our dealing with a major publisher who will not be named (Pearson).  They priced the text at an outrageously high level, and then dropped it from their list after a few years and solicited more mathematicians to write similar texts.  William Trench, whose real analysis textbook is also free on the AIM site, had an identical experience in the same time period with the same publisher.
We got our copyright back and just posted the PDF on the web. Very soon there were tens of thousands of downloads and that prompted us to make a second edition.
Remember too that old textbooks that are now in the public domain (and may have been scanned) can still be valid and useful presentations of elementary real analysis.  There is nothing much new in the subject since it was mostly developed to this level long ago.  If you can find a copy of Hardy's Course of Pure Mathematics you will be learning from a master and, at the same time, not enriching the big publishing companies (who will not be named).
Comment: Our advanced $\text{Real Analysis}$ textbook is not on the AIM site since they are currently interested only in undergraduate mathematics texts.  But our ClassicalRealAnalysis.com website has that too for free download.
Comment: Thanks mate, i will look it up.
Comment: @B.S.Thomson: Sorry about the lazy citation above! I own and very much enjoy both this book and its sequel (Bruckner/Bruckner/Thomson), so there's no excuse for getting it wrong. I applaud you and the Bruckners for making them freely available, and also want to mention that the print editions are very reasonably priced.


Are oil-filled transformers ever run at a vacuum?

Question: Larger oil-filled transformers are sometimes dehydrated by removing the oil and pulling a vacuum inside the chassis for an extended time. That requires that the chassis must be rated to hold a vacuum. If I read correctly, the dielectric strength of a vacuum is greater than that of the insulating oil. Given that, why not just run such a transformer at a vacuum all the time? Do the thermal benefits of the oil overwhelm the benefits of the insulation being perfectly dry all the time? If so, could you design a transformer that wouldn't have that property? Are there, in fact, transformers designed for vacuum operation?
Comment: What if after some time the vacuum fails?
Answer: Large oil-filled transformers use the oil as a thermal transfer medium as well as a dielectric. That's why the cooling fins are on the outside.

If there was a vacuum inside the coils would run very hot and would require massive derating to protect the wire insulation. There would still be heat loss through the wires to the outside world and also by conduction through the mounting means, and by radiation to the housing. Transformer oil is essential to minimizing the size and cost of large transformers. Pure water would be vastly thermally superior to oil, but the slightest ionic contamination would be an issue.
There is no particular trick in making a transformer operate in a vacuum, it just has to be designed so the heat produced can get out of the innards. If it's for space use you may have to specify materials that don't outgas excessively.
Comment: I wonder what the derate on the conductors would be...
Comment: @StephenCollings Probably quite a bit unless it was specifically designed with some other means than oil to conduct heat out of the windings and core and to dissipate it. Then you end up with the extra cost and size of a 'dry' transformer (and then some) plus a hermetically sealed housing. $$$$


Which Stack Exchange site is for asking about problems with Facebook accounts?

Question: I want to ask question about problems in my Facebook account. On which Stack Exchange site should I ask?
Comment: Pretty broad. If you have questions about *using* Facebook you could head over to [Web Apps](http://webapps.stackexchange.com/). Sounds more like you need Facebook Support though.
Comment: Related: [On which Stack Exchange site can I ask customer service questions about product X or company Y?](https://meta.stackexchange.com/q/347991/295232)
Comment: I have the exact same question, currently about understanding why Facebook censor my blog related to math popularization (about everyday bias related to that, and fitting none of the "out of our standards" topics), and what can/should I do about that.
In the past, I often had questions about stuck situations, like how to signal a phishing post that manage to undisplay signaling button.
"contacting Facebook" is near-impossible, while expert community has some technical knowledge of how to.
→ We do need a place for that, and it's technical based.
Comment: ( Beside, Facebook is no longer "just a product": it happens to be a part of the web where it's often impossible not to be (when you need to reach a large bunch of peoples that are already around)).
Comment: @FabriceNEYRET [facebook] is the 3rd popular tag in [webapps.se] . We need some help voting and answering those questions.
Comment: @FabriceNEYRET Are you still interested in questions about Facebook?
Comment: @Rubén : not at this very moment but it can happen again; why ?
Answer: Questions about using Facebook are on-topic for Web Applications SE:

Web Applications Stack Exchange is for expert and advanced users of web applications.
If your question generally covers …

Using Gmail, Facebook, Twitter, Google, or any other website which behaves like an application

Do study the site help center to see what is on and off-topic.
If you have a Facebook support issue, you'll need to contact Facebook directly. Web Applications SE can help you make sense of the features Facebook offers (e.g. how do I prevent my photos from being seen by anyone but my friends?), they cannot fix broken accounts.
Comment: [Why we're not customer support for \[your favorite company\]](http://meta.stackoverflow.com/q/255745/839601)
Comment: Check out the Web Applications FAQ. Start with [What kind of questions can I ask here? The detailed version](https://webapps.meta.stackexchange.com/q/894/311306)
Answer: If you've got problems with your account then you need to be talking to Facebook support, not some Q&A site on the internet.
Comment: Facebook support is horrible and their documentation is almost as bad. If you want to solve a Facebook problem 99% of the time you find the answer on a blog or forum, so why not a SE?
Comment: @jerclarke Most requests for help with Facebook account issues can't get a definitive answer from the community as it's defined in SO/SE. Instead of being posted as a SO/SE question, people looking for help with these issues might use the chat, but first, they should find an expert willing to participate. Web Applications chat very rarely has active users. Despite that, it's not an option for brand-new users. Ref. [On which Stack Exchange site can I ask customer service questions about product X or company Y?](https://meta.stackexchange.com/q/347991/295232)
Answer: I have noticed that several questions asked here about Facebook have marked as duplicate of this question and that the previous answers might have not addressed completely the concerns.
First, regarding the problems with a Facebook account, this is way too broad. As suggested in both previous answers, in general terms, users should contact Facebook support. Start looking at https://www.facebook.com/help/.
Related:

Why can't I ask customer service-related questions on Stack Overflow?
On which Stack Exchange site can I ask customer service questions about product X or company Y?

Other questions:

Questions about using the Facebook's web app as end-user might be on-topic in Web Applications. The exceptions are questions about interactions between users (or the lack of interaction) , troubleshooting like questions, specialized advertising / commercial (how to sell more / how to manage budget), questions asking about internal policies, technologies or any stuff that only Facebook employees can answer. [facebook] info 3,223 questions.

Questions about using Facebook's apps for Android might be on topic in Android Enthusiasts. [facebook] info 281 questions.

Questions about Facebook's apps related to Apple devices like device privacy and app permissions, might be asked in Ask Different. [facebook] info 237 questions

Questions about integrating Facebook using their API's as programmer might be on topic in Stack Overflow but also might be on topic in other sites depenting on the system to be integreated. SO [facebook] info 85,745 questions.

The following searches might help to explore posts across all the Stack Exchange Network having <code>[facebook]</code>:

[facebook]  205,698 results.
[facebook] is:question isanswered:1 44,516 results (only answered questions).
[facebook] is:question isanswered:0 48,004 results (only unanswered questions).

Arqade [facebook] 18 questions.
Ask Ubuntu [facebook] 199 questions.
Information Security [facebook] 264 questions.
Code Review [facebook] 41 questions.
Game Developement [facebook] 92 questions.
Magento [facebook] 79 questions.
Salesforce [facebook] 65 questions.
Software Engineering [facebook] 34 questions
Software Recommendations [facebook] 80 questions
Stack Overflow Spanish [facebook] 148 questions.
Stack Overflow Japanese [facebook] 44 questions.
Stack Overflow Portuguese [facebook] 308 questions.
Stack Overflow Russian [facebook] 228 questions.
Super User [facebook] 226 questions.
User Experience [facebook] 96 questions.
Webmasters [facebook] 427 questions.

Cross Validated [social-network] facebook 18 results.
Freelancing facebook 77 results.
Interpersonal Skills [social-media] facebook 45 results.
Mathematica and Wolfram Language [social-media] facebook 23 results.
Personal Finance and Money facebook 304 results.
Psychology and Neuroscience [social-network] facebook 13 results.
The Workplace [social-media] facebook 94 results.
Writing facebook 217 results.


Cache block in multiple, different versions in cache

Question: Is there way to add the same block to cache in different versions to cache, for example for different sorting in products' grid, but for the same request params - for example random sorting, which should be different every time? It would be good to have for example 10-20 versions of block with different order of products and just take different versions from cache. It is not good solution to clean cache for every request with random sorting parameter.
Answer: For random sorting, i prefer to have 1 cached version of the block, and use javascript to shuffle the items client side. This reduces the load on the server and the result is the same for the customer.
This is assuming that shuffling the shown results (limited to the items on page 1) is sufficient.
If you want to shuffle more products, spanning multiple result pages, that would be more difficult are require server side customization.
Comment: yes - JS is server is 1 page limited, that is the point

maybe having some infite scroll extension there it could be done, as extension like that usually loads pages via ajax and caches next page
Comment: It really depends how random you want to make this. In my experience some random effect is usually enough and not worth the extra server load. Also, randomizing results can be frustrating as customers see something on your page, but cannot find it again on a second visit.
Comment: Of course random sorting is not intented to be default one. It is worth considering if our approach is not enough.


How does Fedex and UPC code functionality in Google search work? Can my site get similar treatment from Google?

Question: When I search for a UPC code in Google, on top of the screen there are two special links to FedEX and UPCDatabase.com. Obviously the way it works is that Google recognizes the strings as valid UPC codes and then loads these "smart links". What are these "smart links" called and how have Fedex and UPCDatabase.com implemented them to have them linked to their website?
Answer: Special informatonal sections at the top of search results are usually called "Google OneBox".  Here is a "museum" of some different oneboxes:

Aircraft Registration Number
Airport Conditions
Book Results
Calculator
Calculator Currency Conversion
Current Local Time
Definition (and definition page)
FCC Equipment Database
Flights
Flight Status
Google Base (jobs)
Image Results
Image Results and Map
Local
Local Results and Flights
Map
Map and Refinement
Movie Showtimes
Music Results
News
Patents
Phonebook Results
Product Search Results
Q&A
Refinement (Google Co-op)
Related
Scholarly Articles
Spelling Correction
Stocks
Trailer
UPC Number
Weather

Google engineers implement these when they feel they would be useful for users.   Webmasters don't have a good way to suggest to Google that something similar should be done for the data on their own site.
Comment: This is very unfair, I'm going to contact Google regarding this. I think all companies in every industry should at least be able to apply to be included in the One Box feature!


Plaintext Size Limit for ECIES with AES-128 CBC mode

Question: Using the ECIES (Elliptic Curve Integrated Encryption Scheme), is there a limit size of plaintext? (what is the maximum allowed number of bytes to be encrypted with ECIES).
Comment: ECIES : Diffie-Hellman key exchange, coupled with a symmetric encryption scheme, and a MAC. You are free to choose the symmetric encryption scheme. So which one do you want to use.
Comment: The symmetric encryption used by ECIES is the AES with CBC (Cipher.getInstance("ECIESwithAES-CBC", new BouncyCastleProvider());).
The other parameters of ECIES, the MAC key size is 128 bits, and the block cipher key size is 128 bits (IESParameterSpec param = new IESParameterSpec(x, y,128, 128, new byte[16]);).
Answer: You are using CBC mode in ECIES. In the CBC mode the $i$-th ciphertext is calculated as
$$c_i = E_k(m_i \oplus c_{i-1})$$
where the $c_0=IV$
Now, there is a problem with CBC mode that is if the adversary can see that $c_i = c_j$ for some $i,j$ with $i \neq j$ then they can calculate:
$$m_i \oplus c_{i-1} = m_j \oplus c_{j-1}$$
and by x-oring both sides they can learn
$$m_i \oplus m_j = c_{i-1} \oplus c_{j-1}.$$
This is ciphertext collision and the probability is given by the birthday bound, $\mathcal{O}(\sqrt{2^n})$, where the $n$ is the block size. So it is not advisable to have more than $2^{64}$ blocks. But in practice, you may reduce this into lower sizes to reduce the change of this attack from 50% to your target security level.


Why is there a little computer on my Chrome Widget?

Question: I cannot see to figure out why it pops up.
I have my widget with my own webpages open but now and again a second chrome widget with the computer screen comes up. Sometimes it's even there all day. Not sure if someone is spying or mirroring my screen?
Answer: This is a "Handoff" indicator, I think. If you have Chrome open on another device (e.g. an iPad) you can click the icon to continue what you're doing on your Mac. For example:


Does this email mean that I have been granted the visa?

Question: I received the following email this morning. Does it mean that my visa has been granted?

UK Visas & Immigration has now assessed your UK visa application and made a decision. Your documents and the decision will be sent back to either the UK Visa Application Centre where you applied, where we will contact you by email over the next few days to collect them, or if you are using the courier return service, will be sent directly back to the address provided.
Please note that TLScontact does not know the outcome of the assessment and has played no role in the decision-making process.
Kind regards,
TLScontact
UK VIsas & Immigration
Comment: This seems to be about understanding the content of an email. Maybe this question would be a better fit at [ell.se], as the correct answer is actually right there in the question.
Comment: It means that the decision will be sent back to either the UK Visa Application Centre where you applied, where they will contact you by email over the next few days to collect them, or if you are using the courier return service, it will be sent directly back to the address you provided.
Comment: I'm voting to close this question as off-topic because the answer is clearly stated in the question.  It is not about travel but about understanding English.
Comment: I don't see this as a language question. Imagine some country where a governmental agency issuing visas only send responds from any kind to people whose visas are granted and never contacts those whose visas have been denied. Then the existence of a mail, no matter the content, would have been an indication of acceptance. It would be a terrible, inefficient and not constructive way to run a bureaucracy, but there are enough places in the world where bureaucracies use ridiculous processes. So, the answer depends on knowing the process of visa confirmation and not on language.
Comment: @Cindy Just a quick-side note: At least in the US, "official" news will usually not come in an email, because it is not a very reliable or robust way to communicate. Email are as public as postal cards, and it is too easy to create fake email.
Comment: @rumtscho That seems to be a completely hypothetical situation and it involves the organization lying when it claims not to know the outcome. If we believe the organization habitually lies, we can't answer the question anyway. In any case, we're looking for "questions based on _actual problems that you face_" (from [help centre](http://travel.stackexchange.com/help/dont-ask); emphasis mine), not hypothetical situations.
Comment: @DavidRicherby they would not be lying. They would just have a process which "swallows" rejections. Nothing strange about it, many agencies around the world work that way. Now, maybe this is unthinkable from a UK agency, but a foreigner wouldn't know that.
Comment: @rumtscho The letter explicitly says they don't know if the application was successful or not. If replies are only sent to successful applicants, then that claim would be a lie: the agency would know that the application was successful because only successful applications receive replies.
Comment: @DavidRicherby if your definition of lie includes not only "untruth uttered with malicious intent" but "untruth uttered because the utterer was too disorganized to realize it's not true" then yes, it is a lie. But in that case, most governmental agencies tend to lie. And because these lies can occur in predictable patterns, it's not very strange for such writings to signal something other than the literal words on the paper. So we could understand this question "does this letter only tell me whatever is written on it, or is it a sign for something more" which is not a language problem.
Answer: No, it does not mean your application was successful.  Also it does not mean your application was refused.  It means neither.  It is simply an advisory that they have reached a decision and are letting you know that you will be contacted to collect your stuff from the VFS/VAC.  It is a standard email sent out automatically by UKVI whenever they update the system.
They do not like to give out results via email because they see visa decisions as private beyond what email provides.
To find out if you were successful you should examine what you get back. If your passport has a bright shiny entry clearance, you were successful. If your passport has a refusal stamp along with a refusal notice, well...  If you have been refused and you do not understand why, the odds are really good we have covered it in the site's archives. See https://travel.stackexchange.com/questions/tagged/visa-refusal
Comment: +1, especially for mentioning the reason they don't give out the answer by email.
Answer: In the email they say that they themselves don't know the outcome of the assessment, so the answer to your question must be "no, it doesn't mean either that you've been granted the visa or that you haven't been granted the visa".


MIDI connection to tablet not working

Question: I am trying to connect my tablet (Samsung galaxy tab a 10.1 2019) to my piano keyboard (Yamaha P-70) using a midi cable.
The keyboard is connected to the tablet through the midi cable and a USB b to USB c adapter.
I tried a simple sight-reading app that shows a sequence of notes to play at the right time and the problem is that the communication of the MIDI signal works perfectly for the first input (the first note pressed), but every input after that is not recognized at all.
I also tried a virtual keyboard app and I get the same problem,but i also noticed that every note pressed after the first stay pressed forever.
I find this behavior quite strange because there is communication between tablet and keyboard, but for some reason it doesn't work.
I would like to know if someone had the same problem and he solved it.
Thanks
Comment: First check to be made is, whether the interface works from a real PC. Tablet USB ports are typically more capable than those of digital pianos but may still not support everything.
Comment: Thans for the suggestion i'll try it
Answer: Apparently, running status does not work in your setup.
This is a known bug of the CH345 chip, which is used mainly in cheap Chinese USB/MIDI interfaces like this:

Comment: That was the first cable i tried then after reading that wasnt good i bought another one that looked better quality but always chinese. Do you have any suggestion about a good quality cable?
Comment: Well-known brands, such as ESI, iConnectivity, M-Audio, Miditech, Roland.
Comment: I bought a roland cable and it works very well so thank you for the answer. For those who are interested my current setup is cable: roland um one tablet: samsung galaxy tab a 2019 keyboard: Yamaha p70

MIDI connection to tablet not working


"[Crashlytics:Crash] Reporting is disabled"

Question: I am getting the following error messages when our production iOS app initializes:
[Crashlytics] Version 3.8.4 (121)
[Crashlytics] Running on iOS Simulator (iPhone), 10.3.0 (16E195)
[Crashlytics:Crash] Reporting is disabled
[Crashlytics] Crash reporting could not be initialized
[Answers] Initialized
[Fabric] Initialized with kit versions: {
    "com.twitter.answers.ios" = "1.3.4";
    "com.twitter.crashlytics.ios" = "3.8.4";
    "io.fabric.sdk.ios" = "1.6.11";
}

Every subsequent call to log an event gets the following error:
[Crashlytics:Crash] WARNING: CLSLog has been used before (or concurrently with)
    Crashlytics initialization and cannot be recorded. The message was: ...

The non-production versions of the app work fine running the exact same code but with different bundleIDs.  Normally when the app initializes for the first time, then I see the app populate in the Fabric dashboard, but in this case the app is not showing up.
We have an Android and an iOS version of the app, and they both use the same bundleID, so I am wondering if there is a conflict because of that? I see the Android version of the app in the dashboard, and it seems to be working properly. This is an app that originally was a Xamarin app that compiled to both platforms, neither of which incorporated Fabric/Crashlytics. We have now written native apps on each platform, and both are using Fabric/Crashlytics.
Since this is a pre-existing app in both stores, we do not have the option of changing either app's bundleID.
Comment: @ArtFeel, as I mentioned previously, in my case I had to open a ticket with Crashlytics, then when they called me back I had a short conversation with the support person and they changed some setting on their server that fixed the problem.  Everything in my code was fine.  I am not sure exactly what change they made.  Good luck!
Comment: The problem I was having was actually a problem on the Crashlytics servers.  It was fixed in short order with a phone call.  Using the same bundleID on iOS and Android is not a problem.
Comment: I have the exact same problem. It works erratically, and the build log suggests there was no difference between the time CLS was enabled and disabled. I'll have to make a call too...
Comment: I have the same problem with Version 3.10.1 (129).
And every time I use `CLSLog` I've got an error: `WARNING: CLSLog has been used before (or concurrently with) Crashlytics initialization and cannot be recorded.`
Any solution?
Answer: Make sure you initialize Crashlytics with Fabric before calling any Crashlytics methods:
Fabric.with([Crashlytics.self])

Comment: If you are using Firebase you shouldn't need to do this anymore going by the docs.
Answer: One step I routinely miss is to make sure you've added the build phase on your target:
"${PODS_ROOT}/Fabric/run" ${FABRIC_API_KEY} ${FABRIC_BUILD_SECRET}
and either replace ${FABRIC_API_KEY} and ${FABRIC_BUILD_SECRET} with your key and secret or add custom build settings for each.
Answer: There are apparently cases where Crashlytics does not auto-activate new apps so that they show up under your list of apps, even though everything is coded correctly and data is going to their servers.  In this case, send an email to Crashlytics support (firstname.lastname@example.com) that contains a copy of the info.plist entries for the app in question and they will activate it for you.  I have had to do this several times, especially with app extensions.
Answer: When I finally traced it down in my situation, the error was entirely correct, but not obvious.
I saw these errors in various testing targets where the code we tested was using a custom logging wrapper which called CLSNSLogv(), but the test didn't actually go through the AppDelegate and therefore did NOT initialize Crashlytics. After trying a few things I was convinced that it worked when executed as an app, but in our configuration it was not working under the unit test configuration.
I'll likely alter our custom wrapper to bypass CLSNSLogv() during testing anyway. The biggest benefit of using that is when crashes occur on devices, so we won't be missing anything.


Is Patent US6194720B1 valid in France?

Question: In reference to the patent: US6194720
Is that patent valid in France?
Answer: US Patent grants are not directly enforceable worldwide. On the page you link to, you'll see an Espacenet link - that is a link to the EPO version of the patent, which will have the same description but usually a different set of claims. On that Espacenet page, look for the Legal Status and Patent Family links for foreign applications. Within the patent family I only see a single document - the US Patent grant US6194720 (B1), so it appears that no WIPO (worldwide, international) or EPO (European) application was filed. This means that the patent is only enforceable in the US.

Is Patent US6194720B1 valid in France?


How to send user to the billing information page immediately after logging in?

Question: I am creating a subscription site using Drupal commerce. My site uses logintoboggan  to login a user after creating an account. I am planning to create an order programmatically and then redirect the user to the page where they can enter their credit card information and billing information. I have not figured out how to redirect them to that page yet. Any help would be appreciated.
Answer: Check out Login Destination module - it allows you to define destination rules for logging in/registering users and even use PHP snippets for custom conditions.


Stimulated emission role in laser cooling

Question: Laser cooling can be achieved by exciting an atomic system, in order to "pump" atoms in the excited state. This gives a recoil momentum $\hbar k$ the the atom, which then emits spontaneously. As spontaneous emission is an isotropic process, this does not give (statistically speaking) e recoil momentum to the atom, which is in this way "slowed down" by the laser.
What is was wondering is: in which way stimulated emission can be ignored in this process ? Maybe both spontaneous and stimulated emission happen, but as the latter does not give momentun change (considering both absorption and emission), is considered as irrelevant? Or maybe that's linked to the choice of alkali, which have some sort of particular property?
Answer: You've hit the nail on the head.

Maybe both spontaneous and stimulated emission happen, but as the latter does not give momentum change (considering both absorption and emission), is considered as irrelevant?

This is exactly what happens. If the absorbed photon is emitted via stimulated emission, there is no net change in the momentum and the atom is neither cooled nor heated.
Comment: So stimulated emission is not treated simply basing the study on the statistical point of view? Every brief I've read does not say anything about this, while I think that a word should be spent on this point.
Answer: Cycles of absorption / stimulated emission plays a crucial role in laser cooling. It is true the cycle does not change the momentum of the atom if the absorption and the emission take place in the same photon mode. But photon can be absorbed in one mode, and emitted in a second one.
This results in the so called optical dipole force, which is related to the spatial variations of the light intensity
$$
F(r)=-\frac{3\pi c^2 \Gamma}{2\omega \Delta} \nabla I(r),
$$
where $\Delta$ is the detuning of the light frequency $\omega$ with respect to the atomic transition and $\Gamma$ is the transition linewidth. Note that the involvement of different modes is included in the presence of the gradient - for a single mode (plane wave), the intensity is homogeneous.
This is how we trap optically atoms, before we perform optical evaporation - this is how the lowest temperatures are reached.
To get an alternative picture, the dipole force is related to the reactive part of the response function $\chi$ of the atom to the light. The radiative pressure, which is due to cycles of absorption / spontaneous emission, is related to the dissipative part of $\chi$.


How is Multicast IP mapped to Multicast Mac address?

Question: My main concern is why is the address 01-00-5E- and how? Especially 5 and E??
Comment: This does not pass the "homework" sniff test. (and it's answered by the 30 year old RFC that *defines* the mapping.)
Comment: Basically, someone registered that OUI with the IEEE. Anyone can get an OUI.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
Answer: The 01-00-5E is commonly called the OUI (Organizationally Unique Identifier), which the IEEE (the group which assigns them) calls MA-L (MAC Address Block Large). Don't read a lot more into it than that. A MAC address does have two flag bits (the two least significant bits in the OUI), and the OUI for multicast correctly uses these bits to identify it as a universal, group MAC address.
The OUI for multicast was acquired from the IEEE by the creators of multicast. It cost $1000 for an OUI, which was a lot of money at the time, so the cost was split in half. Each of the two people who put up the money got to own half the addresses possible with the OUI. That means that of the 24 address bits (48 MAC address bits minus the 24 OUI bits), each person got 23 bits for addresses.
That's why the IP to MAC mapping only uses 23 bits when the multicast group part of an IP address requires 28 bits (Class D, multicast, addresses start with 1110 as the first four bits, leaving 28 of the 32 bits in an IP address for the multicast group). Because of mapping 28 bits into 23 bits, each multicast MAC address represents 32 different multicast IPv4 addresses.
Answer:
An IP host group address is mapped to an Ethernet multicast address
by placing the low-order 23-bits of the IP address into the low-order
23 bits of the Ethernet multicast address 01-00-5E-00-00-00 (hex).
Because there are 28 significant bits in an IP host group address,
more than one host group address may map to the same Ethernet
multicast address.

Source: RFC1112
Comment: Basically, every multicast MAC address is used for 32 different IP multicast addresses (28 bits - 23 bits = 5 bits, and 2^5=32).


Inspecting STL containers in Visual Studio debugging

Question: If I have a std::vector or std::map variable, and I want to see the contents, it's a big pain to see the nth element while debugging. Is there a plugin, or some trick to making it easier to watch STL container variables while debugging (VS2003/2005/2008)?
Answer: If you want to watch more than one element at the same time, you can append a comma and the number of elements as so:
(v._Myfirst)[startIndex], count
However, note that count must be a constant, it cannot be the result of another expression.
Comment: I had to do `v._Myfirst(), count` in VS2015.
Comment: small naming difference in Visual Studio 2010 (and possibly other versions?): `(v._M_start)[startIndex], count`
Comment: I had to do `(v._Myfirst + startIndex),count` in VS2010 SP1
Answer: For vectors, this thread on the msdn forums has a code snippet for setting a watch on a vector index that might help.
Comment: For those lazy to follow the link, solution is `((v)._Myfirst)[index]`
Comment: `_Myfirst` didn't work in Visual Studio 2019. I used `__begin_` like this `v.__begin_[index]`
Answer: In VS2005 and VS 2008 you can see the contents of STL containers.  The rules for getting at the data are in autoexp.dat "c:\Program Files\Microsoft Visual Studio 9\Common7\Packages\Debugger\autoexp.dat".
AutoExp.dat is meant to be customized.  However, the STL defs are under a section called [Visualizer].  If you can figure out the language used in that section, more power to you, however I'd recommend just leaving that part alone.
Autoexp.dat existed in VS2003, but there was no support for STL containers ([Visualizer] didn't exist).  In VS2003 you have to manually navigate the underlying data representation.
By modifying autoexp.dat it is possible to add rules for navigating the data representation of your own types so they are easier to debug.  If you do this, you should only add to the stuff under [AutoExp].  Be careful and keep a back up of this file before you modify it.
Answer: To view the nth element of a container in the Visual Studio debugger, use:
container.operator[](n)

Comment: seems easier than the _Myfirst option, I used & to view the raw buffer in the memory window
Answer: You could create a custom visualiser
Check this out: http://www.virtualdub.org/blog/pivot/entry.php?id=120
Answer: Most simply method is you have to ready a pointer to watch variable like this.
vector<int> a = { 0,1,2,3,4,5 };
int* ptr = &a[0]; // watch this ptr in VisualStudio Watch window like this "ptr,6".

I tried "a._Myfirst[0]" in  VisualStudio2015, But It wasn't display array data.
If you can use "natvis", it will resolve your problems.
This is "sample.natvis" for display std::vector data for Visual studio 2015.
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
  <Type Name="std::vector<*>">
    <DisplayString>{{ size={_Mypair._Myval2._Mylast - _Mypair._Myval2._Myfirst} }}</DisplayString>
    <Expand>
      <Item Name="[size]" ExcludeView="simple">_Mypair._Myval2._Mylast - _Mypair._Myval2._Myfirst</Item>
      <Item Name="[capacity]" ExcludeView="simple">_Mypair._Myval2._Myend - _Mypair._Myval2._Myfirst</Item>
      <ArrayItems>
        <Size>_Mypair._Myval2._Mylast - _Mypair._Myval2._Myfirst</Size>
        <ValuePointer>_Mypair._Myval2._Myfirst</ValuePointer>
      </ArrayItems>
    </Expand>
  </Type>
</AutoVisualizer>

Before

After
Comment: Thanks, didn't use the natvis but used the pointer expression in the Watch window, adding the array suffix: `a._Mypair._Myval2._Myfirst, 10` (replace `10` with vector size). BTW it is the only answer mentioning _Mypair and _Myval2, maybe they appeared in VS 2015?
Comment: This could be posted as an answer
Answer: Visual Studio 2008, at least for me, displays the contents of STL containers in the standard mouseover contents box.
Comment: Me too and I'm sure VS2005 did the same.
Answer: You can also right-click any value in your watch, and choose 'add watch'.  This can be useful if you only need to look at one element of a map or set.
It also leads to the solution that christopher_f posted for vectors - ((v)._Myfirst)[index]
Answer: Above discussed method [((v)._Myfirst)[index]] will work only for specific container(std::vector) not for all possible STL containers. For example if you want to see the content of std::deque then you have to look for some other method to browse through the content in std::deque.
Maybe you can try the following similar setting to solve your issue
[I tested this setting only for Visual Studio 2010 Professional version installed with Microsoft Visual studio 2010 Service pack 1]
Step 1: Uninstall the Microsoft Visual studio 2010 Service pack 1 - for my project work I don't really need the Service pack 1 so uninstalling service pack 1 will not cause any issue for my case.
Step 2: Restart your system.
Step 3: This step is not necessary if you are not getting Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt'. Otherwise browse through
Project Property -> Linker (General) -> Change Enable Incremental Linking to No (/INCREMENTAL:NO)
Answer: In vs 2015, I could not get any of these working
so, i wrote a bit of code
1: I had vector of vector of long long elements
std::vector<std::string> vs(M_coins + 1);
for (unsigned long long i = 0; i <= M_coins; i++) {
    std::for_each(memo[i].begin(), memo[i].end(), [i, &vs](long long &n) {
        vs[i].append(std::to_string(n));
        });
}
// now vs is ready for use as vs[0], vs[1].. so on, for your debugger

basically what i did was converted vector into string.
i had vector of vector so i had string vector to fill.
2: if you have just a vector of long long elements, then just convert as below:
std::vector<std::string> s;
std::for_each(v1.begin(), v1.end(), [&s](long long &n) {
    s.append(std::to_string(n));
    });
// now s is ready for use, for your debugger

hope it helped.
Answer: This is old but since I regularly stumble on this post because it is still referenced high on google, as of Visual Studio 2019, one can simply write in the debugger's Watch:
vectorName.data()

(replace vectorName by your variable name) to get a pointer to the content.
Then, knowing the current size of the vector, you can tell the debugger to show you the first N cells:
vectorName.data(),N

(N being the size of your vector)
And if like me, you have a lot of vectors of bytes that actually store another data structure, you can even tell the debugger to interpret the pointer as an array of something else :
(float*)vectorName.data(),4

For example, I have a std::vector of 16 bytes and using that I can tell the debugger to show me an array of 4 floats instead (which is more useful to me than the bytes alone).


Emulator not responding. How to troubleshoot?

Question: I  waited a long time to get the home screen in the emulator, but i didn't get it. How to proceed from here?
Comment: How long have you waited? Kill the emulator and restart it
Comment: No wonder it's slow. Intel HAXM emulator acceleration seems to be turned off. Install the Intel drivers from the SDK Manager to speed things up.
Comment: Your AVD RAM size is higher than that of the HAXM's maximum RAM size.
Comment: Next time try to use more informative title for your question.
Answer: the reason is your haxm is not working is that, that your AVD and HAXM both must be configured to use same amount of memory(not sure if lower memory in avd will work).
you can change HAXM memory by reinstalling it(could not find any better method). during installation you will be asked to enter the desired amount of memory.
and you can change the avd memory from avd manager by clicking on the icon and then editing the avd by clicking the pencil button in the right, then go to advanced settings and you will see the memory option(might need to scroll on lower resolution screen)
Answer: Maybe you can try to use an emulator snapshot.To use a snapshot with your device, open the AVD manager from the Android Studio menu by selecting Tools→Android→AVD Manager, edit the AVD by clicking on the Edit symbol, then check the "Store a snapshot for faster startup" option.
This will save a snapshot of what the memory looks like when the device is running. The emulator will be able to restore the memory in this state without booting the device.
Besides, when you create a new virtual device, you can set its CPU type similar to your development machine(e.g. If your machine use a particular type of Intel x86 CPU, then set your virtual device's CPU to x86 architecture). Also, installing HAXM will help accelerate the speed. You can find it on https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager.
What's more, you can try to use GenyMotion instead of the original AVD.
Finally, running apps on your real device will offer you a more efficiency way to test the code.
In your case, it seems that your HAXM memory configuration(max 1024MB) cannot fullfill the AVD(1536MB) according to the screenshot. So you could adjust the HAXM max memory configuration by running the HAXM installer again. When the installer prompted to adjust the max memory size, set it to a number bigger than 1536MB, such as 2048MB. Then reload the AVD, the HAXM would run correctly, and the speed will improved efficiently.
Answer: use genymotion emulator. It is fast comparing to general emulator. Program execution is fast than general emulator.
Answer: Things you can try,

Your AVD RAM size is higher than that of the HAXM's maximum RAM size. You can see in the log that,
<code>emulator: AVD RAM size = 1536
emulator: HAXM max RAM size = 1024
emulator: You might want to adjust your AVD RAM size and/or HAXM configuration to run in fast virt mode.
</code>

So you need to adjust and set your virtual device's RAM lesser than that of max HAXM RAM size. I would suggest 512mb or 768mb for your AVD.

The first startup can take a while, especially on a slow machine but otherwise try running the adb logcat command to see the log output. That will help you determine what the problem could be.
Delete the emulator and create a new one
Un-check the 'Snapshot' option and restart your emulator.


Will changing your SD card affect your New Leaf Game (Physical)?

Question: Will it affect your New Leaf game if you have the physical copy but use a new SD card once the old one is full?
Answer: All 3DS games save to the SD card. You can migrate your 3DS save files from one SD card to another by using a computer with an SD card reader to transfer the save and update files.
See the articles here for 3DS file management.
Answer: If you have a physical game cartridge of the game, the data should be saving to the cartridge, not the SD card. If you bought the game from the eShop or used a download code, it WILL save to the SD card.


Understanding of support vector machine classifiers and linear separability of data in infinite dimensions

Question: I am unclear on some details on how support vector machine classifiers actually work. I understand the general idea of how they work when the given data is linearly separable, so that we can separate the two classes of data by a hyperplane, and therefore we can also find the maximal margin hyperplane. If however, the input data is not linearly separable then it is my understanding that we map the data to a higher dimension in which the new data is linearly separable and we just find the maximal margin classifier in this new space. In particular, we can use a kernel K and replace the dot product $\langle x_j, x_k \rangle$ in the dual problem with $K(x_j,x_k)$ (here the $x_i$s are our input data). Then by the Moore-Aronszajn theorem, $K$ is the reproducing kernel of some reproducing kernel Hilbert space(RKHS) H, and we have $K(x_j,x_k) = \langle \phi(x_j), \phi(x_k) \rangle$, where $\phi$ is the canonical feature map. So we implicitly map our data to H in which it is linearly separable, and use $K$ in place of the inner product in H. Is this understanding sound? Moreover, what exactly happens when we use the Gaussian kernel? Since the corresponding RKHS is infinite dimensional, what exactly does it mean for the data to be linearly separable in this space? As we can't talk about a hyperplane in infinite dimensions, but it can be shown that the data will always be linearly separable (whatever this means) in this space up to the adjustment of some parameters.
Answer: I think you understand the basic ideas behind kernel SVMs correctly. Do note however, that the RKHS $H$ of a given kernel $K$ is not just any Hilbert space, but also a function space satisfying the reproducing property
$$\langle h, K(x, \phi(x) \rangle = h(x)$$ for all $h \in H$ and $x \in X$. Here I denote $X$ for the sample space, often $\mathbb{R}^d$. In this high-dimensional space $H$ (it may even be infinite-dimensional, as in the case of the Gaussian kernel), we may now find a separating hyperplane. And yes, we may speak of hyperplanes even for these spaces. Admittedly, they do not have a nice geometric visualisation as in the case of two or three dimensions, but from a mathematical point of view, they are simply given by the set
$$\{h \in H : w^T h = b\}$$ for some $w \in H, b \in \mathbb{R}$.
Of course, it is not clear a priori that finding the correct $w \in H$ is a feasible task. Here, the representer theorem comes in: It guarantees that the solution of the kernel SVM actually lies in the finite-dimensional subspace
$$H_X = span( \{\phi(x_1),\dots,\phi(x_n)\}$$
Thus, we do not actually need to work in $H$ at all (what we need from $H_x$ is implicitly encoded in the kernel matrix).
Finally, a word on the Gaussian RKHS $H$. It satisfies the nice property of being universal. This means, loosely speaking, that we can approximate any decision boundary (between the two classes you are trying to classify using the SVM) by a function from $H$. In other words, for all data sets $X \subset \mathbb{R}^d$, there exists some $w \in H_X$ that achieves zero loss on $X$.
You may want to read the introductory chapter of the book "Support Vector Machines" by Steinwart and Christmann (Springer 2008).
Comment: To clarify, when you write $w^T h$ do you mean the inner product? Then for the infinite dimensional case, we are still finding a hyperplane of the form you described, however the representer theorem guarantees that this hyperplane is contained in $H_x$, so we proceed as 'normal' to find the maximal margin hyperplane in this finite dimensional subspace? I will follow up on the recommended text, thanks!
Comment: Yes, $w^Tx = \langle w, x \rangle_H$. And indeed, the representer theorem tells you that you don't have to minimize your loss function over $H$ but over $H_x$. Finally, since kernel methods mostly rely only on the inner products $\langle \phi(x_i), \phi(x_j) \rangle = K(x_i, x_j)$ you don't even need the vectors $\phi(x_i)$, but only the kernel matrix


What "derive" means in this context?

Question: This comes from the book "Black Rednecks And White Liberals" by Thomas Sowell
"Attempts to derive the black manner of speaking
from slavery and its parallel among whites as an influence from black speech were answered by a Southern historian who asked, "from whence came the drawl of the people of the upper Great Plains and of the Blue Ridge, Smoky, and Cumberland Mountains, who have had little or no contact with the Negro?""
I found this definition for "derive"
3. (tr) to trace the source or development of
Is this the correct definition?
does "trace" in this definition mean:
c. To locate or ascertain the origin of: traced the money to a foreign bank account.
What is confusing to me is that the sentence from the book says "derive from" So there were "attempts to derive the black manner of speaking from slavery"
but the slavery itself is the source of black speech they were looking for.
Answer: Yes, trace is the correct definition of derive in this context.
What the sentence is trying to say is that they were trying to trace the source of the black speech to slavery, so yes, they were considering slavery to be the source of the black speech.

What "derive" means in this context?