How could Smaug live buried under gold without breathing? (The desolation of Smaug: The film)

Question: Before Smaug awakens because of Bilbo's ventures, there's not even a single breath amidst all the gold. His breath is only heard when he wakes up. Is he capable of living without breathing?
Comment: Perhaps he has been sitting in that particular position long enough that the loose stuff had already fallen down to a point that it was relatively stable.
Comment: Considering that sometimes I have to approach my little son very close to see whether he is actually breathing, I would say that smaug was simply deeply asleep.
Comment: yes, but he was lying under heaps of gold... Even the slightest of breaths would cause rumbling...
Answer: In order of possibility:

Smaug does not need to breathe. He is a magical monster and his life processes do not resemble that of living beings. After all, he can breathe fire, fly AND speak intelligently. Of the magical origins of dragons little is actually known so they may not have the same requirements as non-magical creatures. Dragons violate so many of the natural laws of physics as to be certainly supernatural in and of themselves.
Smaug breathes, but while dormant under his gold may only breathe once in a given period which was shorter than Bilbo's initial visit. Like many serpents and reptiles, they are able to live for very long periods without any environmental resources. For example: The bushmaster viper may live an entire year on less than one meal per month.
Smaug breathes very quietly unless he wants to talk, interact, or breath fire. He may when in a hibernation state, need almost no natural resources, such as air, at all.
It has been suggested that possibly like an alligator, Smaug may lie below the gold for the most part but his nostrils may be camouflaged by the gold, and the gold may be loose enough to allow him to breathe quietly while at rest.
Comment: "Smaug does not need to breathe": not very plausible, IMHO. He may be magical, but magical doesn't mean breaking the consistency of the Secondary World. In every creature, a biological feature if present has a function: he has a heart that pumps his blood, and when shot is killed. He has eyes in order to see, he speaks so he must have lungs, and he has a nose and nostrils: their function is to breathe, so he breathes.
Comment: I think it's also a possibility that the gold coins were just packed fairly loosely so there was room for air currents to get between the top layer and the layer of his nostrils, especially if his nostrils were pretty close to the surface (and maybe also if the coins had "high relief" art on them like the one at http://www.usmint.gov/mint_programs/ultrahigh/ so that they'd be bumpy and would have spaces between them even when directly on top of one another)
Comment: @hypnosifl the question isn't whether he can physically breathe or not it's that every time a vertebrate takes a breath their lungs and ribs expand by quite a lot, meaning that the gold underneath him would shift a lot with every breath, which is why it is speculated that he isn't breathing at all
Comment: @Hypnosifl - Actually, you are thinking of modern coins. Coins minted by processes the dwarves most likely had available to them (Hand carved molds), the coins would naturally have had bumps and irregularities without the need for raised engravings to provide space.


detect if LSF daemons are running

Question: I've inherited a script that tries to detect if the LSF daemons are running by doing a ps and then grepping for a mess of stuff. I think that's error prone and I'm looking for a better way. The best I've found so far is the LSF command lsid, but that only indicates if LSF is installed and doesn't really tell me things are up and running. Short of submitting a job, has anybody got a better idea? This needs to work with Linux & Solaris.
Comment: I know of 2-3 programs that are called LSF, which one is this?
Comment: this one : http://en.wikipedia.org/wiki/Platform_LSF
Answer: In general:
The only safe way on Linux/Unix to know if a certain process is running or not is to use the pidfile approach.
This means:

When you start the process you save the PID of the newly started process in a pidfile. Typically this file is saved where the process has its log files and a good name in your case would be lsf.pid (this kind of seems to be the convention for such files).
Now you need a script to start/stop/show status of your process that takes the pidfile into account. There are lots of these on the Internet.

The major benefits of this approach is that you can do ps -p <pidno>. This is the ONLY safe way to identify if a process is running or not. Also the ps -p command is portable across Linux/Unix versions unlike so much of the other stuff you can find.
All in all: Yes, you can use an approach with grep'ing on various forms of output from ps command but it will never be a safe method and it is difficult to make truly portable. Bite the bullet and use the pidfile approach.
With regards to Solaris:
Your daemon should really run under SMF.
This solves all of your problems (you do not need the general approach described above) and at the same time it also gives you:

Automatic startup at boot.
Dependency management: The process is only started when dependencies that you define are met, such as "network is up" or whatever.
Automatic restart if process failure.
Automatic restart if dependencies are restarted (if you want it to).
SMF keeps track of the whole problem of uniquely identifying your process.
You can define how many times you will allow your service to run concurrently. Typically this is 1. This avoids that the process can be started in duplicate.
Administration delegation. You can delegate in a safe way to others the right to start/stop the service without such user having access to the privileges that the service requires (it is kind of sudo on steroids).

detect if LSF daemons are running


Fan speeds up and slows down annoyingly on a Dell Latitude 5520

Question: I' ve just bought a dell latitude 5520 and installed 11.10, my trouble is that the fan is noisy which is not regular.
It is quiet for 1 minute and then speeds up and slows down every 4 seconds for 1 minute : it's very annoying.
I tried i8fan things on the Internet but i didn't solve my problem, it seems to work better in windows 7 but i don't use it a lot.
Dell technician came and changed the motherboard and the fan but it's still the same.
I have to put music on when i'm on my computer...
Anyone have the same problem or a solution?
Comment: can you check your CPU usage e.g. using the program top? In general the behaviour you explained is normal, depending on the heat your system produces.
Answer: I had a similar issue on my Inspiron 5100 (long time ago).
I solved it with lm-sensors. You can install this package and then use sensors to view te sensor values.
You can also use it to regulate the fan speed. But be careful, you can burn your CPU if it's not finely cooled !
I found it: http://ubuntuforums.org/showthread.php?t=42737
Answer: I believe the issue is kernel-level, and have confirmed the following works (in stopping the fan, and running less often) with kernels 3.2 - 3.5. Though on Inspiron 15R 5520, the root cause is likely the same.
echo "min_power" | tee /sys/class/scsi_host/host*/link_power_management_policy

Typically one only needs to do it on host0, but it doesn't hurt to do it as above, just to be sure. Yes, as it's strange as it sounds, the only way I could get the fan to quite down is with enabling SATA ALPM (Agressive Link Power Management) -- the min_power used above. Unfortunately, medium_power doesn't help. max_performance is the default and is what keeps the fan always running for some odd reason. But, since this happens to be a laptop, this may be a good idea anyway as it shaves a good 0.7-1.5Watts off your power consumption when you running on batteries.
Another thing to help with power/heat, is power savings options of the integrated GPU - Intel HD 4000 kernel module; i915
options i915 modeset=1 i915_enable_rc6=1 i915_enable_fbc=1 lvds_downclock=1 semaphores=1

modeset is necessary (along with opensource radeon driver) for vgaswitcheroo to work. that way, you can disable the discrete graphics when not needed via:
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

echo MIGD > /sys/kernel/debug/vgaswitcheroo/switch

echo IGD > /sys/kernel/debug/vgaswitcheroo/switch

echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

This 2nd OFF may not be needed, unless scripting, to avoid possible blanking on resume. You may want to run this in startup, for default boot to be more energy efficient (and quieter fan operation).
Answer: For me the problem was i8kmon. I sorted it out by stopping i8kmon:

sudo service i8kmon stop

I also edited /etc/default/i8kmon and set ENABLED=0 to disable it at startup.


How would you pronounce the name "Sidheag"

Question: In Gail Carriger's series, mainly Finishing School, there is a female character named Sidheag, and I have no clue how this is pronounced. (Is it a real name in the first place or is it made-up?)
Answer: According to the author's website

Sidheag ~ SHEE-ak alternatively pronounced SIDH-hey, just to make
  matters confusing. (Again, chosen for its meaning, all the pack names
  are.)

The word itself means "Wolf" in Gaelic and is, apparently a traditional name in Scotland although it's never broken into the top 10,000 baby names in the last 100 years.
Comment: Yet more evidence that Gaelic uses the Latin alphabet just to confuse foreigners. :)
Comment: A lot of websites (of doubtful trustworthiness) seem to be saying that it means 'wolf' in Gaelic, but it doesn't—not quite. There is _sitheach_, which does mean a wolf, but which ends in _-ach_ /əx/, rather than _-ag_ /əɡ/. The former is a common adjectivising and nominalising suffix with no specific meaning, whereas the latter is a feminising diminutive suffix that's very common in female names. _Sidheag_ seems more likely to me to be an older spelling of _sìtheag_ 'female fairy' (cf. Irish _sídheog_), which seems a more likely source for a girl's name anyway.
Comment: The Finishing School series is amazing!!!!!!!!!!!! Sidheag might be my favorite character other than Sophronia. I agree about the pronunciation though. According to the Gaelic name nerds site it means "wolf" which I though was interesting... :)
Comment: The "wolf" meaning would make much more sense in context since this character is related to a pack of werewolves.
Answer: There is  absolutely  no  way a Scottish name "Sidheag" could  be  pronounced  "Sidh-hay" as Gail Carriger states, nor "Sit-ay" as the otherwise  excellent  audio reader does. "SI" in both Scots and Irish Gaelic is always pronounced  "SH," the "dh" is silent, and the final   "g" is sounded.
Comment: So how is it pronounced? Is SHEE-AK correct?
Answer: I know that Sidhe is pronounced "Shee" kinda like the e in eh, rather than the e in be. Technically DH in Gaelic makes a sound like what would happen if you drew out the GH in ugh, or if you voiced the CH in Scottish loch/German ach. However, a broad DH like that is sometimes just dropped at the beginning or end of a word, so you could probably ignore it so long as you get the rest right.
The e and the a in Sidheag sort of run together lightly, meaning that when you're saying it aloud your jaw drops a little and your lips go from the wider E configuration to a slightly rounder version in order to make a soft A sound. Not too much though– it's all rather subtle– and remember you're saying this all in one beat, so it should flow smoothly.
Finally, Gs in Gaelic are velar (with tongue to soft part at the back of the roof of your mouth) like the Ks in English (eg. kook)
I'm not Scottish, and I'm definitely not the best Gaelic speaker out there (I only know a few words) but I do my research. I hope I've been helpful.
Comment: I don't speak Gaelic, but this seems logical.
Comment: Gaelic is inflected, often through modification of vowel sounds. That said, not every vowel is pronounced individually; vowels must match the consonants around it. Hence, in _sidhe_ the pronunciation is (approximately) SHEE-ah. For the G, the tongue touches much farther down the throat than along the top of the mouth, and is very short; hence its common representation in English as a K. It is still a G, though. I don't know of any good way to represent its sound with only English/Latin letters.


Javascript upgrade when upgrading from MOSS 2007 to SP 2010?

Question: When migrating from MOSS 2007 to SharePoint 2010 how do I upgrade client side scripts (javascript, jquery, etc) running on the MOSS 2007 sites?
Answer: Which scripts are you referring to? Out of the box, SharePoint doesn't use jQuery, so anything you've added to the environment would need to be manually upgraded by you during the upgrade process. Customizations that affect the DOM will likely break during the upgrade process since the DOM structure of the 2010 look and feel is so different from the 2007 versions.
Comment: Thank you for the clarification webdes03. The scripts that I am referring to are the ones that are added to Content Editor Web Part (by either a developer or user). Also, I would like to know if there is any way by which I would come to know about all the scripts running in my SharePoint environment, so as to upgrade them all. Thanks in advance...
Comment: You could potentially use search to search for any .js filetypes, but there's no guarantee that'd find everything. There is no way to locate all of those scripts; one of the drawbacks to the CEWP approach.


Torrent uploading on a college network

Question: For a very good reason my college uses a method for throttling torrent traffic that means that people can't connect to you when you are downloading torrents so my upload rate is always 0 (even when I can download a torrent). This means I can't download a torrents that don't allow leaching without seeding and downloading a torrent without uploading anything is kind of a crappy thing to do. Any recommendations on how to get around this barrier would be appreciated (and don't feel bad! I limit my torrent traffic anyway so I wouldn't screw the network with my new power).
Comment: They limit this stuff for a reason, and the traffic is very obviously what it is, even when encrypted. Can you really not find a free/cheap alternative to whatever you're downloading?
Comment: The limit on the university is, I hope, based on the fact that torrent takes up a lot of traffic - even with limitations. So you shouldn't really try going around the limit, even for legitimate traffic, unless there's something that makes your case somehow special. Don't try to hog the wire(less). :)
Answer: Get a cheap Server like kimsufi for example, and tunnel your torrents. Or superseed them with rtorrent directly from the webserver.
The best way to do it is to use rtorrent in command line, it's not as easy as utorrent, but, you can get used to it. Follow some cheatsheet
Answer: Get a Seedbox and be done with it.
Answer: Use a proxy or a private VPN to hide your activity from the school. See Hotspot Shield or HTTP-Tunnel Client.

Torrent uploading on a college network


What is 'repo' in banking

Question: I keep hearing about repo rate etc. But this question is not what is the repo rate. It is: What is a definition of 'repo' ?
Answer: Repo is the short abbreviation for Repurchase agreement, as per Investopedia (https://www.investopedia.com/terms/r/repurchaseagreement.asp).
Answer: Thanks for the link Mike J. My understanding is now that:

A 'repo', short for 'repurchase agreement', is typically: Party 'A' (effectively a borrower - typically a bank) selling an asset (eg. a treasury bond) for cash to Party 'B' (effectively the lender) with the following conditions as part of the deal: Party A agrees to buy the asset back the next day for cash at an agreed slightly higher price and Party B agrees to sell the asset back to Party A the next day for cash at the agreed slightly higher price.

Party A benefits by obtaining cash for a day and Party B benefits by getting a percentage return on the cash provided.

The annualised percentage price increase to the slightly higher price is known as 'The Repo Rate.' Increased repo rates indicates that repo lenders see more risk of default in Repo borrowers.

As repo borrowers are usually banks then a higher repo rate indicates a degree of banking system instability, either systemic or technical.
Comment: No, a higher repo rate doesn't necessarily say anything about instability. In fact, during the 2008 financial crisis, repo rates dropped, because (1) repos are collateralized loans, so ones backed by high-quality collateral are preferable to uncollateralized loans (including large-dollar uninsured deposits), and (2) there's a censoring effect, where lower-quality borrowers just wouldn't get loans at all while higher-quality ones who generally borrowed cheaper to begin with continued to get them.
Comment: A higher median repo rate basically just means that the risk-free cost of cash increased. Sometimes that happens in an orderly way, as when the Fed moves to increase the Fed Funds rate and thus all short rates, sometimes it happens by surprise due to cash shortfalls (there are a bunch of factors that affect the supply and demand for cash in this market) and you see a big spike in rates (the latter has been happening more often over the past year, as unencumbered reserves at banks have become more scarce).
Comment: So, to be clear, an increase in average repo rates says literally nothing about default risk.

What is 'repo' in banking


Shishim - mi yodeya?

Question: Who knows sixty?
Please cite/link your sources, if possible. At some point in the next few days, I will:

Upvote all interesting answers.

Accept the best answer.

Go on to the next number.
Comment: Prev: https://judaism.stackexchange.com/q/2096/17423
Comment: Next: https://judaism.stackexchange.com/questions/2145/echad-veshishim-mi-yodeya?r=SearchResults
Answer: 60 are the number of letters in Birkas Kohanim. These are compared to valiant warriors who guard and protect the Jewish People. (Tanchuma, Naso 9, et al, interpreting Song of Songs 3:7)
Answer: In Bavel, they asked for rain (tal umatar) 60 days after Tekufas Tishrei (Taanis 10a)
Comment: And we still do so in countries outside of Eretz Yisrael (notwithstanding the Rosh's famous attempt to change that practice).
Comment: @Double AA It's actually 59 days AFTER the tekufah. Its 60 days including the day of the tekufah.
Answer: 60 is how many myriads of Israelites there were in the desert.
Also the proportion of a stingy person's crop to the amount he gives as t'ruma.
Also death:sleep.
Comment: Also, Egypt:Cush (the whole African continent, maybe?), Cush:world, world:Garden, Garden:Eden, Eden:Gehinnom (Pesachim 94a).
Comment: While your at it- fire:gehinom, honey:manna, shabbos:olam haba, dream:nevua (brachos 57b)
Answer: Sixty describes a verse in Song of Songs that Artscroll interprets two different ways.
Artscroll siddur page 293:

Behold! The couch of Shlomo!  Sixty mighty ones round about it ...

Same Hebrew verse, same exact Artscroll siddur, eight pages later:

Behold the resting place of Him to Whom peace belongs, with sixty myriads of Israel's mighty encircling it.

Sixty is the rule of thumb for the point at which most normal foodstuffs are diluted, by volume, beyond  tasteability.  (As Rabbi Moshe Dovid Tendler has pointed out, the notion of homoeopathic dilutions really doesn't click with this.)
The practice of some Sephardic Jews is to prefer to use a non-Jewish taste tester instead, but Ashkenazic practice relies on this rule of thumb, more or less exclusively*.
It's not per se that sixty-to-one is a halachically-magical number; I'd asked a medical-ethics posek if 1.6% is ever a threshold used in Halacha in the various discussions of odds and risk in Halacha; he said no, that's just about food.
Flavorings, including some food concentrates, are famously not nullified by 1:60; thus, if a non-kosher coffee flavoring is usually added 1:100 into plain coffee, that coffee remains non-kosher.  However, the resulting flavored coffee is now a normal foodstuff, and would in turn be nullified if mixed 1:60 with plain coffee.
The Achronim debate, in the case of a non-kosher flavoring added 1:60+, whether the foodstuff is Biblically or Rabbinically prohibited.  The logic to say it's Biblically prohibited is straightforward: it tastes non-kosher, it's non-kosher; 60 was just a rule of thumb.  Those who argue it was Biblically permitted say (e.g. Chochmas Adam) that the Torah prohibition is only on "normally tasteable" proportionate tastes, not "trace" tastes.  Which is awfully close to saying that 60 is a magic number ... (Well at least it's a unitary perfect number ...)
(* Yes there are exceptions, but that's too complicated for here.)
Comment: The source of 60 is the z'roah b'sheilah (Chulin 98a).  Rashi holds the Torah holds firm at 1/60, more is asur, 1/60 and less is mutar (but, like Shalom said, Chazal assured if it's nosen ta'am even though it's residual taste).  Tos'fos holds that more than 1/60 is also mutar if it's not nosen taam.  1/60 is the maximum ratio.
Comment: Checkmark for going to town on bitul.
Answer: Hineh mitaso sheliShlomo, shishim giborim saviv lah Migiborei Yisrael.  Shir Hashirim 3:7
This can refer to: 60 myriads that left Egypt (Rashi); The 24 priestly shifts + 24 Levite shifts + 12 divisions of Israel during the time of the Beis Hamikdash who conquered their (bad) inclinations (Metzudas David); The 60 letters that the Kohanim bless Yisrael with (Unkolos); etc.
Answer: 60 is the age at which one becomes a senior (Pirkei Avos 5:25) (in contrast to the opinion of the AARP).
Answer: Zohar Vayigash 211:1 says that the amount Agalos that Yoseph sent to Yaakov was 60.
Answer: The angels Gabriel and Metatron are given with sixty fiery lashes (Yoma 77a, Hagigah 15a). Gabriel for disobeying orders and Metatron to demonstrate the unity of Gd.
Elijah is also punished in this way, (B. Metz 85b)
Answer: 60 is the gematria of גאון (Gaon) - the title given to one who has mastered all of the 60 mesechtos of Shas by heart. (The three Bavas are counted as one mesechta, and Sanhedrin and Makkos are counted as one - רדב"ז; רלט-שלג, or by counting Ma'aseros and Ma'ser Sheni as one, see here)
Answer: Bechoros 8a says that a pig's pregnancy lasts 60 days.
Comment: erm... http://cal.vet.upenn.edu/projects/swine/bio/fem/gest/hm.html
Answer: SIXTY is the number of the daughters of רחבעם [RECHAVAM] (דברי הימים ב` י"א:כא)
Answer: The sixty rams of the peace offering corresponded to the sixty myriads of Israel's fighting hosts; the sixty he-goats to the sixty empires; and the sixty he-lambs to the building of the second Temple that measured sixty cubits in height and sixty in width. Legends of the Jews 3:3:65. When I get access to my library, I'll find the source.
Answer: Bereishis 25:26 - Yitzchak was 60 when Yaakov and Eisav were born

וְאַֽחֲרֵי־כֵ֞ן יָצָ֣א אָחִ֗יו וְיָד֤וֹ אֹחֶ֙זֶת֙ בַּעֲקֵ֣ב עֵשָׂ֔ו וַיִּקְרָ֥א שְׁמ֖וֹ יַעֲקֹ֑ב וְיִצְחָ֛ק בֶּן־שִׁשִּׁ֥ים שָׁנָ֖ה בְּלֶ֥דֶת אֹתָֽם׃
Then his brother emerged, holding on to the heel of Esau; so they named him Jacob. Isaac was sixty years old when they were born.
Answer: The Gemara (Megillah 15b) says that an angel stretched the King's golden scepter, which was originally two amot — cubits — towards her either twelve or as much as sixty amot.
Answer: Doniel 3:1 - Nevuchadnezzar made a gold statue measuring 60 amos high.

נְבוּכַדְנֶצַּ֣ר מַלְכָּ֗א עֲבַד֙ צְלֵ֣ם דִּֽי־דְהַ֔ב רוּמֵהּ֙ אַמִּ֣ין שִׁתִּ֔ין פְּתָיֵ֖הּ אַמִּ֣ין שִׁ֑ת אֲקִימֵהּ֙ בְּבִקְעַ֣ת דּוּרָ֔א בִּמְדִינַ֖ת בָּבֶֽל׃
King Nebuchadnezzar made a statue of gold sixty cubits high and six cubits broad. He set it up in the plain of Dura in the province of Babylon.
Answer: Melachim I 5:2

וַיְהִ֥י לֶֽחֶם־שְׁלֹמֹ֖ה לְי֣וֹם אֶחָ֑ד שְׁלֹשִׁ֥ים כֹּר֙ סֹ֔לֶת וְשִׁשִּׁ֥ים כֹּ֖ר קָֽמַח׃
Solomon's daily provisions consisted of 30 kors of semolina, and 60 kors of [ordinary] flour

Shishim - mi yodeya?


How to change the blog page title with specific user's only blog posts?

Question: There is a team page of the company and there are few links to social accounts which every user have, including the link to their blog posts.
This link redirects you to blog page, but only with this user blog articles. The address shows blog/user_id and the title of the page is "Blog". I want the title to be different depending on what user's blog you've entered. Something like this: "John Doe's blog posts". Should I edit blog template? I use Drupal 8.
Answer: Tryout this one   Reference
<code>class CustomController extends ControllerBase implements ContainerInjectionInterface
  public function getBlockContent() {
    if ($route = $request->attributes->get(\Symfony\Cmf\Component\Routing\RouteObjectInterface::ROUTE_OBJECT)) {
      $route->setDefault('_title', $some_title);
    }
  }
</code>
}


How to set the front page with Mobile Switch

Question: I am using Mobile Switch to switch to my mobile theme when viewed on a mobile device. However, I don't see any way of setting redirect to a custom front page. How can I do this?
Answer: Have you tried Context Mobile Switch in comination with Context? And if you want to implement a small custom module then you can add the global $conf variable and inspect it for which property to switch on.
Comment: Can you explain exactly how you would use the $conf variable here? I tried enabling the context mobile switch module and I didn't see any change...
Comment: Use context mobile switch with context module. In context UI create new context and add two conditions, 1. you are at the url of the front page of normal theme, 2. site is using mobile theme. Then add action to redirect to your mobile front page. To use $conf variable the easiest (not nice) is to add the php code filter to a body field, and very first statement you do something like this: global $conf;
global $base_url;
if (isset($conf['mobile_switch_mobile_theme_use']) && $conf['mobile_switch_mobile_theme_use'] == TRUE) drupal_goto($base_url . '/yourmobilefronturl'; ?>.


synchronize localy hosted wordpress with online one

Question: Here is some discussion but my question is bit different. Is there any way to synchronize all data (including themes, plugins & media) of locally
hosted (on xampp) wordpress with online version?
Answer: You would need to copy the entire local database to the online area. That means that both areas should have the same plugins and themes installed. You would also need to copy all media files from local to online. Lots of works.
There are plugins that will 'clone' a local database (and content and media files), allowing that 'clone' to be 'imported' into the live database. Note that all will totally replace the online database with the local version, so all current content on the online version will be lost.


Can I bring a sex toy in checked-in luggage travelling to Mauritius but transiting in Dubai?

Question: I'm travelling from Europe soon and I'd like to know if it is authorised to bring a sex toy and lube with me in my checked-in luggage transiting through Dubai. I haven't found much research about transiting passengers. Although, I know it is illegal to bring sex toys in the country, but I'm only stopping in Dubai for a couple hours and my luggage will be already checked-in from France to arrive at my destination. I was just wondering if it is safe to transit in Dubai without being stopped or the sex toy being confiscated
Comment: You've checked whether they're legal in Mauritius, haven't you?
Comment: Yes, it's illegal to sell sex toys on the island but there must have been tourists who have gone there with their toys. I've been searching and I've found one or two people who said that they brought their toys to Mauritius on their holiday
Comment: Many people have learned the hard way that transiting in Dubai with illegal things never ends well, do not take that risk however small it is
Answer: A good rule of thumb is this:  if you will be clearing Customs and Immigration for the airport through which you are transiting, you will be subject to their laws of what may be imported and what you may not.  If you are not required to clear Customs and Immigration, then legally you have not been admitted into the country and you are probably in better shape with this situation.
For example, transiting through the US (e.g. Toronto Pearson-Atlanta-Cape Town) you clear US Customs even though you are only in the US for a connection.
Also, consider if you have a flight cancellation or weather problems.  You may have to clear customs in Dubai even if you didn't intend to actually do more than make a connection there.
Personally, I wouldn't risk bringing things that are illegal in Dubai in either circumstance.  If you really want to take the toy, rebook your flight to route only through airports where such materials are legal.
Comment: I do not have to go through immigration, I'm just transiting but I do understand it is quite a risk. I'm also questionning if I'll get through to Mauritius because it's illegal to sell toys on the Island despite people who have bought them online and there must have been multiple tourists who have brought their own
Comment: @C.Jackson If sex toys are important for your vacation satisfaction, I suggest destinations like Canada or Australia where they're legal :)


Nginx redirects to port 8080 when accessing url without slash

Question: when accessing:
http://example.com/somefolder --> http://example.com:8080/somefolder
I have tried this:
 http {
    port_in_redirect off;

Any ideas?
Comment: The nginx configuration file that defines the `server` block which contains the `proxy_pass` directive.  What you're probably going to need will be a [`proxy_redirect`](http://wiki.nginx.org/NginxHttpProxyModule#proxy_redirect) directive - seeing your config should confirm.
Comment: Can you provide your configuration?  Are you proxying to another service behind nginx?
Comment: I believe we are are proxying to apache.  Which configuration files do you want?
Comment: Note that some browsers cache redirects so when changing `port_in_redirect` from `on` to `off` you may need to restart it.
Comment: @emersion `port_in_redirect` doesn't work at all
Answer: I just ran into the same problem and port_in_redirect off; actually worked for me, just make sure you use it inside the server {} block.
server {
  listen 8080;
  server_name example.com;

  port_in_redirect off;
  autoindex on;

  location / {
    root /var/www/example.com;
    index index.html;
  }
}

Comment: Or even use `port_in_redirect` inside `location`.
Comment: worked perfectly for hosting nginx on 8080 behind a load balancer. thank you
Answer: This should fix problem. Add proxy_redirect directive right after proxy_pass directive
proxy_redirect http://example.com:8080/ http://example.com/;
Answer: If someone is still experiencing this problem while having apache behind nginx reverse proxy setup, you could try the ff:

  location / {
    proxy_redirect off;
    proxy_set_header Host $host:$server_port; # <-- this one solved mine
    proxy_set_header X-Forwarded-Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://127.0.0.1:8083;
  }

My setup is that I let Apache listen to 127.0.0.1:8083 and let nginx proxy requests to it.
Answer: I had the same problem with my nginx + Apache setup. Apache seems to be redirecting to it's own port (running on 8080), while nginx is on port 80.
In my setup, this made infinite redirect loop for normal urls:
proxy_set_header Host $host:80; # Force port 80

Instead bind the returning data to port 80, like this:
proxy_bind $host:80; # Bind to port 80

Here is my nginx server block:
server {
    listen 80;
    listen [::]:80 ipv6only=on;

    server_name _; # Wildcard server

    location / {
        proxy_bind $host:80; # Bind to port 80 << THIS IS THE MAGIC
        proxy_pass http://localhost:8080;
        proxy_set_header Host            $host; # Pass host header
        proxy_set_header X-Real-IP       $remote_addr; # Preserve client IP
        proxy_set_header X-Forwarded-For $remote_addr;
    }
}

With this wildcard setup, all requests nginx does not have a server block for is passed on to Apache.
Comment: Doesn't work at all
Answer: I think this simple example is enough:
location = /somefolder {
    return 302 http://$host:8080/somefolder;
}

Answer: In case anyone else was having this issue - the article here: http://www.linuxquestions.org/questions/linux-server-73/strange-nginx-redirects-without-trailing-slash-930876/ solved the problem for me.
I had to add an extra header in the proxy.
Make sure you have the Host set to $http_host and also that you have set the X-Forwarded-Host to $http_host like below:
proxy_redirect off;
proxy_set_header Host $http_host;             # <-- make sure this is $http_host
proxy_set_header X-Forwarded-Host $http_host; # <-- make sure you set this
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 16k;
proxy_buffers 32 8k;
proxy_busy_buffers_size 64k;

Comment: It doesn't work at all
Answer: Adding
absolute_redirect off;
in the location block works for me.
Answer: http://wiki.codemongers.com/NginxHttpCoreModule#port_in_redirect
syntax: port_in_redirect [ on|off ]
default: port_in_redirect on
context: http, server, location

Hope this is what you are looking for.
Comment: I have tried this in the http context with no luck
Answer: I had a similar problem.
Maybe you should use directive proxy_set_header to set the headers' host and location. In my configuration I added proxy_set_header Location $host:80;  and all the requests return port 80 now.
Comment: I believe this will break redirects beyond "/" - every redirect would point to $host:80
Answer: This issue is caused by Nginx auto translate relative path to absolute path, right?
There is a way to tell Nginx not translate, you add a space before slash:
ngx.redirect(" /foo")
Comment: Please note that this is a question from 3 years ago.
Answer: I would recommend instead adding this to your server block:
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

This was when you go to example.com/wp-admin it will go to example.com/wp-admin rather than going to example.com:8080/wp-admin/ and if you are on CloudFlare DNS for instance it will say the site is down.
I'm using Ubuntu, Nginx and Varnish and this works perfectly now rather than disabling port_in_redirect.
To add, be sure to to restart nginx after:
sudo service nginx restart


What determines the gender of a Gen-1 Pokemon?

Question: Pokémon in the Generation 1 games don't have a gender, but they can be traded to Generation 2 games, where most Pokémon have genders. What determines the gender of a Generation 1 Pokémon when it is traded to a Generation 2 game?
Answer: The Attack IVs.
From the Bulbapedia:

In Generation II, a Pokémon's gender was determined through its Attack IV. Due to this, a female Pokémon could never have a maximized Attack stat (unless they were a member of an all-female species, such as Smoochum), because female Pokémon were given the lower portion of the IV range. This also prevented female Pokémon of a species with a gender ratio of seven males to one female, such as starter Pokémon or Eevee, from being Shiny, due to that also being based partly on the Attack IV.

Basically, females were given the lower half Attack IV range and males the upper.  This Reddit post goes into a brief discussion about it as well. I also found another post that explains the ratios:

87.5% male ratio: Attack IV needs to be 0 or 1 to be female all others result in a male
75% female ratio: Attack IV needs to be below 12 to be female
75% male ratio: Attack IV must be below 4 to be female
50-50 ratio: Attack IV must be below 8 to be female
Comment: It's worth noting that 100% gender (the Nidorans etc) and 'no gender' (eg Ditto) Pokemon also exist in Gen 1, and when transferred across they will always be that gender.
Comment: How can I tell (from Red/Blue) what a particular Pokémon will end up being when traded?
Comment: From what I understand, its the ratio (above) and the Attack IVs you will need to consider when trading up to Gen 2.  Maybe [this thread](http://serenesforest.net/forums/index.php?showtopic=63781) will help?


Is it safe to install Ubuntu packages on Debian?

Question: I've found online guides to adding Ubuntu PPAs and repositories to a Debian system. Is this a bad idea? If so, why?
Comment: I have found some vague and dire words of warning buried in the forums, such as ["Adding an Ubuntu repo is a good way to mess up your Debian system as they are not really binary compatible"](http://forums.debian.net/viewtopic.php?f=5&t=55646#p322724) and ["I have heard of people using Debian sid sources in Ubuntu, but even they tend to bork their systems"](http://www.linuxquestions.org/questions/debian-26/mixing-ubuntu-repositories-with-debian-3-1-sarge-338900/#post1723909). However, it seems like people are still doing it, and the guides linked above aren't specific about the dangers.
Answer: Basically, since dpkg and apt are shared between Debian and Ubuntu, they will be able to read and use repositories made for "the other side" without problems. However, as soon as you try to install non-trivial packages from a "foreign" repository, you are likely to run into dependency problems. Some packages are named differently on Debian and Ubuntu, so if they were listed as a dependency of the package you are trying to install, you might end up with missing packages or duplicate installations.
From my experience, third-party-software with few dependencies (like NX) may work, but don't try to mix GNU tools or similar stuff.
Comment: For some small things, it won't be a problem. I've heard of people using wine from the ubuntu repos on debian just fine.
Comment: This is most of what I was looking for, thanks! Could you clarify what you mean by "foreign" repositories? Also, I'm not sure what you mean when you talk about mixing GNU tools...do you mean different versions of the same GNU tool? Or getting one GNU tool from the Debian repos and a different one from the Ubuntu repos?
Comment: "Foreign" repositories are those that are not provided by the distribution itself. For example, the Opera web browser uses a repository at http://deb.opera.com/, and FreeNX uses https://launchpad.net/~freenx-team/+archive/ppa. Both serve, at the same time, as an example for software that can be installed from one repository to both Ubuntu and Debian, as their dependencies are non-critical.
Answer: Your mileage may vary. I wouldn't do that. It's not only about dependencies problems, but about binary compatibility (https://wiki.ubuntu.com/MarkShuttleworth#What_about_binary_compatibility_between_distributions.3F): Debian packages are likely built with different toolchain versions, so you may incur in troubles.
Comment: Thank you for the useful link! This addresses the issue that people were talking about in the forums in much more depth than I've seen elsewhere.


Is there anything that can produce light without UV rays?

Question: I've read that everything from fire to LEDs can produce UV radiation. Generally, unless intended otherwise, lightbulbs will have a phosphor coating to prevent UV radiation from escaping the bulb. Although this technically creates a light source that emits a low amount of UV rays, I'm wondering if there exists any possibly way to create raw, unfiltered light that does not emit ultraviolet radiation?
Comment: Indeed, the classic red GaAs LED isn't putting out any UV...
Comment: I'm pretty sure diodes don't produce any UV unless intended to.. can you reference where you read what you are claiming?
Comment: Thermal sources emit the full spectrum of EM radiation, including UV.  Non-thermal sources like LEDs and lasers can produce light of one wavelength and effectively zero light in the UV range.
Comment: Perhaps it's possible with lasers? i.e. [stimulated emission](https://en.wikipedia.org/wiki/Stimulated_emission)
Comment: https://www.premierltg.com/do-led-lights-produce-uv-led-tanning-beds/#:~:text=LED%27s%20can%20be%20designed%20to%20produce%20light%20of%20any%20wavelength.&text=However%20studies%20have%20shown%20that,Ultraviolet%20light%20to%20white%20light. This is where I read that even diodes emit UV
Answer: Well, anything with non zero temperature produces light over the whole spectrum, but cool anything low enough and you get a pretty much zero emission of UV (or visible light for that matter, things don't get visible for us until hundreds of degrees)

Otherwise, you can get something to emit light of only specific frequencies if it works by making an electron go from one shell to an other in an atom. In that case the energy of the emitted photon, is exactly the energy difference between the two shells, and from E = hf, this also means exact frequency. Thus find the right atom, and excite it with the right method and you get light with no UV's.
Hope i answered your question, don't hesitate to ask if it needs clarifications
Answer: Common LEDs do not produce UV light unless designed to. Note that tungsten filament light bulbs do not have a phosphor coating inside them to convert UV into visible light- the only light bulbs that do are compact fluorescent light bulbs.


Can line and light maintenance be combined?

Question: Is there any possibility to combine line maintenance and light maintenance (containing A, B and C check) under the name of line and light maintenance? In real is there any company which possesses a line maintenance which carried out "A" check and so on?
Comment: you should add a country, Im not an ame but in Canada operators can get there own maintenance scheduled approved by Transport Canada. I have know idea any of the details.
Answer: Line maintenance is activities that can be carried out in the turn around time between flights should something need replaced or repaired.
Although considerably less intensive than D checks, A, B, and C checks can still take anywhere from 8 to 72 hours depending on which one and how many problems. There would not be enough time to perform an A, B, or C check on the line. Not to mention it would cause a huge problem for airports (imagine what sitting on the line for 8 hours for an A check at an airport like ORD would cause), and would cause quite a logistical problem for airlines moving equipment around.
However I would expect that maintenance activities considered "line maintenance possible" will be taken care of when an A, B, C, or D check is accomplished.


Man pages offline for e-reader?

Question: Is there anywhere one can get a copy of Ubuntu's man pages in e-reader (preferably Kindle/mobi, epub can be handled)format?
Answer: This bash command will dump HTML files for every man page on the system.  You'll need to install the groff package first, then cd to an empty directory and run:
for f in `ls -1 /usr/share/man/man*`; do n=`echo $f | sed s/[.].*[.]gz//`; man -Thtml $n > $n.html ; done

This will cycle through all of the files in the /usr/share/man directory, strip off the section number and the extension using sed, then call man to render the manpage to HTML (man -Thtml in turn calls groff, which is why you need it installed first), storing the result in an html file with the same name as the page.  It will take a while to complete, and groff throws some warnings about line breaks, but when it finishes, you will have all of your man pages in HTML format.
Most e-readers can handle HTML files, but if yours doesn't, you can use calibre to convert the HTML files to mobi or epub or any other format you choose.
Comment: You can try also `man -Tdvi` and `dvi2pdf` after that to get a bunch of PDFs.
Comment: Sounds excellent.  I knew there was a way to get PDF output, but PDFs don't reflow well
Comment: I've had pretty good luck using Calibre to convert pdf's for my kindle and android.   (Text and html convert well, of course.)
Answer: all man pages are located at
/usr/share/man

But they're compressed in .gz files.
Also there's a web where you can see all man pages online.
I guess if you search a software who gives you the possibility to download all content of each page/link, you can create your own man-pages library for e reader
Comment: The mentioned downloading software could be `wget -R`.
Answer: You can ask to man to convert a manpage into HTML and then running a command to display it. So you can import a man page directly into calibre with (If you obtain something like command exited with status 3, install groff package):
man --html=calibre YOUR_MANPAGE

You can also import you manpage to calibre database without running GUI:
man --html='calibredb add' YOUR_MANPAGE

Once your manpage is in calibre, you can easily send them to your e-reader (I suggest to send them as .mobi format).
Now, just iterate over the list of manpage you want to import:
find /usr/share/man/man[1-9] -type f | xargs -l man --html='calibredb add'

Man pages offline for e-reader?


showing tasks collapsed

Question: Is it possible to show tasks in a task list collapsed by default? And if so, is it possible to specify some tasks/sub-tasks as collapsed by default and others to be expanded by default?
Comment: Agreed - this is not what I'm looking for. I want to show only the top-level tasks with the sub-tasks collapsed (twisty pointing right rather than down).
Answer: By default, it is collapsed as group
and to check this setting > open your view > modify the view .

From the above ribbon, select modify view   >

beside group check this setting

Regarding controlling to collapse some sub-tasks unfortunately it's not supported as  out of the box but you can create another view to show your subtasks and set it as expanded .
Comment: This option doesn't change whether my task list is collapsed or expanded (also, my task lists default to expanded so that sub-tasks are shown). I believe that the option you mentioned is only for list items that have been grouped, not for tasks and sub-tasks.

showing tasks collapsed


How to organize large Rails application?

Question: I am working on a large(ERP level) Rails project. We have 150 tables and more than 150 models. It takes minutes to find a model. Should we add all models under the models folder or should we put them in different subfolders? Same thing goes for controllers and views.
Answer: I think you are running into the limitations of a single Rails application.  Much like having too much code in one module, it sounds like you have too many modules in one application.
You should consider breaking it up into multiple applications using a service model, or you might also go the route of plugins or even better look at the new Engine framework.
This will benefit you multiple ways.  It will force you to exercise good encapsulation and have good testable interface points between pieces.
Good Luck
Comment: You have described the situation very well. Thanks for that. Can you be more specific about multiple applications? How do I do that? Can you provide some links?
Comment: I think he is implying that some of your functionality can be broken off into other projects as a sort of web service style architecture. That would allow some functional encapsulation and you would have smaller chunks to digest at a given time.
Comment: http://tech.taskrabbit.com/blog/2014/02/11/rails-4-engines/
Answer: I don't think it is necessary.
Doing the namespace route you mention (for models under separate directories) is what i would do.
I would also analyze the current performance issue further.
Just having 150 models/tables should not cause more than a fraction of a second to be able to find and use the model!  Is it actually the db query itself that takes a long time (when not cached)?  That can be addressed in many ways (splitting data, aggregating data, adding indexes, changing queries to be more performant, etc.
You may or may not need to do controllers and views under separate directories.
To access things arranged this way you just use ::, e.g. if you put lots of models about bedrooms and attics and basements, etc. under a subdirectory 'buildings' and then want to access it in the controller, use ::, e.g. attics = Buildings::Attic.all


In Edge of Tomorrow, is everyone on the European Mainland dead?

Question: We know the mimics overran the entirety of the European Union, or at least the vast majority of it. However throughout the movie we never see or hear of any survivors living in occupied areas, did the mimics just wipe out pretty much everyone they encountered?
Answer: It took them five years to take control of the subcontinent, so either everyone there is evacuated or dead of all kinds of causes. And yes, mimics did kill everyone they've met.
When you listen to news at the beginning of the movie there is a voice saying:

"(...) when they landed on Earth, five years ago, their (...) advance across Europe was unstoppable (...) millions of victims (...) continued evacuation (...)".

Simultaneously it shows landing site and then - in red - expansion of area they controlled.
At least I assume as much - red is traditionally used by NATO to mark enemy units/position/controlled territory.
5 years is impossible to survive in territory where enemy is of different species, with ability to move under ground, under water and quite a long ways in air. And where almost all humans are gone. Also, 5 years to conquer Europe is excessively slow, even with constant fighting, so it definitely suggests "weeding".
Comment: some sort of quote from the book or movie backing this up would greatly improve this answer.
Comment: @Kony2013 Just FYI, anything about the course of the war referenced from the novel All You Need Is Kill will not apply to the film Edge of Tomorrow, since the novel takes place entirely in East Asia, mostly in Japan. Honestly, I think the only things that are consistent between the two are the international organization of the UDF, and the portrayal of Rita as a character.
Comment: Yea, if there's anything in the book or movie that mention it at all that'd be great info. Right now I'm assuming the mimics are pretty much wiping out hundreds of millions of people which is a damn scary thought.
Comment: @acepl - Much better.
Comment: @recognizer Ahhh ok sorry, I didn't realize they were that different. Thank you for pointing that out!


Traveling through Munich Airport

Question: I'm traveling from the US, through Munich Airport, to connect to another flight to Turkey. What exactly is checked when going through passport control in the Munich Airport?
Comment: What passport do you hold?
Comment: Are you leaving the airport? Usually you'll be in special transit areas so your passport won't need to be checked there. I think (-:
Comment: Are both flights on the same ticket?
Answer: You are transferring from a flight from a non-Schengen location to a flight to a non-Schengen location. Your passport will be checked, so you need to have it and a valid visa if necessary. You may need to have a copy of the documents that you needed to obtain the visa, such as your ticket or boarding pass for your onward flight (proof of onward travel). There are two cases when changing airplanes inside the Schengen area:

If the airport where you are transferring has an international zone which you will not leave, you need a transit visa (unless exempt).
Otherwise, you need a visitor visa (single-entry is enough).

The official information from the German embassy is that Munich has an international area, so you only need a transit visa at most unless you want to get out of the airport.
Whether you need a transit visa depends on your nationality. USA citizens don't need one; Turkish citizens generally do. However, if you are Turkish (or from a number of other countries) and hold a valid visa or residence permit for the US (or if your US visa expired less than 4 days ago) then you do not need a transit visa.
Comment: Wow, I didn't realize there is something like airport transit visa! Note that it seems to be different from a normal transit visa (and probably easier to obtain).
Comment: @Grzenio AFAIK the airport transit visa is the only kind of transit visa in Germany (as in most of Schengen). Anything else requires a regular visitor visa (which may be only valid for the expected transit time). Other places have different types of transit visas, for example I believe Lithuania has land transit visas to cross between Kaliningrad and the rest of Russia.
Answer: Munich airport allows International to International transfers without having to pass through passport control.
There are however a small number of countries that may require a visa to pass through the airport, even if you are not going through passport control - and that includes Turkish citizens.
Comment: @KateGregory Yes, that's probably because of the Schengen aspect, Germany and Italy were part of it from the start. Did you go through passport control in Venice? Usually Schengen flights have other gate numbers (it can be in the same terminal, with two parallel but separate corridors – Schengen and non-Schengen – or some such arrangement) and no passport check at arrival.
Comment: I've changed planes in Munich between London and Venice (so international to international but perhaps not nonSchengen to nonSchengen) and had to line up for passport control.
Comment: @KateGregory You weren't an international-to-international transfer. Intra-Schengen flights don't count as international for this purpose; immigration control is done at your point of entry into the Schengen area.
Comment: I think especially for someone travelling from the US to Turkey the word International is too vague. England, Germany, and Italy are different countries to non-Europeans and the nonSchengen thing needs to be explained.
Comment: I think it also depends on if you're arriving and departing from the same terminal. I doubt that you can transit between the two terminals without going through immigration.

Traveling through Munich Airport


how to access a ListBox inside a Pivot in windows phone 7?

Question: i have a a Pivot that has a ListBox defined as its Pivot.ItemTemplate as the following.
<controls:Pivot x:Name="pivot">
 <controls:Pivot.ItemTemplate>
  <DataTemplate>
   <ListBox x:Name="listBox">
   ...
   </ListBox>
  </DataTemplate>
 </controls:Pivot.ItemTemplate>
</controls:Pivot>

how do i programmatically access the corresponding ListBox control corresponding to the Pivot.SelectedItem or Pivot.SelectedIndex?
i tried something similar to this link http://www.windowsphonegeek.com/tips/how-to-access-a-control-placed-inside-listbox-itemtemplate-in-wp7.
var count = VisualTreeHelper.GetChildrenCount(pivotItem);
for(int i=0; i < count; i++) {
 var child = VisualTreeHelper.GetChild(pivotItem, i);
 if(child is ListBox) {
  //do something
 } else {
  Debug.WriteLine(child.GetType());
 }
}

for some reason, i get System.Windows.Controls.Grid on the Debug.WriteLine.
the reason why i need to get a handle or access the ListBox inside the Pivot (that is currently on display/selected), is because i need to reset its view (scroll it back to the top). the ListBox is data bound to ObservableCollection, and when i update the collection, the scroll position needs to be placed back to the top; otherwise, everything works (data binding/visual display), except now the view is stuck in the middle or where the user currently is. if there's an easier way to do this without getting a handle on the ListBox, i'm open to that solution as well.
just in case anyone is interested, i tinkered and came up with something that works specifically for my case. the code is below. basically, i had to get the PivotItem first.
PivotItem pivotItem = pivot.ItemContainerGenerator.ContainerFromItem(myObject) as PivotItem;

i then created a local variable to store the ListBox (if it's found) and recursed the tree view model.
ListBox listBox = null;
Recurse(pivotItem, ref listBox);

and my Recurse function looks like the following.
private void Recurse(DependencyObject obj, ref ListBox listBox) {
 if(obj is ListBox) {
  listBox = obj as ListBox;
  return;
 }

 var count = VisualTreeHelper.GetChildrenCount(obj);
 for(int i=0; i < count; i++) {
  var child = VisualTreeHelper.GetChild(obj, i);
  Recurse(child, ref listBox);
 }
}

Answer: try:
(Listbox)VisualTreeHelper.GetChild((pivot.SelectedItem as PivotItem), 0);

Comment: when i try what you said, i get an InvalidOperationException: Reference is not a valid visual DependencyObject.
Answer: Looks like this was a while back, but this is what worked for me:
First get the PivotItem:
PivotItem pivotItem = Pivot.ItemContainerGenerator.ContainerFromItem(Pivot.SelectedItem) as PivotItem;

Then get the first child, a ListBox, from the PivotItem:
        private T FindFirstElementInVisualTree<T>(DependencyObject parentElement) where T : DependencyObject {
        var count = VisualTreeHelper.GetChildrenCount(parentElement);
        if (count == 0)
            return null;

        for (int i = 0; i < count; i++) {
            var child = VisualTreeHelper.GetChild(parentElement, i);

            if (child != null && child is T) {
                return (T)child;
            } else {
                var result = FindFirstElementInVisualTree<T>(child);
                if (result != null)
                    return result;

            }
        }
        return null;
    }

Then call:
ListBox listBox = FindFirstElementInVisualTree<ListBox>(pivotItem);

Answer: use StackPanel inside your ListBox

this link may help you
http://blogs.msdn.com/b/oren/archive/2010/11/08/wp7-silverlight-perf-demo-1-virtualizingstackpanel-vs-stackpanel-as-a-listbox-itemspanel.aspx


Automator app in notification centre

Question: I've made an Automator application that runs displays a notification and then runs a shell script. Works fine. However, the notification centre doesn't display the name of the application, but instead shows some garbled code. I'm using Mavericks. How can I fix this?
Answer: In Finder, go to ThisAutomatorThing.app
Right click. Show Package Contents.
Go to folder /Contents/, and open Info.plist file with a text editor. Find something like:
<key>CFBundleName</key>
<string>6ARbL3D-C0D4</string>

If the string is exactly the gibberish in notification, replace it with you app name.
You MIGHT need to 1) reset LaunchServices to delete the old cache and reflect the change:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

AND/OR, 2) reset LaunchPad:
rm ~/Library/Application\ Support/Dock/*.db;killall Finder

Comment: `CFBundleName` was already set properly, but after using the terminal commands it is now all good and proper. It's also showing the right icon now. Thanks!
Comment: I can't seem to upvote your answer as I'm a new user, sorry.
Comment: Ur welcome. OSX has very robust caching. Things like Info.plist is only gleamed once, and notification daemon will go to cache, not the app, to look for this metadata/information. So if you have saved the automator applet as untitled at first, CFBundleName string would have been made up randomly. The system doesn't keep track of changes to any file. It only updates its cache if you rename app in Finder, and re-rename it back.

Automator app in notification centre


User access restrictions

Question: we have a few users that upload directly to the server. Now we want to implement a new system where we use a common PC for all uploads. We already created separate user accounts for all users in that PC, and created SSH key based login to the server. So now, users can login via ssh/sftp to their respective user accounts in main PC and then do all the uploading to the server.
Now the problem is, we want to give full access to only 2 users, and restrict all other users from accessing anything other than /var/www/html.
Answer: Create a group for the users how should have full acces:
<code>$ sudo groupadd full_access
$ sudo chown -R :full_access /path/to/special/data/
$ sudo usermod -a -G full_access username
</code>
Don't do something like "sudo chown -R :www_full_access /"! This will break your system. If you need user with root-access to your system, add them to the sudoers group:
<code>$ sudo usermod -a -G sudo username
</code>
Comment: Without `-a`, `usermod -G` will remove the user from any current groups.
Comment: @muru Good point!

User access restrictions


Why a graph generated from a graphon is said to be dense?

Question: Now, I'm studying about a Graphon proposed by Lovasz.
Why a graph generated by a graphon is said to be dense?
I cannot image this.
Comment: Please edit again to add sources for "a Graphon proposed by Lovasz".
Comment: I see the word _gryphon_ in the title, I get excited because I'm a brony...
Comment: Thanks! I edited.
Answer: An $n$-vertex graph is dense in this sense if it has $m = \Theta(n^2)$ edges: if its density $m/\binom n2$ is positive. Such a graph has a constant fraction of all the positive edges it could have.
Suppose we have a graphon $W : [0,1]^2 \to [0,1]$, and let's exclude examples which are zero almost everywhere (such graphons will actually produce empty graphs almost surely). Then there is an $\epsilon>0$ such that the set $S = \{(x,y) \in [0,1]^2 : W(x,y) \ge \epsilon\}$ has positive measure $\mu(S)$.
We generate an $n$-vertex graph from this graphon by choosing values $u_1, u_2, \dots, u_n \in [0,1]$ independently and uniformly at random, and then adding edge $(i,j)$ with probability $W(u_i, u_j)$ (also independently for each $(i,j)$.) We have
$$
   \Pr[(i,j) \in E] = \Pr[(i,j) \in E \mid (u_i, u_j) \in S] \cdot \Pr[(u_i, u_j) \in S] \ge \epsilon \cdot \mu(S).
$$
Therefore the expected number of edges in the graph is at least $\epsilon \mu(S) \binom n2$.
In fact the number of edges is tightly concentrated around the mean. We can prove this, for example, with McDiarmid's inequality: changing each $u_i$ can change the number of edges by at most $c_i = n-1$, so
$$
   \Pr\left[|E| \le (\epsilon \mu(S)- \delta) \binom n2 \right] \le \exp\left(\frac{2 (\delta \binom n2)^2}{\sum_{i=1}^n (n-1)^2}\right) = e^{-\delta^2 n/2}.
$$
Therefore the graph has density at least $\epsilon \mu(S)-\delta$ with probability $1 - e^{-\delta n^2/2}$, which goes to $1$ as $n \to \infty$. This proves that the graph we get is dense asymptotically almost surely.
Comment: What will happen if your assumptions are not true?
Suppose a graphon W(x, y) = 1 (x < 1/2 and y < 1/2), 0 (otherwise).
Comment: Sorry, I should rephrase my assumptions. I want "not (zero almost everywhere)" rather than "(not zero) almost everywhere". The graphon in your example still has $\mu(S) = \frac14$ when $\epsilon=1$.
Comment: I understand. Thanks a lot!


File Conversion Issue with PDAL

Question: Is there any single command line available which converts all the pcd file in a folder into CSV and create individual CSV file for individual pcd file?
Answer: No there is not a single command. PDAL does not apply multiple operations to data. Users must achieve that themselves with external tools. One could write a bash, powershell, or windows batch script to achieve it with some simple script.

File Conversion Issue with PDAL


Minimizing the volume of a cylinder using fixed surface area

Question: Considering that I want my cylinder to have a fixed surface area of 0.3m^2, how can I minimize the volume of the cylinder. I have already tried to optimize it but I am only able to maximize the volume.
Comment: Think of a cylinder with very small height. The infimum of the possible volumes of the cylinder is $0m^3$
Comment: Without additional information, this is a classic Lagrange multipliers problem.
Comment: How can I find the minimum volume using Lagrange multipliers?
Comment: Can't you just think about the problem and realize the minimal volume is $0$?  Try it!
Answer: In the limits, the volume approaches 0, there technically isn't a minimum in the sense of 'local extrema'. Consider the following:
$$A=2\pi( r^2 + rh)=0.3$$
$$h =\frac{0.3}{2\pi r}-r$$
$$V=\pi r^2 h = \pi r^2 (\frac{0.3}{2\pi r}-r)=\frac{0.3r}{2} - \pi r^3$$
Notice as $r \rightarrow 0$, $V \rightarrow 0$, and of course $h \rightarrow \infty$.
Answer: You want to solve the problem:
$$\tag{P} \begin{cases} \text{minimize:} & V = \pi r^2 h \\ \text{u. c.:} & 2\pi (r^2 + r h) = 0.3 \\ & r,h > 0 \end{cases}$$
From the equality constraint you get:
$$\pi rh = 0.15 - \pi r^2$$
therefore your two-variables problem rewrites as one-variable optimization problem, i.e.:
$$\tag{P'} \begin{cases} \text{minimize:} & V = r (0.15 - \pi r^2) \\ \text{u. c.:} & 0 < r < \sqrt{\frac{0.15}{\pi}} \end{cases}\; .$$
Function $V = r (0.15 - \pi r^2)$ is of class $C^\infty$ and differentiating you find:
$$\begin{split} V^\prime &= 0.15 - 3\pi r^2 \\ V^{\prime \prime} &= -6\pi r \end{split}$$
hence $V$ is concave in $]0,\sqrt{\frac{0.15}{\pi}}[$ and takes its infimum in one of the extrema, i.e. either for $r \nearrow \sqrt{\frac{0.15}{\pi}}$ or for $r\searrow 0$; in either case you find $V \to 0$, which is not the mimimum because $0$ is not a value taken by function $V$ on $]0,\sqrt{\frac{0.15}{\pi}}[$.
Thus the minimum problem (P) has no solution at all.


How Can a Tester Increase his Observation Skills?

Question: How should a tester increase his observation skills?  I feel that I somewhere lack sharp observation and attention to detail. any games or exercises that can make my approach towards testing easier with practice.
Comment: Meditation can help.
Comment: @user246 - Personally, I prefer puzzle games. Hidden object games can also work.
Answer: I'd suggest starting with looking at the answers to these questions:
How to become a more Creative Software Tester?
How can a Software Tester use "Out of the Box" thinking approach to find more bugs?
There are a lot of useful suggestions there.
Some other things that can help:

Practice pattern recognition:

Take a large data dump or log file that you know has bad data and/or stack dumps in it. Scroll through it relatively quickly, and try to find the bad data that way. I use this technique to quickly locate problems in massive blocks of information.
View the old version and the new version of something side-by-side (using screenshots if necessary) and let your eyes unfocus. You should see any differences in appearance more clearly that way.
Play hidden object games. They're great for teaching you to recognize small things in a mass of mostly unconnected information.

Switch it up when you get stale - everyone has a limit to how long they can maintain intense focus on anything. When you feel yourself getting tired, change to an activity that takes less focus or is completely different (one good thing about software testing is that there is no shortage of variety in the job).
Take a purely physical break periodically - this doesn't have to be much. It can be as simple as leaning back, closing your eyes for a moment, and stretching. Or a bathroom break. This should happen at least once an hour - in really demanding situations you may need to do it every twenty minutes or so.
Leave yourself notes - task switching has a built in penalty where you need to re-familiarize yourself with the new task and drop the thoughts in the previous one. Leave yourself notes to speed up the process.
Minimize distractions - if you're in a noisy environment, headphones help to block out conversation that would otherwise distract you from the work you're doing (I've had to work in an open area where the sales team would be holding loud conversations next to my cube. Without the headphones I'd never have been able to get anything done).

Honestly, most of increasing your ability to pick up details is in adjusting your environment to maximize your focus. Much of the rest is practicing pattern recognition.
Answer: The problem may not be with your observation skills. It may be that you are expecting too much from them. Inattentional blindness (as described in this article by one of the original researchers - and yes, this is about the invisible gorilla experiment, if you've seen that famous video).
The human brain can only absorb so much. That focus (ability to block out other things) is actually a really important function. If you change how you test, you can help yourself to work with your brain, instead of against it. For example, working with long, highly detailed, test scripts is a classic trigger for inattentional blindness. I've seen testers sleepwalk past utterly obvious issues, because so much of their attention was on walking through the exact steps in the test script. If you can try different approaches, you may find your observation skills are surprisingly not so bad once you give them a fair chance.
Here are two:

Use test charters to focus your testing on a specific goal each time.
Use testing tours suggestions to give you ideas for exploring the product to learn it better.
Answer:
Collect all info about your work before starting it
Assign two roles to yourself first as the one who is inspecting the work , other as the one who is doing the work
Keep on asking the questions to yourself and try to use your past experiences
Try to concentrate on the work
Answer: As sorta mentioned before assuming the role of the client is really important. Perhaps if given the opportunity find time to meet with them and find out what their role in the project will be, What responsibilities they have, run through some use case of their day to day interaction with the process.
Experience will be the key in terms of observation skills increasing. You will start to develop modals that you start with when testing. The obvious as i call it. From there branch off like a puzzle starting with your corner piece going in one direction come back go in another direction until you have everything together to fit the final piece. Its kind of like the hot pot when mom says not to touch it and you get burned. You have to learn and heal from your mistakes to improve just like anything in life.
Research into QA reading will also help as well i would look up anything by James Bach and my personal fav. "Agile testing: a practical guide for testers and agile teams". Alot of good information in both of them that have helped me with my QA process.
Answer: What I do in general to increase my observation ,is to close my eyes and describe in fine detail any known physical setting for me like my living room/my office cubicle/ any other extremely known place .
It is surprising that even in those familiar places we miss lot of fine details.
Comment: +1 I also did this for almost 5 years
Answer: Just behave like a teacher and student.Ask Question to yoursely and try to answer it.
Always be alert and make an imaginary view of the things.Be creative...


Facebook profile information display

Question: How can i display Facebook profile information like First name, Lastname, address. I am using Drupal for Facebook module in login with facebook a/c in my drupal web site.
Answer: You can use the Facebook OAuth (FBOAuth) module for this. Here is a quote about it (from the module's project page):

... provides authentication services and an API to perform actions against Facebook. This module allows users to login to Drupal through the service commonly known as "Facebook Connect". This module is built with simplicity and flexibility in mind, it provides login services (and does it well), and an API for performing any other actions you may want to write yourself to query against Facebook's APIs.
Features:

One-click login through Facebook.
Automatic import of user e-mail and profile information during initial login.
Integration with Profile module to map Facebook data to Profile fields. (Drupal 6)
Integration with Field module to map Facebook data to fields on users. (Drupal 7)
A flexible and direct API for modules to get authenticated and query Facebook's APIs (plus extensive documentation).
Extensive permission settings for Facebook data retrieval.
The ability to de-authenticate or unlink a Facebook account from a Drupal account.
Does not require any external libraries or downloads.
Comment: thax for quick reply abubakar, i will try and let u know the status
Comment: facebook block display like : $user = $facebook->getUser(); $userEmail = $user['email']; print_r($user);
Answer: fboauth is best one.i have using that module for user signup.you can easily mapping your facebook information with profile field like religion,email,education history,work history,etc.and the you enable the ADVANCED PERMISSION SETTINGS in toggle tab.

Facebook profile information display


Density of positive multiples of an irrational number

Question: Let $x$ be irrational. Use $\{r\}$ to denote the fractional part of $r$: $\{r\} = r - \lfloor r \rfloor$. I know how to prove that the following set is dense in $[0,1]$: $$\{\{nx\} : n \in \mathbb{Z}\}.$$ But what about $$\{\{nx\} : n \in \mathbb{N}\}?$$ Any proof that I've seen of the first one fails for the second one.
Comment: You can find some very similar questions already answered on this site. A few examples:
http://math.stackexchange.com/questions/1624387/density-of-positive-multiples-of-an-irrational-number
http://math.stackexchange.com/questions/202392/cluster-points-of-multiples-of-the-fractional-part-of-an-irrational-number
http://math.stackexchange.com/questions/267004/cluster-points-of-the-sequence-a-nx-nx-lfloor-nx-rfloor
http://math.stackexchange.com/questions/1436617/limit-points-of-particular-sets-of-real-numbers
Answer: A minor modification of the pigeonhole argument works. Let $m$ be any positive integer. By the pigeonhole principle there must be distinct $i,j\in\{1,\dots,m+1\}$ and $k\in\{0,\dots,m-1\}$ such that $\frac{k}m\le\{ix\},\{jx\}<\frac{k+1}m$; clearly $\{|(j-i)x|\}<\frac1m$. Let $\ell$ be the largest positive integer such that $\ell\{|(j-i)x|\}<1$, let $A_m=\{n|j-i|x:0\le n\le\ell\}$, and let $D_m=\big\{\{y\}:y\in A_m\big\}$.
If $x>0$, every point of $[0,1)$ is clearly within $\frac1m$ of $A_m=D_m$. If $x<0$, then
$$D_m=\{1-|y|:y\in A_m\}\;,$$
so every point of $[0,1)$ is again within $\frac1m$ of the set $D_m$. Since $D_m\subseteq\big\{\{nx\}:n\in\Bbb N\big\}$, we're done.
Comment: I hope you don't mind how close my answer is to yours, but I had written an answer for someone in chat and was going to post it elsewhere, then saw this question was a better fit.
Comment: @robjohn: No problem: someone may benefit from the greater detail.
Comment: Can you give more details why if $x>0$ then every ppint of $[0,1)$ is clearly within $1/m$ of $A_m$.
Comment: @ZFR: Adjacent points of $A_m$ are less than $\frac1m$ apart. Every point of $[0,1)$ is either equal to one of these points, between two adjacent ones, or between $\ell\{|(j-i)x|\}$ and $1$ and hence less than $\frac1m$ from some point of $A_m$.
Answer: Here is a proof where the second statement follows from the first with a minor step. I wrote this answer for another question, but then I saw it fit here better, other than being along very similar lines to Brian M. Scott's answer.

Let $r$ be irrational. Choose an arbitrary $n\in\mathbb{N}$. Partition $[0,1)$ into $n$ subintervals
$$
\left\{I_k=\left[\frac{k-1}n,\frac kn\right):1\le k\le n\right\}\tag1
$$
Consider the discrete set $\{\{kr\}:0\le k\le n\}\subset[0,1)$. There are $n+1$ elements in this set, so two of them must lie in the same subinterval. That means that we have $k_1\ne k_2$ so that $\{(k_1-k_2)r\}\in\left(0,\frac1n\right)$, we leave $0$ out of the interval because $r$ is irrational.
Let $m=\left\lfloor\frac1{\{(k_1-k_2)r\}}\right\rfloor$, then because $m$ is the greatest integer not greater than $\frac1{\{(k_1-k_2)r\}}$,
$$
m\{(k_1-k_2)r\}\!\!\overset{\substack{r\not\in\mathbb{Q}\\\downarrow}}{\lt}\!\!1\lt(m+1)\{(k_1-k_2)r\}\tag2
$$
which implies that $\{m(k_1-k_2)r\}=m\{(k_1-k_2)r\}\in\left(\frac{n-1}n,1\right)$.
Since $\{(k_1-k_2)r\}\in\left(0,\frac1n\right)$, if $j\{(k_1-k_2)r\}\in I_k$, then $(j+1)\{(k_1-k_2)r\}\in I_k\cup I_{k+1}$; that is, $\{j(k_1-k_2)r\}=j\{(k_1-k_2)r\}$ cannot skip over any of the $I_k$. Therefore,
$$
\left\{\{j(k_1-k_2)r\}:1\le j\le m\vphantom{\frac12}\right\}\tag3
$$
must have at least one element in each $I_k$ for $1\le k\le n$.
The only problem is that we don't know that $k_1-k_2\gt0$. However, this is not a problem since $\{j(k_1-k_2)r\}\in I_k\iff\{j(k_2-k_1)r\}\in I_{n+1-k}$. Therefore,
$$
\left\{\{j(k_2-k_1)r\}:1\le j\le m\vphantom{\frac12}\right\}\tag4
$$
must also have at least one element in each $I_k$ for $1\le k\le n$.
Since $n$ was arbitrary, we have shown that $\left\{\mathbb{N}r\right\}$ is dense in $[0,1]$.
Comment: @ZFR: You know, I modified this so many times while writing it, and now it seems you are correct; there is no reason for $r\gt0$, so I have removed that constraint.
Comment: Thanks a lot professor Robjohn for answering my question. I was having lot of difficulty understanding $k_2\gt k_1$ case. It all makes sense to me now. Many thanks :) I would only like to add this little more detail for statement just before $(3)$ in the hope that it will benefit those who visit this great answer in future: Suppose on the contrary that for some $k<n$, the subinterval $(\frac{k-1}n, \frac kn )$ doesn't contain any element of the set $T=\{ j\{(k_2-k_1)r\}: 1\le j\le m\}$. (Contd.)
Comment: (Contd.) Note that $T_L=\{j: j\{(k_2-k_1)r\}\le \frac{k-1}n\}$ is non-empty and therefore $T_L$ has a maximal element $M\in \mathbb N$ that is $(M+1)\{(k_2-k_1)r\}\ge \frac kn$ and $M\{(k_2-k_1)r\}\le \frac{k-1}n$ and subtracting the two, we get: $\{(k_2-k_1)r\}\ge \frac 1n$, which is a contradiction. Therefore no subinterval $I_k$ can be free of elements from $\{\mathbb N r\}$.
Comment: Really nice answer which helped me to understand the problem. But I think you can assume $r$ to be any real irrational number from the beginning of the solution.
Comment: Thanks a lot for your answer! To be honest I've spent on this problem about 2-3 days and eventually your solution helped me to understand it completely. Thanks! +1
Answer: Really? I thought exactly the same proof worked for $\Bbb N$.
Let $k\in\Bbb Z$ with $k\ne 0$ and define $$f(t)=e^{2\pi ikt}.$$
Then $f$ has period $1$, and $$\frac1N\sum_{n=0}^{N-1}f(nx)
=\frac1N\sum_{n=0}^{N-1}\left(e^{2\pi ikx}\right)^n=\frac1N
\frac{e^{2\pi ikxN}-1}{e^{2\pi ikx}-1}\to0\quad(N\to\infty).$$
So the usual approximation shows that $$\frac1N\sum_{n=0}^{N-1}f(nx)\to\int_0^1 f(t)\,dt$$for $f\in C(\Bbb T)$ and you're done, as usual.
How is this any different from the case $n\in\Bbb Z$?
Comment: How does that imply that $\{ \exp (2\pi i {n x}) :n\in N\}$ is dense in the unit circle in $C$ ? Anyway, a proof from the most elementary method works for N just as well as for Z.
Comment: @user254665 Say those points are not dense. There is then an interval, or arc, $I$ on the circle that contains none of the points. Take $f\in C(\Bbb T)$ such that $f=0$ on the complement of $I$ but $\int f > 0$. Then $\frac1N\sum_0^{N-1}f(nx)=0$ for every $N$, so it does not converge to $\int f$. (Yes, the pigeonhole argument works as well. I really can't think of an argument that works for $n\in\Bbb Z$ but not $\Bbb N$. In any case, ignoring the question of which is simpler, this argument shows more than just that the points are dense, it shows they are asymptotically uniformly distributed.)
Comment: very nice integral proof, which yields extra info (distribution) too.
Comment: @user254665 Yes it is very nice. The equidistribution is Weyl's theorem - I think it's his proof, not sure, in any case it's a standard thing.


SalesForce Marketing Cloud journey exit as trigger to enter new journey?

Question: To simplify a rather large/complicated journey, we'd like to split it up into 4 mini journeys, with contacts who exit one journey a certain way automatically moving to the next journey. Is the way to do this the "Update Contact" option, or is there something else?
Answer: Update Contact can indeed be used to build kind of journey linking/orchestration. You should have a Data Extension which keeps track on your contacts entering and exiting journeys, and query this to build an entry audience for one of your subsequent journeys. However, as you might have realised this is not a real time link, and you will only inject contacts as a result of an automation run.
If you need a real time link, you will need to develop a custom Journey Builder activity, which calls the API trigger of the subsequent journey. Mind you, this only works if the journey you are linking to has the API entry event and not e.g. Salesforce Data entry event.
Both solutions have a drawback of not linking the contacts to the next journey if contacts exit the previous journey abruptly - e.g. due to exit criteria or goal being met. Here they will never pass through the Update Contact or your custom activity.


How do I resolve the error "Trying to send command for object without authority."?

Question: I don't know what I did wrong I tried couple different ways from not using commands to using SpawnWithClientAuthority. But It either gives build and compile errors or just the Error in the title
Here the Start function of my player object
 void Start () {
    player = isLocalPlayer;
    race = Data.races[(int)selectRace].getInstance();
    clss = Data.classes[(int)selectClass].getInstance();
    health = race.Health * clss.HealthMultiplyer;
    speed = race.Speed * clss.SpeedMultiplyer;
    armor = race.Armor * clss.ArmorhMultiplayer;
    energy = race.Energy * clss.EnergyMultiplayer;
    skills.AddRange(race.RaceSkills);
    skills.AddRange(clss.ClassSkills);

        Data.entities.Add(this);

    Debug.Log(isLocalPlayer);

    if (!isLocalPlayer)
        return;
    int enID = Data.entities.IndexOf(this);
    foreach (Skill s in skills)
        s.CmdSpawn(enID);

}

And here is the spawn functions from skills I try to spawn
[Command]
public override void CmdSpawn(int enID)
{
    setEntity(Data.entities[enID]);
    Debug.Log("Spawned");
    dir = getEntity().lookingAt;
    gameObject.transform.position = getEntity().transform.position + dir * 0.65f;
    transform.up = dir;
    NetworkServer.Spawn(gameObject);
}

and
[Command]
public override void CmdSpawn(int enID)
{
    setEntity(Data.entities[enID]);
    dir = getEntity().lookingAt;
    transform.up = dir;
    dir = new Vector3(dir.z, dir.y, -dir.x);
    gameObject.transform.position = getEntity().transform.position + dir * 0.65f;

    NetworkServer.Spawn(gameObject);

}

If you can help, thank you ^.^
Comment: " build and compile errors or just the Error in the title" what is build and compile error?
Answer: Your problem here is this line:
s.CmdSpawn(enID);

You are performing a Command on your Skills from the PlayerController which your player doesn't seem to have authority over. There are a few ways to fix this. Either you can assign authority of the skills to the player something like:
s.GetComponent<NetworkIdentity>().AssignClientAuthority(connectionToClient);

OR
I would personally change around your Spawn method so that it is on your PlayerController and instead of just passing in the enID, you should pass in the Skill s and the enID
CmdSpawn(s, enID);

Answer: Well this is the problem which i usally get when first i were learning UNET. So here is the general answer and i am sure it will solve your problem once you get that How UNET actually work.
Beside your code fragment, the error

Trying to send command for object without authority.

clearly means that you are sending Command request from an object whose authority you don't have.
So What it means and how to resolve it you can see my answer Here.
According to your code fragment, Before sending the command (or executing command function), Assign authority of that object(where your script attached) to your Player.
hope that it will make sense and solve the problem. Happy!
Comment: Problem is I am already senfing it from the player object. Threre is even
if (!isLocalPlayer)
        return;
statement which if that was false it wouldnt even call the the command.


How badly damaged was the Sdf-1?

Question: How badly damaged was sdf-1 after the final space Battle?
And why was the bridge still visible after IT was supposedly completely destroyed in episode to the stars?  The bridge seemed intact in this episode .
Can anybody please explain this?
Answer: If by "final" battle, you mean the battle against Khyron in episode 36th "To the Stars", it was destroyed to the point it became garbage and buried. The bridge wasnt intact after that because the SDF-1 was buried and it doesnt appear anymore.
If by "final" battle you mean the battle were it was almost destroyed in episode 27th "Force of Arms", it was damaged enough that they didnt use it anymore until the last episode, when they partially repaired it for it to fly again, they made it fly once last time again against Khyron who finally destroyed it by making his vessel collision with it.
Something of this info you can see it here:
http://robotech.wikia.com/wiki/To_the_Stars

How badly damaged was the Sdf-1?


Do the forces between Earth and Sun point in the directions that the Earth and the Sun were 8 minutes ago?

Question: No information can travel faster than light, so does the force between Earth and Sun point in the direction that the Earth was 8 minutes ago or in the direction that the Earth is now?
Comment: Related question: https://physics.stackexchange.com/q/73061/
Comment: Also related: https://physics.stackexchange.com/q/5456/123208 Please don't just look at the top voted answers there, IMHO most of the answers on that page have interesting insights on this question.
Comment: The answer is "kinda yes", but the notion of where a moving, relativistically distant object is "right now" is not well defined.
Answer:
… so the force beetwen Earth and Sun points in the direction that the earth was 8 or points in the direction that the earth is now?

No.  Gravitational acceleration is directed towards the position of the source quadratically extrapolated  from its "retarded position" toward its instantaneous position (that is using velocity and acceleration from that moment in a truncated Taylor expansion for the current position), up to small nonlinear terms and corrections of higher order in velocities.

No information can travel faster than light …

This does not mean that the force must be directed toward retarded position of the second body since the "information" transmitted may also include velocity and acceleration.
In nonrelativistic situations, such as motion of Earth around the Sun, this "quadratic extrapolation" matches the instantaneous position with a high degree of precision. For Earth–Sun system the discrepancy (which could be approximated by the next term of Taylor expansion $\approx \left|\frac{1}{6}\frac{d^3 \mathbf{r}}{dt^3}\,\tau^3\right|$) would be about several centimeters. Whereas discrepancy between instantaneous and retarded positions is about $15\,000\,\text{km}$. So the effects of such "gravitational aberration" are nonexistent within the Solar system.
One should keep in mind that all discussions of finite speed for gravity propagation must proceed within the framework of general relativity which has inherent ambiguity in identifying concepts of Newtonian physics such as force direction. While in Newtonian physics gravitational force between isolated bodies is defined unambiguously in GR we instead have the connection ($\nabla$) and curved spacetime. In order to extract from it Newtonian force and position of the bodies we must choose a specific reference frame, and impose a gauge conditions, which provides a certain freedom in the definitions.
Also note, that for the somewhat similar situation of two charges orbiting each other the direction of electrostatic force is given not by quadratic but by linear extrapolation from retarded position (using only velocity and not acceleration). The difference is in dipole character of EM radiation versus quadrupole nature of gravitational radiation.
For more information see the following (rather technical) paper:
Carlip, S. (2000). Aberration and the speed of gravity. Physics Letters A, 267(2-3), 81-87,
DOI:10.1016/S0375-9601(00)00101-8, arXiv:gr-qc/9909087
Comment: @sfmiller940: this quadratic extrapolation is a property of gravity (and ultimately traceable to the spin $s=2$ of gravitational field and conservation of energy and angular momentum). If we consider bound systems held by some other field the degree of extrapolation could be different. And this extrapolation is "close enough" only for nonrelativistic dynamics (as in Solar system). For [Hulse-Taylor binary pulsar](https://en.wikipedia.org/wiki/Hulse%E2%80%93Taylor_binary) or during final stages of black hole inspirals discrepancies would be significant.
Comment: Why focus on quadratic extrapolations rather than using higher degree approximations or the full Taylor series? Is it just that the quadratic is "close enough" for most purposes?
Answer: This is more complicated than it first looks.
Two forces. The force from the sun on the earth, and the force from the earth on the sun.
The force on the sun from the earth -- which has rather small effect --
has three components. There is the force that the earth would have had if it was stationary in our frame. Second there is the force due to the velocity of the earth 8 minutes ago. These two can be added to give a force that comes from the direction the earth would be now, if it had continued to travel at constant velocity for 8 minutes.
The third force, due to the earth's acceleration, appears to come not from where the earth would have been now, but from where the earth actually was 8 minutes ago.
None of these have a direct relation to where the earth is now, since in those 8 minutes many other forces could act on the earth.
Comment: _The force on the sun from the earth -- kind of small_ **Wrong.** Have you ever checked Newton gravity law ? It states that gravity force is proportional to the product of masses : $F=G{\frac {m_{1}m_{2}}{r^{2}}}$. So force from sun to earth and from earth to sun are equal in magnitude.
Comment: You're right the forces are equal. I should have said that the sun's response to that force is small, compared to the earth's response.
Comment: Carlip's paper in my answer would do. But to see that EM and gravity are different in that regard one could also use post-Newtonian expansion: system of charges is conservative up to $1/c^2$ terms while system of gravitating bodies is conservative up to $1/c^4$. Radiative effects appear at $1/c^3$ for  EM and at $1/c^5$ for gravity.
Comment: This is wrong. For EM field "effective position" is linearly extrapolated. For gravitational field this "effective position" is extrapolated quadratically, taking into account not only velocity but also acceleration.
Comment: @A.V.S It sounds like there's something here I ought to learn about. Would you suggest a link?


Background Files disabled in Trimble GeoXT

Question: I am trying to send background shapefiles to the trimble GeoExplorer 2008 series. I have used GPS Pathfinder Office and sent the files in the correct coordinate system. Look at the picture I attached. The Geo7X clearly shows background files as an option. The GeoXT does not.
Comment: Have you checked the Terrasync documentation for the version of Terrasync on the GeoXT? Those two handhelds are almost certainly not running the same version of Terrasync.
Comment: Can you clarify what the question actually is, the title mentions `disabled` does that mean you have documentation that says uploading files is theoretically possible in a GeoXT and you want to know how to enable this functionality, or is the question is it possible to upload files or is it how do you upload files?
Comment: The GeoXT has version 3.7 and the Geo7X has version 5.7.  My question is why can't I see the background files option on the GeoXT GPS? I am trying to load a background raster image and boundary. I am almost certain I have uploaded background files before on the GeoXT. This unit is pretty old so it has been a few years.
Comment: Please [edit] your question to provide any requested clarifications.
Answer: According to the documentation for Terrasync v3.0, Background files are only available in Terrasync Professional. If you have the Standard version, you can't use Background files. The GeoXT probably has the Standard version.

This option is not available in the TerraSync Standard edition
  software. You can only open background files using the TerraSync
  Professional edition software.


What is the name of this effect? How is it achieved?

Question: I was told that this was created using a single image though it looks like two images. How is it possible to create an effect like this?
Posted by Sammy Rawal on Instagram
Comment: Or it's a series of images taken at the same time from slightly different angles with some special gadget.
Comment: To me it just looks like a very short movie which is looped while zooming in and out.
Answer: Parallax Effect, 2.5D
The 2.5D or parallax effect is an incredibly popular method for bringing images to life when editing video with mixed media, such as photos, newspaper articles, and graphics. "Parallax" is rooted in the Greek word "parallaxis", which translates literally as "alternation". In imagery and animation, the parallax effect is when the movement of the background appears slower than the foreground to produce an illusion of depth. This alternating motion between the foreground and the background produces a feeling of changing perspectives that pulls the viewer in.
There are many methods and tools to create the parallax effect..
How to Give Your Still Photos a 2.5D Parallax Effect in Photoshop
How to Create a 2.5D Parallax Effect on Images in Photoshop CC
2.5D Parallax Effect Tutorial in Photoshop
Comment: Thank you. I think the technique is the same as what you've mentioned here. Looks like the original video was created by looping two frames, first the original and the second one where the background (and foreground?) is slightly altered using the parallax effect.


A single word for a secluded garden surrounded by a wall

Question: Can anybody give me a single word for a secluded garden surrounded by a wall?
Comment: Did you have the idea of the Secret Garden in mind?
Answer: Pleasance seems to fit the bill quite nicely. -- ODO

(noun) A secluded enclosure or part of a garden, especially one attached to a large house.
Answer: It's actually called "walled garden"

A walled garden is specifically a
  garden enclosed by high walls for
  horticultural rather than security
  purposes, though traditionally all
  gardens have been hedged about or
  walled for protection from animal or
  human intruders. Garden walls may also
  serve a decorative purpose, but their
  essential function in the north
  temperate zone has been to shelter the
  garden from wind and frost.

Curiously, the literal meaning of the word "paradise" IS "walled garden" but it has long since lost that meaning

The word "paradise" entered English
  from the French paradis, inherited
  from the Latin paradisus, from Greek
  parádeisos (παράδεισος), and
  ultimately from an Old Iranian root,
  attested in Avestan as
  pairi.daêza-. The literal meaning
  of this Eastern Old Iranian language
  word is "walled (enclosure)",from
  pairi- "around" + -diz "to create,
  make". The word is not attested in
  other Old Iranian languages (these may
  however be hypothetically
  reconstructed, for example as Old
  Persian *paridayda-).

Maybe you can also use hortus conclosus

Hortus conclusus is a Latin term,
  meaning literally "enclosed garden".
  "The word 'garden' is at root the same
  as the word 'yard'. It means an
  enclosure", observed Derek Clifford,
  at the outset of a series of essays on
  garden design, in which he skirted the
  conventions of the hortus
  conclusus.1 Thus, at their root,
  both of the words in hortus conclusus
  refer linguistically to enclosure.
Comment: @alwayslearning glad to be of help! :)
Answer: Courtyard -- Dictionary.com

(noun) a court open to the sky, especially one enclosed on all four sides.
Comment: That's what came to my mind, although a court does not necessarily have a garden.
Answer: What came to mind are the ancient Roman homes where the second half of the house is surrounded by a peristyle.  The use of the word peristyle would be specific to a colonnade with a covered walkway and may not always contain a garden.  However, I have seen peristyle garden and peristyle courtyard as alternatives. There is also a cloister, the medieval equivalent.
Secret garden is another possibility.
Answer: Maybe not quite the same, but a "cloister" is a courtyard or garden surrounded by a covered walkway. Here is one example.
Comment: You could always have included a representative image in your answer. Answers should be complete and stand on their own; it should not be necessary to search for additional resources (or even, really, to click on a link except for verification of a quote or citation).
Comment: Good answer, and fyi the term was already mentioned in another answer, although not highlighted for better visibility.
Answer: Perhaps you could try plantiecrub, although this source here suggests it would be for growing cabbage.

noun - a small circular dry-stone enclosure for growing cabbage plants.
Answer: Bower comes to mind. -- ODO

(noun) 1. A pleasant shady place under trees or climbing plants in a garden or wood.
Comment: I think _bower_ may be a very apt word for what the poster is describing—but to strengthen your answer and help future visitors to this page understand why it may be a good choice, please consider adding a relevant dictionary definition of _bower_ to your answer.