In hinduism how has "Kala" or time been described?

Question: How exactly time has been defined? And are their any stories related to starting and ending of time in Hinduism scriptures?
Comment: See [Why Lord Shiva is depicted as Lord of Time?](http://hinduism.stackexchange.com/q/8637/3500)
Comment: Good question , on understanding/ descibing  "time", in a different way.
Comment: @iammilind - Yes thanks for pointing out. I was quite  new when I asked this question actually. And even i didn't knew the answer very well at that time. But i wanted the definition of Time from Hinduism point of view i.e. like it's how we define things in science. Accepted answer is not actually what i really wanted to know.
Comment: @iammilind -Anyway it's ok ,we can close this as duplicate. I will again ask a similar question as i haven't described what i really wanted from answer. :-)
Comment: Yes I understand. Most of the time answers in proposed duplicates don't satisfy the OPs. Yet the main intent of them is to redirect the new answers. Since that Qn is older & equally broad as yours, it's better if the new answerers post their answers in that thread. You can quickly close by clicking that blue button appearing above your Qn.
Comment: @iammilind - Yes you are right. But I got what I was looking for from Puranas. They are although not defining the entity "Time" in scientific language ,but they are describing it's properties. For e.g. Shreemad Bhagvatam is stating the properties of time in general. According to this purana time is the most powerful thing and nobody can escape from him therefore one should always be cautious etc. and lot's more. Will give u exact verse no. etc.later on.
Answer: Lord Krishna(Narayan) is the Lord of Time

Lord Krishna(Narayan) Himself is time like he is mentioned in Bhagvad Gita:
प्रह्लादश्चास्मि दैत्यानां कालः कलयतामहम् ।
मृगाणां च मृगेन्द्रोऽहं वैनतेयश्च पक्षिणाम् ॥ (Chapter 10, Solka 30)

Meaning:

I am the water-god, and the manes. I am the controller of death. I am the time or death among the healers, lion among the beasts, and the king of birds among birds.

There are many scriptures which is provided the time/kal details

In Vishnu Puran
Accroding to Cosmic Time

Accroding to earth Time

Accroding to Vishnu Purun chapter III (Theory) (Tables already inculded this information with in it)

Measure of time. Moments or Káshthás,; day and night; fortnight, month, year,divine year: Yugas, or ages: Maháyuga, or great age: day of Brahmá: periods of the Manus: a Manwantara: night of Brahmá, and destruction of the world: a year of Brahmá:his life: a Kalpa: a Parárrdha: the past, or Pádma Kalpa: the present, or Váráha.
MAITREYA.--How can creative agency be attributed to that Brahma, who is without
  qualities, illimitable, pure, and free from imperfection?
PARÁSARA.--The essential properties of existent things are objects of observation, of which no fore knowledge is attainable; and creation, and hundreds of properties, belong to Brahma, as inseparable parts of his essence, as heat, oh chief of sages, is inherent in fire.Hear then how the deity Náráyána, in the person of Brahmá, the great parent of the world,created all existent things.
  Brahmá is said to be born: a familiar phrase, to signify his manifestation; and, as the peculiar measure of his presence, a hundred of his years is said to constitute his life: that period is also called Param, and the half of it, Parárddham. I have already declared to you, oh sinless Brahman, that Time is a form of Vishnu: hear now how it is applied to measure the duration of Brahmá, and of all other sentient beings, as well as of those which are unconscious, as the mountains, oceans, and the like.
Oh best of sages, fifteen twinklings of the eye make a Káshthá; thirty Káshthás, one Kalá;
  and thirty Kalás, one Muhúrtta. Thirty Muhúrttas constitute a day and night of mortals:
  thirty such days make a month, divided into two half-months: six months form an Ayana
  (the period of the sun's progress north or south of the ecliptic): and two Ayanas compose
  a year. The southern Ayana is a night, and the northern a day of the gods. Twelve
  thousand divine years, each composed of (three hundred and sixty) such days, constitute
  the period of the four Yugas, or ages. They are thus distributed: the Krita age has four
  thousand divine years; the Tretá three thousand; the Dwápara two thousand; and the Kali age one thousand: so those acquainted with antiquity have declared.
  The period that precedes a Yuga is called a Sandhyá, and it is of as many hundred years as there are thousands in the Yuga: and the period that follows a Yuga, termed the Sandhyánsa, is of similar duration. The interval between the Sandhyá and the Sandhyánsa is the Yuga, denominated Krita, Tretá, &c. The Krita, Tretá, Dwápara, and Kali,constitute a great age, or aggregate of four ages: a thousand such aggregates are a day ofBrahmá, and fourteen Menus reign within that term. Hear the division of time which they measure.
Seven Rishis, certain (secondary) divinities, Indra, Manu, and the kings his sons, are created and perish at one period; and the interval, called a Manwantara, is equal to seventy-one times the number of years contained in the four Yugas, with some additional years: this is the duration of the Manu, the (attendant) divinities, and the rest, which is equal to 852.000 divine years, or to 306.720.000 years of mortals, independent of the additional period. Fourteen times this period constitutes a Bráhma day, that is, a day of Brahmá; the term (Bráhma) being the derivative form.
At the end of this day a dissolution of the universe occurs, when all the three worlds,earth, and the regions of space, are consumed with fire. The dwellers of Maharloka (theregion inhabited by the saints who survive the world), distressed by the heat, repair then to Janaloka (the region of holy men after their decease). When the-three worlds are but one mighty ocean, Brahmá, who is one with Náráyana, satiate with the demolition of the universe, sleeps upon his serpent-bed--contemplated, the lotus born, by the ascetic inhabitants of the Janaloka--for a night of equal duration with his day; at the close of
  which he creates anew.
Of such days and nights is a year of Brahmá composed; and a hundred such years
  constitute his whole life. One Parárddha, or half his existence, has expired, terminating with the Mahá Kalpa called Pádma. The Kalpa (or day of Brahmá) termed Váráha is the first of the second period of Brahmá's existence.

You can also refer Shrimad-Bhagvad Puran, For More details of Creation of this world and minute details of creations and time.
Comment: Accroding to Vedas/Purans there is no such definition in Hinduism,Because Time is Described as Eternal in Hinduism, Time  never dies, I already Described **Time = Lord Krishna(Narayan)**, So as per my point of view, I can say **Time is endless, eternal and the  Potency/Power of Lord Narayan**.
Comment: 3.11 years actually means 3.11 quadrillion years (thousand-trillion), right?
Comment: Which 'Skanda/Adhyaya/verses' in 'Shrimad-Bhagvad Puran' contains Creation of this world and minute details of creations and time? So that I can refer. Thanks.
Answer: The calculation of time with respect to atom is mentioned in third canto of Srimad-Bhagavatam in great detail.
Time is the energy of Lord Hari.(SB 3.11.3)

Time is the potency of the almighty Personality of Godhead, Hari, who
  controls all physical movement although He is not visible in the
  physical world.

Atomic time as well as gross time(as we know it) is described in subsequent verses.

Atomic time is measured according to its covering a particular atomic
  space. That time which covers the unmanifest aggregate of atoms is
  called the great time.

Division of Gross Time:

two atoms make one double atom, and three double atoms make one
  hexatom. This hexatom is visible in the sunshine which enters through
  the holes of a window screen. One can clearly see that the hexatom
  goes up towards the sky.
The time duration needed for the integration of three trasareṇus is
  called a truṭi, and one hundred truṭis make one vedha. Three vedhas
  make one lava.
The duration of time of three lavas is equal to one nimeṣa, the
  combination of three nimeṣas makes one kṣaṇa, five kṣaṇas combined
  together make one kāṣṭhā, and fifteen kāṣṭhās make one laghu.
Fifteen laghus make one nāḍikā, which is also called a daṇḍa. Two
  daṇḍas make one muhūrta, and six or seven daṇḍas make one fourth of a
  day or night, according to human calculation.
It is calculated that there are four praharas, which are also called
  yāmas, in the day and four in the night of the human being. Similarly,
  fifteen days and nights are a fortnight, and there are two fortnights,
  white and black, in a month.

Then 12 months constitute a year. That around 43 Lakh years make one Chatur-Yuga(Divya-Yuga) etc has been described in detail in Shree Krishna's answer.
Comment: Yes ,  it's a nice  answer.
Comment: @UdayKrishna - Also there is very good description about interplanetary distances in Bhagvatam.They are mentioning lots of other distances in figures also.
Answer: we basically follow time calculation system called Kalpa...a day of brahma is of 4320000000 yrs & so much length is night too...like this 360 day+nights in 1 yr & his life span is of 100(in brahmanda puran it is 108) yrs...now we r at 51st yr's 1st day's 7th manvantar's 28th kaliyuga's 5117th yr...world starting is said like a bubble from karanodakshayi vishnu's body rises..just like story of chinese pangu in 1000 yrs it breaks & 1 man appears...he is brahma & after his 1st day the brahmanda gets filled with water & there appears & resides garbhodakshayi vishnu on who's navel lotus next day brahma rises...btw time speed is different at different places like our 1 yr is 1 day+night of heavenly gods..our 1 month is 1 day+night of pitr...any more further info u need tell me!:)
& sorry i have to find iskcon's those so many articles like on 1 article i can't tell i got all this info...it took various articles but iskcon will support as yes they do say so!sorry my tantrums again but pls pardon as i have a point in answer so..sorry me very casual type guy so pardon pls pls i can prove why my answer right but tell me what exactly i didn't told so as all i understood was this & i know i m mistaking somewhere so...
Comment: You should cite sources.


How do I get even lighting across a model? Blender 2.82

Question: I want to texture bake, but the lighting causes the final product of the bake to be affected with dark areas. How do I get even lighting across the model or fix the problem in general?
Comment: Can we get some visuals?
Answer: Turn up the value of the world's color.
Say we start with some object that I have a few lights on, but in an otherwise empty scene;

I turn off my collection of lights, then make the color of the world shader pure white;

Result;
Answer: To get even lighting across your whole model you could use a very big plane with an emission shader, so the shadows will be minimized. Or you use a hdri-Environment with just a white image, so it creates an even light-dome around your model. Another solution could be just one color solid white for the environment. All the best Marco


What are some of the ways you can cue in your reader that your chapter is a timeskip to the past?

Question: What are some of the ways you can cue in your reader that your chapter is a timeskip to the past? Let's say you write a chapter just to go back in time and reveal some details about some characters' pasts, how do you cue in your reader without literally telling them there was a time skip?
Comment: As a reader I really prefer to have a clear message if a chapter is suddenly in a different time compared to what I just read, unless you intend for people to be confused. Because if you don't come straight out to say it, people will miss it and wonder "wasn't he dead? why does he have an arm again? how did we get here?" and on and on.
Answer: Use the story
The most organic way to show a broken timeline is to use the story itself to show where in the chronology things happen (as opposed to dates in chapters, or mentions in the narrative description, etc).
Long time jumps
Here are some ways to show long time jumps:
Use a distinct before and after state. Maybe someone is dead after and alive before, so if they are alive, we know it's before. (E.g. the character's parents or grandparents...)
Character age can be used. For instance, if some characters are children in the past and adults in the present they would do different things (go to school instead of work) and may even think and speak differently. (E.g. loudly insisting their secret friend should have a seat at the dinner table and throwing a tantrum if that is denied...)
Characters' relationships might be different in the past and present such as marriages, divorces, friendships, etc.
If you're jumping way back in time, setting and society can also be used to show which time we're in. If everybody is going crazy about the Beatles we're not in 2021 anymore...
Big events can be used to show a before and after. Just to mention one aspect, flying in July 2000 was completely different from flying in October 2001...
Short time jumps
If your time jump is shorter, meaning the general world is the same before and after, you show the chronology, for instance by having plots converge in one or a few scenes. Show the same scene from different perspectives or have one plot show the beginning of the scene and another the end.
You can also use cues like sound, TV news, or other common/"global" information to show what time in the chronology we're at, and thus if your chapter is before, simultaneous with, or after other chapters.
Also, see this question and its answers for more ideas on chronology handling.
Answer: First think carefully about just how much of the character's back story is actually important, relevant, and necessary. Often one finds that a tangential mention of a particular event is enough without reliving the whole thing in technicolour.
If you decided you need the whole flashback chapter then:
X/I still remember(ed) the day that... and proceed to tell the story of your past event in third or first person as appropriate. Is an effective flashback structure if you're careful to keep your tenses straight.
Answer: The point about the timeskip is to reveal a character's (or situation's, or object's) background - ie, the character was different then. Before the big crucial detail/reveal you're leading up to, think what other details you could include to show these differences - for example in a story about a military general, starting the flashback with 'Private joe bloggs ...' would be an easy one.
As per @ash's answer, keeping a close control over what tenses you're using will be important.
Answer: Have each chapter begin with a timestamp.  The time stamp should be consistent in format and not the time of day on a clock (I prefer using military time (i.e. 0000-2359, as it saves three characters (a colon and an AM/PM designator)), the date on the calendar, and the calendar year.   If you are traversing time zones as well, then make sure you account for the local time of the scene in your time stamp with a designated time zone (most zones will go to a major city in that time zone although it always helps to look up the difference) and make sure you account for the difference in your story's chronology.  For example, if chapter 1 is 1200 PST (L.A.) and chapter 2 is 1200 EST (D.C.) then you've gone back in time 3 hours.  However if it's 1400 9/7/year EST (D.C.) in chapter 1 and 0300 9/8/year JST (Tokyo) in chapter 2, the two chapters happen simultaneously since Japan is 13 hours ahead of the Easter U.S.  (By the way, this discrephancy in dates caused Japan to recieve a charge of a war crime against the U.S. and U.K. in WWII.  In international war, surprise attacks.  Suffice to say according to Japan, they attacked and declared war on December 8th... but the U.S. maintained the attack was on the 7th and Japan declared war on the 8th, ignoring that U.S. Territory and allied territory was attacked at the same time as Pearl Harbor in the early morning of the 8th.).
Comment: "I prefer using military time (i.e. 0000-2359, as it saves three characters (a colon and an AM/PM designator)". Why is it so important to save three characters? You're probably not even saving any space, because it'll be on its own line. Anyway, I thought this was what OP didn't want to do.
Answer: A hint
You can, a few chapters before the timeskip give the hint of the event which will be covered in the timeskip, somewhat like "this-this happened back then" From dialogue, internal thoughts etc. You can get quite creative here. And when the timeskip does come, you can play the event. This would work when you're going back to the past, from the present.


Audio amplifier hardware

Question: We design a wooden box with a high-quality speaker inside. Inside the box we have a Raspberry Pi 2, which generates music. We need about 15 Watts power for the speaker, max. We could amplify the output of the phones jack. A better solution might be the onboard connector P5. Is there dedicated Raspberry hardware that connects with P5 and delivers enough power for "loudspeakers"?
Answer: One nice solution would be to use TDA7297 stereo amplifier IC (2x15 watt stereo), and build a custom PCB:

You can even buy an amplifier based on this IC from Amazon:
http://www.amazon.com/TDA7297-Version-Audio-Amplifier-Dual-Channel/dp/B00FR7PDUS

I've tested this circuit, and it works fine with RPi.
Answer: Have a look at the Hifiberry products while the "newer" products use the GPIO pins, the Amp+ (DAC + amplifier) and the DAC+ board share the following pins (see here  GPIO usage):

GPIO 2 and 3 for configuration
GPIO 28 through 31 for the sound interface

but the "older" DAC (not DAC+) on the other hand does not use any of the GPIO pins but the onboard sound connector P5. However it only works with the older Raspberry Pi models A and B - which makes me wonder why you seek to use the P5 connector with a Pi 2.

Disclaimer: I am not using any HiFiBerry boards as of now, so this answer is based on the available documentation only.

Audio amplifier hardware


com.qualcomm.embms keeps popping up every few minutes

Question: In Lenovo Phab, a message : "Unfortunately, com.qualcomm.embms has stopped." keeps popping up exactly twice every few minutes, to which I've to click 'OK' every time.
I've tried force stopping it from the settings manually but it's still going on. I've scanned the device with McAfee but there are no threats. But a Quadrooter scan tells me I've the following vulnerability : (CVE-2016-2504).
Is it possibly popping up because of that? Or is it just a bug? What should I do to make it stop popping up? Help would be appreciated.
Answer: A new widespread vulnerability that affects millions of Android devices around the world could allow hackers to read your SMS text messages, phone records, and perform any capabilities the radio allows.
This hack involves the netd daemon, which is the network interface in Android. The problem arose when Qualcomm released new Application Program Interfaces (APIs) as part of the network_manager system service, which also involved the netd daemon. These APIs allowed additional tethering capabilities.This vulnerability is labeled as CVE-2016-2060 with a medium risk.
Devices ranging from Gingerbread to Lollipop are likely affected. So, if you can upgrade your android that would be the best option.
Also, The FireEye Mobile Security app will detect the Qualcomm vulnerability, but it's only for enterprise customers. If you have a corporate phone, check with your administrator to find out if your company subscribes to the service.
The good news is that FireEye has been monitoring the use of the API, and hasn't found any occurrences of it being exploited. However, that could change as hackers learn of the flaw.
Looking at the big picture, it's still more unlikely than likely that you will fall victim to an attack.
You can read more about this issue in this blog.


special needs kitty! Hiding and won't come out. Should I have adopted her brother to

Question: We got a black kitty from the pound she had been there almost 6 months after being taken by the human society from a crazy cat ladies home. She is affectionate when she is out. But on any strange street sound she hides and we can't find her. She had a brother and a sister there to. But we only adopted her should we have adopted the brother also to make her comfortable?
Comment: https://pets.stackexchange.com/questions/17578/first-time-owning-a-cat and https://pets.stackexchange.com/questions/19815/fearful-3-year-old-adopted-cat may also have good information for you
Answer: How long has it been since you adopted her? It can take some cats up to a year to adjust to a new home, new people, new sounds and smells. when I adopted my cat, she spent the entirety of the first month at home hiding under the dresser, leaving only to eat and use the litterbox and only when she thought no one was in the room. Now, she is very friendly almost never hides. So my recommendation is just to give it some time and see how she does
Comment: Thanks! She is real affectionate when we have seen her. So if time is all I need I will be pleased.


2014 Honda Accord starter problem, it cannot start intermittently

Question: My Honda according 2014 only has 38000 miles. When first time cannot started, I changed a new battery. It was good for 4 or 5 months. My car is with a key to start. Then some time it started fine. Now it ,ore often cannot start. No click noise. All light signals are good. The dealer charges a lot just for diagnoses. What I should do?
Comment: Welcome to Motor Vehicle Maintenance & Repair!  So, if I understand correctly, your turn signals work (and probably headlights too?), but when you turn the key nothing happens?  That sounds like an ignition relay or solenoid to me -- you could look up those parts and change them.  Both of them are pretty cheap and pretty easy to replace.
Answer: My '02 Honda Accord has an ignition relay that went bad. Check that. On my Accord it is in the top left most part of the engine compartment. Separate from the fuses.
When it happened to me I changed the spark plugs to a noticeable performance improvement, but didn't fix the problem. I brought it into the dealer and they identified it as the relay. Cheap part. And the cost of repairs is subtracted from the diagnoses at my Honda dealer. So if the diagnoses costs $129 but the job is only a $150 job, Honda in my past only charges the difference. Meaning you would pay the $150, and not $279. Similarly if the job is a $50 job, they would only charge you $129.


Add multiple rows in Lightning component

Question: I am new to lightning. I have one requirement and I am not sure how to achieve it.
any help is appreciated.
Requirement is :
we have to build custom lightning component, where in user will key in few details. User can also click on (+) button to add new row below the existing row and user should be able to key in other set of records, like wise user can add multiple rows dynamically and click of (-) will remove the inline row. On click of (save) button all the info should be saved at backend. below image is just the mock up that I need to develop.

The input data the user is keying in can be of any object(Standard/ custom) or can be wrapper class type based on the information we want the user to key in. but it will only one either of two.
Comment: Will this [answer](http://salesforce.stackexchange.com/a/121672/20830) help you out?
Answer: You can use the following example -> Handler change not working with attribute updated inside aura:iteration
Then behind "+" and "-" buttons, update the value of SomeList , then the screen will automatically be rerendered so if u removed an element, it will disappear, and if you added one it will appear :)
Answer: This is precisely what you want.
Answer: You can try and build a wrapper Class with your Input 1,2,3,4,.. and then try to bind a List of CustomWrapperClass Objects with an <aura:iteration items="{!v.myCustomWrapperObjectsList}">.
Whenever user adds a new row, all you need to do is call a custom method from controller and refresh your List<CustomWrapperClass>.
Now whenever the user hits the 'Save' button all you need to do is call an action and invoke an Apex method where you pass this List<CustomWrapperClass> as a parameter and save/commit the data in your custom object or wherever you need it.
Please read on aura:iteration docs from Salesforce if you need help.
Also comment if you need help in structuring your code.


Can a non-indian spouse claim rights/share in Indian properties on divorce?

Question: I am a divorced Indian citizen in USA and have grown up kids in India. I am going to get married to a non-Indian citizen in USA. She has German citizenship and will still have her German citizenship after our marriage. We plan to register the marriage in USA and Germany too. But, we haven't planned to register it in India or Indian consulate yet. I have some real estate and other financial establishments in India. In case of divorce, can she claim her rights in the establishments which are in India? I want to protect those properties and establishments for my children in India. Will a prenup made in USA between an Indian and non-Indian recognized in India? Can it be enforced it in India?
Answer: She is not Indian citizen. You are registering marriage in USA & Germany. You are not Indian resident. So It depends on Alimony provisions of USA & Germany.
If you want to protect your properties for your children in India, Transfer your properties to your children. If you want to have control over properties, Transfer the ownership but get appointed as trustee of those properties until they get adulthood or married.


Using Wii U on wireless network with username and password

Question: I just moved into college, and the wireless network on campus requires a username and password. When I tried connecting my Wii U to the network, there was no field for username. Am I unable to connect to the network? I then noticed there's no ethernet port on the Wii U. Can I use a USB to Ethernet adapter?
Comment: @Frank: some wireless connection types *can* have usernames/passwords as part of the connection process, such as WPA-2 with PEAP, but they are very much in the minority. It's quite likely the Wii U won't support these methods, as they're pretty much limited to enterprises -- if that's what is used, user is probably out of luck. JShoe: when you connect on your PC/Laptop/whatever, does it ask you when you connect or when you open a browser?
Comment: I can only comment on the second part; yes you can use a usb Ethernet adapter. You should be able to use any adapter, but Nintendo does sell their own branded one.
Comment: Wireless access points don't need usernames.  If it asks for one, use a browser.  It should get you to a login screen.
Comment: @TZHX Huh.  I've never run into a wireless point that needs a username.  Most often, it's a gated browser site that limits access, most likely due to these other types not being supported that easily.
Comment: @Frank as I said, they're in the minority. But, for example, the eduroam network used for wireless access on many university campuses in Europe uses it.
Comment: @TZHX When I connect. Definitely not a browser thing.
Comment: @JShoe then I'm afraid you're probably out of luck. :(
Comment: @Frank When a network is using EAP authentication it can require a username token. My college did the same thing.
Answer: Does the WiiU Setup panel complain that it can't connect?  Or does it seem to consider itself connected yet programs will complain that they can't access other sites?  That is, the WiiU's Setup page shows a connection between WiiU and 'network device', but then fails between 'network device' and 'internet'?
If the former, I have no ideas.  But if the latter, then:
It may be that the wireless network actually lets anybody 'connect', but until you provide a school username-and-password it just responds to every single network request with a login-page.  If that's the case, try starting the WiiU's web browser, and see if you can get that login-page.   Once the network believes that your wireless-card belongs to an authenticated user, it will start honoring all further requests from it.
(This is a common approach to networks, and this sol'n has nothing to do w/ a Wii U per se, and might apply in any situation where you try to connect with anything besides a browser.)
...Apologies if you already knew/understood all this.
Answer: If Not-Just-Yeti's suggestion doesn't work, you can try setting up the connection manually.
I'll assume you were using the automatic setup method on the Wii U. This is good for most users, but the network you'll be connecting to is not typical.
Take some of your cues from the Nintendo support page on connecting your Wii U to the internet:

From the Wii U Menu, select "System Settings."
Using the Left Stick, select the "Internet" icon and press the A Button.
Tap "Connect to the Internet."
Tap "Connection Types" or press the Y Button.
Select "Manual Connection."
Tap "SSID" and enter your Wi-Fi network's name (case-sensitive).
Tap "Security" and select your encryption method, then enter in your Wi-Fi network's security key.
If you are using a proxy server, tap the arrow to the right, select "Proxy Settings," and enter in your proxy information (most networks do not require this configuration).
When finished, tap "Save "or press the B Button.
Tap "Save" again.
Tap "Connection Test" to test your connection.
Tap "OK" if the connection test was successful.
If you receive an error, click here and enter your error code into our error code lookup tool.
If you wish to set this network as your default network, tap "Set."

This is how you use the manual configuration settings for the Wii U. They're actually pretty powerful. If you're unsure what details you need to connect your system, give the help desk of your institution a call, and tell them you need help connecting a device to the network, and that you are needing to configure manual settings on the device. They should be able to provide you with the details of the network including security, proxy information, etc.
Best of luck!


Mean encoding With KFold regularization

Question: I just learned that regularizing the mean encoding reduce the leakage hence generalize better than mean encoding without it but I made 2 submissions with XGB in predict future sales competition on Kaggle  with the naive mean encoding method and got RMSE = 1.152 and with 5 folds validation and got RMSE = 1.154 which was a surprise for my. Can any one explain why this may happen ? also after making the kfolds regularization every item_id has multiple mean encoding one for each fold so should I leave the train set in this format or take their mean ? also when applying this to the test should I take the mean and apply it or what ?
I'm encoding the item_id with the target which is the number of sold items :
Naive method :
all_data['item_target_enc'] = all_data.groupby('item_id') ['item_cnt_month'].transform('mean')

Regularization :
kf = KFold(n_splits = 5 , shuffle = False)

for train_ind, val_ind in kf.split(all_data) :

train_data , val_data = all_data.iloc[train_ind], all_data.iloc[val_ind]

all_data.loc[all_data.index[val_ind] , 'item_target_enc'] = val_data['item_id'].map(train_data.groupby('item_id')['item_cnt_month'].mean())

all_data['item_target_enc'].fillna(all_data.item_cnt_month.mean(), inplace=True) # fill na that happened from values in validation not in the train with the global mean

Here is the encoding result with regularization for each item_id i got an array which was confusing for my to take the mean or not :
Comment: https://contrib.scikit-learn.org/category_encoders/
Answer: Try this.
item_target_enc= df.groupby(['item_id'])['item_cnt_month'].mean().to_dict()

df['item_id'] =  df['item_id'].map(item_target_enc)

Mean encoding With KFold regularization


How I do a system restore?

Question: Problem I Faced

I installed something that crashed my Wifi drivers that I compiled earlier.
Un-installing the same package doesn't helped.
Finally, I re-compiled my wifi drivers and things are good.

My Question
But, is there anything like System Restore or System Rollback in Ubuntu/LinuxMint?

Is there anything that can undo an apt-get install package command?
Comment: System breakage is a serious problem in Linux, there must be something like `System Wide UNDO` ?
Comment: Think outside the windows box (and Google your question). You can just zip up whole chunks of your system, but saying that system failure is a serious problem just isn't true. I run Linux on all of my computers (bleeding-edge Arch Linux, so stability should suffer), and I have yet to see my computer crash or malfunction. Did I mention the computers have been running Arch for 2-4 years each?
Comment: @Blender I am a 100% Linux user from 2 years now. Although I hate Windows System restore, but in linux some times X updates break your graphics, there should be something like sandbox or somthing.. to undo that.
Comment: It might have been worth doing an apt-get purge on the package that broke your system since this is supposed to remove any settings associated with it.
Answer: There is a software for Linux called Timeshift exactly for this purpose. Using Timeshift you can take snapshots of your Linux system regularly and restore them whenever you need.
This software brings System Restore feature of Windows to your Linux distribution.
A short description from its official website:

TimeShift for Linux is a application that provides functionality similar to the System Restore feature in Windows and the Time Machine tool in Mac OS. TimeShift protects your system by taking incremental snapshots of the file system at regular intervals. These snapshots can be restored later to bring your system to the exact state it was in at the time when the snapshot was taken.
Snapshots are taken using rsync and hard-links. Common files are shared between snapshots which saves disk space. Each snapshot is a full system backup that can be browsed with a file manager.
Comment: That sounds nice, but if I haven't taken snapshots already, I can not take advantage of it. :/ right?
Comment: That should be part of the official release
Answer: Actually, there are few things in Ubuntu et al. that will allow you to roll-back changes.  Brief below:

/var/backups/dpkg.status.*: this directory keeps a set of log of the last system state prior to an install as follows; /var/backups/dpkg.status.0 is the most recent log prior to a state change (e.g. package install/remove/update ...etc); /var/backups/dpkg.status.?.gz are compressed, archived versions of the logs at various points in time, rotated monthly.
/var/lib/dpkg/status: this is the current state of installed packages.  Manually backing this up, or providing a logrotate script in /etc/logrotate.d will ensure schedule snapshots of your system state to your liking.
Roll-back: the corner stone is your previous state /var/backups/dpkg.status.0.  Here is a brief step-wise procedure to restore previous package state (note brief and not exhaustive).
a.  cp /var/backups/dpkg.status /var/lib/dpkg/status (will revert back the package state one version back).
b. dpkg -l | grep ii (will give you a list of supposedly installed packages based on the rolled-back /var/lib/dpkg/status file achieved in step a. above).
c.  dpkg -l | grep ii | awk '{print "apt-get --reinstall -y install", $2}' > /tmp/reinstall && sh /tmp/reinstall (will create a simple one-liner shell script and runs that to reinstall packages determined to have been on the system prior to an apt-get operation)
d. apt-get --reinstall install ucf (will take care of sanitising /etc config files et. al)
e. Repeat step c. if/as necessary

With a minimal bit of luck, you should be OK.
Answer: The complement of apt-get install package is apt-get remove package. To remove all associated settings too, you need to run apt-get purge package.
Note that these commands rely on the uninstallation scripts provided with the package. All packages in the main repository I know of do their job of uninstalling very well. This may not be the case for third-party packages.
As for your driver issue, there are a few possibilities why installing a package broke your wireless driver:

The driver has a post-installation hook which is executed when a condition is met, e.g. kernel updates
The package overwrote a file that the wireless driver depended on
The package in question was a kernel update but the driver does not have a post-installation hook for recompiling the driver (most likely)

As for the "System rollback" / "System Restore" features, the closest feature you'll get is a system image using software like Clonezilla. Unfortunately, this cannot be done within a running system and must be performed from a Live CD.
Answer: There is no such feature in Ubuntu like "Restore to previous state" in Windows. You should have taken backup, to restore the machine to an earlier stage. Seriously I am also missing this feature. There are many tools but none of them work like Windows Restore point nor Macs Time Machine.  Let's see if things get better in backup in Linux.
Answer: btrfs has/will have some nifty snapshot features that should be able to handle this sort of stuff. Just keep your data in one filesystem and your system in another, and use periodic (daily? weekly?) snapshots, then roll back whenever problems arise.
Comment: The apt-btrfs-snapshot package automatically snapshots the root subvolume whenever apt does things with packages, making it easy to roll back.
Comment: Ellaborate.. please.
Comment: http://lmgtfy.com?q=apt-btrfs-snapshot
Answer: Apart from Timeshift and the /var logs mentioned, you can also use etckeeper to guard against ruining config files in your /etc directory and not having backups to restore to. It uses a VCS.

How I do a system restore?


What is the difference between pseudoscience and non-science?

Question: Within the scope of the problem of demarcation there seems to be an implicit distinction between pseudoscience and non-science. Trying to make explicit what such distinction might be, I wonder: Does the difference between pseudoscience and non-science amount simply to the fact that the former "pretends to be scientific" whereas the latter does not? --- What does it really mean for some theory "to pretend to be scientific"?
(And, could it be that theories we might consider pseudoscientific at present time, would turn in future into scientific ones (just as it happens from time to time with non-scientific theories that evolve into scientific ones?))
Comment: You might also find useful information in the following answer: http://philosophy.stackexchange.com/questions/22820/when-did-psychology-separate-from-philosophy-and-become-a-science
Comment: Thanks a lot; sorry  - was not aware of these. I asked a slightly different question but those you refer me to will do perfectly fine, as they're close enough. Thanks again.
Comment: That happens a lot, no need to be sorry.  That is why the mechanism for voting to close as a duplicate exists.
Comment: Oh I see...Well, thanks for this thoughtful sensitive note. Will keep it in mind.
Answer: I think that pseudoscience is a field that makes scientific claims but is not science, thus giving off the impression that it is scientific. I think it's important to not make it something the practitioner does (such as "pretends to be science") because even if someone stands up an repetitively says "I'm not doing science" that shouldn't change our perception of his field, and I do think that pseudoscience is a description of a kind of field of knowledge.
Comment: i think it would be more accurate to say that pseudoscience is a description of a kind of field of **pseudo**knowledge.
Comment: Maybe 'pretends' is too strong, but I think claiming to be scientific is a part of pseudoscience. Astrology and numerology might well be called pseudosciences because their practioners make claims that they have predictive value and that they contribute to our understanding of how the world works. In this, their claims resemble those of science, but they are false. By contrast, aesthetics is non-science, but doesn't claim to be, so it is not pseudoscience.


Can we enter the UK with Blue Cards issued by Romania?

Question: I am an Irish national and my non-EU wife and son (Indian) have EU family cards issued by Romania (long-term residency valid for 5 years). Can my son and wife travel to the UK for a few days with me to watch a soccer match?
Comment: You can find out here https://www.gov.uk/check-uk-visa
Comment: This is an other site you can use to check whether they need visa: https://www.iatatravelcentre.com/passport-visa-health-travel-document-requirements.htm
Answer: I have an EU Blue Card and I am pretty sure that your family will need a Visa to travel to the UK. Most of the websites where you need to check the availability of Visa for travel do not state exceptions if one holds EU Blue Cards/Green Cards etc. The main basis for entry depends solely on the fact that which Passport you bear.
In a synonymous situation, if you are an American Green Card holder but you still have a passport that requires a Visa to travel to a certain country; you will still need to apply for a Visa.


logistic regression. How to get dual function?

Question: Given pairs $(x_i, y_i), x_i \in R^n , y_i \in R$ we want to solve minimization
problem (logistic regression):$\min \frac{1}{2} ||w||^2 + \sum_i^{i=m}\log(1+\exp(-y w\cdot x_i))$. How to do that? I know the dual form is:
$ \min_{\alpha} D(\alpha)= \frac{1}{2}\sum_{i, j}\alpha_i \alpha_j y_i y_j x_i \cdot x_j + \sum_i\alpha_i \log(\alpha_i) + (C-\alpha_i)\log(C-\alpha_i)$, subject to: $0\le \alpha_i\le C$. How to get dual?
Comment: What are you precisely asking about? Is this a homework?
Comment: This is really a mathematical question, but it needs improving before it can be migrated.  First, what kind of "dual" do you seek?  Second, what is $w$?  Third, why doesn't $w$ appear in your putative dual form?  Fourth, there are some typos; *e.g.*, $y$ needs to be $y_i$.  Fifth, this does not appear to be any form of logistic regression (perhaps because of the typos): what exactly is the connection?
Comment: @whuber, there are typos, but why do you say it's not a form of LR?
Comment: @Pardis I might be able to see a connection once the argument of $\exp$ is clarified.  In its current form it does not appear to be related to a log probability.
Comment: I added the explanation to my answer below.
Answer: Tom Minka gives the derivation in this excellent paper "A comparison of numerical optimizers for logistic regression" pdf, section 9
Comment: While this is good material, this is not an answer imo, more like a comment.
Comment: This is four years old. At this point, we could probably just leave it, unless the link is dead.
Comment: Welcome to the site. We are trying to build a permanent repository of high-quality
statistical information in the form of questions & answers. Thus, we're wary of
link-only answers, due to linkrot. Can you post a full citation & a summary of the
information at the link, in case it goes dead?
Answer: LIBLINEAR supports $\ell_2$-regularized logistic regression. According to the authors, the package implements the "trust region Newton method". Here, you can find the slides to learn more, but note that it is not based on the dual formulation.
@whuber I am explaining here, because there wasn't space in the comments...
As you know, in logistic regression, the response data are chosen to be realizations of a Bernoulli random variable $Y$. In this GLM, the conditional expectation is,
\begin{equation}
\mathbb{E}(Y|X) = \sigma\big(\mathbf{w}^\mathsf{T}\mathbf{x}\big)
\end{equation}
where $\sigma(z)$ is the logistic function
\begin{equation}
\sigma(z) = \frac{1}{1+ \exp(-z)}.
\end{equation}
Here's the likelihood
\begin{equation}
\begin{aligned}
\mathcal{L}(\mathbf{w}) = \operatorname{p}(\mathbf{y}|\mathbf{X};\mathbf{w}) &= \prod_{i=1}^n \operatorname{p}(y_i|\mathbf{x}_i;\mathbf{w})\\
&= \prod_{i=1}^n \sigma\big(\mathbf{w}^\mathsf{T}\mathbf{x}_i\big)^{y_i}\big(1-\sigma(\mathbf{w}^\mathsf{T}\mathbf{x}_i)\big)^{1-y_i}.
\end{aligned}
\end{equation}
and the negative log-likelihood becomes
\begin{align}
-\ell(\mathbf{w}) = -\log \mathcal{L}(\mathbf{w}) &= -\sum_{i=1}^{n} \log \operatorname{p}(y_i| \mathbf{x}_i;\mathbf{w})\\
&= -\sum_{i=1}^{n} \log\sigma\big(y_i \mathbf{w}^\mathsf{T}\mathbf{x}_i\big)\\
&= \sum_{i=1}^{n} \log\big(1+ \exp\big(-y_i\mathbf{w}^\mathsf{T}\mathbf{x}_i\big)\big)
\end{align}
where the last equation follows because $y_i \in \{-1,1\}$.
The $\ell_2$-regularization term is the result of MAP estimation of the parameters with a Gaussian prior.
Comment: I am sorry, but didn't OP ask us how to get the dual form?
Comment: that's true, I was answering the related question that came up in the comments above; additionally, I thought that the OP's main question was how to solve the $\ell_2$-regularized problem not how to obtain the dual formulation
Comment: @user1149913 seems to give a good answer to that part
Answer: Why not just take partial derivative of minimization function with respect to unknown parameters? You can find a lot of material on the web.
Answer: Use the lower bound of the convex function $\log(1+x)$:
$$
\log (1+x) \ge  \log(1+x_1) +(x-x_1)*(`d(\log(1+x_1))` )
$$
where $d(f)$ is the differentiation of $f$.
Note that the factor of $x$ on the right is your dual variable, which is in between $[0,1]$; now the problem is quadratic in $w$ and can be solved.
Comment: Welcome to the site, @Ashwini. I took the liberty of using CV's $\LaTeX$ markup features to make your post more readable. Please make sure it still says what you want it to.


Shimano Bottom Bracket alternative

Question: I have a Giant TCR Alliance which has had 2 Shimano SM-BB71-41 press fit bottom brackets, both started clicking, pretty annoying. Any ideas on a good alternative? I'm looking to the £60 mark. Thanks guys.
Answer: There's every reason to suspect that problems with the bore tolerances and/or alignment are causing it. That's become a common theme of creaky BB issues.
It's a good idea when the cups are out to take what measurements you can to see what's going on. Bore tolerances are easy to measure but alignment for the most part is not.
The thread-together models from various manufacturers can sometimes help mitigate the effects of misalignment. Either retaining compound or, in some cases, very light abrasive work in the hands of someone who knows what they're doing can help with tolerances.
At the far end of the spectrum are the custom-for-your-frame's-misalignment BBs a la Hambini which can solve bore alignment problems that nothing else can.
Comment: We also shouldn't rule out the way they where installed. OP hasn't said how the BBs where installed, ie correctly and with all the usual anti-creak options.

Shimano Bottom Bracket alternative


What is the relationship between independent assortment and cross over?

Question: During meiosis, the independent assortment will be made first and then cross over will be made. I am so confused, what is the difference between this two process? I looked at the diagram on internet.It is said that law of independent assortment is alleles of genes on non homologous chromosomes assort independently during gametes formation, but I don't quite understand that.
So, another way for understanding this topic, independent assortment is tetrads can line up four different ways between homologous separate. Is that right.
Appreciate your help.
Answer:
During meiosis, the independent assortment will be made first and then cross over will be made.

No, independent assortment occurs after crossing over. Crossing over occurs in prophase I while independent assortment occurs in metaphase I and anaphase I.

I am so confused, what is the difference between this two process?

During prophase I, a process called synapsis occurs. That is, homologous chromosomes (one from your mother and one from your father) come together and bind together, forming a tetrad. This binding is due to crossing over, which is when the genetic material on the maternal chromosome and the paternal chromosome exchange places. The maternal chromosome gives some of its genes to the paternal chromosome, and the paternal chromosome gives some of its genes to the maternal chromosome. Crossing over increases genetic variety by creating a new chromosome with a new combination of genes.
During metaphase I, the tetrads line up at the equator of the cell. During anaphase one, the tetrads are broken apart and each homologous chromosome that made each tetrad up is pulled toward one end of the cell. Look at the image below, where the blue represents paternal chromosomes and the red represents maternal chromosomes.

Independent assortment describes the phenomenon where the paternal and maternal chromosomes can be lined up randomly at the equator. There are many combinations. For example,

Both red chromosomes could face the top pole and both blue
chromosomes could face the bottom pole.
Both blue chromosomes could face the top pole and both red could face the bottom.
One red on the left and one blue on the right could face the top, as shown in the picture.
One blue on the left and one red on the right could face the top.

This random alignment at the equator makes it so that during anaphase, random proportions of maternal and paternal chromosomes get assorted into each of the resulting daughter cells. Some cells could get more maternal chromosomes and the other would get more paternal chromosomes, and vice versa. On the other hand, they could get similar amounts. Independent assortment increases genetic variation by allowing daughter cells to each randomly receive a different proportion of paternal and maternal chromosomes.
In conclusion, crossing over and independent assortment (sometimes called random assortment) are different independent processes that both lead to an increase in genetic diversity.

References

Reece, Jane A., Lisa A. Urry, Michael L. Cain, Steven A. Wasserman, Peter V. Minorsky, and Robert B. Jackson. "Meiosis and Sexual Life Cycles." Campbell Biology. 10th ed. Glenview: Pearson, 2014. 252-266. Print.
https://www.quia.com/files/quia/users/dschnepp/Meiosis/Metaphase-I
Comment: I'm interested in the randomness of the "Independent assortment" of the genetic material. How specifically is randomness achieved, to create the specific unique variation out of the 2^23=8388608 possibilities. Are certain combinations naturally more likely than others, and how does the cell make the components line up randomly at the equator?


Open source drone technologies

Question: What is the best place to understand the details of drones?  Preferably something open source.  Books would also be helpful.
Comment: What aspect of drones are you trying to understand? At the moment, your question is essentially, "Drones: tell me all about them!", which is far too broad.
Comment: OP: Asking what the best of anything is pretty much ensures your question will be put on hold.
Answer: I can think of a couple of open source UAV projects:

Paparazzi is a complete system of open source hardware and software for Unmanned Aircraft Systems, including autopilots and a ground control and planning station. All of the hardware plans and software source code you need to make a drone from scratch are available on github. But not everyone has the equipment to make a printed circuit board at home.
Open pilot is an autopilot for UAVs. They also sell hardware if I remember properly, which might make it a bit easier if you're just starting.

If you just want a simple introduction to flying drones, DIY drones has a quick guide to the basics.

Open source drone technologies


Does B'Twin advertise us as a source for any questions?

Question: Man, there are a lot of questions that involve B'Twin bikes, especially as someone's first question on this site...
Answer: That's pretty unlikely but not impossible - its probably more that btwin bikes are sold at a price point and/or retail chain that appeals to personalities who would do research on the web.
If they were more expensive, the buyer might be more likely to spend on an LBS.
If they were super cheap.... well even the web is in range of most first world citizens, from cellphones to free wifi to internet computers at the local library.
Or are you suffering from "Baader-Meinhof Phenomenon" or "frequency illusion" ?

A search gets these counts for mentions of a word:
43 mongoose
46 huffy
307 cannondale
359 giant
600 specialized
650 trek
22 btwin and 28 for twin
So perhaps its not as common as you think?
Comment: It's entirely possible, just seems like there are a lot...  searching for B'Twin, I get 11 results, in the past 2 years, not to count the ones that misspell or change the name somehow...


UK unemployment for July 2016

Question: Why was the UK unemployment rate in July 2016 lower than forecasted by the Bank of England?
Answer: I would guess that this Is due to the variance that exists in the tool used to make predictions about unemployment in the economy known as  Okun's Law. As stated on wikipedia as:

The gap version of Okun's law may be written (Abel & Bernanke 2005) as:
${{\displaystyle (Y-{\overline {Y}})\over{\overline {Y}}}=c(u-{\overline {u}})}$
where

${\displaystyle Y}$ is actual output

${\overline {Y}}$ is potential GDP
${\displaystyle u} $ is actual unemployment rate
${\displaystyle {\overline {u}}}$ is the natural rate of unemployment
${\displaystyle c}$ is the factor relating changes in unemployment to changes in output (Econ John: This is also known as the "Okun Coefficient")

From the Usefulness section on wikipedia

Through comparisons between actual data and theoretical forecasting, Okun's law proves to be an invaluable tool in predicting trends between unemployment and real GDP. However, the accuracy of the data theoretically proved through Okun's law compared to real world numbers proves to be generally inaccurate. This is due to the variances in Okun's coefficient. Many conclude that information proved by Okun's law to be acceptable to a certain degree. Also, some findings have concluded that Okun's law tends to have higher rates of accuracy for short-run predictions, rather than long-run predictions. Forecasters have concluded this to be true due to unforeseen market conditions that may affect Okun's coefficient.
As such, Okun's law is generally acceptable by forecasters as a tool for short-run trend analysis between unemployment and real GDP, rather than being used for long run analysis as well as accurate numerical calculations.

Hope this helps.
Comment: For more info check this out. https://www.kansascityfed.org/publicat/econrev/pdf/4q07knotek.pdf

UK unemployment for July 2016


How can tester know that The Application has Memory leakage Problem?

Question: I was testing an Android application for memory leakage. But I have no idea How to test memory leakage in the application. And How would I know that app has memory leakage problem?
Comment: Why is this tagged iOS?  Do you need an answer for iOS applications too?
Answer: It is hard, if not possible, to test memory leak with manual testing. Even if you can catch it, you can not prove it.

With a memory leak, an application will run slower and slower, consuming more and more memory.

We need to catch memory leak with tools, depends on which platform you are testing on, there are multiple options to choose from. Check out links below:
Memory analysis for Android applications
Eclipse memory analysis tool
Answer: Same question asked in stack-overflow [SO]. Please refer this.
There are some tool as well Valgrind, Quick Start Guide here.
Basically memory leakage happen more likely when you hold an Object, long after its purpose has been served.
Answer: When using android studio, here's how you check for memory leaks these days:
https://developer.android.com/studio/profile/investigate-ram.html

Start your app on a connected device or emulator.
Select View > Tool Windows > Android Monitor.
In the upper-left corner of Android Monitor, select the Monitors tab.

You may need to connect your device to your PC and run the application in debug mode. That means you will need to check out the source code as well.


Are Vega-Vanna-Volga methods/models also used in equity derivatives? Or only in FX? Why?

Question: Vega-Vanna-Volga models seem to be popular in the FX derivatives market and are often calibrated via 25 delta risk reversal, Vega weighted butterfly, and ATM straddle quotes. I am wondering if they are also used to price equity and commodity derivatives. Is there something that makes the model particularly suited to FX markets?
Comment: The main reason is that its easy (FX quotes VOL directly in ATM DNS, RR and BF) and computationally cheap (compared to the market standard SLV model), which is why it is often called the trader's rule of thumb. Many stock options are American and for non of them exist RR and BF (or ATM DNS) quotes. It would be very convoluted to compute an option that way.
Comment: @AKdemy Why would it be convoluted to do so? What's wrong with grabbing the Black-Scholes quoted IV of the RR, BF, ATM, and calibating?
Comment: In FX you directly have quoted RR, BF and ATM DNS. In equity you have neither (and most systems display vol surfaces in terms of moneyness for equity). You could still do it if you would like to, but it's an archaic method that isn't even used much in FX anymore (it may have been used more frequently some 20 years ago) and I have never seen or heard of anyone use it for equity in an actual pricing tool in my career.
Answer: FX differs from other asset classes in that some market manipulation by central banks is the norm.  For almost any currency, if its exchange rate versus other currencies moves outside a certain band, the central banks will try to intervene, usually by just buying the currency in the market. The bank's goal is not to make money by speculation, but to keep the exchange rate within this band. The resources that the bank spends on the intervention are likely to end up the P&L of some other market participant whose goal is to generate P&L. If a currency hovers near one side of the band, then the intervention from that side is more likely than from the other. This is the fundamental reason for the asymmetry and for the importance of the risk reversal.
Because of these complicated dynamics, when you price FX exotic options, you estimate the "overhedge" - the additional cost of hedging the volatility risk, and include it in the price of the exotic. The vanna $\frac{d\  vega}{d\  spot}$ is simply the change in vega due to change in spot. The volga $\frac{d\ vega}{d\ vol}$ is the change in vega due to change of volatility. If they are non-zero, then every time the spot or the vol changes, your vega changes. To keep your vega exposure flat, you must trade some vanilla options.
No comparable market intervention happens in equities. There still are fat tails because (main reason among many) for almost any equity, there are many outstanding limit orders to buy/sell if the price goes above/below some threshold, which is usually a round number. There is some asymmetry because (one important reason among many) psychologically for many people losing money (by selling a put) is more painful than missing the opportunity to make money by buying a call. But I can't imagine a situation where, if an equity price becomes "too low", someone would intervene and spend lots of money not in the hopes of making money, but just to keep the price up. (If the price appears too low and the company has the requisite cash, it may engage in shares buy-back, but that's a very slow process and does not affect the price much.)
Comment: By asymmetry due to 'missing the opportunity to make money by buying a call' do you mean OTM calls are in less demand so the implied distribution has a less fat tail at higher strikes- or that the OTM call buyers are okay with making less money by paying a higher premium- or something else? (Sorry the wording of your post is a bit confusing). Thanks!
Comment: I think asymmetry can exist in equity markets due to structural reasons.  For example if you incorporate a probability of default into your model then it will generate a smile. I understand what vega vanna and volga are; I don't understand how your description of central bank intervention necessitates such a framework or why it would invalidate such a framework in the case of equities.
Comment: And anyway, I am not even sure about your claim that someone would not intervene if equity prices went too low. Central banks have done so in the past havent they?   Quantitative easing and zero interest rate policy are examples of monetary policy enacted by central banks to boost asset prices they deemed too low.


Is there a polymorph effect that grants the new form's gaze attack?

Question: I have been reading up on polymorph spells, and I want to know if there is any way to gain a Medusa's Petrifying Gaze. Monsterous Physique grants special abilities based on what level of the spell you are casting, but gaze is not listed there. Does that mean you can't gain a monsterous humanoid's gaze attack at all?
Answer: Monsterous Physique Does not Grant Gaze
You are correct, the Monstrous Physique spell does not grant Petrifying Gaze.  It specifically lists the abilities and bonuses that you can gain from polymorphing into those creatures.
Generally You Cannot Polymorph for a Gaze Attack
Proving a negative claim is difficult, when it's possible.  All I can provide is some general guidance.  In general, Pathfinder's polymorph ability has been significantly changed from D&D 3.5's.  Polymorph no longer grants access to supernatural or spell-like abilities. This is on purpose.
Additionally, polymorph is segregated into different spells based on the type of creature you want to change into.  Monstrous Physique is used to change into monstrous humanoids, for example.  As far as I am aware, no other spell accomplishes this task.  So there is likely no way polymorph can grant you the Medusa's petrifying gaze.
But
You can cast Flesh to Stone to generally produce the same effect.  It is a level 6 spell, compared to level 3 for Monstrous Physique.
Comment: This is as I thought, but can you confirm that there are no ways to polymorph that grant gaze abilities?
Comment: Edited to address this better.
Comment: Thanks for the clarification. I was hoping for petrifying gaze as a level 3 spell.


Recover iPad Safari bookmarks overwritten by iCloud

Question: My wife had a lot of bookmarks on Safari for iPad. From my macbook I was using Safari, with other bookmarks and some day I tried iCloud, so my wife's iPad bookmarks were overwritten with my macbook's Safari bookmarks. I wonder whether there is some way to recover my wife's bookmarks before she kills me.
Answer: The only way is to restore from a useful backup, if you have one.
If you sync the iPad to iTunes and use Time Machine regularly, you would likely have the appropriate backup to restore from. In that case:

Restore the iPad backup set from Time Machine from a date before you overwrote the bookmarks. The location of the backup is ~/Library/Application Support/MobileSync/Backup/ (you can get to it by pressing Cmd+Shift+G in the Finder and entering this path).
Connect the iPad, run iTunes and restore from the backup.

If you use iCloud Backup, then you can restore from iCloud and choose which date's backup you'd like to restore from. You can check if you're using iCloud Backup by opening the Settings app on the iPad, then going to the iCloud submenu and looking at the status right below "Storage & Backup", where it would say "iCloud Backup is off." (or "iCloud Backup is on.", as the case may be).
In any case, keep in mind that restoring from a backup means you lose all application data changes after the date of the backup.
Also see Restoring from a previous iCloud backup.
Comment: Thanks, right now I just wonder; is iCloud backed-up by default? How can I check this?
Comment: I've updated the answer with the steps to check if iCloud Backup is on or off.


What happens if you mix two insoluble liquids but with the same density?

Question: Would it make two separate phases? or would it make something like and emulsion?
Comment: I'd guess an emulsion. However the "same" density has to be taken with a grain of salt. The "same" to how many significant figures? I'm guess that with a very very small difference eventually gravity and environmental vibrations would cause the mixture to separate.
Comment: Have you ever seen a [lava lamp](https://en.wikipedia.org/wiki/Lava_lamp)? The wax in the middle of the pathway has pretty much the same density as the liquid, and it might be a large blob or fine emulsion depending how you treated the system mechanically beforehand.
Comment: BTW, an emulsion is a special case of 2 separate phases. Stability of emulsion is given by properties of phase border layers. It is well illustrated by shaking of amyalkokol/isoamylalkohol with water. The former creates emulsion due linearity of molecules, forming oriented surface layer.. The latter quickly separates.
Answer: There is no "or" in the first place. An emulsion is a two-phased system, it is just that one phase comes in a form of small droplets. Small as they are, however, they are pretty big from molecular point of view.
Now to the point. If you stir the liquids vigorously, you'll have an emulsion. Short of that, they will attempt to minimize the surface, and the shape with minimal surface is a sphere. Indeed, that's what you will end up with. It's been done before. Look up the Plateau's oil drop experiment: they put oil in a water/ethanol mixture with ratio tuned so as to match the density of oil, and behold, it just floats there in a huge spherical drop.
If both liquids get in contact with the wall, the geometry might become more complicated. The phase separation surface will develop certain contact angle where it touches the wall, and the rest of it will form some kind of minimal surface, which can be surprisingly diverse.
So it goes.
Comment: That's a good point. I guess the resulting geometry also depends on the surface tension for contact with the walls of the container, which I assumed is favorable.
Comment: Given that both liquids get in contact with the wall... Wait, I'd better add that into the answer.
Answer: Well, if you are speaking about an equilibrium mixture of two pure substances, then you would not have an emulsion, since an emulsion of two such substances would not be thermodynamically stable. Formation of an emulsion requires an additional energy input to form the unstable dispersion.
The stable structure (for instance a sphere or two side-by-side solutions) is a question for surface chemistry. Insolubility implies that the surface tension between the fluids is greater than zero (molecules in the pure liquids have a lower free energy than at the liquid-liquid interface). The result is that the liquids will attempt to minimize contact with each other. If the densities are identical, this will result not in an emulsion but in the liquids occupying side-by-side volumes, provided (as Ivan's answer points out) contact with the walls is more favorable than between the fluids, and the tension between each fluid and the container is identical. If the tension of one of the fluids in contact with the wall is lower than that of the  other, then the second liquid will form a volume with a minimum surface enclosed by the first liquid (as Ivan points out).
Also, lava lamps are a fun illustration of the physical chemistry at work. Note that here thermal energy and mechanical mixing lead to fusion and breakage of globs of one liquid suspended in another. The surface tension of the glob-forming liquid in contact with the lamp walls is higher than that of the other liquid, which explains why it forms suspended globs. If the globs had a lower tension than the other liquid when in contact with the container walls, they would tend to partition to the walls (although shear due to fluid motion might keep them suspended). The density of the liquids is kept in flux, transitioning via heating and cooling through a density equivalence point that causes the globs to rise and fall.


What's wrong with my Dracaena Marginata?

Question: I've had it for a few weeks now and watered it once. It was on the windowsill for a couple of weeks but has since been moved to my dressing table which gives it some sunlight. About 5/6 leaves have fallen off & the tips of a few leaves are brown.
Answer: This appears to be Dracaena marginata, and as such, it does not appreciate direct sunlight. It tolerates fairly low light conditions, but does better in bright daylight, without sun. If you want to keep it in a window, then a north facing one is probably best, but it doesn't really need to be in a window, just somewhere it gets reasonable daylight and away from heat sources such as radiators.
Assuming it is winter where you are and your home is heated (which might mean a need for more frequent watering than you've been giving it) the usual rules apply - water when the surface of the soil feels dry to the touch, but not so dry the soil has shrunken from the sides of the pot. Water thoroughly, allowing any excess to drain away freely from the bottom of the pot and empty out any outer tray or pot after 30 minutes so the plant is not left sitting in water.
I'm not sure what's caused the minor leaf damage shown in the image - check beneath all leaves, closely, in case your plant has an insect invader of some description, otherwise it looks like physical damage of some sort. Further care instructions here https://homeguides.sfgate.com/indoor-care-dracaena-marginata-42795.html
Comment: I've since removed the damaged leaves and given it a water, hopefully it will be fine soon!

What’s wrong with my Dracaena Marginata?


Why does my ice cream get crispy in my float?

Question: I float my ice cream with Diet Pepsi. I'm always excited for when the ice cream gets crispy. It gets crispier when I use cold soda instead of room temperature. Is my soda freezing in the ice cream?
Answer: I think I know what you mean, but is the ice cream "crispy" only on the surface? Unless your ice cream becomes crispy in its interior as well, (which I could not explain), I think it's simply as you speculate, the water in the soda is freezing into a crust of ice around the surface of the ice cream ball. This would explain why it is more noticeable when the soda is cold.
Comment: The ice cream starts getting crispy on the outside. Sometimes it goes pretty deep if I leave it long enough. But this sounds right!
Answer: Turns out that my soda is freezing.
I ran a rudimentary experiment with white ice cream and dark soda. Here's a picture showing the soda freezing inside of the ice cream.

The soda on the outside is warmer than the ice cream when poured over it. This melts some ice cream and dilutes the soda with sweet creamy goodness. Sometimes the ice cream will be cold enough to freeze parts of the soda onto the ice cream causing this "crispy" shell that I like.


Does AES use different keys for each block of plaintext?

Question: If you have 4 16-byte blocks of plaintext to encrypt does each block have a different 128 bit original key? Or do they all use the same?
Answer: TL;DR no it doesn't use different keys for each block; the key stays the same. AES has been designed to be able to encrypt many blocks with the same key.

AES is a block cipher. As a block cipher it can only encrypt / decrypt (or permute) one block of plaintext / ciphertext at a time. How you encrypt 4 concatenated blocks of plaintext isn't specified by AES. So in that sense it is impossible to answer your question.
Generally the block cipher AES is however used in a block cipher mode of operation such as CBC. These modes of operation take an already keyed block cipher as parameter. So in a mode of operation the key stays the same. This also goes for the derived sub-keys or round keys that are calculated during initialization of the block cipher that performs the key schedule.
In principle you could create a mode that uses different keys for each block encrypt (probably using some kind of calculation to calculate each "block key" from a key seed). That would however require you calculate the key schedule for each block. Furthermore, it would likely allow related key attacks, to which at least AES-256 is susceptible.
Proposing such a mode during a crypto conference is probably not advisable.

If the 16 byte blocks are separate messages then it is of course also possible to use the same key. If you're not concerned about leaking information about equality of the plaintext then you can also simply use the block cipher directly.
The modes of operation specified for block ciphers such as CBC, GCM (and so on) also work for smaller messages. Note that you need to use an IV if you want to reuse the key for most modes of operation. Using an IV is required for modes of operation that provide CPA security.
If you want to use different keys then that's also possible, for instance by deriving keys from a master key using a KDF.
Answer: You may use the same key, but you need to use different (unique) IV (initialization vector).
There are multiple encryption modes to encrypt multiple blocks using the same key.
Comment: The question is asking about encrypting multiple _blocks_ with the same or different keys, not encrypting multiple _files_ (which is where an IV is relevant). Suggesting to use a unique IV for every block encrypted with the same key is nonsensical.


What would be the best methods to find out the factors that can change customers behaviours who call?

Question: We want to understand why our customers have to call rather than find relevant information on our website. We want to find the factors so we can influence or change their behaviour in the future. Anyone has done similar research? Any suggestions / thoughts on this?
Comment: Is it possible to link the customers who call to their user profile or usage analytics data? Also, is there some IVR system in place that would help to filter or analyze the primary call purpose or do you have some integrated customer support platform like Zendesk?
Answer: Phone questionnaires are notorious for delivering bad results. It all has to do with the attitude of the caller. Most calls to a business are helpdesk related. There already is some irritation and therefor often no patience for a questionnaire when the call is over.
I think the most unintrusive way is to send the customer an email afterwards with just a few questions (1 to 5 questions). That is if you can link the caller to an email address. Otherwise you might want to send out a questionnaire to all email addresses or ask the caller to stay on the line and answer a questionnaire.
Comment: I agree. People who call normally have issues with their services, there will be "happy" customers, but it may create bias in the results. I'm thinking to have interviews first, then craft the survey questions to quantify the findings. Human behaviour is really complex, the challenge is how to dive in to find that trigger for change.
Comment: Given the massive volume of email received nowadays I wonder whether people will be that happy getting more of them uninvited.
Answer: I'd probably just start with a very quick "would you like to say why you called rather than used the website ?" at the end of the phone conversation.
This will give you unstructured data and then someone will need to go through it to try to pull out any common themes.
Once you have common themes then you might want a more structured approach.
Comment: That assumes they called because they couldn't find something on the website. I'd start off with something more high-level and then drill down into IF they thought about or tried finding that information on the website.


Is there a word-list for child English?

Question: Are there any publications which list words of English that one might reasonably expect a child to know? I assume that "father" would be on the list, and "allophone; metallurgy" would not be. As for age of this ideal child, between 6 and 12 is in the relevant range. My need for such a list relates to the question of how English phonology is acquired, especially whether the phonological generalizations that describe a plausible child lexicon are radically different from those describing the entire set of English words (the answer is "Clearly", this is about demonstrating that). My preference would be for a list that is based in actual observation, but a policy list ("children in grade 5 should know these words...") might work.
Comment: Might it be possible to just compile one from CHILDES or something?
Comment: Interesting idea. Not much data in the primary school range, but I'll see what I can come up with.
Answer: I found the following link regarding the CHILDES database that might be helpful to you in extracting the list of words you want. The description reads "ChildFreq is a tool that lets you extract word frequencies from the Childes database," and it is located here: http://childfreq.sumsar.net/

Is there a word-list for child English?


Why does Jules laugh in the "Pulp Fiction" bar scene?

Question: In Pulp Fiction (1994), Jules starts laughing at Vincent's answer when asked if he met Mia.
Why does he start laughing?
I never really understood the joke or what made it so funny.
Comment: Hi jacob, you may want to take the [tour].
Comment: Not sure why you are getting down votes, I wondered about this for a long time too.
Comment: When you watch the rest of the movie you understand why he was laughing. It's one of these "ah, that makes sense in retrospect" moments.
Answer: As A.bakker explained, Marsellus is known to be jealous. But the main issue is that Vincent thinks it will be a straightforward assignment, and he would have no problem avoiding anything that would make Marsellus jealous.
But he hasn't met Mia, who is, well, not exactly boring, is she?
His plan to "sit across a table, chew [his] food with [his] mouth closed, laugh at her jokes, and that's all [he's] gonna do" is not as easy as he thinks.
Answer: He's laughing because Mia is Marsellus' wife, and he is known to be jealous.
In a previous conversation between Vincent and Jules (While driving to get the briefcase) they discussed his jealousy, allegedly throwing a man off a balcony for giving his wife a foot massage. Vincent dismisses it as an urban legend/exaggeration stating that he isn't nervous and nothing special will happen. While Jules implies that him taking out Mia might be a suicide mission due to the jealous nature of Marsellus.

Why does Jules laugh in the “Pulp Fiction” bar scene?


Mining Transactions

Question: I understand the theory of mining, blocks, secure wallets, etc.-- but do I?  What are the "transactions" that I'm mining??  My program is searching what? And I am rewarded bitcoins for my mining BUT who do I benefit by this mining?
Answer: I cannot comment, so i will try to give a high level answer
you are mining "our" transactions: verifying the signature, checking if it's valid inputs that are in the current unspending transaction output set.
You benefit us as bitcoin users by verifying the validity of transactions, and your work makes it harder for an attacker who troes double spend.
Comment: My question is:  Where do the bitcoins come from to begin with?  How do you have bitcoins to spend??
Answer:
What are the "transactions" that I'm mining??

Bitcoin is a currency so it is used for payment. People use bitcoin to pay for goods and services instead of using $ or EUR, or just transfer bitcoins to someones account for 'real' money. Each payment (bitcoin transfer from account to account) is done in transaction. For transaction to succeed it must be validated and included in the block and pushed onto blockchain (in other words mined). So you are mining other people's transactions.

My program is searching what?

Check What exactly is Mining?

And I am rewarded bitcoins for my mining BUT who do I benefit by this mining?

As said above for other's people transactions to succeede they must be mined by someone, so you are helping them in making transactions.
Comment: Miners also receive a monetary benefit. They are rewarded the block subsidy (currently 12.5 BTC) and all transaction fees paid by transactions in the block.

Mining Transactions


Group node from OG membership doesn't work

Question: I want to create some views to display Group information on Group content pages. E.g. Display contact info from the group in a block/pane in the sidebar.
I did this before, by using the default OG Content view and add the relations.

I add the relationship OG membership: Group Node from OG membership, and sets its relation to (OG membership from node)
Set the contextual filter to provide a default value (Current OG group from context) and keep relation set to the default OG membership from Node.
Add fields and set their relation to Group node from OG Membership.

This isn't working though, it gives no results when viewing on Groupcontent-pages. It gives only results when viewing the Grouppage itself. I do not know why this is not working the way it should. As I recall I never had this problem before.
I used Organic Groups 7.x-2.7 with Panopoly 7.x-1.30. I have this on 2 separate installs (one on Acquia site, and one in my VM). The VM has only Panopoly and OG (and dependencys) installed as extra so it's almost vanilla.
I have enabled OG Context of course.
How can I solve this? Without these views it's a pain for the user to see in which groupcontext they are browsing.
EDIT:
I installed a vanilla drupal (Not Panopoly). Installed OG + dependencys.
Then I created an empty view and added the following:
1. Relationship: OG membership: OG membership from Node group (required)
2. Contextual: (OG membership from node group) OG membership: Og membership ID
and Current OG group from context
This works! However, this doesn't work in Panopoly... Is this the new way to work with OG and Groupinfo on groupcontent pages?
The SQL-querys views does are exactly the same. Though on Panopoly there are no results. On Vanilla Drupal there is.
How can I debug this?
Answer: Solved it. The panel needed the relationship. This can be added on the contexts-page of the panel. The relation I added was:
 Node from Node (on Node: Groups audience [og_group_ref])
When this is added it can be chosen instead of "This node" when Views panes are added to a page-layout.
This works with the default OG Content-view with the relation OG membership: Group Node from OG membership added to it. (on groups without content this gives No content in this group however.)


How does Diana Allers's focus affect your War Assets?

Question: So, even though I'm playing mostly renegade, I was benevolent enough to let a reporter on board, and she's asked me what she should focus on. I told her "Cerberus is lame, report on that" but I'm curious as to how each option (recruitment or Cerberus) affects War Asset collection.
Answer: She'll occasionally ask for interviews.  The results of these interviews can effect other war assets.
For instance there is one after curing the genophage.  Using the Paragon dialog option drives up recruiting for the Krogan Clans asset.
There's also an instance where she's arguing with a random crew member.  You have an option of killing one of her stories if you take the crew member's side.
Answer: It doesn't make a difference to your war assets one way or the other. Only your actual interviews do. However, depending on your answer to her on other occasions depends on whether you get paragon or renegade points and added reputation.
Answer: I got +10 for letting her on the Normandy.


Created by field is not showing in Data loader

Question: I am uploading case through dataloader . But while mapping the fields from CSV to salesforce fields "Created by" field is not showing on the time of mapping from data loader on the time of Insert the case in salesforce and this field is already visible from the salesforce.
Answer: The CreatedBy Field is a read-only field that cannot be updated via dataloader without "Set Audit Fields upon Record Creation" permissions. Previously you had to file a Case with Support to turn this permission on for a limited period of time when importing data. Without the permission enabled you won't see it mapped when using dataloader.
You no longer need to file a case with Salesforce to give a user "Set Audit Fields upon Record Creation" permissions to allow the user to Set audit fields, such as Created By, Last Modified By, and Created Date when you create a record (API only i.e Importing Tools) with Data Loader in order to make the Created Date writable.
See the following Knowledge Articles for more: 000171151, 000213290, and 000005202. You no longer need to file a support case with Salesforce as was necessary in the past.
Comment: Also, only valid on insert, and if you change this permission, you need to log out of the Data Loader and log back in, as it caches the describe information when you first log in.
Comment: Thanks it works
Answer: I have been trying this Feb. 2020. I confirm that the "Set Audit Fields upon Record Creation" permission set is required (or you can set it on custom profiles.) After turning off automated processes which updated the records after saving, I found that of the 4 audit fields only 3 could be set. The CreatedById could not be set and even when included manually in the mapping file, Data Loader would not map it.


Can i sue my work for false promises

Question: I got hired on at performance to go work at exon in beaumont and they sent to classes 4 days in a row out of state  i had to drive everyday from Louisiana. They said that i had the job at exon then after i drove my fourth day the told me that my background didnt go through and i couldnt work there. I asked them if they were going to pay me for driving and all the classes i went to and they said they were not.
Comment: Hello!  Welcome to Law.SE.  Please read our [tour page](https://law.stackexchange.com/tour).
Comment: What about the class was required for the job?  For example, if the company said that to do a certain job you needed a CPR certification and you decided to get that certification that might be treated differently than if  it was company-specific training.
Answer:
Can i sue my work for false promises

Your description is not precise or detailed enough to identify whether there is an actual promise, a breach contract, or fraud.
What you reflect, though, is that employment was contingent on a successful background check. If that is the case, your awareness that the company would conduct the background check is highly relevant for ascertaining whether you have any remedies under the Fair Credit Reporting Act. For instance, whether the employer complied with the requisite disclosures or your right to verify and fix material inaccuracies in the report. See 15 USC 1681b (b)(2)(A) et seq.
Another relevant aspect is who paid for the 4-day training you attended (not the commuting expenses). If you covered the cost of training --which you apparently did--, it might be worth to identify any ulterior motive for the employer to require from you that training at the specific entity where you took it. This might unveil a tort of fraud and simultaneously be tantamount to a violation of state law. As an example, Texas might have a statute akin to MCL 408.478(1).
Although you mention Exon (or do you mean Exxon?), an important distinction is on whose payroll you would have been if hired. In other words, whether the official employer is Exon or just an intermediary on whose behalf you would work for its client Exon.

I asked them if they were going to pay me for driving and all the classes i went to and they said they were not.

The matter of commuting expenses is something you should have inquired of the employer, preferably in writing, prior to committing to the training and incurring the commuting expenses. As for the cost of training, see the third paragraph in this answer.
Comment: Also probably a wage and hour violation for the unpaid training.
Comment: How is Fair Credit Reporting Act relevant?
Comment: @GeorgeWhite The FCRA contemplates consumer reports being used as part of a screening process *for employment purposes*. That is reflected in various statutes of the FCRA. In addition to the statute I mentioned, see also 1681b(a)(3)(B), 1681c-1, and 1681d(d)(2).

Can i sue my work for false promises


Prefix code of symbol pairs

Question: An input sequence consists of two symbols, each independently and randomly chosen from a set of symbols with known associated probabilities. Each symbol is independently encoded using a prefix code that minimizes the expected codeword length. Is it possible to reduce the expected total length of codewords by using instead of this code a prefix code where the symbols are ordered pairs of the original symbols?
Comment: Would this be equivalent to having two concatenated encoders? My (quick) guess is that either it can't be done or the gains will be small. Shannon says that the big gains are obtained by looking at larger sequences of uncoded symbols, not by concatenating encoders.
Comment: @MBaz I reworded the question. I did not mean concatenation. Even small gains would be of interest!
Comment: The answer then is yes, per Shannon's source coding theorem. In fact, to get good compression you have to take $N$ of the original symbols, with large $N$; taking pairs will buy you a little bit extra compression, but not much.
Answer: A simple example: consider a source $S = \lbrace 0, 1 \rbrace$ with probabilities $\lbrace 0.9, 0.1\rbrace$.
If you take one symbol at a time, no compression is possible: you need one bit per symbol.
Taking two symbols at a time, compression is possible. Now you have a source $S_2 = \lbrace 00, 01, 10, 11 \rbrace$ with probabilities $\lbrace 0.81, 0.09, 0.09, 0.01 \rbrace$. A possible encoding is:
<code>Message | Codeword
--------|---------
00      | 0
01      | 10
10      | 110
11      | 111
</code>
Here, the average number of bits per message from source $S$ is $(1 \cdot 0.81 + 2 \cdot 0.09 + 3 \cdot 0.09 + 3 \cdot 0.01)/2 = 0.645$. It is clear, however, that by having only four combinations, the prefix code is not as short as it could be -- for example, $01$ and $10$ should have codewords of the same length, which in turn should be shorter than the codeword for $11$. If you group more $S$ messages, then you have more room for optimizing the code.
Note that the entropy of $S$ is around $0.47$; this means that the code above is still far from optimal. What Shannon says is that one may approach the entropy by increasing the number of symbols that are considered as input to the prefix code.
Comment: Exactly what I was looking for.

Prefix code of symbol pairs