converting projections using dotspatial or proj4

Question: how can i convert projections using either dotspatial or proj4?
i am making a program using sharpmap and dotspatial in VB.net
have to convert a EPSG 4030 into a Lambert conformal conic projection and back to WGS84 on the fly
also can i convert a system on the fly using a WKT?
Answer: It's not clear from your question whether you know the proj4 string for the projection you want to convert into. DotSpatial has some built-in projections under DotSpatial.Projections.KnownCoordinateSystems, but I can't locate Lambert.
If you just want to know how to use DotSpatial, you can use code like this, passing in the proj4 strings (sorry it's in C#, but it should be easy to translate):
<code>public override ReprojectPoint(ref Point[] point, string sourceProjection, string destinationProjection)
{
    double[] pntXY = new double[point.Length * 2];
    double[] pntZ = new double[point.Length];

    for (int i = 0; i < point.Length; i++)
    {
        pntXY[i*2] = point[i].x;
        pntXY[i*2+1] = point[i].y;

        pntZ[i] = 1;
    }

    ProjectionInfo src = new ProjectionInfo(sourceProjection),
                dst = new ProjectionInfo(destinationProjection);

    Reproject.ReprojectPoints(pntXY, pntZ, src, dst, 0, point.Length);

    for (int i = 0; i < point.Length; i++)
    {
        point[i].x = pntXY[i*2];
        point[i].y = pntXY[i*2+1];
    }
}

public struct Point
{
    public Point(double x, double y)
    {
        this.x = x;
        this.y = y;
    }

    public double x;
    public double y;

    public override string ToString()
    {
        return "POINT(" + x.ToString() + " " + y.ToString() + ")";
    }
}
</code>
I don't think there's any support for reprojecting WKT on-the-fly in DotSpatial - you'd need to write some code to parse it.


How to make an Ableton Live project a set time

Question: I'd like to make be able a project file only ninety seconds, and have Ableton discard any music that runs over that time as a result of any midi tranformations or effects.
Answer:
Go into arrange view, expand the master track

Enter draw mode: press ctrl+b or click on the pencil button at the top of the screen next to the little keyboard. You want it to be yellow.

Use draw mode to zero out a region of the Master Mixer - Track Volume automation

Exit draw mode: press ctrl+b again, or click on the pencil button so that it is no longer active.
Use the pointer cursor to click on one of the automation corners to the right, deleting it.

Delete the other rightmost automation corner. Now the automation curve should be down at the bottom for the rest of time.
Comment: I've redone my answer with screenshots.
Comment: So nice to see a cleanly illustrated answer. +1 to you.
Comment: i'm in arrange view, and can highlight the first 90 seconds and can make that little green arrow, but how do i do the last two steps in your solution?


Is there any extendable editor out there with vi-like modes?

Question: I'm looking for a perfect text editor :)
The "must have" list:

vim-like modal editing, keybindings similar to vim
emacs like extendibility - same "real" language for plugins and the editor itself, so that the extension can affect almost anything in the editor and outside... vim script is not enough, python plugin is not enough either
plugins are not limited with regards to external processes, can change the text asynchronously, etc.
supports termcap / curses, so that it can run a real terminal inside
uses real syntax parsing, so that plugins can get back information about the word's "type" without going through the "what's it's colour" path (synIDattr(synID(line("."), col("."), 1), "name") is a no-no)
remote editing possible (but that is probably already guaranteed by the plugins + extendibility points)

I know about viper emacs, but I'm not sure whether I like the idea...
Does anyone know about something better?
Clarifications:
I'm not a full time programmer. I'm an admin / programmer / power user who already spends all the time in the console on many hosts at once and 95% of that time, it's vim running. I love vim, but I'm looking for vim-im ;) Eclipse doesn't cut it for me, as most of the time I'm editing configs / dsls with my own syntax files.
Sometimes I do need a kind-of-refactoring plugin for things that I do frequently. I have a proof that it can be done in vim, but it's real pain... You can't request a "previous token in parse tree" for example. The best that you can do is go back char-by-char and check if the word has the same colouring style as a variable/function/whatever (which requests parsing of the file fragment at every check). If I can't extend the editor in simple scripting language, it won't work for me either.
Also I frequently need to have a second terminal just to run something and copy the output to vim. I can't run :!r... because it hangs every tab in vim until the command is finished.
Ah - and linux + console only - I'm not interested in windows world :)
Answer: From one vim'mer to another -- your search is futile, abort, abort, etc..
If you're frustrated at whatever editor your IDE is using (eclipse jumps to mind), then either use vi as an external editor, or get used to the text editor that the IDE uses.  The reason being is that nobody, apart from vi users, finds vi natural, and therefore the demand for vi key bindings in any "modern" editor will be radically different.
If you really love vi and terminal mode and all that, use vi.  If you want something a bit more intelligent, go with vim.
Comment: Actually I'm really happy with vim, but want more... That is - more of the console vim / emacs goodness :) not a fancy-looking mouse-use-forcing IDE :/
Answer: SlickEdit: http://www.slickedit.com/content/view/73/60
Comment: As mentioned in clarification - I'm not interested in the windows land.

Also "Create custom macros with a full-featured macro language" hardly satisfies ``"real language for plugins and the editor itself, so that the extension can affect almost anything in the editor and outside''
Comment: SlickEdit isn't "Windows land"; it is available on Unix and Linux as well. Also, you added some of those constraints (linux + console) after I had originally answered.
In my opinion, you won't find what you're asking for until you write your own editor.
Answer: Found it after all :)
http://haskell.org/haskellwiki/Yi
Yi supports both vim (with modes and :commands) and emacs keymap. It uses proper incremental parser and is completely extensible with haskell (it interfaces with ghc and compiles your config/plugin + links itself to the result). Tabs, minibuffers and every other cool thing is supported.
I'm using it for the last couple of days and I'm really happy with it.
Answer: Kate/Kwrite in KDE4.2 beta's now has a vim-like mode,
The whole [Esc] -->  Command mode deal, the :help and s/ friends features are included.
Its not really a full implementation, but it has some of the basics covered.
There is also the Yzis editor  which looks interesting and I can't wait for it to be stable enough to use, which lets you have the power of vim editing everywhere.
I can't wait to be editing my stackoverflow posts in a syntax highlighting editor with full power tools :D
Answer: There's a plugin for Eclipse that basically changes the editor for a vim editor.
Comment: I suppose he's talking about eclim: http://eclim.sourceforge.net/. I'm going to check it out some time...


Android and Symbian NFC mobile development questions and answers (FAQ)

Question: Let's share on a common place ideas about the NFC development, technology… I warmly welcome any comments you might have – either about the Android or Symbian SDK or about the NFC in general.
From my point of view the general question is what we can develop, i.e. what kinds of applications can we bring to the market with the NFC technology? And how can we, developers, earn money and benefit from the NFC?
I think there is an expectation the NFC will open the door for numerous services and possibilities for developers – but is that true? The difference between the NFC and other wireless technologies (BT, WiFi) is that it already comes with major use cases – payment, transportation tickets and keys (building access). But for all these use cases you need a secure element, which is

either controlled by the phone manufacturer, e.g. Google – see Google Wallet which uses exclusively the built-in NXP SecureMX on Nexus S (and this is something which can be very hardly changed if we do not want to compromise the security),
or accessible via UICC on SIM card (on Android and Symbian /and MeeGO/ phone as well); here the deal has to be made with operators.

But having 3 or 4 operators in a country, how probable it will be for a middle-sized company that they will allow running their applets on SIM cards? And what about more worldwide solutions? All above mentioned services/use cases need a lot of coordination of all the players and a well established ecosystem (banks, MNO, NFC chip producers, phone manufacturers, TSM…).
They are still options for p2p applications, tags reading – but many functionality will be already built-in in the phone, so this does not look like goldmine…
I think the chances can be bigger if the phone will include the NFC-WI(S2C) – having this interface (specified by ECMA) and micro SD cards with the NFC-WI support (already specified by the SD card association) will possibly allow purchasing the SD cards with secure elements for an arbitrary company… But it is not on the market and it does not look anything will appear soon.
What is your vision and experience with NFC and mobile phone development?
Answer: In order to be a little bit more practical, and not only theoretical, I have posted some patches on xda-developers to enable card emulation mode on the currently unique android phone supporting NFC (the Nexus S). You and others might be interested in playing around with card emulation mode by yourselves. Take into consideration that this is only for experimental purposes.
They apply to gingerbread versión 2.3.4_r1 of the AOSP sources. They allow:

Enabling NFC card emulation mode on the Nexus S. This mode is always enabled.
Disabling reader mode, letting the card emulation being the only one working.
Selecting an external secure element (in UICC) instead of the embedded one (in SmartMX chip).
Although not related, removing time-limit to bluetooth discoverability option.

What I have found out about NFC card emulation on Android so far:

Card emulation is disabled by default on stock images and require a firmware modification. Alteration of Nfc system application and libnfc-nxp system library are the places to look at.
Embedded SmartMX chip inside Nexus S presents itself as a dual smartcard. A programable one (allowing installing of cardlets on it) based and a 4K Mifare one.
The 4K Mifare card has default keys, so it can be written/read from an external reader.
The programable card is supposed to be GP compatible, but no one except Google can fiddle with it since access keys are not public.
Nexus S does support SWP and allows to operate with a secure element located inside an UICC.
Applications can not access directly to any contents of secure elements. On one hand the embedded SE is unaccessible because we do not know the keys. On the other hand the external element is accesible externally by means of SWP (that connects to NFC controller) but not internally because AFAIK the SIM slot is not connected by other means to the NFC controller. This leaves us with only one path, the baseband processor. However BB firmware is propietary and controlled by manufacturers. Samsung has not implemented the 3GPP TS 27.007 Technical Specification to interact with it in its BB firmware.
OTA access to external SE should be possible, this lies in hands of MNOs. Some of the might offer TSM services to allow 3rd party access to SE inside UICC.

By the way the technology you mention (NFC-WI) is already used in the Nexus S to interconnect the NFC controller with the embedded secure element.
Upate
To summarize I answer Sten's questions:

Since the Mifare 4K area has default keys, anybody with the external
  NFC reader can change the keys and securely store values there – is
  that correct? Did you try it? Does this come with any difficulties?

Short answer yes, I did access Mifare 4K from an external reader. I was able to modify default keys too. The difficulties come from modifying system sources and building a custom firmware yourself.

Is use of the external NFC reader the only way how to access the
  Mifare space?

Theoretically no. The other alternative would be sending APDUs to the SIM, containing the Mifare commands to execute on the Mifare card.

Can e.g. application installed on the Android phone read/write some
  data to Mifare 4K using some API (over NFC controller and NFC-WI
  path)? Can e.g. seek-for-android help there?

For the time being no. Though you modify the AOSP sources with seek-for-android patches (I did it myself) your application will just crash with stock phones. The reason is that they have not implemented the 3GPP TS 27.007 Technical Specification, that allows the application processor to send APDUs directly to the SIM (UICC).
However there could be some light ahead of the tunnel, since citizy project in France are already using secure element mode of NFC technology with Android phones, taking the UICC secure element approach. In fact there is a modified Samsung Galaxy SII model in use and the new Acer Liquid Express will also be soon available to integrate into citizy. Those phones are bound to have the required TS 27.007 specification implemented in their baseband processor firmware. When it comes to application processor I do not know if they took the SEEK-for-android from G&D path or the OpenNFC from Insecure. Being french I would bet all-in for the last one.
Comment: Well, you cannot access Mifare 4K from the phone, but you can from an external RFID reader (keys have default values). If you mean OTA normal MNO OTA I don't think it can be accessed that way since OTA is meant to access SIM not Phone internals itself.
Comment: As far as I have realized experimenting with Nexus S, SWP is only used to connect UICC<->NFC Controller in radio communication. That channel (I haven't found how) is not accesible from application processor. The only "path" to access a SE from application processor via NFC Controller is NFC-WI interface, which is used exclusively for embedded SE communication. The only supposed way to access UICC from application processor is via baseband processor (which is connected to UICC), which must implement appropiated AT commands to export that functionality.
Comment: Hi, NICE contribution:
So in short – one cannot access the Mifare 4K unless the Google will share the keys with the respective company or rent a space via TSM – this I think can be theoretically possible for some companies, since there should be still a lot of free sectors available (unless the Goolge Wallet occupies all 3440 bytes). But I am not sure how in such case (i.e. even with Google permission) cardlets can be installed on the phone built-in SmartMX – is it possible via OTA?
_To be continued_
Comment: The other option is SIM card – there is the way to access it over NFC via SWP or directly (BB) over USB or similar – but to upload the program on the SIM card there are same restrictions as for built-in secure element…
This left us with micro SD cards I think.
Comment: If you enable card emulation mode via the modification mentioned above you won't be able to use the card emulation from the UICC/SmartMX at the same time. Problem: How do you tell the UICC to disable Card emulation without altering the program? This is a dead end imho.
Comment: You can work with card emulation using embedded SmartMX SE or using the external SE inside UICC. Not at the same time, but with the patches provided you can specify if you prefer external over embedded if available or not.
Answer: So to continue the discussion I will just summary it: The NXP SmartMX microcontroller consists of two separate secure elements. The first one is programmable, runs some operating system (e.g. MULTOS or Sm@rtCafe or other) and a JavaCard VM, but it is locked and the production access keys there are in Google or TSM hands only. There is no way to install JavaCard application for testing purposes here, since it is not possible to unlock the secure element for test purposes.
Also there is no way how to utilize the SIM card, because even if this can be technically possible, for the commercial application deal with MNO is necessary. Let's stop for a while with the Mifare 4K, which seems to be the most promissing:
Since the Mifare 4K area has default keys, anybody with the external NFC reader can change the keys and securely store values there – is that correct? Did you try it? Does this come with any difficulties?
Is use of the external NFC reader the only way how to access the Mifare space? Can e.g. application installed on the Android phone read/write some data to Mifare 4K using some API (over NFC controller and NFC-WI path)? Can e.g. seek-for-android help there?
Thanks
STeN
Comment: The Mifare4K is a dead end because no NFC controller beside the NXP family support this tag. It's not required by the NFC standard and NXP wants license for their broken Crypto-1 algorithm. Therefore all upcomming NFC-Chips that I know off don't support Mifare classic tags.
Comment: I doubt this is a format we like, on a Q&A site. (Not being a discussion forum!)


Asus Eee-PC 1015PEM

Question: My Asus  worked perfectly until yesterday. I assume that the battery drained and AC was not plugged. I turned it on and doesn't chargeat all.  It seems that something wrong with my battery. It works from AC but when it is plugged it shows only 4% available charging. When I unplug AC it shuts down right away. I already tried the 45  seconds holding power button method, and I uninstalled in device manager Microsoft ACPI-compliant Method Battery. Nothing helped. Does anybody has any idea?
Answer: Well, it could be that the software is wrong about the available charge. I would shut the laptop down and give it some time to charge undisturbed. Your physical charging indicator will tell you when it's done.

Asus Eee-PC 1015PEM


Are buffaloes sacred?

Question: They don't seem to be since India exports buffalo-meat.  But Mahisa has many positive connotations: 'f. a buffalo-cow, (grāmya-mahiṣī, a tame
buffalo-cow); 'powerfull woman,' any woman of
high rank, especially the first or properly conse-
crated wife of a king, a queen consort, any queen, also means "great".'
Comment: According to [this site](https://i.redd.it/0rlegx6e14h01.png), buffalo is a "dumb" animal so maybe that's why India exports buffalo beef.
Comment: Related: [Is "cow" a concept or does it refer to just one species of milk-producing bovine animals?](https://hinduism.stackexchange.com/q/22220/2995)
Comment: If buffalo is "Mahisha" then in Rig Veda there is a Mantra that mentions it as the foremost among all animals. Does that count for an answer?
Comment: go ahead @rickross
Answer: See the following Mantra from the Rig Veda (RV):

brahmA devanAm padavih kavinAm (1) rshir viprAnAm mahisho
  mrgAnAm (2) shyeno grdhrAnAm svadhitir (3) vanAnAm somah
  pavitramatyeti rebhan (4)

BrahmA among the Gods, the leader among seers (1), Rishi among the
  Vipras (can mean "the wise" or "a BrAhmin"), buffalo among all
  animals (2), hawk amidst the vultures, self-law among the delights
  (3), Soma goes singing over the purifiers (4).
RV 9.96.6

Thus, the Mahisha or buffalo is given an elevated status among all the animals. Just like BrahmA enjoys an exalted position among all the Gods, the Rishis among the Vipras, similarly does the Mahisha among all animals.
Comment: I didn't think brahma of the trimurti occurs in Rig Veda.  This doesn't say "sacred" just says it is the best among animals. @rickross
Comment: Brahma does appear in Rig Veda at many places.. for e.g in Rig Vedokta Devi Sukta there's a mention of the God Brahma. "This doesn't say "sacred" just says it is the best among animals" Yes I know, that's why before posting the answer i asked under ur Q whether it's ok or not to answer with a mantra that is simply describing the Mahisha as the best among all animals @SK
Comment: Sorry, I must have misunderstood your original question.  Please note that this image reoccurs in BG when krishna says I am Himalaya among mountains, Ganga among rivers and so forth @rickross
Comment: I think sacredness is also implied when it is stated as the best among it's kind.. like when they say "Just like Ganga among rivers, swan among birds.."  it only says that Ganges and the swan are best among their respective types but it is also implying their sacredness or purity.. Ganges is most definitely the most sacred river, swan, which is Brahma's mount, is also sacred..  Yama's mount is the Mahisha. So, it is sacred for that reason too. @SK
Answer: Yes they are considered sacred. In the Rig Veda the bovine species, whether as buffalo or bull, lends its glamor to the evocation of the gods, Agni, Indra, Soma, and Varuna, the principal Vedic gods, are invoked as buffaloes. Much less frequently are they invoked as bulls. Indra is once praised as a buffalo great in "bull powers":
HYMN XXXVIII. Indra.

4 Even as he mounted up they all adorned him: self-luminous he travels
  clothed in splendour. That is the Bull's, the Asura's mighty figure:
  he, omniform, hath reached the eternal waters. 5 First the more
  ancient Bull engendered offspring; these are his many draughts that
  lent him vigour. From days of old ye Kings, two Sons of Heaven, by
  hymns of sacrifice have won dominion.

HYMN CXLI. Agni.

2 Wonderful, rich in nourishment, he dwells in food; next, in the
  seven auspicious Mothers is his home. Thirdly, that they might drain
  the treasures of the Bull, the maidens brought forth him for whom the
  ten provide.

HYMN XLVI. Indra.

OF thee, the Bull, the Warrior, Sovran Ruler, joyous and fierce, ancient and ever youthful, The undecaying One who wields the thunder,
  renowned and great, great are the exploits, Indra.
Comment: The first para appears to be taken from the book [The Presence of Siva](https://books.google.com/books?id=O5BanndcIgUC&pg=PA13&lpg=PA13&dq=%22Much+less+frequently+are+they+invoked+as+bulls%22&source=bl&ots=xcs_ApQnoj&sig=4Rb7MV8CgdnQdLy9YDbZvhpMavA&hl=en&sa=X&ved=0ahUKEwjNlI-LksfaAhUphlQKHbeZAXsQ6AEIKTAA#v=onepage&q=%22Much%20less%20frequently%20are%20they%20invoked%20as%20bulls%22&f=false).

Are buffaloes sacred?


Dance: tango argentino dance floor dimension

Question: what are the approximate minimum dance floor dimensions to dance tango argentino? I need it for a project of tango argentino-themed restaurant/club.
Comment: Hi - although we should be able to answer questions about tango music here, and maybe even about the crossover of the music and the dance, this question doesn't seem to have a musical aspect.
Comment: I'd be grateful for the answer on my question as I cant find any information about it and I thought this is the best place to find it :) If you cant really help me with it, could you tell me where should i look for ?
Comment: Have you tried asking on a dance forum?
Comment: Yes i tried on dance-forum.com , but the registration there is broken and I really need an answer, thats why i decided to ask for it here.
Comment: How about https://www.reddit.com/r/tango/ or https://www.reddit.com/r/Dance/ ?
Answer: Pretty much depends on the number of people you want to accommodate.  Tango Argentino is a slowish dance with moderate progression and room coverage, so you can get away with quite a bit less than the "120m² per 6 dance pairs" requirement I seem to remember from ballroom dancing tournaments.  But a tango argentino-themed restaurant/club will most certainly also want to accommodate milongas and tango waltz.  What does "themed" mean?  Do you only want enough room for show dancing, or are the patrons themselves permitted to dance?
How about contacting some of your prospective customers and ask them what made them pick their favorite locations so far?  You'll want to accommodate them in more respects than just floor area anyway.


When I am using google analytics to track a rails app deployed to heroku, which url do I use?

Question: There is the initial heroku app name like something.herokuapp.com, then there is the ssl certified heroku app name like somethingelse.herokussl.com, and finally there is the actual website name www.anothername.com that is cname'd to the heroku ssl address. Which url should I ask google analytics to generate the tracking analytics code for?
Comment: I don't think it matters. As long as you have the Analytics script on your page, it will track the visitors. I changed the domain of my site and Analytics is still working.
Answer: I tried it with all three urls (the herokuapp, the herokussl, and the domain name I am pointing from) and they all tracked the same. So I guess it doesn't matter which one you pick
Answer: www.anothername.com
and you should add setDomainName method before trackPageview, on all pages.
<code>_gaq.push(['_setDomainName', 'anothername.com']);</code>


What is the difference between "Country of Issue" and "Country of Citizenship" of a passport?

Question: On multiple occasions I have seen forms where it needs to be stated what the Country of Issue and what the Country of Citizenship is.
What is the difference between the two, if your passport is issued by a consulate in a foreign country. Technically the soil of a consulate belongs to its own country. So both the country of issue and citizenship should be the same. At least that is what I would say. But if this is the case, why do some forms require to fill in both?
Comment: "Technically the soil of a consulate belongs to its own country." This statement is ambiguous but the idea that country X's diplomatic mission (embassy, consulate, whatever) in country Y is part of X's territory is persistent but false. The diplomatic mission remains part of the host country Y's territory but is afforded certain privileges under the Vienna Convention. Y's laws usually don't apply in the mission and Y usually cannot enter it without permission. See [Wikipedia](http://en.wikipedia.org/wiki/Embassy#Extraterritoriality) and the various links and sources there for more information.
Comment: I am not sure it makes much sense to claim that the soil of a consulate *belongs* to that consulate's country (incidentally, consulates usually simply rent their facilities!).
Comment: @Szabolcs I know that for my country the actual booklet is manufactured at some central facility and shipped back to the consulate but the consulate is still considered to be the "authority" issuing the passport.
Comment: @DavidRicherby I am not a specialist but the Convention includes language like "The premises of the mission shall be inviolable" or "The premises of the mission […] shall be immune from search, requisition, attachment or execution" It's always very practical, no sweeping statements about laws applying or not, which are not needed and would be much more open to interpretation.
Comment: @DavidRicherby Would that imply that Country of Issue is Country Y if that consulate issues a passport for Country X?
Comment: @andra I don't know for sure but the answers suggest not: they seem to be saying that, if your passport was issued by officials of country X, then the country of issue is X, regardless of whether those officials were sitting in a diplomatic mission in some other country or anywhere else.
Comment: When I got my passport at a consulate, they didn't technically issue it themselves.  They just helped with forwarding the request to the home country and mailing the documents and passport so I could pick it up at the consulate.  I know that this is true for at least two countries.
Comment: In fact Y laws do generally apply, it's just they can't be enforced.
Comment: @andra I don't think one has much to do with the other.
Comment: @Relaxed Are you sure? Wikipedia explicitly says that local laws usually don't apply (regardless of the fact that they'd be largely unenforceable, even if they did apply).
Comment: Based on my study, possession of a French passport is not regarded as proof of French citizenship, but a supposition of French citizenship! All other countries regard possession of their respective national passports as proof of citizenship. Why are the French different? After all, we have to remember that the French are the ones who invented the "bureaucracy"
G.M.Gersoppa
Answer: Although not common, some countries issue passports to non-citizens as well. As you may have noticed, the data page of a passport often states the nationality or citizenship of the holder in a separate field and the citizenship may actually differ from the issuing country.
One example is laissez-passer documents or emergency passports, which may be issued by foreign governments. For example, if you travel to a country without a diplomatic representation from your home country and lose your passport, your home country may have an agreement with a third country to help you with a temporary emergency passport.
Another example is the British Passport, which can be issued to all British nationals, even if they are not British citizens (British nationality law makes a clear difference between "nationals" and "citizens").
Comment: This is more common in the Middle East. Most people I've met on my travels who identify as Palestinian had a passport of some other country - I think Jordan was such. And all but one person I've met from Kuwait don't have Kuwaiti citizenship but either had Kuwait passports or passports from other Middle Eastern countries.
Comment: It's certainly possible to seek assistance from another consulate or to get a laissez-passer from a third country but do you have any concrete example of emergency passport issued for this purpose?
Comment: In addition in the old days, if your passport was issued by a foreign mission (say you are a residing abroad), the passport had "place of issue" the country you were residing in, but your citizenship is the country that issued the passport.
Answer: From the ESTA website (which I was reading just as you posted the question!):

Your "Country of Issue" is the same as your "Country of Citizenship".
  For instance, if you are a citizen of the United Kingdom, but are
  getting your passport from the UK Consulate in Hong Kong, the UK is
  your country of issue. The UK Consulate may be located in Hong Kong,
  but Hong Kong is not the country issuing you the passport.

However, it's worth noting that some forms word this differently, and ask for place of issue or authority who issued it. Then it could be different.
For example, my current New Zealand passport.
Country of citizenship: New Zealand, clearly.
But where it was issued? I was in London, UK, and the field in the passport says "DIA LON".  (Department of Internal Affairs, London). This is the Identity Services Office in London - often referred to as the London Passport Office - and is responsible for the issuing and renewals of New Zealand Passports in the United Kingdom and Ireland.
So when it says place of issue, that's usually what gets put down for me, or when it asks for 'Authority' as that's the specified field in the passport as well.
Country of Issue, however, would still be New Zealand.
Comment: The "country of issue" is the same as the "country of citizenship"… for people who qualify for the VWP (and many others)!
Answer: It's difficult to know precisely without context but there are few cases where this could be relevant, in particular:

Travel documents other than passports (e.g. refugee travel documents) are issued by the country where the person resides and indicate that the holder can be readmitted to the country of issue even though they are still citizens of another country. Formally, these documents are typically not called "passports" but they look like one and are often informally called "refugee passports".
Some countries like the UK and the US have a distinction between "citizens" and "nationals". For the US, some people from the American Samoa can for example get a passport issued by the US Department of State but cannot claim the US as their "country of citizenship".
People living in countries that are not recognized as such by many other countries in the world (e.g. Palestine, Northern Cyprus) sometimes travel with a passport from another country (e.g. Jordan, Turkey) where they might or might not be considered a citizen. However, it would be difficult to accept "Palestine" as "country of citizenship" if it's not officially recognized wherever you are so that's probably not the intent of the form.

On the other hand, if you have a regular passport, issued by your country's authorities, then I would tend to think that "country of issue" and "country of citizenship" are the same even if you got your passport through a consulate abroad (that's certainly the terminology used by the US authorities, as shown in the link provided by Mark).
Answer: Rather unusual example, but you could be travelling on either Holy See or the Sovereign Military Order of Malta passports, while you are (obviously) a citizen of your home country. These entities do not have the concept of citizenship in the usual sense, indeed, they are not countries.
Answer: Any country can emit a passport for any person regardless of its citizenship.
Case in point, France does not recognize a passport as a proof of citizenship for its own citizen. (In BOLD here and here for french readers)
The passport is an official travel document stating to other countries that the holder is recognized as specified. Having a passport from a certain country entails some prerogatives, like being exempt of visa, or having a passport automatically purported to be valid 6 month after expiration etc....
But holding a passport and having a citizenship are in theory completely different notions. Although practically, 99.9% of the passport are issued by the country of citizenship, there are no international laws to my knowledge which prevent a country to issue a passport to non-citizen, (although some local legislation may prevent doing so.)
exemple : UK passport for Hong Kong, US passports, any diplomatic passport, which are issued on a mission basis for representation of the said State, who is sovereign in deciding who represents it....
Comment: France does [recognize its passports as a proof of nationality](http://vosdroits.service-public.fr/particuliers/F18713.xhtml) and, to my knowledge, does not issue them to anybody but French citizens.
Comment: While I might believe your assertions, could you provide any sources to back up what you say, especially in light of the much more rigorous security screenings in effect worldwide these days.
Comment: Once again I removed almost all comments. Please remember that comments are not here for extensive discussions. Take this to the Travel Chat.
Comment: I really do not know anything about French citizenship and/or passports.  But I would imagine that it would be similar to US citizenship and/or passports.  There are non-US citizens who legally hold US passports.  http://en.wikipedia.org/wiki/United_States_passport  Why would France be different?
Comment: I removed all other comments. Remember that extended discussion in the comments should be avoided. Use the chat for that.
Comment: Just for the record and without rehashing all the arguments: In France passports are only issued to citizens. Evidence: [1](http://www.legifrance.gouv.fr/affichTexteArticle.do?idArticle=LEGIARTI000018763637&cidTexte=LEGITEXT000018763666&dateTexte=20140702), [2](http://vosdroits.service-public.fr/particuliers/F14929.xhtml#titreN1016F), [3](https://en.wikipedia.org/wiki/French_passport)
Comment: @CGCampbell is right, it's on the posters to provide sources for their statements, not on any one else to disprove them.
Comment: @emory It's mainly a question of terminology, the documents issued to non-citizens are simply called "[titre de voyage](http://prado.consilium.europa.eu/en/categories/FRA/J/resultByCountryCategory.html)". It's a good point, though, I think this would deserve a new answer as the question is in fact about a US form, so this might explain it.
Comment: Just for the record and without rehashing arguments : the proposition "france only issues passport to french citizen" and "passport proves nationality" are related but different propositions. Its a very trivial assertion, and even if the difference is not understood, one just needs to recognize that it was until recently not sufficient to have a passport to prove nationality to know, if not understand, the distinction...


Android App created with Kivy (Buildozer) crashes on phone, but why?

Question: I have some problems with an App, which I wrote with kivy an packaged with buildozer is always crashing when I try to run in on my phone. On my PC I use Ubuntu 14.10 and I don't get any error when compiling it (buildozer android debug). Then I send it on my SmartPhone and I install and run it, but it just loads and after a few seconds it crashes. By the way the kivy program is not very big.
Could someone help me, please? And sorry for my bad grammar ;)
Comment: Please provide the log output from your application. Run `buildozer android logcat` to dump all log output from your device; copy and paste from the start of your application run until it crashes.
Answer: Buildozer.spec, use the following setting
Tittle= abc

Package.name=abc

Package.domain=org.abc

Include all your files eg.png,txt etc
Requirements= python3,kivy==2.0.0,kivymd, pillow,kivy-deps.angle,kivy-deps.glew,kivy-deps.sdl2

Uncomment android.logcat.
Now make sure your phone is on developer mode, connect your phone to the computer, turn on USB debugging, open a terminal,
cd abc
sudo apt install scrcpy

Type
sudo apt install adb

type
scrcpy

your phone will appear on your computer.
Type
buildozer android debug deploy run logcat.
adb logcat -s python

Run your app on your phone ( ensure you phone is connected to your computer); your log file will appear
Answer: Try using kivy-launcher just put your main.py and other files and run it and you can debug logs inside log directory. Then once you got all the error fix build an apk and use it.
Answer: If you are using kivy and your app loads some images, then there is no problem. But if you are using some other packages like pygame to load images, it will crash. Or if you are working in some files like reading or writing a text file, it will crash. Because when you package your app with buildozer, It will move the additional files of your app (.txt, .png) to a different location. So your python file fails to find the additional files in your specified location.
To solve this, do some corrections in your python file like changing the path of the additional file from the current directory of the python file to the path that is referred below.
PATH = "/data/data/#package domain#.#package name#/files/app"
In the above path change #package domain# with the domain of your package and #package name# with your package name.
All the additional files of any app that is installed in an android device will go to this location.
Try out this. All the best.


Data Encryption and Internet Speed

Question: I was wondering, does encryption used over the Internet in a web browser noticeably slow down the speed of data transfer? I keep reading about stuff like HTTPS, but I always wonder if there's a speed disadvantage in securing your data over HTTPS, encrypted instant messages, or even an encrypted LAN VNC connection.
Answer: It is a question of rates.  If your CPU can encrypt data at 30MB/s, but you can only transfer data at 10MB/s, then encrypted communication will only be slow relative to unencrypted communication if there is something else hogging the CPU and bringing the encryption rate below 10MB/s.
If there is something else restricting the transfer rate (say the time it takes to read from disk the data being encrypted and then transferred), then that also could be a limiting factor, but would not be due to encryption.
Other than that, there is only latency to worry about, and I think most implementations are reasonably well tuned to reduce the impact of encryption on latency.
Answer: Generally any encryption or decryption process takes longer than clear messages;but if that encryption approach is supported by source and destination  over network we can say it takes less time to proceed.
Comment: Thanks for the info, but I am specifically curious about just how much of a difference it makes. I don't need to know the technical aspects of it, I just want to know how much slower it would be for simple encrypted web browsing. For example, if I use standard HTTPS with Gmail, would requests be several times as slow? A fraction as slow? 50% slower? Barely slower at all?
Comment: of course it s not 50% but lets say 10-15% i m saying by experience,but at least you could be sure your data is less under sniffing or revealing.
Answer: With todays fast PCs I don't think encryption itself will slow the speed of transfer.
However, general web browsing over a secure (HTTPS) connection can be slower because the browser is less likely to cache secure pages, and so there are more requests to the server.

Data Encryption and Internet Speed


PDF Chain Page Limit

Question: I am using pdf chain to merge several single page pdf documents. But this program only adds 26 pages at a time, I want to combine 100 pages at once. I am doing something wrong or is there a setting I am missing?
Answer: PDF Chain is just a GUI for pdftk so you could try using that directly:
pdftk input_file*.pdf cat output output.pdf

Answer: It seems you are using a very old version of PDF Chain. Newer versions don't have this limitation. There is a PPA with the actual version of pdfchain and the fitting version of pdftk:

launchpad.net/~pdfchain-team/+archive/ppa

Seems you want to remove single pages from a document. Don't use burst and cat for this. Use cat only! For example do the page selection "1-3 5-end" for removing page 4. Read the documentation of pdftk and pdfchain about:

http://www.pdflabs.com/docs/pdftk-cli-examples/
http://pdfchain.sourceforge.net/documentation.html

Greetings.

PDF Chain Page Limit


How to make rdiff-backup bandwidth efficient?

Question: I am using rdiff-backup to backup files from my server to a backup server. I run the backup using a command similar to:
rdiff-backup email@example.com::/home/user/data/complete complete

This backup is working well. However, from the features page of Rdiff-backup it says:

Bandwidth efficient: rdiff-backup depends on librsync, and thus uses the same diffing algorithm as rsync (rsync and rdiff-backup strictly speaking do not share any code however). [...] For instance, suppose you slightly alter large file A to make large file A', and A is still on the remote system. When rdiff-backup is run, it will only send over the diff A->A' [...]

The files on the remote are database dumps, generated using mysqldump, that are created hourly. The data does not change much from hour to hour. Each filename has the format YYYYMMDDHHMM.sql.
Based on my interpretation of the above 'feature', rdiff-backup should be sending a small diff to create the file based on the other files in the directory -- in other words, if A prime is the latest backup and A is the T-1 backup, it should send a small diff to get from A to A prime.
However, it quite clearly is not working in this way. It is sending the entire new file, even though the new file is only slightly different. I would expect data transfer to be a few megabytes, but it is transferring hundreds of megabytes.
Also from the man page:

rdiff-backup  can  also  operate in a bandwidth efficient manner over a pipe, like rsync(1).  Thus you can use ssh and rdiff-backup to securely back  a  hard  drive  up to a remote location, and only the differences will be transmitted.  Using the default settings, rdiff-backup requires that the remote system accept ssh connections, and that rdiff-backup is installed in the user's PATH on the remote system.  For information  on other options, see the section on REMOTE OPERATION.

So my question is:

Am I interpreting this feature correctly?
If I am, how do I use rdiff-backup to function in this way?
Answer: Per your post you are generating every hour unique sql dump YYYYMMDDHHMM.sql
This is every time new file with unique file name.
If you was changing files on the source (instead of generating new files) - then this feature would apply.Otherwise it looks at the source, discovers entirely new file YYYYMMDDHH+1MM.sql, it has no idea that on the destination file named YYYYMMDDHHMM.sql is a very close thing and it will start syncing file YYYYMMDDHH+1MM.sql to the destination.
If you want to use this feature - then when new file YYYYMMDDHH+1MM.sql is generated on source - you would need to fire up some script which will connect to destination and make a copy of file YYYYMMDDHHMM.sql
cp YYYYMMDDHHMM.sql YYYYMMDDHH+1MM.sql

After that fire up your sync.
In this way it will discover that destination has file with the same name and hopefully will attempt to use this partial sync algorithm.


Obtaining a "Supervisa" for Canada from outside your home country?

Question: Can one apply for the parents/grandparents supervisa from -
outside their home country?
from within Canada while on a visitor visa?
Answer: Canada's parent and grandparent super visa is a temporary resident visa (visitor visa) which allows visitors to stay up to two years on each entry.
Canada requires applicants for visitor visas to apply outside Canada, either in their home country, or from a country which they have been admitted for a period of at least one year.

For all other applications [other than permanent residence] you must select the visa office that serves your country of nationality or the country where you have been legally admitted for at least one year.

The only exception allowing an application from within Canada is if the applicant has entered Canada on a student or work permit. (But it seems unlikely that such a person would need or qualify for a parent and grandparent super visa.)
Answer: As of 2022, temporary resident visa applications (incl. supervisas) may be submitted in any country where you are staying legally. Online application is recommended.

I am currently living in or visiting a country that I am not a citizen
of. Can I apply for a visitor visa at the local visa office?
If you are applying on paper we recommend that you apply for a visa
from your home country. However, if you are legally admitted to the
country you are currently in, you can apply at your nearest visa
application centre (VAC). The VAC can help make sure your application
is complete and that all proper documentation is included. You must
state clearly on your application why you have not applied in your
normal country of residence.
You can also apply for a visa online.
https://www.cic.gc.ca/english/helpcentre/answer.asp?qnum=1017&top=16

from within Canada while on a visitor visa?

A multi-entry supervisa valid for ten years or until passport expiry is not issued within Canada.
But if you have been admitted as a visitor on a normal visitor visa (for which six months of stay are normally granted), you may nonetheless apply to extend your stay under the supervisa stream (with the same requirements, e.g. minimum income, medical insurance, etc.). In this case, a visitor record would be issued to allow an additional period of stay for (usually) one or two years.
Unlike a supervisa issued on a counterfoil outside Canada, the visitor record is only valid while you are in Canada. If you leave Canada, the visitor record does not authorize your return to Canada.
If you have a valid multiple entry visa or if you are visa exempt, you may return to a Canadian port of entry and apply to enter Canada again. It will be treated as a new application for admission. The border officer can admit you for another six months (or other periods they think justified). Sometimes, if you have a previously issued extension (visitor record) and have only taken a short trip outside Canada (e.g. to the U.S.), the border officer may re-admit you for the previously authorized extension period; but this is at discretion and not a guarantee. As always, if the border officer is not satisfied that you will follow or have followed immigration law, they can also of course refuse your entry despite your visitor visa or previously issued visitor record.


How to ask editor for a formal acceptance letter?

Question: How can I ask editor to send me a formal acceptance letter of my paper to use it in my university?
Comment: Why would you need such a letter? If your paper has been accepted, the notification would work; if your paper hasn't been accepted, the editor can't possibly send you a formal acceptance letter.
Answer: You send an email to the editor asking for a formal acceptance letter of your paper. Be sure to identify which paper it is about.
If desired, add a second paragraph to your email, which explains why you need such a letter. Do not hide anything necessary in the paragraph.
Be polite and to the point.


2009 iMac automatically ejecting DVD

Question: I'm trying to read a Snow Leopard installation DVD on an iMac 2009 (it's running El Capitan) and it automatically ejects several seconds after inserting it. Why? How can this be fixed?
Comment: I had the same problem on a 2009 MBP and 2010 Mac Mini. Unfortunately they're the only machines I have with optical drives, because either the disc has gone bad or I'm having multiple drive issues.
Answer: That usually happens when the disc is damaged or dirty and can't be mounted. Physically inspect the surface of your disc for scratches or residue, and if necessary clean it with a microfiber cloth (wiping radially, outward). It's okay to use water or a damp cloth if necessary, but avoid harsh chemicals. And of course wipe your disc dry before trying again.
If this doesn't work, make sure your DVD drive isn't the culprit by inserting another DVD and making sure it mounts properly.

2009 iMac automatically ejecting DVD


What do these commands mean?

Question: What would be a more straight forward readable way of these commands?
And why exit 255 and not exit 1?
[ $# -eq 3 ] || { echo error ; exit 255 ; }

grep -q "string" && exit 0

Comment: read about short circuiting operators
Comment: Things like `$#` are unfortunately difficult to find in the bash documentation. See [this question](http://stackoverflow.com/q/20272085/827263).
Answer: Others have already mentioned that $# is the number of command-line arguments, so I'll ignore that part of your question.
Given cmd1 && cmd2, the shell first executes cmd1.  If cmd1 fails, the entire expression fails.  If cmd1 succeeds, the shell proceeds to execute cmd2.  The entire expression succeeds if both cmd1 and cmd2 succeed.  So, the && operator is the short-circuiting boolean AND applied to shell commands.  Uses of this operator can be replaced with
if cmd1
then
    cmd2
fi

Given cmd1 || cmd2, the shell first executes cmd1.  If it succeeds, the entire expression succeeds.  Otherwise, the shell executes cmd2 and the success or failure of the expression is determined by cmd2.  In short, this is the short-circuiting boolean OR applied to shell commands.  You can replace this form with
if ! cmd1
then
    cmd2
fi

I've carefully used the phrases succeeded / succeeds and failed / fails above.  Success, for shell commands, is defined as a process exit status of zero.  Failure is any non-zero status.  However, attempting to understand the && and || operators in terms of exit statuses is, at least to me, confusing since you end up with a weird sort of inverted logic.
Answer: This is pretty much straight forward, actually.
The script checks if it gets exactly 3 partameters, thats the [ $# -eq 3 ] part. If not, then the { echo error ; exit 255 ; } part will be executed. The exit code 255 has a special meaning, it means "Exit status out of range" see here. I think it's a bit missapplied here, but possible.
Answer: $# is the number of arguments to the shell. So, the first line says "exit if there are not 3 arguments", because the right part (after the ||) is only executed, if the left part is not true. || is the logical or.
255 as a return code may be arbitrary.
the scripts will return 0, if the word "string" is in the input.
Does this help?
Comment: Exit codes are not entirely arbitrary, especially 255 is not arbitrary!
Answer: On one side of the or operator you have the test ( [ ) function, if this evaluates to true (which it will when $# is equal to three) then we don't even need to bother checking the otherside. If it's false, we have to try the other side, which in this case is a function to echo an error and then exit. The same functionality could be accomplished with a more verbose script:
if [ $# -ne 3 ]
then
  echo error
  exit 255
fi

Answer: The line with the grep command does exit 0 if "string" is in the input, otherwise the exit code will be 1.
A more explicit way would be:
grep -q "string"
if [ $? -eq 0 ]
then
  exit 0
else
  exit 1
fi

What do these commands mean?


how many ways are there to place 7 iPhones and 5 galaxies in a row such that no galaxies are next to each other?

Question: I realize that there are 7 iphones, so when I place them with a spot between each one of them, then there are 8 spots in total. Can I do $$\binom{8}{5}7!? $$
Answer: $7!$ ways to arrange the iPhones.
$\binom85$ ways to choose spots for the Galaxies.
$5!$ ways to arrange the Galaxies.
So in total, there are $7!\times\binom85\times5!$ ways.
Answer: $$\binom{8}{5}.7!.5! $$
the phones themselves can switch places


How can I write easier with a learning disability?

Question: I've been writing stories since Elementary School but was diagnosed with a reading comprehension disability in High School. I was labeled as a visual learner.
Currently I'm writing articles for websites but having a hard time focusing and writing properly. My editor said my article hardly read well but I'm a well spoken person and communicate my thoughts better than I write them.
Comment: Not an answer, but a word of support - my brother has a similar problem (even though officially classed as dyslexia, it doesn't quite match) - and had his first book published in bookshops and online earlier this month - so never let anything put you off (but do get a good and understanding editor) ;-)
Comment: How does one get something published? I feel like I'll never have my own book.
Comment: He started emailing around publishing companies. Unfortunately he got one that has really screwed him over as they did no editing, ran it through a spellcheck like in Word and did no grammar checking (so things like through / threw etc) and generally left it as a half-finished book - next time he's going to get my help, and as he's now published he's one step up to getting a publisher that doesn't have a bad reputation for doing this. In the UK at least there are legal protections against bad contracts (especially to anyone with learning difficulties).
Answer: Whenever you have written something, read it out aloud. When I do this I often spot mistakes, clumsy phrasing, and sentences that go on too long.
It can feel embarrassing to read out loud to an empty room or to your family, but stick with it. It is a great technique for making your writing sound natural and relaxed. If your mind works better using sound than vision, it allows you to perceive your writing as sounds rather than marks on the page. You could even try recording your own voice reading your draft article and then playing it back.
By the way, don't take labels such as "visual learner" or "auditory learner" as being absolute. I think from my own experience there is some truth in these descriptions, but many psychologists say that the idea of learning styles has little hard evidence behind it.
Comment: Thank you so much. Besides just recording my voice is there any programs that come to mind that uses Speech to text similar to texting on phones? Everyone calls me a social butter fly since I talk so much to everyone but I need that to translate into writing.
Comment: Reading comprehension stated for me based on the testing meant that my mind wonders while I'm reading and I think of other things. I have to read certain things over and over for it to register in my head of what it means. I tend to read children and teen books because its easier for me to understand. It's not that I can't read adult books, doing so would just take me longer.
Comment: @JoeRosa: Funny, I'm the opposite. If the text is too basic, my mind wanders about. If it's a challenging text (and interesting, but that goes without saying), the whole world gets shut out and only the story/information of the text exists.
Comment: @JoeRosa, unfortunately I don't know of a good speech-to-text program. I am too old to keep up to date with all the latest programs and apps! You could try googling for reviews of "voice recognition software" or "speech recognition software", or looking in computer magazines.
Answer: I had difficulty recognising certain sounds as a child. In dictations, I got to the point of having 80-90% of the words spelt wrongly. I overcame this problem with copies and reading A LOT.
I don't know what you or the people who diagnosed you mean by 'reading comprehension disability'; what I do know is that you have a difficulty. I don't mean to sound dismissive, but I dislike the word 'disability'; it seems to make a storm out of a shower. Moreover, I remember my terror all too well when I realised I couldn't distinguish between the sounds v and f. I spent years working very hard to overcome it and I can only thank my teachers for not yet having embarked on the theory that you must simplify tests and assignments, or take it easy on the marking, for people with difficulties like mine. They told me that I could make it, I just had to work harder than my colleagues. And I did.
In my view, you overcome your difficulty by reading and writing. A LOT. Start with easy texts (related to your interests and goals) and then move up. Read the texts once in silence, and then read them aloud. Analyse how the text was organised (each chapter should focus on a certain idea). Make diagrams with the events/information (being a visual learner, this should be particularly helpful). Make one diagram per paragraph and then connect the diagrams. This will help you understand the structure of a text before you write one yourself using that structure.
Then you write.
First, create a diagram of your ideas. Imagine you want to mention A, B and C. Write A, B and C on a piece of paper and add a definition for each as well as important factors associated. Make arrows with labels connecting A, B and C and/or factors they share or which are connected in some way.
Secondly, think how you'll organise those ideas into a text. For that, you need to know the basic structure (introduction-development-conclusion) and how to organise multiple ideas within the development section. Remake the diagram in order to mimic how the ideas and connections will be presented in the text.
Thirdly, write. I'm going to go out on a limb and guess you have no writing discipline. By this I mean that you have an idea and want to splash it onto a page as fast as possible. You should not put in paper the words running in your mind: one's mind is often chaotic and makes subtle inferences that disappear once you write things down. Force yourself to take it easy and take your time, especially at the beginning.
Get yourself a list of connectors and choose three you feel comfortable with for each function (contrasting ideas, adding ideas, etc). While writing, refer to the list and use them. Make sure the level of formality/informality is the same for the tone of the text and the connectors.
Last but not the least, get yourself a mentor, that is, someone who is willing (and has the skills) to go over your 'reading diagrams', 'writing diagrams' and texts to give you help.
Since you say you speak better that you write, may I suggest that you speak about the topic you want to write? Imagine you are dictating it for someone to write. Record it and then transpose it into writing and analyse it. I may be wrong, but I'm willing to bet you'll find that you write very much as you speak. You see, you can get away with a lot of confusing stuff (skipping, repetition, general disorganisation) while speaking, but not while writing. Moreover, while speaking, you can see if the other person is following you and quickly add more information to clarify any difficulties.
Comment: I use to have special classes to help my speech similar to you. I believe I had an issue with my S sounds and something else. I'll use what you said as a guide line to perfect what I'm doing.


Host multiple subdomains with one public ip, on one server

Question: I wanna host many subdomains on one server with only one public ip.
For example there would be: service1.myurl.com, service2.myurl.com and myurl.com.
How can I achieve that ?
Would running the different services in containers and referencing them work?
Comment: you can put proxy service or load balancer and forward those requests into local ips/ports where real services would run.
Comment: Would all your services run on the same server? Because then it is simple: NginX and create as many configs as many subdomains you would have.
Comment: @Bert yes all on the same server... will check your solution...
Comment: Do you actually want to run a DNS server, or are you just trying to set up a number of websites. If it is the latter, what you want  is supported by most webservers, nginx (by creating multiple Server sections, apache (by creating multiple name based VirtualHost entries), Microsoft IIS (by creating multiple sites and binding them to a specific host names) etc.
Answer: The most correct way for you to do this, install serial and configure BIND9 as authoritative to forward these requests to your web server.
Pointing your domain to the IP of the DNS server you just installed.
Set up a DNS zone for that domain, and indicate the subdomains that your web server wants answered, as well as configure your virtualhost on the web server to respond to the subdomains created.


Where does Photo Booth store photos and videos?

Question: I want to automatically backup photos and videos from Photo Booth to Google Photos, but don't know where they are stored.
Answer: The PhotoBooth Library is within the Pictures folder of your Home Folder.
Regarding automatic backup, there is no direct way to do it as Photo Booth does not have many options for that. You can try following:
Get Desktop Uploader app for Google Photos. Alternative way to get it is by opening the sidebar on Google Photos in your browser and clicking App downloads.
After installing the app and logging into your Google account, you can select which folders Google Photos will automatically back up. So try to
add this path to auto backup:
"/Users/your_username/Pictures/Photo Booth Library/Pictures"
You can right-click "Photo Booth Library", and select "Show Package Contents" to see the Pictures folder, or open directly from Terminal with: open ~/Pictures/Photo\ Booth\ Library/Pictures
Comment: Sure enough the movies are also stored in the mentioned `Pictures` directory.  Go figure...
Answer: Photo Booth.app stores its original photos at:

~/Pictures/Photo Booth Library/Pictures/

File names are in the form of Photo on 10-11-12 at 10.11 AM.jpg
From Finder, Right Click > Show Package Contents on the Photo Booth Library file to explore its contents.
Answer: they are stored in Photo-Booth Application
you can create/use following command to create a symbolic link, to link photo-booth-pics directory under your Pictures directory
ln -s ~/Pictures/Photo\ Booth\ Library/Pictures ~/Pictures/photo-booth-pics

After above command Go to /Users/your_user_name/Pictures/photo-booth-pics/
to see your pics


Latin Hypercube Sampling Asymptotics

Question: I am trying to construct a proof for a problem I am working on and one of the assumptions that I am making is that the set of points I am sampling from is dense over the entire space. Practically, I am using Latin hypercube sampling to obtain my points over the entire sample space.  What I would like to know is if Latin hypercube samples are dense over the entire space if you let your sample size tend to $\infty$?  If so, a citation for this fact would be greatly appreciated.
Comment: Yes, assuming a continuous distribution, because for any $\epsilon>0$ you can set the number of divisions to be such that all per-variable intervals have width $<\epsilon/2$.  Thus at least one hyperinterval (i.e. sample volume) is strictly contained by a width $\epsilon$ hypercube around any point you choose.  (Comment, not Answer, as all I know about LHS comes from Wikipedia as of ten minutes ago ...)
Comment: This is true, but I don't think it can easily be used to show denseness of large Latin Hypercube samples. The reason for this is that the sampled points in LHS are not independent: the existence of a sample point inside a specific hyperinterval precludes any other sample points from appearing in the same row/column (or whatever the multi-dimensional term is for this).
Comment: @Creosote do you think you could formalize your answer more?
Comment: @RustyStatistician, please expand your opening post to explain, in a formal manner as required by your proof, what you mean by "the set of points I am sampling from is dense over the entire space".  Thanks.
Comment: If I take an initial Latin Hypercube Sample where $n$ is so large, we consider it to be inifinty, is that sample dense?'
Comment: So really I just care about 1 Latin hypercube sample taken at once, not taking more iteratively.
Comment: So, just to clarify: it seems that you are interested in a single Latin Hypercube sample of size $n$, where $n$ is large? In which case, what do you mean by 'dense'?
Comment: Aysmptotically, if you let $n\rightarrow\infty$, so you take a very large sample, can that sample be dense?  In the sense of: https://en.wikipedia.org/wiki/Dense_set
Comment: No finite sample can ever be dense in a continuous sample space. For this, you would need sample points arbitrarily close to *any* point in the sample space, which would force the sample to be infinite. However, you could define a concept analogous to denseness but more appropriate for finite samples e.g. you could ask whether every point in the sample space is within a distance 0.001 (say) from a point in your sample, which would be a measure of how well your sample covers the sample space.
Comment: What about if the sample space is bounded, like infill asymptotics?
Comment: @RustyStatistician I notice that you're still interested in this question; just wondering what else you are looking for, beyond the two answers already provided? Unfortunately I don't think you'll find a citation for this statement as it's not actually that useful in practice i.e. denseness in the limit as $n\to\infty$ doesn't tell you anything useful for a specific $n$. Also, if you are looking specifically for a sampling method with good 'coverage' of the sample space then you might be better looking at quasi Monte Carlo sampling techniques, which give you more control over denseness.
Comment: For example, see http://math.stackexchange.com/questions/31357/how-is-a-halton-sequence-related-to-a-latin-hypercube
Comment: @S.Catterall I guess I am hoping that my bount will either 1) spur more answers to the question or 2) provide more comments on the 2 current answers.
Answer: Short answer: Yes, in a probabilistic way. It is possible to show that, given any distance $\epsilon>0$, any finite subset $\{x_1,…,x_m\}$ of the sample space and any prescribed 'tolerance' $\delta>0$, for suitably large sample sizes we can be sure that the probability that there is a sample point within a distance $\epsilon$ of $x_i$ is $>1-\delta$ for all $i=1,…,m$.
Long answer: I am not aware of any directly relevant citation (but see below). Most of the literature on Latin Hypercube Sampling (LHS) relates to its variance reduction properties. The other issue is, what does it mean to say that the sample size tends to $\infty$? For simple IID random sampling, a sample of size $n$ can be obtained from a sample of size $n-1$ by appending a further independent sample. For LHS I don't think you can do this as the number of samples is specified in advance as part of the procedure. So it appears that you would have to take a succession of independent LHS samples of size $1,2,3,...$.
There also needs to be some way of interpreting 'dense' in the limit as the sample size tends to $\infty$. Density does not seem to hold in a deterministic way for LHS e.g. in two dimensions, you could choose a sequence of LHS samples of size $1,2,3,...$ such that they all stick to the diagonal of $[0,1)^2$. So some kind of probabilistic definition seems necessary.
Let, for every $n$, $X_n=(X_{n1},X_{n2},...,X_{nn})$ be a sample of size $n$ generated according to some stochastic mechanism. Assume that, for different $n$, these samples are independent. Then to define asymptotic density we might require that, for every $\epsilon>0$, and for every $x$ in the sample space (assumed to be $[0,1)^d$), we have $P(min_{1\leq k\leq n} \|X_{nk}-x\|\geq \epsilon)\to0$ (as $n\to \infty$).
If the sample $X_n$ is obtained by taking $n$ independent samples from the $U([0,1)^d)$ distribution ('IID random sampling') then $$P(min_{1\leq k\leq n} \|X_{nk}-x\|\geq \epsilon)=\prod_{k=1}^n P(\|X_{nk}-x\|\geq \epsilon)\leq (1-v_\epsilon 2^{-d})^n \to 0$$ where $v_\epsilon$ is the volume of the $d$-dimensional ball of radius $\epsilon$. So certainly IID random sampling is asymptotically dense.
Now consider the case that the samples $X_n$ are obtained by LHS. Theorem 10.1 in these notes states that the members of the sample $X_n$ are all distributed as $U([0,1)^d)$. However, the permutations used in the definition of LHS (although independent for different dimensions) induce some dependence between the members of the sample ($X_{nk}, k\leq n$), so it is less obvious that the asymptotic density property holds.
Fix $\epsilon\gt 0$ and $x\in [0,1)^d$. Define $P_n=P(min_{1\leq k\leq n} \|X_{nk}-x\|\geq \epsilon)$. We want to show that $P_n\to 0$. To do this, we can make use of Proposition 10.3 in those notes, which is a kind of Central Limit Theorem for Latin Hypercube Sampling. Define $f:[0,1]^d\to\mathbb{R}$ by $f(z)=1$ if $z$ is in the ball of radius $\epsilon$ around $x$, $f(z)=0$ otherwise. Then Proposition 10.3 tells us that $Y_n:=\sqrt n (\hat{\mu}_{LHS}-\mu)\xrightarrow{d} N(0,\Sigma)$ where $\mu=\int_{[0,1]^d} f(z) dz$ and $\hat{\mu}_{LHS}=\frac{1}{n}\sum_{i=1}^n f(X_{ni})$.
Take $L>0$. Eventually, for large enough $n$, we will have $-\sqrt n\mu\lt -L$. So eventually we will have $P_n=P(Y_n=-\sqrt n \mu)\le P(Y_n\lt -L)$. Therefore $\limsup P_n\le \limsup P(Y_n\lt -L)=\Phi(\frac{-L}{\sqrt\Sigma})$, where $\Phi$ is the standard normal cdf. Since $L$ was arbitrary, it follows that $P_n\to 0$ as required.
This proves asymptotic density (as defined above) for both iid random sampling and LHS. Informally, this means that given any $\epsilon$ and any $x$ in the sampling space, the probability that the sample gets to within $\epsilon$ of $x$ can be made as close to 1 as you please by choosing the sample size sufficiently large. It is easy to extend the concept of asymptotic density so as to apply to finite subsets of the sample space - by applying what we already know to each point in the finite subset. More formally, this means that we can show: for any $\epsilon>0$ and any finite subset $\{x_1,...,x_m\}$ of the sample space, $min_{1\leq j\leq m} P(min_{1\leq k\leq n} \|X_{nk}-x_j\|\lt \epsilon)\to 1$ (as $n\to\infty$).
Comment: I have two questions: 1) If you just have  sample of size $n$ where $n$ is large, does that change the argument?  And 2) Latin hypercubes samples can be on any range of values (not necessarily just (0,1)) so does that also change teh answer?
Comment: Also, would you be willing to explain why for large enough $n$, we will have $-\sqrt{n}\mu$?  I assume that means that for large $n$, $\hat\mu_{LHS}$ goes to zero, because in distribution it is a $N(0,\Sigma)$?
Comment: @RustyStatistician Everything is defined in terms of finite samples i.e. $n\lt\infty$ but large. I've added some additional explanation at the end to explain what's happening. Other ranges of values can easily be accommodated ((0,1) is not special), so long as the volume of the sample space is finite.
Comment: Can you elaborate on your short answer?
Comment: @RustyStatistician The short answer is an informal summary of my long answer which, I think you'll agree, is already quite elaborate! So , as suggested above, it would be good if you could rewrite your question in more formal terms so that I know whether my attempted answer is on the right track (in terms of answering your intended question) or not.
Comment: The original question isn't mine.
Answer: I'm not sure if this is quite what you want, but here goes.
You're LHS-sampling $n$ points from $[0,1)^d$, say.  We'll argue very informally that, for any $\epsilon>0$, the expected number of empty (hyper)cuboids of size $\epsilon$ in each dimension goes to zero as $n\to\infty$.
Let $m=\lceil 2/\epsilon \rceil$ so that if we divide $[0,1)^d$ uniformly into $m^d$ tiny cuboids -- microcuboids, say -- of width $1/m$ then every width-$\epsilon$ cuboid contains at least one microcuboid.  So if we can show that the expected number of unsampled microcuboids is zero, in the limit as $n\to\infty$, then we're done.  (Note that our microcuboids are arranged on a regular grid, but the $\epsilon$-cuboids can be in any position.)
The chance of completely missing a given microcuboid with the first sample point is $1-m^{-d}$, independent of $n$, as the first set of $d$ sample coordinates (first sample point) can be chosen freely.  Given that the first few sample points have all missed that microcuboid, subsequent sample points will find it harder to miss (on average), so the chance of all $n$ points missing it is less than $(1-m^{-d})^n$.
There are $m^d$ microcuboids in $[0,1)^d$, so the expected number that are missed is bounded above by $m^d(1-m^{-d})^n$ -- because expectations add -- which is zero in the limit as $n\to\infty$.

Updates ...
(1) Here's a picture showing how, for given $\epsilon$, you can pick $m$ large enough so that an $m\times m$ grid of "microcuboids" (squares in this 2-dimensional illustration) is guaranteed to have at least one microcuboid within any $\epsilon\times\epsilon$ sized region.  I've shown two "randomly"-chosen $\epsilon\times\epsilon$ regions and have coloured-in purple the two microcuboids that they contain.

(2) Consider any particular microcuboid.  It has volume $(1/m)^d$, a fraction $m^{-d}$ of the whole space.  So the first LHS sample -- which is the only one chosen completely freely -- will miss it with probability $1-m^{-d}$.  The only important fact is that this is a fixed value (we'll let $n\to\infty$, but keep $m$ constant) that's less than $1$.
(3) Now think about the number of sample points $n>m$.  I've illustrated $n=6m$ in the picture.  LHS works in a fine mesh of these super-tiny $n^{-1}\times n^{-1}$ sized "nanocuboids" (if you will), not the larger $m^{-1}\times m^{-1}$ sized "microcuboids", but actually that's not important in the proof.  The proof only needs the slightly hand-waving statement that it gets gradually harder, on average, to keep missing a given microcuboid as you throw down more points.  So it was a probability of $1-m^{-d}$ for the first LHS point missing, but less than $(1-m^{-d})^n$ for all $n$ of them missing: that's zero in the limit as $n\to\infty$.
(4) All these epsilons are fine for a proof but aren't great for your intuition.  So here are a couple of pictures illustrating $n=10$ and $n=50$ sample points, with the largest empty rectangular area highlighted.  (The grid is the LHS sampling grid -- the "nanocuboids" referred to earlier.)  It should be "obvious" (in some vague intuitive sense) that the largest empty area will shrink to arbitrarily small size as the number of sample points $n\to\infty$.
Comment: Does this argument hold for any general interval?  Instead of $[0,1)$?
Comment: Yes, for any finite dimensions.  It should be clearer now that I've fixed the proof.
Comment: is it possible to give a 1-d or even 2-d picture of this proof?  I am pretty lost in it.
Comment: Done.  Happy to take further questions if need be.
Comment: Awesome thanks! That definitely does help now with the intuition.

Latin Hypercube Sampling Asymptotics


Ways to collect and resolve potentially conflicting feedback

Question: Lately, it seems like half my team is involved in writing reports, papers and articles about their work as opposed to doing the "actual" work. The problem is that mot of the time isn't spent in writing the first draft, it's in sending that draft to stakeholders and getting feedback on it that, while helpful, sometimes suggests taking the paper in very different directions.
It's particularly difficult when the person who will be responsible for final sign-off is fairly high up in management, so we want to avoid taking up too much of their time with multiple iterations of the same document - so the typical approach is to circulate the document around other stakeholders first, but then when we think it's ready to pass up the chain they sometimes ask for changes that pull the structure back to what it looked like before we spoke to all the other stakeholders.
This kind of thing can be very discouraging for the people involved, and it makes it much harder for us to have clear expectations of when these papers will be released and on planning our work in general.
As a team, we have had multiple discussions about strategies to mitigate this. Some of our efforts have had a level of success, but we'd still like some suggestions. I am particularly interested in whether there things that I, as a manager within the team, can do to make things easier for the staff I work with.
Things we've tried already include:
Getting feedback on the initial structure from the person doing the sign-off: This has helped, but there can still be conflicts when the other stakeholders have feedback that sounds good, but disrupts that structure.
Asking stakeholders to consolidate or coordinate their feedback: We don't have many good systems in place to enable this so it usually falls back on Word documents with "Track changes" enabled going back and forth in emails, and it's hard to book the stakeholders in for some kind of joint feedback session.
Telling stakeholders what parts we want them to give feedback on: This has worked a little, and it's good for them as well since they know where to focus if they're pressed for time.
Breaking stakeholders up into groups, and getting feedback from each group separately: Also partially successful. It makes coordinating the feedback easier, and we've been able to ask each group for feedback on individual components.
Answer: I'd suggest streamlining the process somewhat so you do less work up front.
For the reports, your first draft could be made the bare bones in terms of high-level detail and structure.  This should be fairly quick to right, and (crucially) easy for management to read.
Management (or anyone) doesn't want to read reams and reams of documentation - if anything can be done to make that initial assessment simpler and quicker, it will be welcomed.
Also, look at what feedback you had on previous drafts and pre-emptively address that feedback before it happens again.
Once you have the high-level documents approved, the detail can be added later and hopefully will also be approved.
Obviously, your team can work on the detailed parts of the documents while the high-level summaries are being approved.


How to get pixel rgb value in hadoop?

Question: I have millions of images stored in hdfs of hadoop. I want to build a index of these images. How to get pixel rgb values of these images? I am new in hadoop, the image format in hadoop is different from the original image binary format. Another problem is should I use the sequencefile in hadoop to pack the enormous images to a big file for efficiency? Many thanks.
Answer: If you have the additional storage and efficiency is important to you I would definitely go with a SequenceFile. Hadoop will handle splitting the file up for you. We ran into a case where we were extracting data from imagery file similar to what you are doing. In our case we were extracting metadata for ingestion in a discovery system so that our imagery files could be searched outside of the cluster. In this case because efficiency was not a big deal for us we just process the files individually making sure to make them not splittable. This way the other system can reach back over http to grab the source files.
Answer: I could answer the problem partially.

Another problem is should I use the sequencefile in hadoop to pack the enormous images to a big file for efficiency?

Depends on the size of the individual files. If the individual files are really big, then consolidating them might not really help and the other way also.
Check this query on SO for more details.

How to get pixel rgb value in hadoop?


Who are my Employer and Supervisor when I'm working a freelance job?

Question: I'm filling out an application that requires my last three places of employment. Most recently I've been doing freelance tutoring for a family. I've been working with the parent to handle the logistics and payment, and only working with the student on the actual tutoring. What should I put in the Employer and Supervisor slots?
Comment: When in doubt, go with whoever pays your invoices. So in this case the parent.
Comment: Do you have a business licence?
Answer:
What should I put in the Employer and Supervisor slots?

A freelancer is self-employed. Your supervisor is whoever supervises your work. That depends on the particular gig.
If the form permits, putting "Self-employed" usually communicates the situation well. If they are looking for references, the parents are the one who supervise your work. Ask them if they are willing to be references.
Answer: None. As freelancer you do not have an employer and you do not have a supervisor (which is a role that is higher than you in the employment hierarchy). You are self-employed. Put that into the application. If you mention it at all - sorry, but "tutoring for a family"... unless you apply for a very beginner job (when this is absolutely fine) this has no place on a job application, unless hit was a full time thing. And then the little question would come up how this was legal (because in most jurisdictions freelance activity requires you to actually market yourself, which sort of would mean MULTIPLE families, not one).


Is it possible to make a vampire PC?

Question: Would it be hypothetically possible to make a player character that's a vampire? I think it would make a really good backstory. By make them a vampire, I mean the whole deal, vampire powers and all. Also, it would be optimal to keep class and/or racial abilities.
Comment: Not to put too fine a point on it, did you do *any* research before asking this?
Comment: Collin - you may want to do some of your own research before asking these questions. They're attracting downvotes for showing a low amount of research effort. For example, googling "D&D 3.5e vampire character" turns up a lot of discussion on the matter, including [discussions of the Vampire template](http://www.giantitp.com/forums/showthread.php?207880-Are-Vampires-Viable-as-Player-Characters) which you don't seem to have come across either (as you're not even mentioning it). The Prestige Class question is problematic for similar reasons.
Comment: ...[Otto?](http://microartstudio.com/news_photos/9LO4I5I2YEFLDG8H.jpg)
Comment: I knew about the template. I just didn't know that when it said it could be applied to "humanoid creatures" that also meant PCs.
Answer: Yes, but it doesn't work very well
The vampire template is in the first Monster Manual, and "can be added to any humanoid or monstrous humanoid creature," granting several special abilities and drawbacks, including:

Undead type, with all the benefits and drawbacks that this entails

Blood Drain

Summoning rats, bats, or wolves, or turning into one of these or into fog

Dominate

Create Spawn

Vulnerability to sunlight, garlic, mirrors, holy symbols, or running water

Inability to enter a home uninvited

Dependency on a coffin

In addition to all of these things (and some minor bonuses and resistances and the like), the vampire template applies a Level Adjustment of +8. This means that a vampire counts as a character 8 levels higher than he or she actually is for the purposes of XP. Most importantly, it means that if your DM says your character is 8th level or lower, you cannot play a vampire at all (as any vampire counts as a minimum of 9th level).
Worse, even if you are playing in a game where you are high enough level, you have to deduct that LA from whatever level you're suppose to be, and you only get that many class levels. So if your DM tells you that the campaign starts with 10th-level characters, and you make a vampire, your vampire only actually has two levels. That means you have 1st-level spells, BAB +2 at the most, approximately 16 HP, a maximum of 5 skill ranks in any given skill, pitiful saves, and so on.
Being so far behind is basically impossible. If you fight 10th-level foes (as you might expect as a 10th-level character), you'll be killed in one blow by just about anything. You'll fail every save, be nearly useless at skill checks, be unable to hit anything, and so on.
The Level Adjustment system is simply terrible, unfortunately, and vampire is one of the worst cases.
Finally, the quirks of vampirism make it very awkward to play a vampire in a group of non-vampires. Even if they're OK with the whole undead, blood-drinking thing (or you successfully hide it), running water, homes lacking invitations, sunlight – those are all really, really common elements in the game. It's going to be very difficult to keep the game running if you have that.
Now, vampirism can work well enough in a heavily-houseruled campaign where everyone is a vampire. But then, systems more dedicated to vampirism may be better choices for that than Dungeons & Dragons.
If you really insist, though, I will recommend Lords of the Night as a really serious, concerted attempt to make playing a vampire in an otherwise non-vampiric party workable... in Pathfinder. Pathfinder and D&D 3.5 are extremely similar, so back-porting the material may work well, but I haven't personally tried to do so: my recommendation just comes from my high estimation of the author's abilities.
Comment: Yeah, LA +8 is going to drive a stake through the use of the MM vampire...besides, it's almost as if they took every vampire-limiting trope and piled it into one description.
Comment: If I remember correctly, WoD d20 had vampire powers count as feats.
Comment: In addition to the +8 ECL, I believe the vampire template can only be applied to humanoids with 5 or more HD, so the player would need at least 5 other levels to qualify.
Answer: Disclaimer: I have never actually played the following template.
As mentioned by KRyan, a full Vampire would probably be awkward, however there is another more approachable template available for Half-Vampire: the Dhampir, from Ravenloft.
A Dhampir has only LA +2, and is actually a fairly potent template (from memory, +20 to attributes, 5 free feats, ...).
In terms of play, it is close to a Vampire:

it has a number of Vampire-like special attacks and qualities (blood draining when grappling, summoning bats/rats/wolves)
but cannot use them in broad daylight or if it has not drunk humanoid blood in the last week

Furthermore a Dhampir is doomed; if it dies, it either becomes a Spawn or a Vampire (depending on its number of HDs) in a couple days, unless properly dealt with.
I would say that this template has a real Vampire feel while remaining affordable for a mainstream D&D adventure.
Answer: Since this is a hypothetical that's been effectively answered by KRyan with regards to the RAW format, I'll also toss in the additional methods of achieving an RP style vampire that you could roll without the massive drawbacks of the actual Vampire template.
From Book of Exalted Deeds - Deathless
You can easily roleplay a Deathless character as a vampire. Simply add a requirement into your backstory for the consumption of blood or energy of a certain type. Impose your own negatives for not being able to feed.
From Libris Mortis - Necropolitan
Same goes for Necropolitan as it does for Deathless.
So there are two additional options to roleplay a vampire type creature without the massive LA. The tradeoff is that you don't get a bunch of the specific vampire abilities. However I would recommend talking to your DM about homebrewing some Vampire specific feats you can make. Basically, take a look at what you're not getting from the LA template for Vampire, and then add those abilities in accordingly over the course of 8 levels in order from least powerful to most powerful. That way, the LA is taken into account and you keep up with levels like everybody else without falling horribly behind on your class.
Answer: Oddly enough, the book Libris Mortis has been mentioned and yet the Vampire Spawn Racial Class from that very book has been ignored. You want to play a Vampire with no level adjustment? Take that class at 1st level. Mind you, you will NOT be able to take any other class until you've taken all 8 levels but the difference between Vampire and Vampire Spawn isn't that large. Vampire Spawn don't get Alternate Form, Children of the Night, and an extra 5 Damage Reduction that Vampires get over Spawn. Everything else is almost negligible. Some slightly larger bonuses to skills and a couple of feats. If you're really hard set on getting that extra little bit though, talk to your DM about adding a few more levels to turn you from a Spawn to a full Vampire. But yes, it's definitely doable through the Vampire Spawn racial monster class from Libris Mortis.

Is it possible to make a vampire PC?


Is it safe to set xp_cmdshell value 1?

Question: I need to use xp_cmdshell in one of SQL job.So is it safe to reconfigure xp_cmdshell to 1 or can i set value 1 in the starting of SQL statements and set it back to 0 in the end of SQL Statement ?
Comment: [xp_cmdshell: should it ever be used?](http://security.stackexchange.com/q/2722/97897)
Answer: No, it is not very safe if you get untrusted input into the database (i.e. if it is on a web server or such). You basically hand the user a really dangerous tool if you have any SQL injection vulnerability. I would not run that risk on public-facing servers.
Internal servers may be another thing, but internal attacks are often overlooked, so probably "we" should protect against internal attack also.
Also, if setup correctly (see https://msdn.microsoft.com/en-us//library/ms175046.aspx ) you need a proxy account and all kinds of SQL Server pereparations to use it.
I would always suggest using SSIS or SQL Server Agent to perform OS level tasks.
Answer: Without discounting anything stated in @til_b & @unclefredo answer.
I would like to say something facts about 'xp_cmdshell'. Before enable the 'xp_cmdshell' you must know the some facts about xp_cmdshell.
The facts with xp_cmdshell on SQL Server 2005 or newer, including SQL Server 2016.

xp_cmdshell is disabled by default on install.
Only those users with sysadmin (sa) permissions can use it.
Only those users with sysadmin (sa) permissions can enable it for use, or disable it.
Those users with sysadmin (sa) permissions can do so much other damage (if they wanted to) like DROP DATABASE, even if xp_cmdshell is
  not enabled.

"xp_cmdshell" is an extended stored procedure provided by Microsoft and stored in the master database.This procedure allows you to issue operating system commands directly to the Windows command shell via T-SQL code.
NB:- If you want to execute this extended stored procedure, you will either need to be a member of the sysadmin role, or have the xp_sqlagent_proxy_account set up on your SQL Server.
How you turn xp_cmdshell on.
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1;
RECONFIGURE;

How you turn xp_cmdshell off.
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 0;

For Example :  how you use xp_cmdshell:
EXEC xp_cmdshell 'dir c:\';
RECONFIGURE;

Definitely, There is some Pros and cons to use the 'xp_cmdshell'.
Pros
1.If xp_cmdshell is being called by a member of the sysadmin role, it is going to execute in the context of the SQL Server service account.
So what ever the service account SQL Server is running under, a member
of the sysadmin role can execute as through the use of xp_cmdshell. So
if DBAs don't normally have administrative rights on a server, but SQL
Server is running under a service account that does, then through the
use of xp_cmdshell they have effectively escalated their rights to be
at that level. By the way, this also means any processes which run
under an account that is a member of the sysadmin role, such as a SQL
Server Agent job owned by sa, runs at this level, too.

2.On the surface being able to run this extended stored procedure does not seem like much, but if the MSSQLSERVER service account has
local administration rights then you can use this extended stored
procedure to perform any windows operating system command. Therefore,
under this circumstance the xp_cmdshell can create quite a security
hole.

Cons
1. When you use the extended stored procedure xp_cmdshell it runs
    commands in the background. Because of this, xp_cmdshell "MUST NOT"
    be used to run programs that require user input. If you try to
    execute a program that requires user input, the xp_cmdshell process
    will hang. The process hangs because the program is waiting for user
    input, but xp_cmdshell will never display the user interface to
    allow the user to enter data.

 2. At the very least, an attacker could use xp_cmdshell to shut down
    key services and processes on the server (especially if coupled with
    something like pskill) rendering the operating system in an unstable
    state where it forces itself to reboot.

For Your Further Ref: - Here And Here
Comment: 2.Only those users with sysadmin (sa) permissions can use it.
 sysadmin can use it without doing enable ??
Answer: Agree with til_b on this. However, if you have to do make sure you minimize the attack area by only having it switched on when you need it and as highlighted, you'll need to set up a proxy.
I would say this though - if you're having to use xp_cmdshell, it may be that whatever you're trying to do isn't best placed to be in the database tier.

Is it safe to set xp_cmdshell value 1?


Is Kali Linux 2.0 Fully Open Source?

Question: i am wondering is kali linux 2.0 fully open source? What i mean by that what software and parts of kali linux 2.0 is closed-source? In kali linux official documentation (http://docs.kali.org/policy/kali-linux-open-source-policy) it says "Kali Linux's non-free section contains several tools which are not open source." What are those tools and are they still here in kali linux 2.0?
Comment: "If you want more information about the license of any given piece of software, you can either check debian/copyright in the source package or /usr/share/doc/package/copyright for a package that you have already installed."  (http://docs.kali.org/policy/kali-linux-open-source-policy)
Comment: i dont want to check a certain package there are to many in kali inux
Answer: Kali, like Debian, is fully open source. However, there are many closed source tools which might be of great interest to the Kali user and, as such, they have been made available through the non-free repo. If you don't want any closed source software on your Kali distro, disable that repo.
If you are just a Kali user, then having closed source software on your machine shouldn't be a problem. The issues arise if you want to build a Kali derivative and distribute it; in this case, you must be fully aware of the restrictions in redistributing each piece of closed source software.
Comment: I disagree that having "closed source" software is not a problem. Proprietary software is always problematic.
Comment: I am a big fan of Linux and Open Source, but when there aren't other alternatives, using closed-source software is fine for most users. Of course there are cases in which closed-source must be avoided at all costs, but it doesn't seem the case of the OP here. (At least, the OP didn't explicitly mention that.)
Answer: Short answer: Kali Linux is fully "Open Source".
Long answer: Since Kali contains "non-free" repos it is likely not considered "Free Software".
Non-free repos:
    http://http.kali.org/dists/kali-current/non-free/binary-amd64/
The FSF doesn't consider a given distribution "Free Software" if it provides non-free software, even in repositories. Kali does fit the Open Source Initiative's definition of "Open Source" however: http://opensource.org/, at least that is my reading.
By looking at the date of the "Packages" file in the above URL I assume that yes, those packages are in the latest version of Kali. If you want to know what those tools are you can read the Packages list directly since it provides a description of the files. You're likely to find firmware and data packages that are not released under an approved OSI or FSF license.
Comment: "Kali Linux's non-free section contains several tools which are `NOT open source`" https://www.kali.org/docs/policy/kali-linux-open-source-policy/

Is Kali Linux 2.0 Fully Open Source?


Where does Windows 7 store bluetooth phone contacts and calendar data?

Question: Windows 7 has feature can help you connect mobile phone via bluetooth. I wonder where Windows 7 stores bluetooth phone contacts and calendar data as I could not find it in documents location ?
Answer: I havent done this personally, but its saved in a folder named after the bluetooth device it was connected to.
So you could do a search for that device name
SOURCE
Answer: in my case : (Lenovo thinkpad W7 pro)
the backup data are stored in :
<code>C:\Users\*usuername*\AppData\Local\Broadcom\Bluetooth Software\BluetoothDeviceBackups
</code>