Transit Visa required for US citizens going from Japan to Korea?

Question: We are U.S citizens and will be traveling to Japan from SFO in June, originally to stay 2 weeks. We are just now thinking of adding a week in Seoul, Korea to depart from Haneda or Narita before returning to Japan for our flight back to SFO. Do we require a transit visa for traveling from Japan to Korea?
Answer: First of all, if you are a US citizen, don't worry about visas. You are allowed 90 days of visa free travel to both Japan and South Korea, which is absolutely sufficient for you.
If I am understanding you correctly, your travel route is SFO-NRT/HND(TYO)-ICN/GMP(SEL)-NRT/HND-SFO. You will transit via Tokyo from Seoul to San Francisco.
Not all transits through Japan require transit visas. If you are staying airside for the transit, you don't need a transit visa. If you either:

need a change of airports, e.g. NRT to HND, or vice versa; or,
need to stay overnight for your transit

then you will need to apply for a transit visa. When you leave Japan for Seoul, you have ended your stay in Japan and thus "used up" your single-visit temporary visitor visa.
So you have two (actually three) options:

book a SEL-TYO-SFO return flight that doesn't require you to change airports or stay overnight. This is very easy to do, and is probably the best option for you;
if you are qualified, you can apply for a multiple-entry visa. If you are the citizen of a CIS (ex-USSR) state, Georgia, India, China (PRC passport holder), Indonesia, Philippines, Vietnam, and/or Qatar, you may be qualified as a tourist;
failing both, apply for a transit visa. Well, why do this.
Comment: @Crazydre Not accurate. That's a landing pass that one could get at Narita, but there is absolutely no guarantee that one will get it. In fact, according to the personal experiences of some people I know, this pass is actually harder to get than a transit visa. For overnight transit, I personally would recommend getting a transit visa.
Comment: There's no guarantee they'll let you in with a transit visa either, so the argument is moot. Entry is ALWAYS up to the immigration officer, but the fact is if they're satisfied that you're a genuine transit passenger who cannot make the connection on the same day, they'll give you the shore pass (what I meant by 72-hour entry). It's also the info the Japanese government has given to all airlines.
Comment: "If you either:
•need a change of airports, e.g. NRT to HND, or vice versa; or,
•need to stay overnight for your transit

then you will need to apply for a transit visa" No, for overnight transit, nationals who require a visa to visit Japan can enter Japan for 72 hours by presenting their passport and connecting ticket
Comment: Thank you both Crazydre and Xuanrui Qi for your response. We are U.S citizens. We booked our roundtrip flight from Narita to SFO back in January. We are only now thinking of adding a roundtrip flight to Seoul from Narita on our last week in Asia. Therefore, we definitely want to be back in Tokyo to make our flight back to SFO.  But, if I understand correctly, I don't need a visa anyway as I am a U.S citizen?
Comment: @urzababa Yes. Japan doesn't forbid visa runs, so no worries at all.
Comment: Can I clarify, a US citizen doesn't need to read your answer past "don't worry about visas"? The question is about US citizens (but maybe it was modified after you answered it) so the rest of the text about visas confused me.
Comment: @Calchas Yes, if you are a US citizen, don't worry about visas at all.


How would I make Alcoholic Rootbeer?

Question: I picked up some rootbeer extract at my local brewshop, and I've made a few batches in old soda bottles... but is it possible brew it with an alcohol content similar to that of beer?
Comment: Step one - brew awesome root beer. Step two - add vodka or other distilled spirit to taste or mindset.
Answer: Making a (good) hard root beer sounds tricky.  At least, the traditional method of brewing root beer doesn't seem like it would scale well to the weeks-of-fermentation beer brewing model.  I imagine in the end, while you would have higher alcohol content, too much of the sugar will have been fermented, so you'd end up with a few gallons of not very sweet liquid (e.g., not root beer).
One approach might be to start with a base fermentable (maybe some sort of wheat/pale dry malt extract combined with honey) that had a light profile in tandem with traditional root beer extract, replace/enhance traditional hops additions with herbs specific to root beer brewing, reach your target gravity, and add heaps of sugar prior to bottling for desired sweetness.  From here, you could bottle and pasteurize to stop the yeast from eating all the added sugar.
With all this said, the easy solution (which might yield tastier results) is to start with your favorite homemade root beer recipe and pour in copious amounts of your favorite distilled beverage!
If you go the route of experimentation, be sure to share any successful recipes!
Answer: I went through exactly this about 9 months ago. I couldn't find anything online about it, so I used a basic cider as the inspiration. Here are the exact notes I took while brewing it. Some sections were direct copies from the cider recipe, I added the rest.
1lb Munton's Dry Malt
2Fl Oz Root Beer Concentrate
¾ cup priming sugar
5lbs granulated sugar
Hefeweisen Ale Yeast WLP300

Pour 1 gallon of water in pot and bring to a boil. Add Dry Malt and stir.
Dissolve the sugar in the heated juice. Stir frequently until the sugar is completely dissolved. Use a wooden or plastic spoon.
Mix the liquid with the dissolved sugar into the bucket with the rest of the water, stirring thoroughly. Temp was at 79 degrees.
Add yeast to the liquid in the bucket. Mix well.
Put the lid on, tightly. Install the airlock and place the bucket somewhere out of the way, but with a steady temperature, usually around 70 degrees.

***After 1 day, bubbling stopped. I left it for another week with no change. Beer Nut rep suggested adding more yeast. WLP001 California Ale was added 1/23/10. I also picked up a hydrometer. Readings as follows:
    5.5%, 11, 1.045 @ ~65 deg.
Root Beer was bitter tasting and ended with .5 grav after adding bottling sugar. I bottled half with only that sugar, then boiled 1/3 cup of sugar and threw that in with the other half. The mixture was very cloudy (looked like mud).
Unfortunately, my hydrometer broke before I could take the first reading, but I'll tell you that it was a very high alcohol content. The resulting drink was a bit like a sarsaparilla without a whole lot of sugar. However, my girlfriend and I drank it like crazy. It was odd, but good.
Changes I would make:
1) Only dissolve about half the original sugar at the start; add the rest when bottling (just have to make sure you let the CO2 work the O2 out of the bottles before capping so you don't get little beer bombs).
2) Wait to add flavor until bottling.
3) Start with California Yeast
Comment: Hefe yeast!  That sounds awful.
Answer: I once had a delicious "American Cervesa" that was kegged into an uncleaned root beer keg.  It was really freaking delicious.  Definitely had a noticeable root beer flavor.
Comment: I have had beers have a 'root beer' essence in a cleaned and sanitzed keg formerly used for root beer - even just a cleaned and sanitized picnic tap and hose - root beer is very strong and persistent!
Answer: You'll have trouble with the sugars fermenting.
One option, which may or may not work, is to make the 'beer' to your target alcohol percentage, then filter it really good to pull out as much yeast as possible, and then perhaps add a potasium metabisulfite tablet or two to retard any remaining yeast. You could then add your sugar sweeteners without them fermenting, hopefully.
Another option would be to go crazy with some non-fermentable lactose sugar (what's used to sweeten milk stouts).
Comment: Why would there be trouble with fermenting the sugars?
Answer: 18# gw base malt, 2# choc., 4oz black or roast barley, 1# oats or flaked barley.  Used 2nd runnings for root beer stout.  to boil add 1 pt. molasses + 1 c. pale dry extract + 2oz root beer extract.  lightly hop with 2 oz cascade. ferment as usual. og 1.065  fg 1.013 .  kegged & force carbonated.  sweeter than typ. ales, dryer than sodas.  many compliments, 34 year old neice said best beer ever.
Answer: I just finished making a 5gal batch of natural root beer using danelion root, burdock root and sassafras, along a small amount of wheatgrass and beet juice (for colour).
I used a combination of white sugar, honey and mollasses to ferment and a combination of lactose and stevia to sweeten. I reused an English Ale yeast from an IPA I made a while ago and bottle conditioned
I transferred to secondary and tasted and was good but a little bland. I primed with corn sugar and bottled 2 gallons to see what it tastes like carbonated. To the remaining 3gal I added 1oz of centinnial hops boiled for 30m. It now has more hop bitterness and flavour but think it could still use a little more hop flavour so plan on boiling 1oz cascade for 15 mins to get some more flavour/aroma. Will then re-prime and bottle the rest.
Answer: Add sugar and ferment it to completion.  Done.
Answer: Ingredients

6 lbs dark lme
1 lb lactose
1 lb amber dme
4 oz root beer extract
1 oz haulertau hops
5 gallons water
6 grams splenda
1 packet safe ale us05
3/4 cup corn sugar

Steps

Bring 2.5 galons water to the boil
Stir in the liquid malt
Return to the boil
At the hot break add hops and amber dme
Boil for 60 min
15 before flame out add the lactose (Stir constantly)
At 60 min chill the wort to 100 degrees F as fast as possible
Add wort to fermenter
Top up with water to 5 gallons
Pitch the yeast at 78 degrees F
Leave for 2 weeks in primary
Rack to clean carboy
Add root beer extract and splenda
Top up to 5 gallon mark again
Leave for another 2 weeks
Prime the batch with 3/4 cup corn sugar
Bottle or keg
Leave for another 2 weeks
Cool in the fridge for at least 3 days
Answer: Some make it so hard... It's Root Beer.

3 Tbls Zanterains Root Beer extract
1 Tbls Vanilla Extract (Real)
1 Tps Wintergreen Extract
1/2 Tps Clove
5 quarts 110 degree water (save 16 oz out for activating yeast)
2 cups of sugar

Mix these together, let sit 10 minutes, whisk briskly till sugar is dissolved.
Now the yeast

1.25 grams Red Star Champagne Yeast
16 oz water saved out (110 degrees)
1 heaping Tbls sugar

Mix water and sugar in jar and shake, shake, shake.
Add yeast but dont stir.
When you see bubbles (activated) shake. Add to root beer.
Pour into Grolsch Bottles and seal, burp every day for 7 days)
Refrigerate and drink. Burp bottles everyday until drank.
Plenty of sweetness left, 3-4 % alcohol.
Nice little buzz with your soda. If ya want more or just have to get hammered... add neutral spirits. I like my little buzz in the afternoon.
Answer: Yes you can make root beer have an alcohol percentage close to beer. You follow the instructions on a root beer kit except add more sugar. Then you let the root beer sit in the bottles with the cap opened, this is to ferment them. Adding the extra sugar gives the yeast more to "eat" to ferment more and to still make it sweet after around 1-2 weeks of fermentation. After the 1-2 weeks put the cap on for a 1-2 days or until the bottle gets pressurized. put the bottles in your fridge and the longer they stay in the better they will taste!

How would I make Alcoholic Rootbeer?


Fiction writing or creative writing?

Question: I'd like to take a writing course, and I'm just a little lost on what course to take and need some guidance. Is a creative writing course worth taking before taking a fiction writing course? I have experience with writing, but I've never taken any courses, I've only just written for fun. Can anyone offer some advice?
Comment: "I would much rather take the fiction course" I think you should listen to this unless you see advice to take the other.
Comment: I should mention that these are online courses. I can work with a personal tutor, the courses are each a year long, no exams or deadlines, just coursework and I can take my time. I found both courses on Oxbridge Home Learning. I would much rather take the fiction course because I want to write fiction. But I'm not sure whether it may be useful to me to take the creative writing one first to better myself. Both courses have received great feedback. I'm just not sure what to do.
Comment: Welcome to Writers.SE. Be sure to take the tour
Comment: What, if anything, is the substantive difference between these two courses? I've always understood "Creative Writing" to be "Fiction" spelled funny.
Answer: It will depend on what you personally need, but I'd say the teacher and class organization may be more important than the subject.
Let's say one course is set up to foster your growth as a writer through  peer-led exercises, solo and group projects, presentation of work, and taught by a supportive teacher. Let's say the second course is more dry, a tired instructor, a few homework assignments - exams - even surveys of literature -
Then I'd suggest the first, interactive course, regardless of whether it is creative writing or fiction writing.
Take a look at the course listings. See if there are prerequisites for either of them. See who teaches the courses and the class size. Get a sense of each teacher (and class management styles, etc) on any of the online rating sites that look at this sort of thing. these things might help you decide. Your choice might even boil down to the time of day that a course is taught.
All else being equal? In that case, it truly will depend on your heart. You might be able to find students who have taken each course you are looking at to give you some feedback about them.
Answer: Take them all, even if they are the same course if they are taught by different teachers you'll learn different things from each experience. For example, the community college I finished my associates of arts degree offered three creative writing classes but each teacher took it in a different direction. I have 'creative non-fiction' 'micro-fiction' and 'creative writing.' All were listed in the catalog as just creative writing classes. In the first I learned how to write biographies the way people actually write them (who knew you could change so much and still call it non-fiction?). The second was how to write complete stories in 500-1000 words. The third had some poetry in it. When I went to the university to complete my bachelor's degree, the classes again were all called creative writing but were in sequence and though they were supposed to follow a trend overall, each teacher made it their own and so the first and second class in sequence felt identical but for the specific works we read and the third was completely different.
I learned important things from each.
Answer: If you can afford the courses, take them both, but to really further your writing tuition, I would try to find courses that are classroom based.
The reason I say that is because studying creative writing or fiction writing one-to-one is nowhere near as effective as studying as part of a group. There is little an online course can teach you that you will not be able to learn from books. And a tutor who feeds back on your work is only one person. Writing is very subjective and the point of view of one person is going to be very limited.
The other BIG advantage to classroom-based courses is that you will meet other writers and you'll probably find that the formation of relationships with other writers will be far more beneficial to your long-term success than anything you study alone online.
I'm not saying don't take them. But I can tell you from experience that I learned far more from actually writing and submitting my first novel (while reading dozens and dozens of books on the craft) than I learned from three years of classroom study at university. However, what I did get from the classroom was a group of dedicated writers who are now my beta readers and who also offer emotional support when things get tough (which they inevitably do in this business).
So, I would say, if funds are limited, invest them in classes where you get to meet other writers, not online.
Good luck!

Fiction writing or creative writing?


Is deep-frying silicone oil safe for home use?

Question: Perhaps it is due to confusion surrounding silicone, but what studies exist that document the safety and best practices of using silicone oil? I understand it is used for as an anti-foaming agent in deep-frying, and also has medicinal purposes (as an anti-flatulant); but in a high temperature evironment, does it remain inert and safe?
Comment: I don't have a definitive answer for you, but Waffle House fries their food on the flattop grill with a product called [Flavor Fry](http://food.zibb.com/trademark/flavor+fry/29236675).  I can't find the ingredients online, but I know it contains either Silicone or Silicone Oil (can't recall which) from having read the label many many years ago.
Comment: Just curious, what is your reason to want to use silicone oil over say regular veg oil in a deep fryer? Or it is just a general curiousity of how silicone oil holds up in high temperature.
Comment: Silicone based chemicals, overall, are more stable than the carbon based homologs.  Dimethylpolysiloxane (silicone oil)  is often used for calibrating instruments because of its heat stability.   With that said, I believe that normal usage of dimethylpolysiloxane in food preparation is as an additive of around 2 parts per million into more familiar carbon oils.
Answer: Not much is out there.
Food-grade silicone oil (dimethylpolysiloxane, for the chemists out there) is routinely used in medical and food-prep devices, and it has been approved by the US FDA Office of Food Additive Safety for use as a direct additive in diverse foods, like milk, dry gelatin dessert mix, canned pineapple juice, and even salt.  Of course, we're talking about minuscule amounts, in the range of 100 ppm; at high concentrations, it is a skin and eye irritant.  So what level is safe?  We can't assume that the FDA ever tested it, as the Office of Food Additive Safety is woefully underfunded.
An informal literature search yielded me only a handful of scientific articles looking at silicone oil in frying.  The most promising was by Bertrand Matthaus, Norbert Haase, and Klaus Vossman, "Factors affecting the concentration of acrylamide during deep fat frying of potatoes," Eur. J. Of Lipid Sci. & Tech., V.106(11), pp. 793-801 (Nov 2004) (fig. 3 specifically measures acrylamide concentration as a function of the amount of silicone oil).  Unfortunately, I don't have a subscription, so I can't tell what the bottom line was.
Myself, I don't see the benefit of using it at home.


Would the concentration of oxygen around fire increase as we get close to the fire (from the outside)

Question: Since fire require oxygen, wouldn't a fire, like those in the American forest along west coast, constantly draws in oxygen from around? And if that is so, would the concentration of oxygen around the fire higher than farther away?
Answer: A fire has no way to directly "draw in" oxygen for it to burn. It consumes what oxygen is in the immediate vicinity of the flame, depleting the air in oxygen compared to the concentration of oxygen in air further away. This sets up a concentration gradient such that oxygen will diffuse into the depleted region near the fire.
An even more important process than diffusion of oxygen into depleted air is convection driven by the heat of the fire. Oxygen-poor air that has been in the fire gets hot and rises, drawing fresh air into the base of the fire. Note that this still isn't oxygen being drawn to the fire, but a mass of fresh air flowing into the lower pressure area at the fire resulting from convection.
The bottom line is that a fire consumes oxygen, so the region around the fire will be slightly depleted in oxygen, not enriched as you suggest.
Answer: Due to convection it draws in air, which happens to contain oxygen.  It doesn't draw in oxygen specifically.
Answer:
Since fire require oxygen, wouldn't a fire, like those in the American forest along west coast, constantly draws in oxygen from around?

That doesn't make sense. You are reversing cause and effect; you are saying that since the presence of oxygen (along with other factors) causes fires, that this somehow mean that fires will cause the presence of oxygen. That would be like saying that putting solar panels on your roof causes your roof to get more sunlight.
Answer: No, it'd be more like the water level around a drain.
Sure the presence of a drain causes the water to flow in that direction, but the water flows in that direction specifically because that region's still water-deficient despite water flowing to it:
 -source
Same deal with the fire and oxygen.  Oxygen's net flow rate will tend to be toward the fire, but it'll be toward the fire because that area's oxygen-deficient, i.e. lower oxygen levels.  If the fire for any reason stopped having lower oxygen levels, oxygen'd stop having a net positive flow toward it.
Phenomena like this are often modeled with Fick's laws of diffusion.  Typically, the result looks like the concentration profile of the diffusing species (in this case, oxygen) decreasing from some bulk concentration (in this case, atmospheric concentration) to the concentration at the sink (in this case, the fire's vicinity).
  -source
In the above, if the oxygen concentration around the fire $C_1$ were to become higher than the atmospheric oxygen concentration $C_0$, then oxygen would start flowing away from the fire.
Comment: Kinda funny to think about a candle's flickering flame due to the dynamic conditions at the flame, kinda like how the whirlpool around the drain also flickers.


taglib declaration for tridion tags

Question: I'm moving a tridion site from asp.net to java and I am wondering about how to handle the taglib declaration for tridion tags (ComponentLink, ComponentPresentation, etc.) at the top of the page. It seems from my research that it's generally put in the page or component template. This seems odd to me. I thought one of the benefits of tcdl tags being converted to a specific language during deployment was to keep the Content Management environment language agnostic. If I have to hard code the taglib declaration into the template I am no longer language agnostic... Granted you have to specify the page extension (jsp, aspx) in the CMS but it still seems counter intuitive. Is there an out of the box option for this that I'm missing or would I need to consider a deployer extension to inject the declarations in the page during deployment?
Answer: As far as I have seen, most people place the snippet at the top of the Page Layouts. I understand the point you are making by not embedding the taglib - but out of the box this functionality doesn't exist. I would actually suggest writing a 'language agnostic' TBB that either checks the extension of the page being published, or the output type of the publication target and based on that injects the respective string.
So the TBB would run (after the DWT) and see that our page is a jsp page (as an example), and then find the head of the document through a regular expression and inject the following.
<%@ taglib uri="cd_tags" prefix="tridion" %>

Update: A way to write the TBB being consistent with the OOTB TBBs (such as the Link Resolver) would be to define a custom TCDL tag, such as:
<tcdl:PageDeclaration />

and use a regular expression to parse your page's output for your custom tag, and have it swap the tag with the appropriate string. It would give you a bit more control around placement of the tag.
Comment: Yeah that was the other method I was considering. I thought the deployer to try to keep that language separation between delivery and CM, but the template building block would seem to be a simpler solution.
Comment: +1 for keeping this managed independently even if still outputted by page templates. We see the same approach for other content (page meta) or functionality that's *added* by templates, without being hard-coded *in* the template's layout.
Answer: The likelihood of there being much benefit to be had from language-agnostic templates is almost certainly small. Most people would be OK with accepting some amount of language-specific things in their templates. So even if you can manage to achieve this technically (I'm sure you can.), it's probably still more effort than dropping these declarations into the page template, and fixing it up again on some putative future occasion when you change technologies again. Even then - when you change technologies again - you'll almost certainly change some other aspects of your design, so you'll be updating your code anyway, and you'll have a project with a budget.
Comment: Yeah fair point. I think keeping the language specific stuff well organized and easy to update on the CM side is more important than trying to eliminate it all together.

taglib declaration for tridion tags


Timeline & iFrame

Question: Can anybody guide about how
does the new FB timeline incorporate the iframe for its pages.
Or is there any new stuffs coming in to replace these stufs?
Answer: The way you create and display your iFrame will be the same, except for a size change.
The new iFrame will be 810px wide, instead of 520px - existing tabs (apps) that are set to 520px will just be centered on the page, so they aren't "broken." Giving us 290 extra pixels is great!
You can no longer set a tab as "default landing page". Instead, users always see the main Timeline view and have to actively click through to custom apps.
To edit which apps you display, click the drop-down icon to the right of the tiles, click the '+' button to import your custom apps, and then hover over them and click the pencil to swap them around.
If you have a contest or something on a tab which you would have wanted set as the "default landing page", you can create a post on your page which has a few sentences advertising such, with a link to the tab. You can then "pin" this post to the top of your page, so it will be the first thing users read. "Pinning" and "starring" on your Page act exactly like they do on your personal timeline.
Here's a good explanation of all changes

Timeline & iFrame


Need to convert from ISpatialReference to SpatialReference

Question: I am attempting to write a method in C# that will accept as input, an ESRI.ArcGIS.Geometry.ISpatialReference object and convert it to an ESRI.ArcGIS.Client.Geometry.SpatialReference object.  I need this for converting an IPoint to a MapPoint.  Are there any online resources for this?
Answer: Use the factory code from the ISpatialReference object to create a new spatial ref. If your client geometry obj was named myGeom and input spatial ref was named inputSR then it would look something like this:
<code>myGeom.SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(inputSR.FactoryCode);
</code>


Proving that non-regular languages are closed under concatenation

Question: How can I prove that non-regular languages are closed under concatenation using only the non-regularity of $L=\{a^nb^n|n\ge1\}$ ?
Answer: You can't prove it because it isn't true: the class of non-regular languages isn't closed under concatenation.
Let $X\subseteq \mathbb{N}$ be any undecidable set containing $1$ and every even number.  For example, take your favourite undecidable set $S$ and let $$X = \{0, 2, 4, \dots\} \cup \{1\} \cup \{2i+1\mid i\in S\}\,.$$ The language $\mathcal{L} = \{a^i\mid i\in X\}$ is undecidable, so it certainly isn't regular.  But $$\mathcal{L}\cdot\mathcal{L} = \{a^{i+j}\mid i,j\in X\} = \{a^i\mid i\in\mathbb{N}\}\,,$$
is regular.
Answer: Here is another example showing that the claim is false. Let $L$ be any non-regular language over $\{0,1\}$, and take
$$
L_0 = \{ 0 w : w \in L \} \cup \{ 1 w : w \in \{0,1\}^* \} \cup \{\epsilon\}, \\
L_1 = \{ 1 w : w \in L \} \cup \{ 0 w : w \in \{0,1\}^* \} \cup \{\epsilon\}.
$$
You can check that $L_0,L_1$ are not regular, but $L_0L_1 = \{0,1\}^*$ is regular.

Another nice example uses Lagrange's four square theorem, which states that every non-negative integer is a sum of four squares. Define $L_1 = \{1^{n^2} : n \geq 0\}$, $L_2 = L_1^2$ and $L_4 = L_2^2$. The four square theorem shows that $L_4 = 1^*$ is regular. Conversely, the pumping lemma shows that $L_1$ is not regular. Hence either $L_2$ is regular, in which case $L_4 = L_2^2$ is a counterexample to the claim, or $L_2$ is not regular, in which case $L_2 = L_1^2$ is a counterexample to the claim. (In fact, $L_2$ is not regular.)

Yet another example assumes the Goldbach conjecture: every even integer larger than 4 is the sum of two odd primes. Let $L = \{ 1^p : \text{$p$ is an odd prime } \}$. Using the pumping lemma it is not hard to show that $L$ isn't regular. Assuming the Goldbach conjecture, $L^2 = \{ (11)^n : n \geq 3 \}$, which is regular.
Answer: Concatenation of two non-regular languages may be regular.
Constructive Proof:
Let $L$ be any non-regular language. Now, we know $L'$ is also non-regular.
Consider $(L \cup \{ \epsilon \})$ ; $(L' \cup \{ \epsilon \})$, both of which are non-regular.
Now, $(L \cup \{ \epsilon \}).(L' \cup \{ \epsilon \}) = \Sigma^*$, which is regular.
For concrete example:
Consider $L =$ Set of All Prime Numbers over $\{ 0 \}$ ,
$M =$ Set of All Composite Numbers over $\{ 0 \}$
Both $L,M$ are Non-regular.
Now, $L.M = \{ 0^n , n \geq 6 \}$ which is regular.


switching over to awesome from openbox, can I still use my menu.xml

Question: I've been using openbox in LXDE for a couple of years now, and I have my menu.xml just the way I like it.  I see in awesome the default menu seems to be constructed in the rc.lua, but I also see that others have used different menus altogether (freedesktop menu for one).  Is there any way for me to use my menu.xml in awesome?
Answer: unfortunately not. , perhaps there's a openbox-menu to lua-script conversion script, but i have not seen one. i do encourage you to try creating one though. do one for me on the fly that lets me not have to re-do my pipemenu scripts.


How to overcome guilt

Question: I am interested in knowing what the Buddha said about guilt. I think I know that it is an unwholesome mind state. Is there any specific teaching that can be gleaned from the suttas. Can anyone also recommend any meditation or contemplation practices to get over crippling guilt.
Comment: Basically we felt guild while we regret about mistakes we did, regret and we correcting our mistakes so we don't feel guilt anymore. Apologize is one thing to do.
Answer: Within the Vinaya, a transgression (one that causes guilt or not) is overcome by declaring it to at least one monk.. The length of time it takes to overcome the transgression was set at the length of time the transgression was kept secret (keep some wrongdoing secret for a year, it is easy to imagine you won't just be able to consciously brush it off in one day!).
The quote on fools and wise people does this idea justice for me:

"Monks, these two are fools. Which two? The one who doesn't see his
  transgression as a transgression, and the one who doesn't rightfully
  pardon another who has confessed his transgression. These two are
  fools.
These two are wise people. Which two? The one who sees his
  transgression as a transgression, and the one who rightfully pardons
  another who has confessed his transgression. These two are wise
  people." AN 2.21

(also, has always worked for me on a personal level - admitting wrongdoing and guilt, preferably in a non-secretive, open setting to others is usually the best way of admitting this to your self, and therefore starting the process of changing yourself for the better)
Answer: One thing it says that kusala (wholesome) sila (morality) results in a lack of guilt.

AN 11.1
"Skillful virtues have freedom from remorse as their purpose, Ananda, and freedom from remorse as their reward."

It also mentions that "feeling remorse" doesn't undo an evil deed. What we must do instead is abandon evil deeds:

SN 42.8
That was not right. That was not good. But if I become remorseful for that reason, that evil deed of mine will not be undone.' So, reflecting thus, he abandons right then the taking of life, and in the future refrains from taking life.

So one key, apparently, is sila ("virtue" or "moral conduct"): that includes topics like the "five precepts", harmlessness, good-will, admirable friends, and so on.
I've read in several places (several authors) that good sila is necessary for (should be practiced before) meditation, for example:

To get good Samadhi, Sila (morality) has to be perfect, since Samadhi is build upon Sila. For a good experience of Anicca, Samadhi must be good. If Samadhi is excellent awareness of Anicca will also become excellent.

You asked, "recommend any meditation or contemplation practices to get over crippling guilt" -- the way to get over guilt is to abstain from, refrain from, abandon wrong-doing.

And "remembering your own (past) virtuous acts" might help you to get over guilt.
Also I think that viewing it as "your" guilt, accusing your self of being guilty, may be another example of dukkha associated with a sense of self.
Answer: Buddhism explains the 'doer' of bad actions (kamma) is 'ignorance' ('not-knowing') rather than 'oneself'. When the mind realises an action is bad & hurtful, this is the arising of wisdom & a positive step according to Buddhism. The Dhammapada states:

172. He who having been heedless is heedless no more, illuminates this world like the moon freed from clouds.
173. He, who by good deeds covers the evil he has done, illuminates this world like the moon freed from clouds.
Answer: Whatever you have done, what you are feeling guilty about, falls within the realm of human experience. Whatever you have done, has been done before, and will be done again by someone else.  In another culture or at another era of time, you likely would have been praised for doing the same thing. Guilt is always about an action that has occurred in the past, and when you really think about it, is relative, and you are judging yourself. It is a true waste of your present moment, not doing much good at all, if any.
The condition of the human experience, as pointed out by the dharma, there is never anything even close to perfection for anyone, ever. Life is only the way it is, perfect like that. The nature of the dharma can be seen as life is an ongoing learning experience.  Once on the path, you will be faced with wonderful feelings, emotions and experiences, and also with the dreadful ones. You will understand the dharma when you learn to repeat what feels good over time, and stop doing the things that make you feel bad (explore: the eight fold path). You will stop caring whether you get things, or whether you can avoid them, while living morally and lovingly. You will see life flowing to you. You will realize the futility of the self to control much of anything. You will see life as flowing along if you look, the dharma in action.
It starts with the awareness that you do have a SELF and also a self. These highs and lows of existence are experienced by the self and observed by the SELF. The self has a job to do, which is to understand the dharma, and become aware of the SELF, which is indestructible and endures. Buddha spelled it all out for us.  It is quite simple really, but you have to have determination, faith, and learn to be still enough for the smoke to clear of human existence, and peacefully your SELF will become recognizable. This is the SELF of all.
This is slightly complicated by what the Buddha called dependent origination. These are things that still need to be worked out by the self to finally experience the SELF.  Some people call this karma. Your self may be pulled into one direction or another where you will have to live with "guilt" for a time.  But, as dependent origination can hold you back, it can further your recognizing the dharma, and these activities like guilt will seemingly evaporate.  effortlessly. I would slowly contemplate your true SELF and see what happens.

How to overcome guilt


Cleaning fuel injectors?

Question: I took my car (2006 Honda Civic) to firestone to get an oil change and they told me I should get the fuel injectors cleaned.  I was in an Advanced Discount Auto Parts store the other day and I noticed that you can buy a bottle of fuel injector cleaner that you can pour down your gas tank.  Is this what firestone would do or would they do something that you can't buy at at store?
Comment: Related [Doing my own fuel induction service - how to, and how difficult?](http://mechanics.stackexchange.com/questions/1537/doing-my-own-fuel-induction-service-how-to-and-how-difficult)
Answer: The "correct" way to clean fuel injectors is to take them out and use some specialised equipment that also allows you to check the injector's spray pattern and flow, which I doubt Firestone will have - usually only FI specialists do have that sort of kit.
My guess is that they were trying to sell you some overpriced additive that you can buy at the store and pour into the tank. At a stretch the might have the sort of injector cleaner that you hook into the fuel system and run cleaner through that way. The latter is better, but still doesn't allow them to check if the clean was actually effective because the injectors stay where they are...
Did they actually say why they thought your injectors needed cleaning (apart from their bottom line, obviously)?
If you think they'd benefit from cleaning, I might be tempted to spend $10 on a bottle of Seafoam, Techron or other injector/fuel system cleaner and pour that into the tank. That'll still save you a lot of money compared to what Firestone would be asking to do more or less the same thing.
Also, in a lot of cases when people recommend that you clean the injectors, you're better off at checking/changing the fuel filter if that hasn't been changed recently. That's something that's overlooked often and tends to have more of an impact on fuel flow than deposits on the injectors.
Comment: This is very good and detailed post.  I just want to make a comment on "When people recommend that you clean the injectors..." -- you need to carefully consider WHO the people are.  For places like firestone (and even your dealership) selling "injection cleaning service" which as this answer stated, is just a cheap fuel additive, is basically pure profit while providing almost no value to you. So in these cases, when tire place recommends X, where X has nothing to do with tires, I'd suggest to simply walk away.
Comment: Sounds to me like their bottom like would run better then :). If you want to try their theory, get a bottle of injection cleaner and pour it into the tank to see if it does make a difference.
Comment: Although in many modern cars, there is no serviceable fuel filter; it is built into the fuel pump.
Comment: They didn't say anything was wrong with it. They just recommended it and said my car would run better.
Answer: I would advise against using any kind of additive or cleaner.  Your best bet is to send it to a professional injector cleaning service.
When my car hit 100K miles, I sent the injectors to this place this place.  Was fast and inexpensive though you have to live your car being down for about a week.  He even gives you a comparison of how fuel flowed before and after.
Comment: another option is to go to junk yard and buy another set of injectors. When my integra with 150k needed them, I bought 4 for $7 a pop. You spend a little more, but your car is off and back on the road in 1 hour.
Answer: They need to be taken out and cleaned. It's a relatively inexpensive job. Where I live, it costs halfway between a minor and major service for a small car. Best thing would be to ask them to do it the next time you have your car serviced to save on labour.

Cleaning fuel injectors?


Waiting time in queues for Empire State Building

Question: How long do you have to queue for going up the Empire State Building in general? As I've seen, they offer a special ticket where you are allowed to skip the elevator queue, but you have to queue for the security check nevertheless. How much time could you save with this express ticket?
Comment: @zuallauz I am sad it wont be open. "[...]The 120,000 square foot facility is scheduled to open in early 2015 and will occupy floors 100-102 at One WTC. [...]" http://www.panynj.gov/wtcprogress/wtc-observation-deck.cfm
Comment: If you're a gregarious kind of person, it might be possible to meet other travellers while you're waiting in line. Make eye contact, smile, say hello, and ask, "Are you from here?"
Comment: Apparently [The One World Trade Center](http://en.wikipedia.org/wiki/One_World_Trade_Center) is opening June 1 so you could check that out as well if the queues are too large. There's supposed to be a 3 floor observation deck on floors 100–102.
Answer: The wait time actually fluctuates throughout the year.  We do see a large increase in the number of guests during the summer months and most major holidays, causing a wait time of about 45 minutes to an hour on average.  During those times we recommend visitors purchase our Express Pass which allows you to skip the ticket and elevator lines.   Everyone does need to go through security as we do our best to provide the safest experience for everyone.  We recommend you purchase your tickets in advance at www.esbnyc.com to avoid having to queue at the building's ticket office. Should you visit other times of the year we suggest coming either between 8-10 a.m. or after 10 p.m. as those are both times we tend to see shorter lines, as Geeo mentioned.  Thank you and we look forward to seeing you!
Comment: I was quoted by the Empire State Building itself!
Comment: Hi, and welcome to Travel-SE! You can list your contact information, including the website, [on your profile page](http://travel.stackexchange.com/users/7101/empire-state-building) as well.
Comment: I queued to go on NYE, the wait time in the "express" lane was over 3 hours.  Needless to say I don't recommend going at that time
Answer: Queue are huge in peak hours (especially weekends) but not if you go early in the morning (try to be there before it opens, 8 am, or a little later) or late at night (1.30 am) when you should be able to enter within minutes.
Comment: Yes, they are opened until 2AM daily, with last elevators going up at 1:15 AM.
Comment: I didn't know the Empire is open in the wee morning hours!  You can go to the top at like 2am?
Answer: I was told by a friend to go at 5pm on a Sunday (well, an hour before sunset) - as they had no queues.
I dutifully went along at the time - perfectly clear day, and for some reason, there was no queue.  I walked straight past all the empty lines, straight up and had a short wait at the intermediate elevator.
I've been told however, that during peak tourist times it's possible to take two hours to get to the top.  I can only imagine the frustration.  So I guess that's the theoretical time you could save.
Answer: I'm just back from NYC and I will say on a weekday it should not take more than 45 minutes to get inside except evening. Everyone tries to go evening around 7pm to watch NYC in daylight and sunset time. We were there by 6.30pm and reached top by 7pm.


How is gender weighted in the developer survey of 2019?

Question: In this years Developer survey, several of the graphs have the option Weighted by Gender. What is this weight and how is it applied? Obviously the results between the two are similar. but there are some changes in percent. I could not find anywhere in methodology about how this was calculated, but I feel it is worthwhile knowing.
Comment: [This section](https://insights.stackoverflow.com/survey/2019#developer-profile-_-developer-type) explains it a bit, but it doesn't have the exact numbers for the weights they used
Comment: @osdavison That explains it pretty well. I saw the title and when straight to methodology to see if it was explained. I somehow missed the explanation right under the graph!
Comment: https://insights.stackoverflow.com/survey/2018#developer-profile-_-gender
Answer: I'm the data scientist who worked on this survey, and I can add a little more context. I saw that after you asked the question, you saw the more detailed explanation we have about survey weighting, and what it is:

Survey weighting is an approach used to analyze survey data when the survey sample doesn't match the underlying population well. For example, in our survey this year, 11% of US respondents identify as women, but data from the US Bureau of Labor Statistics estimates that women's participation in the software developer workforce is about twice that, more like 20%. We can use survey weighting to adjust for the mismatch between our survey sample and the population of developers.
  [....]
  When we use weighting, we see small increases in the representation of developer roles that have the most representation from women, like designers, and decreases in others with low representation from women, like DevOps.

Given the proportions involved (just about 11% of US respondents identified as gender minorities, and the US Bureau of Labor Statistics estimates that more like 20% of software developers are women), the actual weight is close to 2. So that means that a response from a woman or non-binary respondent (we assumed we undersampled all gender minorities about the same) was weighted about twice that of a man, for those weighted US results.
If you want to look more at the (quite simple) math involved, I like this explanation, with some examples.
Comment: Shouldn't this result in men's result being weighted down. That is, imagining that we have 90% of men and 10% of women answering for a population of 80%/20%, I would expect the following weights to be applied: 8/9 for men and 2 for women. This way, if we had 9 votes from men and 1 vote from women (total 10) afterwards we have 8  virtual votes from men and 2 virtual votes from men, for the same total.
Comment: Women are a gender minority *in the tech industry*. You people.
Comment: Controversial indeed.  Can we separate on religion and/or level of education too?  Let's get some real controversy!  Separate on hair colour?  Self-identified hair colour?  In all honesty though, I think calling women a "gender minority" is the most controversial thing said here, there are actually more women in the US than men.  I suppose this is concerning SO users specifically though, still.  I also don't see where "Software Developer" is listed on your survey - So maybe the "bureau" have different boundaries for their classification of what a software developer is?  That may skew results.
Comment: `gender minorities` is a thing now? Making everyone a victim it really not the way of improving \ fixing anything (written by a "racial minority" according to your definition.)
Comment: All this obsessing over gender. Honestly.
Comment: @Stargateur As there isn't a set of primary categories, it's only gender that's been singled out, it's obvious that this is a politically motivated view on the data.  I'd rather that was left out of SO.
Comment: Thank you for the good explanation. Since anything gender related in the survey has the potential to become controversial, I appreciate the straight forward answer.
Comment: Really? You all think that classifying **20% of a sample** as a minority is **controversial**? You must be kidding. Here's a definition of the term "minority" for you: [(Noun) The smaller in number of two groups forming a whole.](https://www.wordnik.com/words/minority)
Comment: @DanRayson As there is both result unweighted and weighted, I don't see the problem, MORE STATS. However, I don't care of these stats I don't judge people by sexe, but stats can't hurt !
Comment: There's a simple litmus test. Do research on "how many women became active SO/SE users influenced by new SE initiatives **aimed at upping female participation**" (as opposed to, "because SE added emails" as the Dev survey results ironically hint as :). While at it, "how many women became active software developers explicitly influenced by new * initiatives aimed at upping female participation". Then, honestly decide if you're doing this to feel self-virtuous, or to actually achieve a real measurable positive result.


one particular laptop does not receive UDP broadcast messages

Question: I am trying to debug a problem with a particular laptop which is running Ubuntu.  We have a service which uses broadcast UDP messages, and this laptop is not receiving them on its wireless interface, except occasionally.
I have boiled the problem down to an example using netcat and socat to demonstrate.  I am temporarily using a wireless router with 192.168.0.X address range.
On one computer I run
$ nc -lu 7570

And on the other computer I run
$ echo "hello" | socat - UDP-DATAGRAM:192.168.0.255:7570,broadcast

This shows up on all computers connected via wireless except the one in question.  If I run socat on the "bad" computer all computers see the message including itself.
Oddly, everything else about this computer seems fine.  It is able to use wireless to browse the net and transfer files with no problems.  It only won't receive UDP broadcast messages.  If I put the "socat" in a loop, it will receive the message once every 100 times or so.  Also, it seems to work fine on the wired connection.  So it must be a problem with the r8192se_pci driver which it uses for its wireless chipset.  However, I've never heard of such a problem where all traffic works fine except for broadcast messages.  Can anyone think of how I might fix or better-diagnose the problem?
Comment: Can you set the interface to promiscuous mode? If so, does that change it's behavior?
Comment: Have you tried sending it unicast UDP messages at the same time as you're sending the broadcast messages and seeing if they go through? UDP isn't reliable and neither is wireless.
Answer: Steve, this sounds very suspiciously like mismatched netmasks between the devices on the subnet... I would check that Ubuntu's netmask with ip addr show.


Qualcomm Atheros AR9485 Wireless Network Adapter not working on Ubuntu 13.10

Question: Solution 1
Hi I recently installed Ubuntu 13.10 on my laptop alongside windows. I have an Atheros AR9485 adapter. It worked well for a few weeks and now won't work anymore although it still works for the windows. I have tried out some of the solutions suggested but it still doesn't work. This so what I have so far done and the answers I get;
$ sudo modprobe -r iwlwifi
Error: missing module name.
FATAL: Error running remove command for iwlwifi

$ sudo modprobe -r iwlwifi.conf
FATAL: Module iwlwifi.conf not found.

$ cd /etc
/etc$ ls

Here I find the directory modprobe.d but modprobe does not exist so I try
$ cd modprobe.d
modprobe.d: No such file or directory

Then I go back to the /etc and try
$ cd /etc
$ cd modprobe.d
/etc/modprobe.d$ ls

I find the file iwlwifi.conf~ and try:
/etc/modprobe.d$ sudo modprobe -r iwlwifi.conf~
FATAL: Module iwlwifi.conf~ not found.

/etc/modprobe.d$ cd ~

$ sudo modprobe.d -r iwlwifi.conf~
sudo: modprobe.d: command not found

I had read a solution that was giving the steps below if I had succeeded. I tried to look for the .conf file and edited it as directed in the last part of this solution but it didn't work and I was unable to go beyond that;
Looks like this hardware has some problem with N configuration in WiFi.
Please try:
sudo modprobe -r iwlwifi
sudo modprobe iwlwifi 11n_disable=1

Now try to reconnect, if it helps follow below steps

Look into /etc/modprobe.d whether there are any file like intel-5100-iwlwifi-disable11n.conf then edit the file.
 sudo gedit /etc/modprobe.d/<filename_here>

Edit the line that says
options iwlwifi 11n_disable=1

to
options iwlwifi 11n_disable=0

Save and reboot.
If no file exists, create a new file
gksudo gedit /etc/modprobe.d/iwlwifi.conf

Add a new line:
options iwlwifi 11n_disable=1

Save and reboot.

Solution 2:
When solution 1 failed, I tried solution 2 as shown here below;
lspci -nnk | grep -iA2 net
lsmod
iwconfig
rfkill list

lspci -nnk | grep -iA2 net
01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI
Express Fast Ethernet controller [10ec:8136] (rev 05)
    Subsystem: Acer Incorporated [ALI] Device [1025:061f]
    Kernel driver in use: r8169
02:00.0 Network controller [0280]: Qualcomm Atheros AR9485 Wireless Network Adapter [168c:0032] (rev 01)
    Subsystem: Foxconn International, Inc. Device [105b:e047]
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader [10ec:5209] (rev 01)

lsmod
Module                  Size  Used by
nls_iso8859_1          12713  1
parport_pc             32701  0
ppdev                  17671  0
bnep                   19564  2
rfcomm                 69070  0
bluetooth             371874  10 bnep,rfcomm
vesafb                 13828  1
lp                     17759  0
parport                42299  3 lp,ppdev,parport_pc
hid_generic            12548  0
usbhid                 53014  0
hid                   101512  2 hid_generic,usbhid
usb_storage            62062  1
rtsx_pci_sdmmc         23527  0
ahci                   25819  2
libahci                31898  1 ahci
rtsx_pci               45546  1 rtsx_pci_sdmmc
r8169                  67341  0
mii                    13934  1 r8169

iwconfig
eth0      no wireless extensions.
lo        no wireless extensions.

rfkill list
The last command did not give an output so I could not follow the instructions that were to come as shown below;
Deactivate the hardware encryption of the driver:
Code:
echo "options ath9k nohwcrypt=1" | sudo tee /etc/modprobe.d/ath9k.conf
sudo modprobe -rfv ath9k
sudo modprobe -v ath9k

Any help either along these steps or any other solution will be appreciated.
Comment: The actions concerning iwlwifi are for a different (Intel) chipset and will be ineffective for your Atheros. I suggest you edit your question to remove it and add the result of the following: dmesg | grep ath
Answer:
Download this driver compat-drivers-3.9-rc4-2-su.tar.bz2 to a folder on your machine.
Go to the folder and unzip the tar file using tar xf compat-dri....
cd into the unzipped file and issue the following commands;

./scripts/driver-select ath9k
sudo make
sudo make install
sudo make unload

Reboot your system.

Hopefully, it works now.


Are companies required to send me an acknowledgement of phone call?

Question: There are several companies will only offer customer support over phone. Often times ending with: "We put a note in your file and sorry but the computer doesn't allow me to send you a conformation of this call." Are US based companies required to send you a conformation that the call occurred with the result of it?
Answer: No. In general, a business is not required to provide proof of interaction with a customer, though if you sue them for breach of contract because they failed to do something they are required to do, they would need to provide the proof to the court that they actually did it, if that is their claim. It is always possible that there is some contractual obligation to send confirmation, e.g. a clause that says "If you request service under clause 7, we must provide written acknowledgment of the request within 48 hours"; you can certainly request such a condition in a contract before you sign up.
Computer confirmation, or indeed written (surface-mailed) confirmation is never necessary, but some proof of having made a request may be necessary. For instance if the contract says "Customer must notify Service of this problem within 14 days of Event". One way to handle this is to submit your notification by certified mail, though that is not free of problems (if you have no idea where to mail it to). Another is to record the call: however, in some states (the "all party consent" states, such as Washington), you can get in trouble for doing this without notifying the other party (solution: announce that the call is being recorded). They may say something like "company rules do not allow you to record calls with us", but that is nonsense, and you can insist that you will record the call (they then may elect to terminate the call).
A third option, not as effective from the evidentiary perspective, is to have a witness present in the room. The wording of the all-party wiretapping laws might prohibit using the speaker without consent from all parties, but no law prohibits a third party from hearing your end of the conversation and testifying that he heard you say such-and-such. You can even record yourself talking, without getting the other party's responses (then the question in court would be whether the recording represents half of a real conversation, or something staged by you).
Comment: Thank you for your answer. The recording the call, with disclaimer, sounds like a sensible option. Does the recorded call fall under some privacy laws? Eg. will I be allowed to share the recording with a third party without the consent of the person from the other line? State is CA in case it matters.
Comment: California is an all-party consent state. An announcement that you are recording suffices to overcome the expectation of privacy, which means there is no prohibition against recording (thus no prohibition against disseminating the recordings).


Field not used warning in Eclipse

Question: I'm implementing a login filter in a JSF application. I have a private field called config. Eclipse displays a warning "The value of the field AuthenticationFilter.config is not used" despite the field being referred to in the init and destroy methods. Am I doing something wrong here or is Eclipse a bit confused?
Here's the AuthenticationFilter class:
package com.mymato.coop;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebFilter("/restricted/*")
public class AuthenticationFilter implements Filter {

      private FilterConfig config;

      public void doFilter(ServletRequest req, ServletResponse resp,
          FilterChain chain) throws IOException, ServletException {
        if (((HttpServletRequest) req).getSession().getAttribute(
            LoginBean.AUTH_KEY) == null) {
          ((HttpServletResponse) resp).sendRedirect("../login.xhtml");
        } else {
          chain.doFilter(req, resp);
        }
      }

      public void init(FilterConfig config) throws ServletException {
        this.config = config;
      }

      public void destroy() {
        config = null;
      }
    }

Answer: Initialising and destroying config aren't "using" them - the compiler is telling you that you've got a variable that you're wasting memory and time initialising and destroying when it isn't being used anywhere.
Answer: Using a field is not giving a value to it.
In your code, you give a value to the field but you never use this field.
In your case, if your field has a value but that this valued field is never used as input value in another instruction, it seems to be useless. The field has a value but nobody uses this value.
So, why declaring it ? Whereas, the warning.
In your code config is never used. why declaring it ?
Maybe, your class build is in progress and you will need it.
Maybe, you never need to store theconfig object to use it later. So you can remove the field in your class.
Question yourself about it .
Answer: I think if you just assign it to null will solve your problem
private FilterConfig config = null;

Sometimes I have this problem too. I think it's the because of the way FilterConfig class is implemented.
Although since you assign the pointer to another one, I don't see why there is a problem. Another quick fix: put some getters/setters, even though you might not use them :D
UPDATE: Also, what davidhxxx said

Field not used warning in Eclipse


Examples of forced stalemate

Question: The usual case one often sees specially in blitz play is when one side (usually the winning) mis-plays and then stalemate occurs with the losing side dodging a loss. But are there positions where stalemate is a forced (maybe planned) outcome no matter what the opponent does?
Answer: Oh sure, here are two examples (annotated):
This is a neat puzzle from the chess.com tactics, with white to play!
 [title "White to play!"]
 [fen "1q6/2b2ppb/4p1k1/7p/2Np1p1P/3P1Q2/6PK/8 w - - 0 1"]

 1.Ne5+ Bxe5 {black has to take else white either checkmates or wins the queen.} 2.Qg3+ fxg3+ {Pawn takes queen is forced else white checkmates} 3.Kh3 {and black has no way to avoid the imminent stalemate, any move draws!}

Sometimes stalemates are exploited strategically or tactically to force
a draw, e.g. in the game below between So and Karjakin, where black may
have had the stalemate setup in mind already when the white pawns got
to
g6 and h7.
 [title "W. So vs S. Karjakin 2017, black to move"]
 [fen "4r2k/4P1pP/2pB2P1/2P2K2/8/8/R7/4r3 b - - 0 1"]

 1.R8xe7 {black switches to antichess style of play to force the draw.} Bxe7 2.Re5+ {and white has no way to avoid the stalemate, the rook will keep checking the king where ever it goes.} Kxe5

Comment: I would like to upvote this twice, once per example. Bravo.
Comment: @thb why don't we let Ellie post 2 answers?
Answer: Viswanathan Anand vs Vladimir Kramnik is a notable one:
[FEN ""]
[Event "World Championship Tournament"]
[Site "Mexico City MEX"]
[Date "2007.09.15"]
[EventDate "?"]
[Round "3"]
[Result "1/2-1/2"]
[White "Viswanathan Anand"]
[Black "Vladimir Kramnik"]
[ECO "C42"]
[WhiteElo "2803"]
[BlackElo "2811"]
[PlyCount "130"]
[StartPly "128"]

1.e4 e5 2.Nf3 Nf6 3.Nxe5 d6 4.Nf3 Nxe4 5.d4 d5 6.Bd3 Nc6 7.O-O
Be7 8.c4 Nb4 9.Be2 O-O 10.Nc3 Bf5 11.a3 Nxc3 12.bxc3 Nc6
13.Re1 Re8 14.cxd5 Qxd5 15.Bf4 Rac8 16.Qa4 Bd7 17.Qc2 Qf5
18.Qxf5 Bxf5 19.Bb5 Bd7 20.d5 Ne5 21.Bxd7 Nxd7 22.Bxc7 Rxc7
23.d6 Rxc3 24.dxe7 f6 25.Rad1 Rc7 26.Nd4 Ne5 27.f4 Nc6 28.Nxc6
bxc6 29.Rd6 c5 30.Ree6 c4 31.Rc6 Rexe7 32.Rxc4 Rxc4 33.Rxe7
Ra4 34.Rb7 h6 35.f5 Rxa3 36.Kf2 h5 37.g3 a5 38.Ra7 a4 39.h4
Ra2+ 40.Kf3 a3 41.Ke3 Ra1 42.Kf2 Kf8 43.Kg2 a2 44.Kh2 Ke8
45.Kg2 Kd8 46.Kh2 Kc8 47.Kg2 Kb8 48.Ra3 Kb7 49.Ra4 Kb6 50.Ra8
Kc5 51.Ra7 Kd5 52.Ra4 Ke5 53.Ra5+ Ke4 54.Kh2 Kf3 55.Ra3+ Kf2
56.Ra4 Kf1 57.Kh1 Ke1 58.Kg2 Kd1 59.Ra7 Rc1 60.Rxa2 Rc2+
61.Rxc2 Kxc2 62.Kf3 Kd3 63.g4 hxg4+ 64.Kxg4 Ke4 65.Kh5 Kxf5
1/2-1/2

Anand forces the draw with 65. Kh5, after which 65... Kxf5 is stalemate, while not taking the pawn allows white into a winning pawn endgame.
Answer: The most common is the situation with King + Pawn vs King, if it's a draw. Okay, the stalemate isn't forced, but everything else is a draw too and it's important that the stalemate exists:
[FEN "8/3k4/8/3KP3/8/8/8/8 w - - 0 1"]

1.e6+ Ke7 2.Ke5 Ke8 3.Kd6 Kd8 4.e7+ Ke8 5.Ke6 {Stalemate}

There is also a sideline in the so-called Saveedra position:
[FEN "8/8/1KP5/3r4/8/8/8/k7 w - - 0 1"]

1.c7 Rd6+ 2.Kb5 (2.Kc5? Rd1! {followed by Rc1(+), =}) Rd5+ 3.Kb4 Rd4+ 4.Kb3 Rd3+ 5.Kc2 Rd4! 6.c8=Q? (6.c8=R! Ra4 7.Kb3 {White wins}) Rc4+ 7.Qxc4 {Stalemate}

Instead 6.c8=R wins, because the stalemate isn't there.
Comment: Probably you mean 2. Kc5? Rd1!  instead of 2. Kc5? Rc1! in the sideline of the second example?
Comment: @wimi I did, yes. Though Rc1 would also work if legal :-)
Answer: Here is a (rather simple) example of a position where stalemate is forced, no matter what either player does:
[FEN "8/p1p3pp/5ppk/6q1/5PPK/6P1/P1P3PP/8 w - - 0 1"]

1. fxg5+ fxg5+ 2. Kh3 a6 3. a3 a5 4. a4 c6 5. c3 c5 6. c4

Answer: Glorfindel's answer shows an example of a forced mutual stalemate. On a similar note, in the below position the soon to be stalemated side must stalemate themselves or lose, and the opposing side has no choice but to allow it. Forced here is a bit of a combination of best move and must make a move due to the king being in check. I made the sequence absurdly long just for fun.
[Title "Me, chess.stackexchange.com 5/19/2019, Black Draws"]
[FEN "3Rbk1K/qqqqq1NQ/6Qq/6QQ/6Qq/2b3QQ/1B4Qq/q5R1 b - - 0 1"]
[startflipped ""]

1... Qexg7+ 2. Qxg7+ Qdxg7+ 3. Qxg7+ Qcxg7+ 4. Qxg7+ Qbxg7+ 5. Qxg7+ Qaxg7+ 6. Qxg7+ Bxg7+ 7. Bxg7+ Qaxg7+ 8. Rxg7 Qxh7+ 9. Qxh7  Qxh7+ 10. Qxh7 Qxh7+ 11. Kxh7

Comment: wow that was fun.
Comment: I've played around a lot with this kind of position in the context of dead reckoning. It's a lot easier to keep the train on the rails if both players are trying to optimize as you are here, than if there is help play (as is implicit in the DP rule). But what happens if Black begins Bxg7+ instead of Qxg7+? I don't find a line for White to win. With help play, there's a pattern I've observed which is that each queue can only contain pieces from one colour, otherwise the draw is avoidable. Should be provable

Examples of forced stalemate


Was my shed repaired properly?

Question: There was a leak in our utility shed area about 8' x 6'. The construction of the shed is plywood with stucco covering. The handyman that repaired the rotten wood installed plywood over the rotten wood between the 2x4 inside the shed, and caulked all the seams on the plywood walls and under the roof. Is this an acceptable way to repair the problem? Will the mold and mildew go away, or will the 2x4's continue to rot?
Answer: The mold and mildew won't "go away" but if it gets no more moisture, it will die off and not cause any further damage.
However, in my book it is NEVER acceptable to just cover up the damage to make it look good.  That's the lazy I don't give a ** way of doing things.
Answer: It is not an acceptable means of repair. You should remove and replace wet, rotted and fungus infected wood. Covering it over is a bad idea. The rot can continue until the wood loses all structural integrity.
It sounds like the repair you got was a schlock job.
Comment: It won't continue to rot *if* the leak was properly sealed.  But we're on the same page otherwise. :)

Was my shed repaired properly?


How to prove that antipodal points on the Bloch sphere are orthogonal?

Question: I started by assuming two antipodal states
$$
|(\theta,\psi)\rangle = \cos\dfrac{\theta}{2}|0\rangle + \sin\dfrac{\theta}{2}e^{i\psi}|1\rangle\\
|(\theta+\pi,\psi+\pi)\rangle= \cos\dfrac{\theta+\pi}{2}|0\rangle + \sin\dfrac{\theta+\pi}{2}e^{i(\psi+\pi)}|1\rangle
$$
and then try to take the inner product of them. However, the math doesn't check out (as in the result I get $\ne0$). What is wrong with my deduction?
Answer: In spherical coordinates antipodal point to $(\theta,\psi)$ is $(\theta+\pi,\psi)$, not $(\theta+\pi,\psi+\pi)$
Answer: In the most widespread convention, the Bloch sphere uses $\theta = 0$ radians latitude to indicate the north pole $|0\rangle$, $\theta = \pi$ to refer to the south pole $|1\rangle$ and $\theta = \pi/2$ to refer to the equator, which includes the superpositions $(1+i)/\sqrt 2$ and $(1-i)/\sqrt 2$ as well as $i|1\rangle$ and $-i|1\rangle$.
If two great circles are distinct and intersect at a given point they will intersect exactly one other time at the opposite point on the sphere and such that a ray passing through both points will also pass through the center of the sphere.  Given this, the difference in latitude between one point and the equator will be of equal magnitude but opposite sign relative to the other, with the equator being at $\pi/2$.  As such, the latitude of the antipode to $(\theta,\psi)$ will be $\pi-\theta$.  As there are $2\pi$ radians of longitude to a sphere, the opposite of a given longitude with be $\pi+\psi$.
This being the case, coordinates for the antipode $(\theta,\psi)$  is $(\pi-\theta,\pi+\psi)$.  Trigonometric identities will be sufficient for the rest.
Comment: Hi, Timothy. Welcome to Quantum Computing SE! It is preferable that you use [MathJax](https://quantumcomputing.meta.stackexchange.com/questions/49) to typeset your posts. I've [edit]ed the answer on your behalf.
Answer:
Attaching my answer for finding the antipodal points on the Bloch sphereution in an alternate way
R Sridhar
Comment: Hi and welcome to Quantum Computing SE. Please refrain from posting scans, rather use typesetting in MathJax.


Can one use pluggable transports to host hidden services?

Question: If I want to host a hidden service but I don't want people to know that the server is communicating to Tor, what can I do? Can I use obfs4? How to setup things?
Comment: You can't, it's just how fundamentally things work. You can't use bridges for hidden services.
Comment: That's mostly wrong.  Tor instances that are hosting hidden services behave like clients, so you can use a bridge, though the new single hop onion service stuff will likely break.
Answer: Yes, bridge and pluggable transport users are able to provide onion services over them.
Bridge users are just taking some extra steps to pick their guard (the bridge), use their guard as their directory server and possibly to use a pluggable transport to transform the traffic while it traverses the network to the guard. Outside of that there is nothing fundamentally different with how Tor operates that would interfere with running an onion service.
However, pluggable transports are built to defeat DPI. That is, upon naive inspection by some algorithm it would not look like a Tor connection. It would likely not stand up to an in-depth analysis of the traffic. It would not be impossible for an observer to determine that it was communicating with the Tor network.
Comment: That said, "people using it to mask hidden services" is not something that was a design consideration for any of the released pluggable transports, so expecting them to actually do anything will likely be disappointing at best.
Comment: This depends on how resourceful and clever the adversaries are.  Ultimately the only thing I view obfs4 as any good for is bypassing dumb DPI boxes, because that's what I designed it to do.
Comment: Yes, but it would be suitable to bypass vanilla Tor filters on some network, for use cases like OnionShare or Ricochet.
Comment: I agree, I've added a note to clarify this point.


Shabbos morning (Drasha) sermon before Kaddish of Musaf

Question: Recently I saw in Halacha that it is inappropriate to have the sermon right before Kaddish of Musaf as it is considered a Hefsek. Yet many Shuls do just that and have the sermon right before Kaddish of Musaf. Is there any justification to do that? What is the source?
Comment: "I saw in Halacha..." ??
Comment: I have sometimes heard a ש״ץ say "השיבנו..." after the rabbi's sermon.
Comment: @msh210 I've seen some yeshivish people make a point of doing this -- and a lot of shul traditionalists making a point of *not* doing so -- "give me that old-time religion, it's good enough for me ..."
Comment: While it may (CYLOR) be halachically appropriate to say "השיבנו..." after the sermon, it always strikes me as somewhat disrespectful-seeming (doubtless only seeming and not intended), almost as if the ש״ץ were saying "okay, now that that's done, we can get back to what we were doing before we were interrupted". Perhaps it's just me.
Comment: [Chikrei Minhagim](http://www.judaica-world.com/product.asp?dept=0∏=BMOS1Z) (I think volume 2) discusses this issue and brings down all the various sources. Unfortunately, I don't have the sefer with me and can't find it online, so I can't quote it. Maybe someone else who has the sefer can look it up fill in the specific information.
Answer: Rabbi Shmuel Kamenetsky in his Sefer brings as the source for a Shabbos morning Drasha prior to Musaf Brachos 28b first Rashi.
Answer: Although the Taz (S.A. O.C 55:3) only requires a minyan at the time of kadish, the Magen Avraham (69:4, 234:1) and others say that there needs to be a minyan at the time of pesukim/learning for the kadish to go on.
I assume that the shuls don't want to leave the Torahs out and don't want to change the order of davening (and say ashrei after the Torahs are put away), and so rely on the pesukim in the drasha.  Perhaps even the Taz (234:1) would not consider it a hefsek because the drasha is part of the pesukim.
Answer: Literally stumbled upon this source last week:
http://www.hebrewbooks.org/pdfpager.aspx?req=4199&st=&pgnum=454 and the following page 455 where the author [Rav Gedalia Felder, zt"l; Posek from Toronto, Ontario, Niftar in 1992] posits that the Drasha is not a Hefsek prior to Kaddish right before Musaf.
Comment: Can you summarize his reasoning?
Answer: When one puts on Rabbeinu Tams before musaf on Rosh Chodesh, the custom is for the Chazan to say a pasuk quietly before Musaf because the donning of Tfillin is a Hefsek (though those not wearing Rabbeinu Tam Tfilin don't because just taking of tfillin is not). Perhaps that is what one should do (see LOR!).
Though many say it is also disrespectful to speak before Torah reading (It's like saying "My speech is more important than the Torah").
Speeking after Davening isn't possible because people would run away before.


Who was Cain's wife?

Question: I saw this problem on reddit today and I think that we cursorily covered this in Tanach class. Who was Cain's wife? In בראשית ד' י"ז it says " וַיֵּדַע קַיִן אֶת-אִשְׁתּוֹ" but it never says who she is. Some of the answers I've seen are that she must be his sister, however it does not mention any other children before this. Furthermore, I don't the "Torah doesn't happen chronologically" card can be pulled here because later, in פסוק כ"ה it says "וַיֵּדַע אָדָם עוֹד, אֶת-אִשְׁתּוֹ". The "עוֹד" means that this must have happened after the birth of קין. The explanation I think was given in class was that his wife was חוה. Is this the case?
Comment: doomrobo, welcome to Mi Yodeya, and thanks very much for this interesting question! I hope you look around and find other stuff that interests you.
Comment: Where on reddit, BTW?
Comment: I can no longer find it for the life of me :(
Comment: http://www.reddit.com/r/Christianity/comments/yzwhf/who_was_cains_wife/
Comment: That's not it. The one I read was a link to an image of a snarky Facebook post about how this guy was reading the Bible in a year and, already, he found an "inconsistency." Must have been /r/atheism.
Answer: The Ibn Ezra (5:29) writes:

והשואלים מי היתה אשת קין ושת, מה טעם לשאלה הזאת, כי כתוב באדם ויולד בנים ובנות, וכן כולם`
Those who ask who was the wife of Kain and Sheis, what is the cause for such a question - it is written by Adam that he had sons and daughters, and so too all of them.

According to the footnotes* on the Ibn Ezra brought in the sefer  מחוקקי יהודה here he means that all the early generations had both sons and daughters, and that a person would marry his twin sister or sister.

*From the footnotes:

ר"מ חפץ and after him ר. נפתלי הירץ וייזל and הכתב והקבלה explain that in the early generations each one was born with a twin sister or sister, and she became his wife. And in this way they were protected from adultery because no one would think about sleeping with a woman whom he did not know. And this practice continued until the days of Lemech who was the first to take two wives who were not his sisters, and from that time on they descended from their lofty spiritual status, and became like it is now, that sometimes a woman only had a son or only a daughter.
This is what the posuk in Bereishis 6:1 "And it was, when men began to multiply on the face of the earth, and daughters were born to them" means, that the way of the world changed from what it was previously when they did not only have daughters, because now they sometimes had only daughters without any sons, as it is until today.
Comment: "[I]t is written **by** Adam"? I think the translation should be "... for it is written about Adam 'and he begot sons and daughters'([Bereshit 5:4](http://www.mechon-mamre.org/p/pt/pt0105.htm#4)), ...".
Answer: The Gemara in Sanhedrin 38b says that Kayin married his twin sister.
The Medrash HaGadol says her name was Kenunoso.
(Source: Tamma DeKra from Rav Chaim Kanievski.)
Comment: Where in Sanhedrin 38b does it say that Kayin married his twin sister? (And, if you say that's what Tamma DeKra says, can you quote where it actually says so?)
Answer: Elsewhere, Rabbi Kanievsky offers another name for Cain's wife, הויה in addition to קנונתו as mentioned above. See http://hebrewbooks.org/pdfpager.aspx?req=49913&st=&pgnum=4
Also, in the book of Jubilees Ch. 4 her name is given as Awan.
Answer: According to R' Yitzchok ben Yehuda Abarbanel on his commentary to Bereishis 4:1, Kayin and Hevel were each born with a twin sister who they married. Kayin's wife is named as Kalmono and Hevel's wife is named as Balbiro. See this link the very first line of the commentary.

Who was Cain's wife?


Get calendar to snap to one screen, rather than overlaying in the middle

Question: I have a problem with Lubuntu desktop in that, the calendar on the tray bar when clicking on the current time opens in the centre of the entire desktop spanning the gap between my dual monitors which is really annoying. I can stopgap this by adding a spacer after the current time by a certain amount to offset it - but this leaves a ridiculous gap in the tray bar.
Answer: I've solved this by right-clicking the tray bar and going to panel settings and in there making the width 100% instead of a set width of the first monitor's resolution. This has the downside of extending the tray bar across both desktops instead of one, and as such is only really a stop-gap solution.
Answer: Instead of stretching the panel across both monitors I moved the clock to the left of the panel. I right click the panel, go to "Add/Remove panel items," select digital clock and move it all the way up until it's second only to the menu.


How long is too long to cook meatballs in sauce?

Question: We use ground Chuck for the meatballs when making meatball subs. No spices or chopped onion, just meat and the meat sauce is a basic tomato based concoction. Then we cook the meatballs(raw) in the sauce in a crackpot for about 10 hrs! When we serve it, the sauce has cooked away by 95%. What I need to know is can you overcook meatballs and/or sauce (on low setting)? They always have a terribly strong and bitter taste that ground beef shouldn't have.
Comment: A covered crockpot on low shouldn't cause a sauce to reduce by much. The only way I can imagine what you're describing happening is if the lid is left off and the power level left on medium or above for 10 hours. The method you describe isn't too off the mark for meatballs that should be just fine. [sample recipe](http://allrecipes.com/recipe/easy-slow-cooker-meatballs/) So what are we missing here?
Comment: Interesting question and answers about why this way of cooking is a culinary disaster.   The only improvement I can imagine is a more specific title so others who might be interested can find it.
Answer: That long time in the crock-pot sounds bad to begin with. Ground meat should be just cooked to a safe temperature -- any more and it will lose moisture and get tough.
The bitterness could come from prolonged exposure to the acidic tomato sauce. If you've ever made ground taco meat and over-seasoned it with lemon or lime juice, it will often taste bitter or astringent.
Answer: Bitter flavors sound like something is burning.  Your description indicates the sauce is reducing by an extreme amount.  It seems possible it is burning on the bottom of the crock, and the burnt flavors are infusing throughout the dish.
You are not describing a method which is likely to produce outstanding results.  The lack of seasonings, breadcrumbs or similar (which change the texture to a more... well... meatball... consistency), the lack of browning (to develop beefy flavor), as well as the possible over reduction of the sauce all seem to lead towards a poor result.
The 10 hour cooking time may be the least of the issues, although it is longer than required by a considerable margin.  Even so, if the sauce doesn't over reduce, and the temperature is well maintained at a very low simmer, it should not be excessive.


Are BLAS implementations guaranteed to give the exact same result?

Question: Given two different BLAS implementations, can we expect that they make the exact same floating point computations and return the same results? Or can it happen, for instance, that one computes a scalar product as
$$
((x_1y_1 + x_2y_2) + x_3y_3) + x_4y_4
$$
and one as
$$
(x_1y_1 + x_2y_2) + (x_3y_3 + x_4y_4),
$$
so possibly giving different result in IEEE floating point arithmetic?
Comment: There are some complaints about BLAS quality in [this thread](http://community.wolfram.com/groups/-/m/t/789993), search for CBLAS in the page.  That would suggest that not only do they not give the same result, but not all of them are accurate enough for any task ...
Answer: No, that is not guaranteed. If you are using a NETLIB BLAS without any optimizations, it it mostly true that the results are the same. But for any practical usage of BLAS and LAPACK one uses a highly optimized an parallel BLAS. The parallelization causes, even if it only works in parallel inside the vector registers of a CPU, that the order how the single terms are evaluated changes and the order of the summation changes too. Now it follows form the missing associative property in the IEEE standard that the results are not the same. So exactly the thing you mentioned can happen.
In the NETLIB BLAS the scalar product is only a for loop unrolled by a factor 5:
<code>DO I = MP1,N,5
          DTEMP = DTEMP + DX(I)*DY(I) + DX(I+1)*DY(I+1) +
     $            DX(I+2)*DY(I+2) + DX(I+3)*DY(I+3) + DX(I+4)*DY(I+4)
END DO
</code>
and it is up to the compiler if each multiplication is added to DTEMP immediately or if all 5 components are summed up first and than added to DTEMP.
In OpenBLAS it is depending on the architecture a more complicated kernel:
<code> __asm__  __volatile__
    (
    "vxorpd     %%ymm4, %%ymm4, %%ymm4               \n\t"
    "vxorpd     %%ymm5, %%ymm5, %%ymm5               \n\t"
    "vxorpd     %%ymm6, %%ymm6, %%ymm6               \n\t"
    "vxorpd     %%ymm7, %%ymm7, %%ymm7               \n\t"

    ".align 16                           \n\t"
    "1:                          \n\t"
        "vmovups                  (%2,%0,8), %%ymm12         \n\t"  // 2 * x
        "vmovups                32(%2,%0,8), %%ymm13         \n\t"  // 2 * x
        "vmovups                64(%2,%0,8), %%ymm14         \n\t"  // 2 * x
        "vmovups                96(%2,%0,8), %%ymm15         \n\t"  // 2 * x

    "vmulpd      (%3,%0,8), %%ymm12, %%ymm12 \n\t"  // 2 * y
    "vmulpd    32(%3,%0,8), %%ymm13, %%ymm13 \n\t"  // 2 * y
    "vmulpd    64(%3,%0,8), %%ymm14, %%ymm14 \n\t"  // 2 * y
    "vmulpd    96(%3,%0,8), %%ymm15, %%ymm15 \n\t"  // 2 * y

    "vaddpd      %%ymm4 , %%ymm12, %%ymm4 \n\t"  // 2 * y
    "vaddpd      %%ymm5 , %%ymm13, %%ymm5 \n\t"  // 2 * y
    "vaddpd      %%ymm6 , %%ymm14, %%ymm6 \n\t"  // 2 * y
    "vaddpd      %%ymm7 , %%ymm15, %%ymm7 \n\t"  // 2 * y

    "addq       $16 , %0         \n\t"
 "subq         $16 , %1            \n\t"
    "jnz        1b                   \n\t"
...
</code>
which splits the scalar product in small scalar products of length 4 and sum them up.
Using the other typical BLAS implementations like ATLAS, MKL, ESSL,... this problem stays the same because each BLAS implementation uses different optimizations to get fast code.
But as far as I know one need an artificial example to cause really faulty results.
If it is necessary that the BLAS library returns for the same results ( bit-wise the same) one have to use a reproducible BLAS library such as:

ReproBLAS http://bebop.cs.berkeley.edu/reproblas/
exBLAS https://exblas.lip6.fr/
Answer: The Short Answer
If the two BLAS implementations are written to carry out the operations in the exact same order, and the libraries were compiled using the same compiler flags and with the same compiler, then they'll give you the same result. Floating point arithmetic is not random, so two identical implementations will give identical results.
However, there are a variety of things that can break this behavior for the sake of performance...
The Longer Answer
IEEE also specifies the order in which these operations are carried out, in addition to how each operation should behave. However, if you compile your BLAS implementation with options like "-ffast-math", the compiler can perform transformations that would be true in exact arithmetic but not "correct" in IEEE floating point. The canonical example is the non-associativity of floating point addition, as you pointed out. With the more aggressive optimization settings, associativity will be assumed, and the processor will do as much of that in parallel as possible by re-ordering the operations.
The other standard-breaking behavior comes via the use of FMA (fused multiply-add) instructions. These are prominent in operations like matrix multiplication, and they have the potential to double the throughput of your routine. However, they perform the operation $a+b*c$ in a single operation, and it only incurs a single floating point rounding step. This deviates from the IEEE standard, which requires that this operation have two rounding steps. This makes the FMA result actually more accurate than the IEEE one, but it is technically standard-breaking behavior.
Comment: _"Floating point arithmetic is not random"_. It's sad that this has to be explicitly stated, but it seems that too many people think it is...
Comment: Well, unpredictable and random look pretty similar, and a lot of intro programming classes say "never compare floats for equality," which gives the impression that the exact value can't be relied upon in the same way as integers.
Comment: @TylerOlsen This isn't relevant to the question, and this isn't why those classes say such things, but IIRC, there used to be a class of compiler bugs where equality couldn't be relied on. E.g., `if (x == 0) assert(x == 0)` *might* sometimes fail, which from a certain point of view is as good as random.
Comment: @Kirill Sorry, I was simply trying to make the point that many people never really learn how floating point works. As for the historical point, that's kind of terrifying, but it must have been resolved before I got into the game.
Comment: @TylerOlsen Oops, my example is wrong. It should be `if (x != 0) assert(x != 0)`, because of the extended-precision arithmetic.
Comment: @kirill Unfortunately those aren't even compiler *bugs* in some languages. For example, I believe the C# spec allows this perverse behaviour.
Answer: In general, no. Leaving associativity aside, the choice of compiler flags (for example, SIMD instructions being enabled, usage of fused multiply add, etc.) or the hardware (e.g., whether extended precision is being used) may produce different results.
There are some efforts to get reproducible BLAS implementations. See ReproBLAS and ExBLAS for more information.
Comment: See also the Conditional Numerical Reproducibility (CNR) feature in recent versions of Intel's MKL BLAS.  Realize that getting this level of reproducibility will typically slow down your computations and may slow them down a lot!


Data collected from ROS

Question:
How can we collect the flight data after a ROS simulation and what kind of dataset do we obtain? Can we get the sensor and video dataset with timestamps to be used in analysis?

Originally posted by jean01 on ROS Answers with karma: 17 on 2020-04-03
Post score: 0

Original comments
Comment by gvdhoorn on 2020-04-03:
I can't answer this (as I'm not into drones), but I would recommend to add quite some more details and information to your question, as right now your question lacks all context. What exactly are you using? Which packages? What tools are you using for simulation?
Or if you're asking this to determine whether you should even (want to) use ROS: please tell people here what it is you're using right now, and what sort of functionality you are looking for.
Without more context I believe the best answers you are going to get will be similar to:
"well, if you use the correct packages and configuration for them, you could do that".
Comment by jean01 on 2020-04-03:
Hector, Gazeboo or any other package to be used with drones are all ok. Actually I am new into the ROS and just trying to run it. How does the data collection process happen when I fly a drone for a few minutes? Where can I find the resulting data?
Answer:
You can record any ROS data you want using rosbag record:  http://wiki.ros.org/rosbag/Commandline
Then you can play that data back later.  While playing back recorded data, it looks basically like it did originally, so you can use any tools and utilities you want to look at and analyze the playback data.  Same as you could do with the live data.
All ROS data has timestamps, I believe. I think you get that for free with ROS.  But some sensor plugins might also embed their own special timing information into the streaming data if they feel it necessary.

Originally posted by Kurt Leucht with karma: 486 on 2020-04-03
This answer was ACCEPTED on the original site
Post score: 1

Original comments
Comment by jean01 on 2020-04-04:
Thank you very much. I will try after running the system.
Comment by jean01 on 2020-04-09:
Thank you Kurt. rosbag record was helpful. This link helped me with recording the data:
http://wiki.ros.org/ROS/Tutorials/Rec...
now I need to reduce the size of data downloaded as it is a huge amount in a short period of time. Should I change the sampling rate of sensors and fps of the cameras or would there be any other way?
Comment by jean01 on 2020-04-09:
This question can be continued from https://answers.ros.org/question/348942/sensor-data-too-huge/

Data collected from ROS


Georeferencing a .jpg image

Question: I have a jpeg image of a district. I need to georeference it. The problem is that I am able to find only one control point of it. All other line features (are roads) are those which I am not able to match with Google since the boundary of my area and the area given in Google Maps differs. I am hereby attaching the image. Please help me to solve the issue
Comment: Hi, and the roads are also not present in google maps?
Comment: ya please tell me wat to do?
Answer: Please try to find out known points or nodes which are matching to Google. Try at least 3 points from Google. I know it is very difficult case but go deeply with your map and google map. or try to find out any 3 corner points of a municipal boundary.  Another way is try to get a georeferenced map of your municipal corporation then try to rubber sheet it with georeference tool.
Answer: Can you go into ArcMap and load one of the Basemap and then bring that jpg to it and use the Georeferencing toolbox ?
Answer: If you want to use QGIS for this, here a tutorial which I have written for a similar problem: http://gis.cri.fmach.it/download/tutorials/geocoding_maps_from_articles.pdf
Answer: Can't you look for bounaries which match to junktions of the roads and use it as pass points? Boundaries of quaters are normally build along transport ways.
Answer: Arun ...Just check the Municipal boundary on google. may be zoom level will be different but u will get the X Y of 3 corner from it. Just check the unit of Google Maps if it is Degree decimal then change it ArcGis unit. Adjust the zoom level of Google maps of your area, may be Google having the Boundary of Municipal corporation area. just check it..
Thanks and Regards

Georeferencing a .jpg image


Stereo vs mono studio monitors?

Question: Stereo vs mono studio monitors?
I am looking for a pair of powered studio monitors. I am looking at the JBL Two way powered monitors What does two way mean? Is it very important to have stereo monitors? Are there any good stereo monitor? I have a Soundcraft EPM 8.
Answer: The term "2-way" has nothing to do with mono or stereo. 2-way means that the monitor speaker reproduces the audio signal with two speaker cones, each responsible for a certain frequency range that are finely tuned to work together. The same is true for 3-way monitor speakers, or any monitor speaker with more than one cone for that matter.
A single monitor speaker will always be mono, i.e. it can reproduce one channel of an audio signal. "Stereo" is often mistaken to mean "left and right", the term however refers to any reproducing system that's capable of reproducing more than one channel. The amount of channels that can be reproduced by a system is expressed by an accompanying number, such as "2.0". That would be a reproducing system capable of reproducing two channels of a signal and is a typical home studio setup (with one speaker reproducing the left and one reproducing the right channel of a 2-channel signal). "2.1" would be a system consisting of two monitor speakers and a subwoofer. "7.1" would typically be a surround setup with subwoofer (left, center, right, left mid, right mid, left surround, right surround, LFE).

Is it very important to have stereo monitors?

If by "stereo" in this case you are (falsely) referring to a monitor speaker with multiple speaker cones, then no, the number of speaker cones is not indicative of sound quality per se. However, I strongly recommend two monitor speakers for music production purposes, that means a 2.0 speaker setup. A 2.1 stereo setup would also be a common option for music production.
Answer: "Two way" means different speaker chassis for two different frequency ranges.
Since directivity, response and efficiency of speakers is frequency dependent, using several different speakers yields better results than a single cone.

Stereo vs mono studio monitors?