Using depleted uranium weapons in medieval battle

Question: The Vikings have journeyed far and wide, and they have discovered the secret to producing vast quantities of depleted uranium and also how to forge weapons with it.
Will the Vikings dethrone Genghis Khan as the world's most powerful conqueror or will their legacy be only one tiny pebble in the never-ending river of time?
Comment: This question no longer meets WB.SE guidelines. It's too broad and too opinion-based. How could anyone realistically determine if the advent of a single technology - if that were even possible (it takes a lot of tech to get to depleted uranium, they're not Ghengis-Khan-era Vikings anymore) - would affect thousands of years of world history.  VTC.
Answer: Depleted uranium has a few features that make it useful for modern projectile weapons:

It's one of the densest substances known.  For high-speed impacts, one of the key parameters for penetration depth is the ratio of the projectile's density to the target's density.
It's self-sharpening.  As a DU projectile penetrates a target, it tends to fracture in a way that maintains the shape of the projectile.
It's flammable.  Uranium dust tends to spontaneously ignite, and after shooting an armored vehicle, there's plenty of dust flying around.
If you've got a nuclear weapons program, it's dirt-cheap.  DU is a waste byproduct of uranium enrichment, so if you're willing to spend the money to build nuclear weapons, you get a large supply of depleted uranium essentially for free.

DU is used for armor because of the density and cost factors mentioned above.
Now, let's look at it in the context of medieval combat.
Swords, arrows, and other weapons are moving at slow-enough speeds that the strength of the material matters.  Uranium isn't very good for that: it has a tensile strength of around 500 MPa and a yield strength of 170 MPa; for comparison, basic carbon steel is around 900 MPa/500 MPa, good spring steel is 1400 MPa/1000 MPa, and even bronze is better at around 700 MPa/650 MPa.
The self-sharpening ability is nice, but your arrows and swords probably aren't hitting metal often enough for it to matter.
Flammability is bad if it's your armor or your sword that is catching fire.
Density?  You can get some seriously effective maces that way, by concentrating a huge weight into a small area.  For weapons such as swords, where strength comes as much from the shape as from the material, a denser material simply means a heavier weapon, causing the user to tire faster.
If your Vikings decide to concentrate on depleted-uranium weapons, they'll probably be remembered as suicidally-aggressive warriors who tire easily and whose weapons shatter with a good blow.
Comment: @PyRulez - Why in the world would DU armor give the wearer cancer? You are aware, I hope, the DU is what's left when the good stuff (U235) has been extracted (US DOD material is ~0.3% U235). A really small amount of research will let you know that the half-life of U238 is about 4.5 billion years, or just about the current age of the solar system, while U235 is about 700 million. As a matter of fact, DU is sometimes used as radiation shielding. So, why would it give the wearer cancer?
Comment: @PyRulez, in addition, uranium decays primarily via alpha emission, and the anti-spall lining of a tank is adequate shielding against it -- as is your clothing, a few inches of air, the outer layer of your skin, or just about anything else.
Comment: @PyRulez, it takes a long time to develop cancer -- most Viking-era soldiers won't live long enough, even if they aren't killed in battle.
Comment: Wait, wouldn't DU armor give soldiers *cancer*!
Comment: I meant modern soldiers. Why would they do that?
Comment: There have been issues of soldiers getting radiation burns from DU ammo. It isn't stuff you want to mess with. DU armour on a human body would kill you before it gave you cancer. In a vehicle, there's enough insulative material that it isn't such a problem, so long as you don't inhale the dust from it after getting hit.
Answer: No

Replace "actinium" with "depleted uranium." The only use of depleted uranium would be to throw it at your enemies.
Comment: Nope. Actinum has a half-life of 21 years. U-238 has a half-life of 4,468,000,000 years. Your comment about "throwing it at your enemies" might make sense as U is very dense, but in context it sounds like you're afraid of its radiation, which you have tragically overblown. It's about as radioactive as a banana and harder to acquire.
Answer: Uranium is a very dense metal, so a sword, axe head or even spear tips and arrows would be mush heavier than standard steel models. The weapons would be very unwieldy and tiring even to carry into battle, much less use in a physically demanding bout of hand to hand combat.
If any enemy were to discover the massive weight of the weapons, their best course of action would be to feign running away and encourage the Vikings to chase them, then turn and cut down the exhausted Vikings as they tried to catch their breaths.
Perhaps the only possible advantage is the weapon would cleave through most shields and armour with a single stroke, assuming anyone is unfortunate enough to be standing in front of a well rested Viking right at the start of a battle.
Even the pyrophoric effects of DU (it self ignites at a high enough temperature in an oxygen atmosphere) only come into play when the piece of DU passes through a piece of metal at supersonic speeds and the frictional energy heats the metal to the point of ignition.
The Great Khan will have a mild chuckle as his mounted warriors ride around the exhausted band of Vikings toiling on the road to Kiev and supposed safety with the rest of the Rus....
Comment: "Self sharpening" happens when a DU dart is passing through metal armour at supersonic speeds, which is vastly beyond what a human swordsman is going to achieve with a swing.
Comment: The "power" of the DU weapon would be its mass. Steel is far harder and sharper when used for sword blades and axe heads, so you would want the opposite: a core of DU with edges of steel.
Comment: `Perhaps the only possible advantage is the weapon would cleave through most shields and armour with a single stroke.` Hmm. I wonder if you put a DU edge on a sword, would it have the same effect, but without the weight of a solid DU sword?
Comment: Ah, I thought it might have to do with the self sharpening thing.


The source code for accent commands

Question: I'm using LaTeX on Ubuntu, it calls TeX Live here. I'm interested to see  source code of accent commands behavior. Where can I find it?
Comment: Welcome to tex.sx! It's not necessary to sign your questions (as there is already a box with your username below it) or to begin them with a greeting.
Comment: @Martin: Thanks a lot, Martin, for your advice!
Answer: Have a look at source2e.pdf. Besides downloading, you could write
texdoc source2e

at the command prompt
This file contains the commented LaTeX sources. Use the PDF reader search feature for accent or \DeclareTextAccent and \DeclareTextCommand.

The source code for accent commands


How does one reconcile the fact that Avraham Avinu proselytized to non-Jews and yet Judaism is not a proselytizing religion?

Question: I've read that Avraham Avinu proselytized to anyone he encountered, encouraging them to acknowledge HaShem as the Master of the Universe and express gratitude to Him. Yet, it is generally understood that Judaism is not a proselytizing religion. Are there any rabbinic explanations as to why Judaism doesn't proselytize even though its great progenitor actually proselytized?
Comment: We don't want the whole world to be Jewish, we want the whole world to be ethical monotheists. The latter is what Avraham was pushing.
Comment: He was informing them of the existence of G-d, he wasn't telling them to join the Jewish religion - it didn't exist?!
Comment: We do make an active effort - it is called being an אור לגוים - "a light unto the nations". This plus also making a kiddush Hashem.
Comment: @Dov True. Then shouldn't it be so that, to honor what made Avraham Avinu beloved to HaShem and consequently establish a covenant with him, there should be a regular effort made to teach non-Jews about HaShem and the 7 Laws?
Comment: @Dov If you found the cure to cancer would you keep it to yourself only and not share it with the rest of the world?
Comment: Of course not which is why Avraham shared the existence of G-d
Comment: @Shalom I just think that if we have the Torah, and if it's the ultimate truth, and if it is the word of God, written by God, then why don't we just share that with the world? If pious Jews are convinced that the Torah will make your life better, why not share that and make more converts. Why not actively seek out converts?
Comment: @Shalom If you found the cure to cancer would you share it with the world or keep it to yourself? Any honest person would share that. Why not share the Torah, the cure to all suffering? Sharing Torah means making more converts, means more Jews. More Jews studying Torah will bring the messianic age faster. If you really want the messiah to come now, make converts!
Comment: @Dov Abraham didn't have the Torah. If he had the Torah I bet he would have shared that, too.
Answer: I think there is a subtle difference.
To proselyte is to ask/convince someone to convert to a religion. In the case of Avraham there was no Jewish religion, it was just an acknowledgment of G-d's existence.
Rambam in Mishneh Torah, Hilchos Avodah Zara 1:3 explains that everyone worshipped idols until Avraham came on the scene. Avraham had this life-changing epiphany whereby he came and called Hashem "Lord" (See Berachos 7b)
It was a sincere desire to bring the awareness of G-d into the world that drove Avraham. The midrash in Bereishis Rabbah 39:16 says precisely this:

וַיִּקְרָא בְּשֵׁם ה', מְלַמֵּד שֶׁהִקְרִיא שְׁמוֹ שֶׁל הַקָּדוֹשׁ בָּרוּךְ הוּא בְּפִי כָּל בְּרִיָה
"And he called the name of Hashem" - this teaches that he caused the Name of G-d to be called upon by all people.

Indeed, the Gemara in Menachos 53a writes equally,

אמר לה טובתי בל עליך איני מחזיק טובה אלא לאברהם יצחק ויעקב שהודיעוני תחלה בעולם
G-d said, "I give credit to Avraham, Yitzchak and Yaakov, who were the first to make Me known in the world.
Answer: The conversion that it is written that Abraham converted is not the same conversion that we are talking about today.
Abraham our father according to the book of the Khazari he belongs to a holy seed from which came the people of Israel, but it is clear that all those who converted during his time did not become Jews, and that is because there was no Judaism yet, and the only thing that existed was the 7 mitzvot of the sons of Noah, and indeed even today it is of great importance to spread the 7 Mitzvah of the sons of Noah according to Judaism.
(And it is true that there are Sage midrashi who say that Abraham our father fulfilled the mitzvot of Sages, but it is clear that it is only him and not the one who converted)
Comment: Welcome to Mi Yodeya. If you want to take this angle, then may I recommend the Rambam in Hilchot Melachim that Moshe was commanded to enforce the 7 Noahide Laws among non Jews?
Comment: I barely understand English so I'm using a translation and maybe that's why I don't understand what you mean to ask.

And if you mean to ask whether today's rabbinic halacha is as written by Maimonides

So the answer is that rabbinic Judaism does see this as an important value even today (Chabad Chassidim have special plans for this)
Comment: אמרתי שטוב שתשובתך תכלול את הלכות מלכים רמב"ם ח' י' "וכן צוה משה רבנו מפי הגבורה לכף את כל באי העולם לקבל מצות שנצטוו בני נח"
Comment: This is broadly correct - in principle it is good to enforce/encourage non-Jews keeping the 7 mitzvos, but not acceptance of Judaism. I would caveat that whether this should be carried out in practice today is another question to which different approaches are taken.
Answer: Maimonides wrote that we should imitate Abraham. And, what did Abraham do? Abraham proselytized. He made converts. He sat in the front of his tent, waiting to teach about God to anvone willing to listen.
Therefore, it is not surprising that Jews used to proselvtize. In fact, it got so bad that Rome banned Jews from seeking converts. Everyone was proselytizing; there were even Buddhist in the city of Alexandria.
Nothing in Judaism is against proselytizing. So, why don't Jews seek converts today? One reason is that  Jews are taught that one not need to be Jewish to have a share in world to come. This is true. However, Maimonides makes it clear that non-Jews must observe the Noahide laws and, for the right reasons. There is another reason why Jews stopped making converts. Once mysticism was introduced into Judaism some Jews began to fancy that they were biologically superior to non-Jews. They feared bringing in non-Jews into their community may dilute the "blood." Lastly, Jews didn't proselvtize out of fear. Not because not allowed.
My own personal view is that Jews should activity be seeking converts purely for academic reasons. Academically, you will agree that 2+2=4, and not 5. It is the same with the Torah. If your convinced that the Torah is true then why not share that wisdom with everyone else? If you found the cure to cancer you would publish it for all. It behooves you to want to share God's Torah with the world.
Judaism is not a race. Judaism is a religion. The Torah is clear that there is one law for the convert and the born Jew. Abraham was a Gentile. Abraham was not a Jew, but a Noahide. God never "recreated" man since Adam (making a superior one called the Jew); all humans are identical. We all come from Adam and Eve. We are all identical. Both King David and the messiah descend from Ruth the convert. Ruth was a gentile who converted and Kings David and Solomon, as well as the Messiah descend from her. We see from here that gentiles have the same capacity to become the greatest leaders as those who are born to Jewish parents. We are all identical.
Thus, Jews should proselytize. Put differently, we are never commanded not to proselytize. There is no Torah law or rabbinical law barring us from proselytizing non-Jews.
Comment: @ddas91600 Thank you.  I'm glad you liked what I wrote.
Comment: Thank you for sharing it. You resoundingly made your point when you wrote, "If you found the cure to cancer you would publish it for all. It behooves you to want to share God's Torah with the world."
Comment: @ddas91600 I'm glad we agree. Yes, I do think that if we are convinced that we have the Word of God, we should share it with the world. If we are convinced that the Torah is the cure to all the troubles in the world, if it can make the world a better place, we have a religious duty to spread Torah. We do this by setting an example and teaching Torah to non-Jews. Even making converts.
Comment: I upvoted because I agree that in the past, there were Jews who did seek converts. Historical sources attest to this, to my knowledge. However, that doesn't mean we should do so today. It has become considerably more difficult to differentiate between honest converts and those who convert for various material incentives.
Comment: Wonderful answer.
Comment: @Harel13 Thank you for the upvote. You are correct, it is more difficult to tell. However, I still think 90% of people are sincere. Most people turn to Islam or Christianity because they are not even aware that Judaism accepts converts.


Measuring the user experience of Augmented reality application for elderly

Question: I'm conducting a study on elderly experience of AR application. The plan was to use SUS (System Usability Scale) to measure the ease of use. Then, after planning the whole thing, I realized I made a stupid yet large mistake. My audience are Arabic Elderly and there is no translation of the SUS to Arabic.
My questions are:

What method might I use instead of SUS that will give more quantifiable results? I found other method but the mainly focus on website not mobile application or not suitable for elderly.
If I would use SUS, what should I do to validate the Arabic version?

I'm open to any suggestion.
Answer: Concerning the second question, Blažica & Lewis detail their method of translating SUS to Slovenian in their paper A Slovene Translation of the System Usability Scale: The SUS-SI. They use method of back-translating and psychometric evaluation to validate the translation.

There were three stages in the translation process. First, 10 reviewers from the fields of computer and natural sciences individually reviewed a draft translation. Second, the final translation incorporated their comments. The third stage was to perform a back-translation. Three independent translators, without reference to the original, translated the final draft back into English. The translators were native Slovene speakers fluent in English. For all 10 items, all three translators provided back-translations with the same meaning as the original and, in some cases, exactly the same wording. For example, Item 9, "I felt very confident using the system," was back-translated to "I was very self-reliant when using the system," "I felt very confident using this system," and "I felt confident when using the system."

Translated SUS was then used to test Gmail with 182 subjects who also provided the likelihood-to-recommend (LTR) score to be used with validation. Results were then analysed as followed:

Reliability: assessed using coefficient alpha
Concurrent validity: correlation between SUS and LTR
Construct validity: two-factor solution of the SUS
Sensitivity
Normative comparison: comparing results to evaluation of Gmail using English language SUS.

For the first question I recommend the book Quantifying the User Experience by Lewis & Sauro, in which they present and compare different post-study and post-task standard questionnaires. They don't address the issue of this question but other post-study questionnaires to consider instead of SUS are UMUX with four items and UMUX-LITE with two items.
If you don't have to use post-study questionnaire, SEQ (Simple Ease Question) is a recommended post-task questionnaire and quite easy to translate. It just asks how difficult the user thought the task was on seven step scale and it could be asked by the person conducting the user test.
If you can't get your hands on the book, I'd recommend Sauro's website MeasuringU, if you haven't already checked it out.
Comment: Thank you @locationunknown very comprehensive summery and the paper is what I needed. Still hoping for an answer to the first question but still thank you a lot.
Comment: @NuhaAbd glad if I could help. I also updated the answer with some thoughts on the first question.
Comment: Perfect!. Yes measuringU was of a great help as well.Thank you
Answer: As 'locationunknown' has pointed out, SUS has a very odd factorial structure: two of its items are actually about Learnability! Yep, read them and guess which! This means that SUS has an effective range of values between 8 and 40 and most people score in the upper ends anyway.
The SUMI questionnaire (sumi.uxp.ie) is a more reliable brute that I created and have known and loved for many years :)# HOWEVER it does not as yet have an Arabic translation. If you're still interested, contact me and we can have one up and running in about three weeks - once I get my head around how to write HTML from right to left (just kidding).
Because of the poor factor structure of SUS nobody bothers to validate it psychometrically - they just adapt it and blaze on. I have seen more variants of SUS than... [metaphor deleted].


Is there a way to grid my google map in Android?

Question: I've created a map I want to classify my map into Let's say hexagon grids like cellular networks so I can be able to color each hexagon independently, the only work around I found was to manually draw circles using the overlay class and the ondraw method, but in order to manually do so I'll have to create like thousands of circles. I need a hexagrid on the whole map so when I need to color a hexagon I just find it by Let's say it's name or number. does Android support such feature?
Answer: No, Android does not have a built-in hexagon overlay for Google Maps. It is conceivable that you could find a third-party component for this, but more likely you will need to implement it yourself.


Why use bootstrapping?

Question: The wiki page for bootstrapping says that you use it in the case where the underlying distribution is unknown. Why is bootstrapping, or sampling with replacement, better than just calculating the variance and other properties from the data directly?
Answer: In general when you are evaluating statistics there are two main approaches: either you use some distributional assumptions (a generating model for your data) or not. Whenever you can you would probably go with a statistical model. But often the distributional assumptions can be wrong or they are not available to you.
If you are doing inferences about the mean of the population, than you can rely on central limit theorem and build a statistic for that. The same for variance. However what about estimating something which does not rely on general assumptions? Bootstrap works for any kind of statistic, this is where it lies its power. It's simple, and does require only minimal assumptions.
And there is another problem which appears in practice. Estimating mean rely on central limit theorem. It is true that your set of assumptions required only independent and identical distributed data. But it's something more. CLT works on large samples, it works in the limit. For small samples it can go wrong more often. And what about if your distribution is skewed. While it's true that CLT relies only on i.i.d. the needed sample size for estimating a mean on a skewed distribution is in general greater that for a symmetric distribution.
I found bootstrapping very useful in two main situations: when the sample is fairly small (but not tiny) and when the distribution is not clean (suppose it's a mixture of two distributions). And is very useful because you can build not only estimates of the population parameters, but also estimations for confidence intervals of p-values. And because it's easy to apply I also found sometimes useful even when you are assuming some model. Doing in parallel can help you to see if there is something really spooky in your sample or assumptions if inferences produces too different results, it makes you think or re-evaluate your setup.
Answer: In many real-world problems (especially in cases where data are the result of measurements) the amount of data available is relatively small and it is very costful to get more measurements. Luckily, modern data science is based on computers, where we can repeat simulations of our experiment to produce more data. Bootstrapping actually creates bigger samples out of your existing data and can even do this in multiple repetitions to allow significance testing.
Bootstrapping respects the distribution that your existing data have, so you don't need to make any assumptions regarding the distribution of your data. This is important because in most statistical approaches there are such assumptions, which sometimes we don't even realise or check before we apply them. (e.g. have a look here or at this post)
Bootstrapping is commonly used for the calculation of confidence intervals or for hypothesis testing. If you are using python, you might find the following links useful:
-Calculation of confidence intervals with bootstrapping example
-2-paired hypothesis testing with bootstrapping

Why use bootstrapping?


Do I need formal consent to use a Google Maps images in printed materials

Question: I was directed to this site to ask permission to use a portion of a Google map in a printed mailing piece by a Google representative. I am a public relations coordinator for a non-profit community mental health facility. Somewhat confused why I would post this question here as I am looking for formal consent to use Google Map imagery. What rules regulate taking a snap shot or capture of the map for printed use on a card, which may be distributed to people at resource events or by mail etc.?
Answer: This is indeed a strange place to send you for a question like that!
However - you can find Google's policies for non-profit use here:    https://www.google.com/permissions/geoguidelines.html
I'm not brave enough to interpret them for you, but hopefully you can find the information you need there.
fyi, in case you come to the conclusion that you cannot use pictures from Google Maps, you might also investigate OpenStreetMap.    Again, I'm not brave enough to interpret their policies for you.


Importing atribute value to output coordinate system in ModelBuilder?

Question: I have point layer in ArcGIS 10.4 with attribute EPSG codes. I want to iterate feature selection with EPSG code, and value with EPSG code use like output coordinate system to function define projection, but there is no possible connect value to output coordinate system value. Maybe it is possible in Python script but I don't know how.
Answer: This sort of iteration is fairly easy in python using a search cursor on your polygons then make feature layer with a definition query to clip by. There is an environment variable called output coordinate system which controls the spatial reference of the output, so it's not a big deal to get the zone for the row, calculate the EPSG, turn the code into an Esri spatial reference with the constructor then define the output coordinate system; much easier than clipping to a temp feature class then projecting.
<code>import os, sys, arcpy

arcpy.env.overwriteOutput = True

InDataToBeClipped = sys.argv[1]
InZonePolygons    = sys.argv[2]
InZoneField       = sys.argv[3] # I'm assuming the zone field is an integer type
OutWorkspace      = sys.argv[4]

with arcpy.da.SearchCursor(InZonePolygons,InZoneField) as sCur:
    # this is how to iterate over the features in the zone polygons
    for row in sCur:
        outZone  = row[0]                                # get the zone for this row, assuming an int type
        outEPSG  = 32600 + outZone                       # make the zone into EPSG for WGS84 UTM Zone XX North
        outSR    = arcpy.SpatialReference(outEPSG)       # create an Esri spatial reference from the EPSG code

        defQuery = '{} = {}'.format(InZoneField,outZone) # define just this zone
        arcpy.AddMessage("Clipping Zone {}".format(outZone))

        arcpy.MakeFeatureLayer_management(InZonePolygons,"ClipPoly",defQuery)
        arcpy.env.outputCoordinateSystem = outSR         # set the spatial reference for the output features

        outFeatureClass = os.path.join(OutWorkspace,'Clipped_Zone{}'.format(outZone))
        arcpy.Clip_analysis(InDataToBeClipped,"ClipPoly",outFeatureClass)
        arcpy.Delete_management("ClipPoly")              # get rid of the temp layer

        # remove empty results
        cnt = arcpy.GetCount_management(outFeatureClass)
        if int(cnt.getOutput(0)) == 0:
            arcpy.AddWarning("No features in output")
            arcpy.Delete_management(outFeatureClass)
</code>
If you're new to python have a read of Adding a script tool and Define script tool parameters. This tool has 4 parameters, in order: feature class or layer, feature class or layer, field and workspace. The zone field should be derived from the 2nd feature class or layer.
Comment: Thanks, it works. This is what i want :-)  Now i need the same for aster gdem raster. Clip parts of raster in zone a project coordinate system. It is the same but no imput points but raster.
Comment: You should be able to use clip_management http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000009n000000 but the tricky part is getting the xmin, ymin, xmax, ymax from the polygon. That would be worth another question.


How do I install Audacious visualization plugin?

Question: https://pclinuxos.pkgs.org/rolling/pclinuxos-x86_64/audacious-plugin-visualizations-4.1-2pclos2021.x86_64.rpm.html is the plugin. But it is about how to install in Ubuntu which to me is quite difficult, please help!
Comment: rpm=redhat, not Ubuntu. Please find a .deb and you can use software center to install it.
Comment: I'm not sure if what you want is included or not in the plugins package but you can try. Install it with `sudo apt install audacious-plugins`
Comment: @Rob what is your Ubuntu version?
Answer: For Ubuntu 21.04 and newer you can use audacious-plugins package from universe pocket. Install it with
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install audacious-plugins

For Ubuntu 20.04 LTS and older you have to add special PPA first, so install using commands below:
sudo add-apt-repository ppa:ubuntuhandbook1/apps
sudo apt-get update
sudo apt-get install audacious-plugins

After installation you should launch Audacious and visit Services → Plugins menu to enable needed plugins in Visualization section, drag them to needed locations to get something like shown below:

Technical details (if needed): the link in your question contains a link to rpm-package.
When downloaded and extracted, one can see its contents as follows:
usr/
└── lib64
    └── audacious
        └── Visualization
            ├── blur_scope-qt.so
            ├── blur_scope.so
            ├── cairo-spectrum.so
            ├── gl-spectrum-qt.so
            ├── qt-spectrum.so
            └── vumeter-qt.so

so the next step is to use package contents search on https://packages.ubuntu.com for example for vumeter-qt.so library. This clearly says that one needs to install audacious-plugins package.
Comment: That is great Norbert, again a good help.  I am just halfway there since I had to also clean the sources.list that had .rpm pointers inside, causing all kind of nastiness. So the work is done, but I don't see any plugins yet, probably has to do with you second part where this package is required. Will look into that tomorrow, cheers!


Network Project

Question: Me and a few classmates have been assigned a project on campus. The goal is to come up with a way to transmit information from a camera that's in a bat house about 500 yards away from the closest building. My group decided to go with an directional antenna. Any ideas on what eco-friendly technology to use? How would you go about it?
Comment: You may want to request (or determine for yourselves) what the definition of "eco-friendly" is. In some circles, a wand blasting RF radiation is not eco-friendly.
Comment: Are we sure that the wavelength of the directional antenna isn't audible to the bats?
Comment: Your first question is a shopping question. The second is calling for opinions. Without specifying devices or technologies, there are simply too many possible answers.
Answer: Two options come to mind.
One: Get a cable(Fiber probebly) up there..
Two: Call NASA(http://en.wikipedia.org/wiki/Laser_Communications_Relay_Demonstration)
:P
Answer: Cool project. The first thing that comes to my mind is combining an 802.11 device with a directional antenna and a solar panel. Ubiquiti makes some inexpensive 802.11 equipment aimed at the Wireless ISP market that would be perfect for your project. Specifically, their airMax product line is well suited for creating bridges over long distances.
Check out this link: Using a 30W solar panel and 22Ah Battery to power a Ubiquiti radio
The Loco M2 referenced in the link above would probably be more than enough for your application. You would need one on each end of the connection.
Answer: You have several ways to do that:
1) MW antenna or unidirectional of other type with a ptp link. This could be eco-friendly since the signal has to meet allowed power limits and it's spreaded in a single directiob and a close angle of transmission.
2) LTE modems with site-to-site vpn (ipsec or open vpn) with static ip from your ISP or  myddns domain on your dynamic public IP.
But these are general ways, knowing what's in the middle between these two points could bring elements to create alternate solutions.

Network Project


Erasing all parts of a cinemagraph (animation) but the movement?

Question: I've got a few cinemagraphs we shot for a client. As expected they want them high quality, I'm following this tutorial to achieve that. http://cssmojo.com/animated-gif-with-a-jpg-background/
What I'm having issues with is (for lack of a better word) erasing all the still image. I started with actually erasing, but that gave me 200ish frames to change.
I tried grouping all the layer, but I was presented with the error, the pixels in a group could not be edited without merging the group. Merging the group removes all sorts of animation and masks so this doesn't work.
I tried to convert everything to a smart object, grouping it all into one smart object. I get the error the smart object is not directly editable.
Essestially what I'm looking for is an "apply to all frames" button. I want to erase everything but the animation, export that as a gif, go back and export the image and then be done with it. Please help!
*Edit; Something to note, these are video files, not frame by frame animations.
Photoshop cs6
Answer: You can apply a Layer Mask on your entire Video Group. Or you can copy the background to the top of the animation. Either way should work.


Putting a programming language on your resume?

Question: How much experience do you need in a language before you can put it on your resume? There is one language I'm in proficient in (Java) which I would definitely put on the resume but say I took I couple of semester courses in college which involved extensive programming in C or self-taught myself C# but have written no meaningful projects in it, can I put those languages on the resume without having the employer laugh at it or perceive it as resume inflation?
Comment: résumé help is off-topic per [help/on-topic]
Comment: @gnat well ok but the upvotes show that this is a useful question to dozens of people, and it was migrated *to* here in 2011. If it can't be reopened here, can it be migrated to another site?
Answer: You can always list languages (as well as other skills) in tiers on a resume:
<code>Proficient:    Java, Lisp
Familiar with: Perl, C++
</code>
As a guy looking at a resume, I will appreciate both the honesty and the effort; and when bringing you in the first question you usually get asked is to rate your individual language proficiency more precisely, orally or on paper.
Comment: +1 : In my resume I have languages separated like this : "Languages :  Main (knowledge and daily experience) : ...
 Experienced: ...
 Used in the past: ...
 Interests and Curiosity: ...
"

I've been told by recruiters that it's a good idea and they will ask the same from other candidates (and i got the job).
Comment: This is what I do as well.
Comment: I use `Exposure to` to describe the languages I have used briefly.
Answer: I include any language which I have used as a professional; i.e. any language I used while paid to write in it. And I don't list competance levels. A resume is an introduction; If I say "Computer languages: Algol, Basic, C, C++, Cobol, Fiemaker, Fortran, and Foxpro", it's up to the interviewer to ask "Just how much Algol do you know?" Probably more than any other person he's ever interviewed. It's sort of a list of discussion topics, not an expertise claim.
Answer: I find that the more technologies a candidate lists on their resume - the less they actually know!
Knowledge of specific technologies is important but experience and knowledge of methodologies is more important.
I would focus on communicating your experience (while mentioning the technology used), and what you know about how software is developed, rather than making lists of technologies and assigning arbitrary levels to them (beginner, intermediate, etc.).
To answer your question - don't list any. Or, list only those that are mentioned in your experience.
Comment: sadly this advice will get your CV binned by an HR droid at many a company
Comment: Sadly, I agree. But, then I'd argue you don't want to work there, anyway!


RAID or batch copy on scheduler?

Question: Is it better to setup a RAID array or a batch copy command on a scheduler?  My needs are simple - to backup my important files (some source code, financial data, etc.) on my home network nightly to a separate hard drive.  My server OS is Windows Server 2008.
Answer: RAID is not meant to be a replacement for backups. It's a method for making your harddisks redundant. If one disk is failing, the information will still be available on the partition.
But let's say you accidentally delete files or the folders on the RAID partition. In this case the deleted data will not be available on the other disks of the array.
So, if you're using RAID, I strongly recommend doing regular backups to other media (NAS, other servers' shares, tape etc.)
Comment: +1 for reiterating the maxim that RAID is not a backup. That should be the first sentence in the first paragraph of any document that mentions RAID. RAID is not a backup
Comment: ah ok that makes sense.   I really don't have a need for the data to be immediately available in the event of a failure so i think i have my answer.
Comment: +1 likewise.  It's a common enough misconception, so there's no harm in the OP thinking it was an option.
Comment: Hallelujah! RAID's awesome until someone goes and rm -rf *'s it.
Answer: Another option-- you can purchase an external USB Hard drive from any BestBuy or Walmart.  Plug it in, run your batch file to copy the important files, then unplug it.  That'll give you protection from virus/computer corruption/lightning strike.  They're cheap and it works well.
Comment: never thought about that from the standpoint of virus protection.  Good idea.
Answer: You might also consider some of the free online backups like Mozy or Carbonite so that your data is protected even in the event of a disaster at your home.
Comment: i actually do use Jungle Disk - i just like the idea of backing up my data to more than one place, and also on different schedules.  So if i backup a virus on my daily then i'll be able to restore from my weekly before the virus was backed up.  Now I haven't had a virus in about 5 years...  but you never know.

RAID or batch copy on scheduler?


Why aren't there computers with a base different than 2?

Question: Wouldn't non-digital computers, those that use a base higher than 2, be faster and more efficient? Especially with Moore's law reaching its limit, wouldn't circuits that have three, four or five states have advantages? Are there computers like that?
Answer: As mentioned in this thread here, this is more due to the electronics of how computers work.  It's a lot easier to create an on-off switch then it is an on-off-middle switch.  If you're really curious about this, I'd recommend reading about how a computer works at the electronic level, as just doing this on-off switch took a lot of time for people to make properly.
That being said, there are computers coming that work with more than one state, mainly in the form of quantum computers.  They can have an on and off state, as well as a "both" state if I'm not mistaken.  There are of course advantages such as potential speed boosts from computers like this (though mostly from the way they work physics wise), but then there are also physical limitations imposed as well, such as the fact that they need to be kept incredibly cold to work properly from what has been experimented with so far.  Quantum computers are the "main focus" of how to solve the issue of Moore's Law currently though.
But long story short, yes, computers that "use a base higher than 2" could be faster and more effecient, and there are computers like that, but they aren't ready for the mass populations of the world to use yet.
Comment: It's somewhat misleading to say that qubits can be on, off or "both". One qubit can actually have infinitely many positions, and several qubits can be entangled. On the other hand, each qubit is a superposition of two possible values, so in that sense it is binary.
Comment: This is in relation to @GEMISIS' answer: Google's D-wave quantum computer was expected to outperform the conventional computers but something else happened. It "flunked". Some give the reason it used quantum annealing which was doomed from the beginning. Guess quantum computers are not ready yet. http://www.newscientist.com/article/dn24882-googles-quantum-computer-flunks-landmark-speed-test.html
Comment: Yeah, I'm definitely not an expert on quantum computers haha Just from what I've read and such.  The main point I wanted to make is that there are computers out there attempting to tackle the problem of Moore's Law hitting it's limitations. :)
Comment: If the three states you're referring to (on-off-middle) are on, off, and high-Z or floating, that would assuredly not be a faster or more efficient computer. When logic is full on or full off, the limitations in speed are imposed by currents and capacitance (how long it takes to charge the gate of a FET). If you have a hard middle voltage, to get there you'll need about double the number of transistors you're using and provide another power supply, or if it's floating (and pulled to middle) you'll have to wait for gate charge to dissipate instead of jamming it in or out.


What's the best way to deal with the market swings?

Question: So I've been trading for a while.  Having said that, the current bear markets are driving me to get some "deals".  I think I bought some investments for a decent price. Having said that, I can't go back to forgetting about them.  I, now, watch the market move up and down.  When it spikes up or down - I'm torn.  I acted on a big change - sold at a loss, then bought back high - sighs.  How can I stop myself from looking?
Comment: Trade with a written plan, don't place trades during the day based on your emotions, place your conditional orders after market close only. Only trade if a stock starts moving up and only sell if a stock starts moving down (using stop loss orders).
Comment: Spread betting or Share dealing may I ask? The latter, you know from confidence the longer term will prosper. The former, larger the bankroll to withstand the swings and 'turbulence'
Comment: Assuming you'd made a calculated decision in choosing which stock to buy, and therefore have some amount of long-term confidence in your decision, why wouldn't seeing a drop in value trigger a "buy more" re-action?
Answer: Change your daily routine so that you do not look at the market.  Since this is rather hard to do, at first you should just spend sometime everyday noting: where, when, and how you were looking at the market.  After just watching yourself for a bit (a few weeks or more) then figure out what else you could do instead.  This "else" will have to be as "enjoyable" as watching the market.
Comment: [Browsing the `habit` tag at Personal Productivity.SE may be helpful.](http://productivity.stackexchange.com/questions/tagged/habit?sort=votes&pageSize=50)


Randomizable zero-knowledge proofs?

Question: I was wondering whether there exists randomizable zero-knowledge proofs. What I mean by randomizable is that assume I have a zero-knowledge proof of knowledge $\pi$, stating that I know $x \in \mathbb{Z}_q$ for a prime $q$, such that $Q = g^x$, and I randomize $Q$ as $Q' = Q^r$ for a random $r \in \mathbb{Z}_q$. Then, I wish to prove that $Q'$ is a randomized version of $Q$. So, is it possible to somehow also randomize the proof $\pi$ into $\pi'$ for this?
Answer: Yes there are. I guess you're looking into non-interactive zero-knowledge (NIZK) proofs, since you're assuming that you have at hand a proof $\pi$. A common approach for building NIZKs in crypto is to rely on the Groth-Sahai methodology, which produces highly structured NIZKs using elliptic curves equipped with a bilinear maps. It was first observed in this paper that Groth-Sahai proofs can be randomized - i.e.,  you can randomize a statement together with its proof so that the randomized proof is indistinguishable from an honest proof computed on the randomized statement. This was used to build anonymous credentials with strong properties, and had many other applications in subsequent works.
Comment: As far as I know, the randomization method in itself is still state of the art - it works fine and it is not clear whether one can have much more efficient randomizations. Recent works have mainly shown more applications of this randomization method rather than improving the method itself. There is also a very recent work on getting a stronger *fully homomorphic* randomization property, given in this [nice paper](https://eprint.iacr.org/2019/732.pdf).
Comment: A last important recent work: [SAVER](https://eprint.iacr.org/2019/1270.pdf) is a system which consists of an encryption scheme with nice properties, together with a very efficient proof system for proving properties of this encryption scheme. It allows in particular to rerandomize ciphertexts together with their associated proof very efficiently; this gives a rerandomization method for the more modern SNARK-style NIZKs.
Comment: What's the current state-of-the-art in this? I mean the paper seems a bit old already. Are there any newer papers about the same/similar topic?

Randomizable zero-knowledge proofs?


How to write a polite quotation request email?

Question: Good day! I'm working at Sales Dept. in a manufacturing enterprise. Lately my company strategy is to find other suppliers to have more competitive prices and I appointed to do this task. But I make a trouble now about the ideas as well as the contents how to write quotation request to them. There are a lot of suppliers (in textile sector) i have in hand and i don't want to just write some paragraphs then copy & past them to send to all. I'm a newcomer here, I hope to have your kind supports. Thank you so much!
Comment: Welcome to Writers.  We can't tell you what to write (the actual *content* of that message), which leaves the question of how to structure it in a polite and professional manner.  That's been asked before, so I'm marking this as a duplicate.  Thanks for understanding.
Answer: Ask a person from the supply dept - how they request supplies from 3rd party companies - raw materials, equipment, machines, whatever your company needs but doesn't manufacture. Phrase your quote request just the same, just exchange the articles you're asking for.
In particular, in your situation, there's really nothing wrong about copy&paste to multiple recipients. It's strictly a business letter, not some kind of courtesy mail like thank-you, congratulations or apology letters, so "personal touches" are really not necessary.


Is the infinite series summation $((-1)^{n-1} \log(n+1))/(n+1)$ convergent?

Question: I have searched here & google but find no clues about how to find it out. This is clearly alternating series, if it is convergent then we have in our hand Leibnitz test, Dirichlet test, Abel test & something like this. In fact we are able to show the given series is absolutely convergent then we are done.
But if divergent, then how to show a alternating series is divergent.
If we are able to show $f(n)=\log(n+1)/(n+1)$ is decreasing then also we are done.
But is the $f(n)$ actually decreases? If so then how?
Please help me to get out of this.
Thanks in advance.
Comment: take a derivative of f(x) = log(x+1)/(x+1) and show it is negative for all x in some interval (c, infinity).
Answer: You want to show that, from some point on,
$$
\frac{\log(n+1)}{n+1}<\frac{\log n}{n}
$$
which is equivalent to
$$
(n+1)^n<n^{n+1}
$$
or
$$
\frac{(n+1)^n}{n^n}<n
$$
Since this is the same as
$$
\left(1+\frac{1}{n}\right)^n<n
$$
you know that this eventually holds (actually for $n\ge3$, but it's irrelevant), because the limit of the left-hand side is $e$.
If you want to prove that without limits, you can consider https://math.stackexchange.com/a/1868235/62967. Basically,
\begin{align}
\left(1+\frac{1}{n}\right)^n
&=
1+1+\frac{1}{2!}\left(1-\frac{1}{n}\right)+
\frac{1}{3!}\left(1-\frac{1}{n}\right)\left(1-\frac{2}{n}\right)\\
&\qquad+\dots+
\frac{1}{n!}\left(1-\frac{1}{n}\right)\dotsm\left(1-\frac{n-1}{n}\right)
\\[6px]
&<
1+1+\frac{1}{2!}+\frac{1}{3!}+\dots+\frac{1}{n!} \\[6px]
&<
1+1+\frac{1}{2}+\frac{1}{2^2}+\dots+\frac{1}{2^n} \\[6px]
&<1+2=3
\end{align}
On the other hand, showing that $f(x)=\frac{\log x}{x}$ is eventually decreasing is much easier:
$$
f'(x)=\frac{1-\log x}{x^2}
$$
which is negative as soon as $x>e$.
Comment: 's sir actually I want this, but sir I was unable to make comment about (1+1/n)^n0$, we have that $(1+1/n)^n<n$ when $n\ge3$.
Comment: sir thank you & sorry that was infront of me but couldn't see. Thank you sir. By considering function I'm done.


Syncing action and lips of a charecter with pre recorded voice over

Question: I am trying to animate my character according to the pre recorded voice over, but the problem is my 3D view port is running at 3 FPS, and I want my animation at 24fps.
I wonder how complex scenes in movies are animated if it is too slow.
Anyway, is there any work around to complete my job?
I also want to to know what are the hardware specifications I should have to play my viewport playback at required FPS
Comment: Please share screenshot, where we can see your scene and modifier stack.
Answer: There are a few approaches you can try. I would first enable Simplify to make the scene a little lighter while you're animating.
Another way to make your animations run faster is to split up the blend file into multiple files, and use them as linked libraries. You'd have one file with the rigged character model, another one with the scene, and a third one with the animation data. You can then link the rigged character into the animation file, make a local proxy of the armature, and animate the character. Because the animation file doesn't contain the rest of the scene, your computer will have an easier time moving from frame to frame. Once you have the animation the way you want it, you can link the animated character into the scene for lighting & rendering.


Historical romance manhwa with a strong red haired female lead and a younger white haired boy

Question: I am looking for a historical romance manhwa that I once read in which the female lead is older, has red hair and fights with swords. She is from a noble family and has to protect a white haired boy from the royal family. The boy suffered a great deal in the past and the female lead was the first one to treat him kindly, which makes him develop feelings for her. For some reason, the female character has to leave for a few years and when she returns, the boy has become an adult and proposes to her.
Comment: Did this story contain any science fiction or fantasy elements?
Comment: Possibly: Seduce the Villain's Father aka Flirting with the Villain's Dad aka Villains Are Destined to Die?
Answer: This is almost certainly The Flower of Veneration.

Cecylia Saryan, liege to the order of Hearthtread and heir to the Dukedom after her father's sudden death, discovers a young boy hidden in his legacy — the Crown Prince Ethan, thought to have drowned 5 years ago. Will Cecylia be able to keep her House intact while helping Ethan reclaim his throne?

The cover image shows the two leads. The female lead is a redhead; she's described as a knight and the head of an order of knights. I didn't see her actually wield a sword in the chapters I checked. The male lead is blonde, not white-haired, but that's pretty close.
The male lead is the disappeared crown prince, believed to be dead after drowning. This is why she needs to protect him from the royal family; his uncle is the new king after the previous king dies, and the male lead's claim to the throne is better.
Although the protagonist's father saved the crown prince and hid him from the new king, he did not treat him well, and basically locked him up in the stables, out of view. The protagonist is the first person to be kind to him.

I believe there's a timeskip, as he looks noticeably older in the cover image, but I wasn't able to find the exact chapter or the details around it.
This is on topic; magic does not appear to play a major role in the story, both it does exist, and both leads are described as having magical powers.


Exothermic dissolution

Question: When I was learning about salts that show exothermic dissolution, I noticed that the same salts used in Daniel Cell( due to similarity of size of anion and cation) were undergoing exothermic dissolution. Is there any relation between the similarity in size of anion/cation and the type of dissolution it undergoes?
Answer: There is no easy general pattern.
The dissolution can be formally divided into 2 steps:

breaking the ion lattice into free ions in vacuum
hydration these "naked" ions by water.

Both lattice forming and hydration enthalpies are negative and their absolute value increases with increasing ion charge and decreasing ion radius.
The relation of their values and the overall enthalpy sign  depends on the particular element chemistry, that modifies hydration and lattice enthalpy values.
There are some trends, but hard to generalize.
You can compare sodium and potassium salts of big anions with delocalized charge, like $\ce{NO3-, ClO3-, ClO4-}$. Dissolution of respective potassium salts is significantly more endothermic, compared to sodium ones. Sodium ion is smaller and is more intensely hydrated with lower enthalpy of hydration.
This difference is bigger that difference of their lattice enthalpies. It is probably due anion size,  packing of bigger potassium cation makes less difference than for chlorides.
Comment: There is always way of learning empirical facts and patterns.. Chemistry students often search for deriving predictions to avoid it, but chemistry is in many aspects a stubborn old empirical man. It could be predicted by intensive application of quantum chemistry, sometimes relativistic one, but learning empirics is much easier.
Comment: So there is no way to predict type of dissolution other than looking at their enthalpies?
Answer: For simple ionic salts, the enthalpy of dissolution is given by
$$\Delta H_{\text{disso}} = \Delta H_{\text{lattice}} + \Delta H_{\text{solvation}}$$
where $\Delta H_{\text{lattice}}$ is the lattice dissociation enthalpy (positive) and $\Delta H_{\text{solvation}}$ is the solvation enthalpy (negative).
For exothermic or endothermic dissolution, we have to compare the lattice and solvation enthalpies. Generally, salts with a small cation and anion (think Lithium Fluoride) have very low solvation enthalpies but also have very high lattice enthalpies (given by the Born-Lande equation), hence their enthalpies of dissolution are relatively higher than salts with larger cations/anions, such as Caesium Fluoride.
This graph1 illustrates the comparative hydration enthalpies of fluorides of $\ce{Na+, K+, Rb+, Cs+}$ (graph a) and also the hydration enthalpies of sodium salts of $\ce{F-, Cl-, Br-, I-}$ (graph b). Notice the decreasing trend: dissolution of $\ce{CsF}$ is more exothermic than $\ce{NaF}$ and similarily for $\ce{NaI}$ and $\ce{NaF}$.

Hydration enthalpies for gaseous ions are calculated as described by Latimer et al.2 in his paper.
Further reading:

Wikipedia article on Enthalpy Change of Solution
Chemistry LibreTexts: Enthalpy Change of Solution

References:

Yıldıran, Hüseyin, et al. "A Theoretical Study on Calculation of Absolute Hydration Enthalpies for Some Univalent Ions." Ionics, vol. 14, no. 6, Nov. 2008, pp. 541–43. doi:10.1007/s11581-008-0214-3.
Latimer, Wendell M., et al. "The Free Energy of Hydration of Gaseous Ions, and the Absolute Potential of the Normal Calomel Electrode." The Journal of Chemical Physics, vol. 7, no. 2, Feb. 1939, pp. 108–11. doi:10.1063/1.1750387.

Exothermic dissolution


Illusory Script contract fraud

Question: I have an idea, I am playing a classic contract-type fiend warlock very much a "sign on the dotted line and you will have ____.... in exchange for your soul" and I was planning on using Illusory Script for contract fraud and want to know if it would work. For example, I write up a contract that says "I (warlock name) will give you a cup of tea, in exchange, you (victim name) will give me your soul... sign here _____" But then use an illusion to make it bog-standard fair contract. Obviously, the areas you sign are the same on both versions. Are there any obvious issues or workaround I would worry about?
Comment: You're trying to trick a fiend about a contract? Good luck with that!
Comment: worth noting many devils have truesight, so who they are trying to trick matters a lot. you may want to add that to the question.
Answer: It is up to the DM to determine how cosmic powers adjudicate fraudulent contracts.
Mechanically, this works out just fine. Illusory script says:

You write on parchment, paper, or some other suitable writing material and imbue it with a potent illusion that lasts for the duration.
To you and any creatures you designate when you cast the spell, the writing appears normal, written in your hand, and conveys whatever meaning you intended when you wrote the text. To all others, the writing appears as if it were written in an unknown or magical script that is unintelligible. Alternatively, you can cause the writing to appear to be an entirely different message, written in a different hand and language, though the language must be one you know.

On the player facing side, this will appear to work as you have described. The actual contract will be written however you like, and the spell will make it appear however you like.
But how cosmic third parties relate to this fraudulent contract is entirely up to the DM. Only your DM can tell you if the contract will be binding at all, and if so, which form of the contract will be binding.
Comment: You might want to point out that this would be a void contract on Earth
Comment: I can't access sourcebooks now, but don't fiends have a high intelligence, and access to the magic like true sight and detect magic?

Illusory Script contract fraud


How effective using Combo Box in Mobile App UI?

Question: Thought about adding a multi value combo box with tags autocomplete

Are there any statistical studies about how users feel about this component? is it easy to use? or is it complected for the average user?
Answer: This is widely used feature and recently I've taken feedback from my beta users and they are quite comfortable with it, but at the same time it also depends on the feature for which it is being used.
Like for an example in your case it is country selection and everyone might not remember all country name or during typing they might forget it, it is better if you give multiselect list with checkbox. along with search box where one can also search and then check it out.
Answer: Aside from the alignment issues with the country and the "x", If I wanted to remove a country, it would be quite a small tap target, specially with older smaller resolution phones.
The adding seems fine, perhaps play with bigger tag size height with a bigger "x"?


Bach Reference in "The Penitent Man Will Pass" [from Indiana Jones]

Question: I was recently listening to the composition John Williams - Indiana Jones and the Last Crusade: The Penitent Man Will Pass and was wondering if the first few notes of the theme of that composition are a reference/citation/parody of the third movement of the Trio Sonata No. 2 In C Minor BWV 526 by Bach. I could not find a score of the Williams piece though to compare. Does anyone know if this is the case here?
Comment: The score will not help you decide this - all it contains is the same information in a different format. Only John Williams could tell you, and even this is iffy - it's been 30 years, after all. Also, what is or isn't a quotation is not at all a well-defined notion; courts of law regularly have to argue about it.
Comment: Listening to the two clips, I can definitely see the resemblance.
Answer: As noted in comments, it's impossible to know this without hearing John Williams's thoughts on the matter.
My sense, based on just the evidence of the music, is no.  First off, note that the "citation" is actually not just from The Penitent Man Will Pass, but is actually the "Grail theme" of the entire movie which occurs numerous times at references to the Holy Grail.
But is there really enough here to claim this is an allusion or reference?  The melody of the fugue begins with a 5-1 (sol-do) leap, as do numerous fugues.  The only distinctive quality of the subject is the move to flat 7 in the melody, harmonizing a minor v chord.  That is unusual as an opening gambit for a fugue, and I can't draw any other fugue subjects to mind right away that do that in Bach, but I'm not sure.  I can think of a few 17th-century fugues/ricercars that begin like this.  But it gives the fugue a distinctive "modal" quality, which sometimes appears in Bach.  (Tonal answers in fugues frequently move to the minor v too, just not generally so early.)  After that, there's a little set of three notes that go faster: 1-2-3 in the scale.  Beyond that, the fugue bears no resemblance to the movie theme.
We're talking about six notes here, and if the B-flat were a B-natural, this would be about the most common melody one could imagine for a fugue subject.
Meanwhile, what doesn't the Bach have?  It has a faster speed-up for the 1-2-3 gesture.  It doesn't have the distinctive heavy VI-V-i cadence that the Grail theme has.  And the Bach theme launches into completely different stuff after six notes.
Basically, the only distinctive feature both melodies share is the emphasized lowered scale degree 7.  One note.  But that's a common feature of melodies evoking a "modal" character, as Williams undoubtedly was trying to do to give the music a more "ancient" or "medieval" kind of sound.  (It's not an actual medieval sound, but it's one movie music trope to represent "olden times," which comes out of 19th century opera, e.g., Wagner.)
Anyhow, could Williams have been thinking of this Bach piece when he wrote the music?  Sure, I suppose.  But why?  Why reference this Bach piece?  It's not like it has any sort of symbolic link with the movie's themes or the Holy Grail.  And if it was inspired by Bach, it's certainly not enough to really be a recognizable reference to this specific piece.
In sum, I don't think we can rule out inspiration for Williams.  But an intentional reference/citation?  I don't think there's enough.  As with most musical connections of a few notes that people hear, they're often coincidences.


Accessing file share from ETL package in SQL Always-On configuration

Question: How can I access the file share from ETL?
Here are my environment details:

I have 2 nodes in a windows cluster. node 01 and node 02
SQL Server 2014 is installed on both the nodes.
Both are Windows Server 2012 R2 machines
I have file share created in Azure portal and mapped as G: in both the nodes (01 and 02)

My ETL package is using C# code. It wants to read and write files on one shared folder for processing. I want it to use shared drive G.
Problem Statement: One of the nodes can be down at any time, so I cannot hard code as below:
<code>//node01/G
</code>
Can I use file share feature (role) in a failover cluster? if yes, where will that new drive be stored?
I saw the post Accessing an Azure Storage Account File Share from an ASP.NET Application on Stack Overflow, but that requires code changes in all the ETL packages. Is that is the only way?
Comment: [Considered using DFS?](http://clemmblog.azurewebsites.net/high-available-file-share-in-windows-azure-using-dfs/)
Answer: It sounds to me like you are suggesting that you require a highly available file share (see https://blogs.technet.microsoft.com/clausjor/2012/06/07/smb-transparent-failover-making-file-shares-continuously-available/). In order to do this you will obviously need Clustered storage (an ip and network name). It would be a little unusual to do this using your Availability Group's Windows Cluster since really that is only in place to provide Quorum and meta-data synchronisation/ mediation of AG Cluster HA objects -and I would personally advice against complicating that deployment -Clusters should be kept as simple and easy to troubleshoot as possible. Instead I would advise to use a remote fileshare - which you can either make highly available via another windows cluster or just use a standalone server (depending upon requirements).


Can I add an aftermarket AC to the existing AC in my small hatchback?

Question: My 15 year old Maruti Wagon R has a weak AC relative to internal volume and often fails in intense Indian heat. Can I add an aftermarket AC to improve the cooling and prevent AC breakdown? My idea is to have 2 complete AC units installed to share the load in extreme heat. Only one would need to be used in cooler conditions. I could not find out whether this is feasible, despite much searching online.
Comment: Have you considered if the AC is leaking? Repair all leaks and fill it with proper volume of coolant, and the performance should improve. I don't think you need an aftermarket AC in most cases.
Comment: Thanks for the suggestion, @juhist -- in fact the AC is defective and going to be repaired, but it is so hot here in coastal South India that it can't cope and breaks down within 4 months. Even when functional our Wagon R's AC is weak and gives only tepid cooling during sunshine hours. One reason I can think is that Wagon R has much more internal volume than its sibling Maruti Alto, our second car (same vintage) whose AC is cooler and fails much less often. That's why I was wondering whether I can 'support' the newly repaired AC with an aftermarket AC for better cooling & to prevent breakdown?
Comment: That it fails so often is very strange to me. Unless there is a systemic issue with the vehicle's A/C itself, it shouldn't fail, even in the hottest of climates. It seems to me, whomever is "repairing" the unit isn't doing a very good job of it. I would expect any A/C system which is closed (not leaking) and undamaged (no physical damage) to run for years and years without incident or breakdown.
Comment: Thanks, @Paulster2 for the information that the AC ought to work without error for years -- as you can see I am not at all an expert in this subject. It is very possible that the repair jobs were either partial or failed to diagnose the real issue. I had noticed the AC becomes 'less cool' within months. I shall know more after the car returns from repair. Is it theoretically feasible to mount 2 AC units in the same car and use them either together or one-at-a-time? If so, are there any practical restrictions to this arrangement?
Comment: I am also from India (Kolkata) and summer in here is hot too, but our Alto's(2008) A/C still works fine without failing, I only clean the ac vents once in a month and clean the condensed water outlet once in a year, my advice is if your local mechanic could not find any fault then go to Maruti Authorized Service Stations, and let them check,
Comment: Thanks for the good advice, @Nilabja -- yes, we have far fewer problems with the AC of our Alto compared to Wagon R, but a thorough checkup is required for both cars to diagnose the real issue.
Answer: There is aftermarket AC kits available, there are loads of manufactures and the kits differ depending on the applications.
Before looking into fitting in an aftermarket system I would take the vehicle to a garage with air con equipment to get the system pressure tested. Usually this procedure holds the system under vacuum for anywhere between 10-40mins and monitors the pressure.
Your option in regards to the aftermarket system seems to be:

A roof mounted electric unit - by far the cheapest and easiest solution, it can be fitted in a morning and at worst case you may need to install a second battery and split charge system and/or a larger alternator. Usually though there is no need for any extra battery's or alternators. Simply cut a hole in the roof and install.
An unfloor/dash engine driven unit - the most professional option if you want a nice 'factory' spec install. You install the matrix/blower assembly either under the dash, seat, floor or in the roof lining and either tap into the existing AC, install a larger AC compressor or add an extra one. The benefit of this system is you can get much larger cooling capacity than an all electric version. You can also get a matrix with built in heater.

I have had great success in installing Webasto products their equipment is also used in most OEM applications so that proves how well built it is.
Just google 'aftermarket air conditioning'. There are loads of kits targeted at the classic car community. Car builder solutions in the UK is just one company that springs to mind although I have never used their products.
Comment: Many thanks for the detailed answer, @Terry Gould; that gives me a *much* better idea of the possibilities! I shall make local enquiries and also assess whether the newly re-evaluated and repaired AC is capable of dealing with the heat in September-November months which have very hot sunshine here; by which time I could formulate an action plan. I shall be sure to ask further questions here if needed, before making a final decision.


How can I test game center (multipleyr) on single IOS device

Question: How Can i test game center (multiplyer) on single iPad device. Please give me idea.
Thanks in advance.
Answer: To my knowledge this is not possible.  You cannot run the multiplayer functionality of GameCenter within the simulator (as documented here: https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/GameCenterOverview/GameCenterOverview.html#//apple_ref/doc/uid/TP40008304-CH5-SW16).
I myself just bought a 2nd iOS device for this very reason.  On the plus side, having two devices allows you to try out other multiplayer games from both sides, to see how things work.
If you have an iPhone in addition to an iPad, you might be able to develop a single application that runs on both devices, even if for deployment you plan on supporting only the iPad.  For example you could detect that you're on the iPhone and run only the functionality necessary to test multiplayer.  In my instance, this wasn't feasible, so I just went ahead and bought the 2nd iPad, but I mention it for completeness.
Finally, now that the third generation iPad has been released, you can probably find the first devices used for significantly less than retail.


~しよう+としてします。 What is the meaning of this expression?

Question: I always see this sentence being used. Like 忘れようとしてします or 毎日勉強しようとしてする
I'm just wondering what is the difference if I use 忘れる or 勉強する instead. Whenever I watch anime or JDrama I always here this pattern. Can someone enlighten me?
Comment: Are you sure about the する on the end?
Comment: Ending with して**い**ます would make a lot better sense than what you're hearing...
Comment: Yup. There's no way I misheard this because I always hear this everytime.
Comment: Yes , it could also be in that form since the present form of  する is しています. What I'm a looking for is the meaning of this expression / sentence.
Answer: The difference between, for example, 勉強しようとする and 勉強する is simply the difference between "to try to study/to be about to study/to get down to studying" (depending on the context) and "to study."
As for the construction しようとしてする, I found a couple of examples on Twitter: "おやすみってツイートしようとしてする前に寝てた" and "恋はしようとしてするもんじゃない恋は落ちるもの." However, in these, しようとしてする cannot be taken as a single lexical unit. The first one has a break between the しよう and the する ("I was about to (しようとして) tweet goodnight, but fell asleep before doing so (する)." And in the second one, するもの means that love is "a thing to do" (するもの) that cannot be a "try to/be about to/get down to doing" (しようとして) "thing to do." I.e., the しようとして is like an adjective that describes (or, in the tweeter's mind, shouldn't be allowed to describe) the するもの. In other words, there's no half-assing about with love - you fall in or you don't.

～しよう＋としてします。 What is the meaning of this expression?


PHP: session.auto_start

Question: I have two projects  in the same server, their settings conflict in the "session.auto_start", related post. Can I have the session.auto_start "ON" despite the other project contains codes such as session_start()?
Answer: If you're using apache, and have the right Options, you can enable session.auto_start with a .htaccess file containing this line: php_flag session.auto_start 1
Or you might be able to put it in your global apache config in that  tag.
Answer: Do you need to independent sessions per user? I imagine you could just have one script check if a session already exists, like:
if(!($_SESSION)) {
    session_start();
}

Answer: If a session is already started. Then you will get an E_NOTICE error. session_start() docs.
Answer: I think you have conflict not because of "session.auto_start" you just need to set individual session_name for each project.

PHP: session.auto_start


Opening a "known file type" into running instance of custom app - .NET

Question: How would you open a file (that has a known file/app association in the registry) into a "running instance" of the application it's supposed to open in? An example would be, I have Excel open and I click on an XLS file.....the file opens up in the current Excel instance. I want to do this for a custom application...how does the eventing/messaging work that "tells" the current instance that it needs to open a file? Is there a "file watcher" that looks for a request to do so etc? Thanks..
Answer: What you want to do is inherit a class from WindowsFormsApplicationBase, setting the protected IsSingleInstance property to true:
// This should all be refactored to make it less tightly-coupled, obviously.
class MyWindowsApplicationBase : WindowsFormsApplicationBase
{
  internal MyWindowsApplicationBase() : base()
  {
    // This is a single instance application.
    this.IsSingleInstance = true;

    // Set to the instance of your form to run.
    this.MainForm = new MyForm();
  }
}

The Main method of your app then looks like this:
// This should all be refactored to make it less tightly-coupled, obviously.
public static void Main(string args[])
{
  // Process the args.
  <process args here>

  // Create the application base.
  MyWindowsApplicationBase appBase = new MyWindowsApplicationBase();

  // <1> Set the StartupNextInstance event handler.
  appBase.StartupNextInstance = <event handler code>;

  // Show the main form of the app.
  appBase.Run(args);
}

Note the section marked <1>.  You set this up with an event handler for the StartupNextInstanceEvent.  This event is fired when the next instance of your app is fired when you have a single instance application (which you specified in the constructor of MyWindowsApplicationBase).  The event handler will pass an EventArgs-derived class which will have the command line arguments which you can then process in the running instance of your app.
Then, all you have to do is set the file associations normally for the file types you want your app to process, and you are set.
Comment: Including a reference to the VisualBasic dll from C# seems wierd, to me, so I usually go the global Mutex route, but this is definitely easier. +1
Comment: @Lucas: I had that reaction initially, but it's a standard part of the framework (it's distributed with every install) so that helped ease my feelings on that matter.
Answer: Looks like what you are looking for is creating a single instance application.  This can be done in C# by using WindowsFormsApplicationBase located in Microsoft.VisualBasic.dll
For details, take a look at:
http://www.hanselman.com/blog/TheWeeklySourceCode31SingleInstanceWinFormsAndMicrosoftVisualBasicdll.aspx
or search for WindowsFormsApplicationBase
Answer: The way I'd do it is like this:

First thing in the main method, check the process list for an existing instance of the application.
If found, send the filename/path to the already running instance using your favorite interprocess communication method (sending windows messages, remoting, wcf, etc.)
Close the new process that windows tried to start (since the existing instance already handled the file open operation
Comment: @casperOne, meh, even if there are a few thousand processes running, how long could it take?  if it becomes a problem and startup time is important for his app, he could do it in a sep thread and just interrupt normal startup if an existing instance is found.
Comment: Scanning the process list is a wasteful procedure.  What you really should do is have a Mutex which is acquired by the application when it runs.  If you can't obtain it, then another instance is running.  THEN you use a messaging tool to indicate to the original instance the new parameters.
Comment: @Joel:  Well, I was working up to a point, which was, the majority of this work has been done for you, wrapped up in the WindowsFormsApplicationBase class.  A comment like "how long could it take" is also quite ignorant, because the overhead is not always a function of the number of processes.
Comment: @Joel: Because if you have the chance to reduce the operation from O(n) time to O(1), and it's an easy win, then there is no reason not to take it (if they serve the same purpose).
Comment: speed and permissions aside, how reliable is scanning the process list? isn't it just the executeable's filename? what if i rename it?
Answer: Example using TCP-sockets:
http://pieterjan.pro/?a=Projecten_csharp_DrawIt.php

start TCPListener on the form
connect TCPClient in the main of the second instance
Send ActivationArguments through the TCP-connection to the form

Works for multiple files at once as well, and even for multiple files at the first time (when application not started yet)
The most important code blocks are:

The constructor of the MainForm (Hoofdscherm) where the server is started and the port number is written to a file. The first file is opened as well.
The Main-function (Program.cs) where the second, third, ... instance connects to the TcpListener in the first instance and sends the filename through the socket

The source code is available on the button "Broncode"
Answer: Windows uses DDE for this purpose.

Dynamic Data Exchange (DDE) is a technology for communication between multiple applications under Microsoft Windows or OS/2.

Registry associations for word or office files usually have DDE commands in addition to the usual file association (to be executed if the app already is running).
So you can host a DDE server in your C# app to implement this functionality.


XML, how to have two variables under the same node?

Question: I have XML sheet that I use in my game. In my unity(C#) game, a game's monster can spawn at predetermined position or random position.
<monster delay="0.2" isRed = "true" position ="random"/>
<monster delay="0.3" isRed = "true" position ="10 20"/>

Right now I read value of position and if it is "random" then I assign random position for the monster.
If it is not "random" then I parse the value, separate them by a space bar then use the two numbers I obtain from the "position" as position of my monster.
I get this gut feeling what I am doing is probably really ugly and inefficient that there is probably better way to do this, but I am not sure.
Answer: It's hard to avoid "ugly and inefficient" when serializing data as XML, but space- or comma- separated strings for coordinate data is okay. Alternatively, you can use two attributes or make position a child element, but I'm not sure these are better than what you already have.
<monster delay="0.3" isRed="true" position-x="10" position-y="20" />

<monster delay="0.3" isRed="true">
   <position x="10" y="20" />
</monster>


What is the Kovat's Index used for?

Question: As mentioned in the title, why do we use the Kovat's Index in gas phase chromatography? It seems a little arbitrary to compare everything to the order that n-alkanes (such as n-pentane, n-hexane, and n-heptane) emerge from the column, and I am curious to know reasons why we use such an index.
Answer:
Why do we use the Kováts index?

The Kováts index is used to normalize GC data. This Wikipedia page(though not very long), sums up why you would want to do so.
Retention times of the same compound on even two different versions of identical instrument with the same temperature and pressure program using the same column from the same manufacturer might not be the same! Retention time is dependent on so many things:

The identity of the analyte
The identity of the stationary phase
The length of the column (did you know that columns sometimes get trimmed as they age to remove deposits?)
The diameter of the column
The thickness of the stationary phase film
The flow rate of the carrier gas
The temperature or temperature program of the oven

With so many variables, gas chromatography (indeed all chromatography) can seem like a forbidding black art in which one has no hope of being able to compare results from one instrument to the next or one lab to the next.
Fortunately, we're smarter than that. We can always compare our analyte's retention time to some retention times of well behaved standards. If we know the elution order (will not change) of a series of well-behaved standards on several instruments, and we know when our analyte elutes in relation to those standards on one instrument, we have a good starting point for predicting the retention time of that analyte on another instrument.
Ervin Kováts took this idea a step farther and created a quantitative index relating the retention time of an unknown analyte to the retention times of known standards in a way that produced system-independent constants describing the elution behavior of compounds. The system-independent part is important, given all of the factors listed above that can influence retention time. Every analyte should have (nearly) the same Kováts index value on any GC system under any set of parameters. Thus, if we determine the Kováts index of analyte $\ce{A}$ on one GC, we can know something about how $\ce{A}$ will behave on other instruments or with a different temperature program, etc.

Why the linear alkanes?

The choice of the n-alkanes was probably not arbitrary, but I cannot say for certain. Of the two links from the Wikipedia article that might contain a rationale, one is dead and the other is in German behind a paywall. However, any well-understood series of standards would have worked. My guess would be that Kováts chose the linear alkanes for the following reasons:

They form a homologous series increasing one carbon at a time.
A great many of them are (were - Kováts developed this index in the 1950s) available commercially in high purity (high enough purity that they can be easily purified further). At Sigma Aldrich, you can buy all of the n-alkanes at least up to eicosane $\ce{C20H42}$.
The first 20 linear alkanes cover a wide range of boiling points (and thus retention times): Methane $\text{BP}=-161.5\ ^\circ \text{C}$, pentane (the first liquid at room temperature) $\text{BP}=35.9\ ^\circ \text{C}$, decane $\text{BP}=173.8\ ^\circ \text{C}$, and eicosane $\text{BP}=343.1\ ^\circ \text{C}$.
There is a relatively reliable linear relationship between $\log(t_r)$ and the number of carbon atoms in the chain.

How do you determine and use the Kováts index?

Lets say we have an analyte $\ce{A}$ that has a retention time of 193 seconds on some system. First, we identify the linear alkanes that have retention times on either side of the analyte. Lets say that heptane has a retention time of 170 seconds and octane has a retention time of 200 seconds in this system.
The formula for the index looks like this (for non-isothermal programs):
$$I=100\times \left[n+\left(N-n\right)\dfrac{t_{r,a}-t_{r,n}}{t_{r,N}-t_{r,n}} \right]$$

$I$ is the Kováts index
$n$ is the number of carbon atoms in the alkane with the lower retention time
$N$ is the number of carbon atoms in the alkane with the higher retention time
$a$ is the analyte
$t_r$ is retention time, so $t_{r,a}$ is the retention time of the analyte

For our example:
$$I=100\times \left[7+\left(8-7\right)\dfrac{193-170}{200-170} \right]$$
$$I=100\times \left[7+\dfrac{23}{30}\right]=777$$
Now, we want to analyze $\ce{A}$ on a different instrument, where the retention times of heptane and octane are 217 and 289 seconds, respectively. We can plug values back into the equation for the index to predict the retention time of $\ce{A}$ on this system:
$$I=100\times \left[n+\left(N-n\right)\dfrac{t_{r,a}-t_{r,n}}{t_{r,N}-t_{r,n}} \right]$$
$$777=100\times \left[7+\left(8-7\right)\dfrac{t_{r,a}-217}{289-217} \right]$$
$$7.77=\left[7+\dfrac{t_{r,a}-217}{72} \right]$$
$$0.77=\dfrac{t_{r,a}-217}{72}$$
$$55.2={t_{r,a}-217}$$
$$t_{r,a}=272$$
Comment: @NicolauSakerNeto - That's how I interpret it, although I admit to being not very familiar with the concept before I  started answering this question. I am now envisioning a very interesting inquiry-based experiment for an undergraduate analytical or instrumental lab course to test the validity of Kovát's index over a range of GC temperature programs and columns.
Comment: Interesting, so the Kováts index works by extrapolating all elution behaviour to the *n*-alkane series, and by doing so it essentially means "this compound elutes *as if it were an* n-*alkane with 7.77 carbon atoms*". Don't know why I didn't realize that before.
Comment: Good answer. Just one question...Are you sure kovats index independent of stationary phase? I think they are not, that's why we have different McReynolds indexes in different phases. Also, according to this site https://goldbook.iupac.org/html/R/R05360.html they are temperature-dependent..
Comment: accoording to this website https://chem.libretexts.org/Core/Analytical_Chemistry/Chromedia/01Gas_Chromotography_(GC)/Gas_Chromotography%3A_Basic_Theory/25Qualitative_analysis%3A_identification kovats index is stationary phase-dependent

What is the Kovat's Index used for?


What kind of LED Lighting should I get to grow lotus indoor?

Question: I am growing lotus from a seed. What kind of lighting should I get for winter? What is the lifecycle and makeup of lotus? I am trying to figure out if I need a blue or red shade LED? I am a little confused with how to grow them in a colder climate like Washington state.
Comment: What do you mean for "Lotus"? There are so many plants named Lotus: https://en.wikipedia.org/wiki/List_of_plants_known_as_lotus . The question is for now (for germination) or for next winter (how to keep it alive)?
Comment: I think they are Nelumbo.
Answer: Unless your plant is still just a seedling, you should just allow it to go dormant for the winter.  If it is outdoors lift it out of the pond and bring it indoors to a cool, not cold, location sitting in wading pool of water.  The water does not need to be deep just enough to keep the plant wet through out the winter.  Ideally the water should stay around 40-50°F (4-10°C)  This is the ideal, but not a firm rule.   In spring you should start to increase the temperature of the air and water.   Also increase the amount of light that the room gets.  You will also increase the amount of water once the plant starts to break dormancy.  Only put as much water as need.  Ideally you want the water temperature indoors to be between 60-65°F (15-18°C).  You will keep it inside until the outdoor water temperature is above 60-65°F (15-18°C).   Depending on where in WA state you live the water may not get above this temperature until sometime in summer.
If the room you store your plant in winter does not have windows this is okay, until spring.  In spring you want to introduce light to the plant as soon as it starts to break dormancy.  A very simple LED grow light of 100W should be enough until you take it outside for summer.   Run the grow light for 16-18 hours.   The grow light should be WHITE light, do  not use any coloured lights.   The grow light should also be full spectrum.
100W is all you need, but the more sunlight you can provide the better.   You can go as high as 1000W, but at this power it should be in place before the plant breaks dormancy, so it does not burn the plant when you do put it in place.  100W light should only about 3" (8 cm) away from the plant, but 1000W should probably be about 12-16" (30-40 cm) above the plant.
When it come to time to bring it outside bring the wading pool in a area that only gets morning sunlight for a few hours to start.  Slowly increase the amount of light the plant gets each day by about an hour.
In the pond it should go in full sun.  The brightest warmest location in the pond.  The pot should be just submerged below the water surface, do not put it in deep water.  You need it to shallow for you plant to thrive in WA.
Even with all of this care you still may not be able to get it to bloom for years.  It is hard in WA with the short summers.
If you have more questions about growing lotus I suggest calling the Lan Su Chinese Garden in Portland, OR horticulture department.  They have a great lotus garden.  There staff are friendly and willing to share growing tips.  They also have a few videos online.
Lan Su Chinese Garden


Emacs not loading init file when run as sudo

Question: Emacs loads my .emacs.d/init.el startup file just fine when run as a regular user, but refuses to load it when run as sudo emacs file.type.  I have tried changing the owner of .emacs.d to root with no success.
Answer: I'm a little of topic, but you could use Emacs as a normal user, and tramp to open file as root:
C-xC-f /sudo::/path/to/file

will ask you for your sudo password, and open the file as root.
Answer: When you run as sudo add -s to preserve your environment.  It's not maintaining your environment, thus your HOME directory is lost.  Emacs looks in ~/.emacs, ~/.emacs.el, or ~/.emacs.d/init.el, so if you lose HOME, you lose the pathing to your startup files.
Answer: sudo -s didn't work for me.
Here is the work-around I used.
Load emacs as a normal user (so your settings take effect)

Type M-x customize-themes
Use the link to migrate your settings to a theme.
Give your theme a name. (I unclicked the Remove saved theme settings from Custom save file.  Don't know if that affected it)
Click save theme and note where the theme is saved.
Exit emacs and copy your theme file to your default emacs theme folder
(e.g. ./usr/share/emacs/24.4/etc/themes/)
Now, open emac with sudo.
Type M-x customize-themes again and you should see your newly created theme as selectable.
Click Save Theme Settings and your sudo session will now use your custom theme in the future.

I wish there was a more elegant way of fixing this but it gets the job done.
Answer: jmq is right. In alternative tricky solution. If you are the only one allowed to be sudoer or to login as root, you can add a symlink in /root/ to your .emacs.d directory. For example:
ls -l /root/.emacs
lrwxrwxrwx. 1 root root 18 May  5 11:14 /root/.emacs -> /home/<user>/.emacs

Answer: jmq has the right idea, the issue is because emacs looks in ~/ directories to find your .emacs file and your installed scripts.
His suggestion of sudo -s, if it works, is the simplest, but there's a good chance it won't work.  The problem is really a matter of how your sudoers is setup.  The sudoers is likely setup to reset your environment, which means it doesn't preserve the HOME directory for your user when it runs the sudo command.  The possible options are presented here as the top rated response, and using -s can't work around most of the sudoers settings that will screw it up in the first place.
Answer: You can easily run emacs with the init file of your choice. For example, the following command
sudo emacs --load ~/.emacsroot -nw filename.ex

Loads emacs

as super user -> sudo
with .emacsroot init file located in the home directory -> --load ~/.emacsroot
in console mode -> -nw
opening filename.ex file
Answer: The following works for me:
sudo emacs /etc/host.conf --directory=/path/to/.emacs.d/

Simplified by putting this in .bashrc:
function semacs { sudo emacs --directory=/path/to/.emacs.d/ $*; }

...so all I enter on the command line is:
semacs /etc/host.conf


Locking an axis for a curve

Question: How would I lock an axis for a curve? I don't want the curve to go in a certain direction until I unlock it. I'm frequently finding that when I created a beveled curve, what looks like everything is on the same level, is actually higher and lower on the Z-Axis.
Answer: You could try setting the curve shape to 2D in Curve > Shape until you want to adjust it in Z axis:

Note that you will still be able to rotate the curve in Object Mode, so you can use this to lock the curve in any direction.
Another option is to fix the curve afterwards:

Select all the control points (A):

Scale to 0 on the axis you want to lock. E.g. SZ0
This will scale everything to be on a plane with the Pivot point, so you can easily control this by using the 3D cursor:

Locking an axis for a curve


how to make a system respond to IR laser?

Question: Lets say i have 2 separate systems called Box A and Box B. Box A has an IR laser beam attached to it.
What equipment can i use to make Box A make a certain action ONLY when the IR laser attached to is pointed at Box B?
Answer: First problem: Detecting the emitter IR while filtering out other wavelengths.
At the simplest level, the signal receiving device needs a phototransistor or photodiode sensitive to infrared at the wavelength that the IR laser emits, and preferably not sensitive to wavelengths deviating much from this wavelength, such as visible light or ultraviolet.
If the IR laser emits at 980 nm, you would be looking for a photodiode or photoresistor sensitive to that range, and preferably with a daylight masking filter blocking visible wavelengths. Several manufacturers offer such devices, for instance the Vishay Semiconductor BPV23F, with a spectral range of 870 nm to 1050 nm.
This solves one part of the problem, ensuring that the sensor "listens" only for IR in the range of interest, and does not get "distracted" by general heat sources, room lights or daylight.

Second problem: Ensuring that an IR source from the emitter device be recognized, not from other IR sources in the same wavelength.
To achieve this, the simplest option would be a modulated-IR integrated sensor, i.e. one that is (a) sensitive to the wavelength range of interest, and (b) designed to respond only to such IR being pulsed at a specific frequency.
Such IR sensors most commonly have a modulation frequency of 38 KHz, used by infrared remote controls such as on your TV. Other modulation frequencies such as 28 KHz, 32 KHz, 36 KHz, 42 KHz, 56 KHz, and others, but let us stay with 38 KHz for now. An example would be the Vishay TSOP1738 - very inexpensive 38 KHz modulated IR receiver with daylight filter, and sensitive to the wavelength of interest.
To be able to activate such a sensor, the IR laser must be pulsed, i.e. turned on and off, at the designated frequency: So your emitter circuit would turn on and off the IR laser 38,000 times per second. Just leaving the IR laser would not work.

Third problem if you must be nit-picky: Ensuring that a specific emitter device is recognized, uniquely identified as distinct from another similar 38 KHz modulated IR emitter.
For this, one would add a further level of modulation on top of the 38 KHz pulses, i.e. turning on and off the 38 KHz pulses in a serial data sequence of on and off times, like any single-wire serial protocol, with each such on / off period or "bit" spanning at least 10 of the 38 KHz pulses (see the linked datasheet above). So each "bit" needs to be a minimum of 0.26 millisecond, preferably twice that or more.
Each unique emitter device would emit an unique serial bit sequence to distinguish it from the others. At the receiver, this bit sequence would be decoded, and matched against the expected sequence. If there is no match, the emitter is not the specific one being listened to.

Depending on the level of unique device identification needed, the first, second or third approach above would be used.


2-factor authentication can be misused?

Question: I was trying to access my account on an e-commerce website but I couldn't get my password right. So, the website offered me the option to authenticate using my security code from Google Authenticator alone (my 2-factor authentication method). I was wondering if this is a possible misuse of this concept of multi-factor authentication.
Comment: subjective question, but use a password manager to avoid such problems.
Answer: It depends on the protection requirements of the website. When you talk about multi-factor authentication, you distinguish between different types of factors:

Something you know (e.g. a password)
Something you have (e.g. an authenticator)
Something you are (e.g. fingerprint)

How many of these factors are required, can be decided based on the protection requirements. If the website is fine with a single factor, proving that you own the authenticator is OK. If the website requires 2 factors (e.g. password AND authenticator), but you are able to log in with only the authenticator, you have found a security defect.
This means the answer is, it depends.
Sidenote: In case your browser is already known to the website, because you successfully authenticated with the same user in this browser before, the requirements concerning the amount of factors might have been deliberately reduced. This is done by some websites to improve the user experience.
Comment: Sounds dangerous. There's a little bit if a risk of collision if the code is used in place of a password. Someone else may have the code at the same time
Comment: Independent of the factors you are using, you will always supply your user id / user name as well. So an accidental collision isn't a problem - like it isn't a problem when two users have the same password. Of course the general risk is higher with fewer factors, but that's basically what my answer is about.

2-factor authentication can be misused?