how to use Stanford NLP (or other packages) to train my own coref (coreference resolution) model?

Question: I have texts similar to this: "This research was conducted as part of the Work, Family and Health Network (www.WorkFamilyHealthNetwork.org), which is funded by a cooperative agreement through the National Institutes of Health and the Centers for Disease Control and Prevention: Eunice Kennedy Shriver National Institute of Child Health and Human Development (Grant # U01HD051217, U01HD051218, U01HD051256, U01HD051276), National Institute on Aging (Grant # U01AG027669), Office of Behavioral and Science Sciences Research, and National Institute for Occupational Safety and Health (Grant # U01OH008788, U01HD059773)." I need to connect the funder with their grant number, e.g.: National Institutes of Health and the Centers for Disease Control and Prevention: Eunice Kennedy Shriver National Institute of Child Health and Human Development -- U01HD051217, U01HD051218, U01HD051256, U01HD051276         National Institute on Aging -- U01AG027669 . I am thinking this as a coreference resolution problem and trying to train my own model. Any idea how I can do this? I tried to follow the instructions from here (https://stanfordnlp.github.io/CoreNLP/coref.html#training-new-models), but since they use the C0NLL dataset, I don't see how exactly I could convert my own data into their format. Anybody help please?
Answer: java -cp "*" -Xmx4g edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,lemma,ner -file input.txt -outputFormat conll
Above will give you the conll format data
Then you can get xml for coref and merge with the conll to get complete data


Mail.app slow to include new messages

Question: With Leopard I was able to link to the University's Exchange 2003 server with and IMAP connection and mail out directly vie the SMTP client. With Snow Leopard I attempted to update to a full Exchange service (Exchange 2007). Almost all has worked OK (ical, address, etc.) except that new mail posted to my email account, which is visible using a 'web' interface to Exchange remains invisible for some random number of hours. Those who are running the Exchange server have no interest in discussing the problem.
Has anyone else had a similar experience?
Answer: This is happening to me as well.  However, it only happens on my iMac which has Entourage 2008 installed.  It never happens on my MacBook which only has Mail.app.  Not sure if there is a connection
Answer: This (or something quite similar) happens to me as well. In my experience, the "sync" mechanism employed by mail.app gets caught up. You can see it happen if you hit Command-0 to view activity. The app gets caught up in the process of retrieving information and then just hangs.
Restarting the program repeatedly seems to work... it gets the messages bit by bit. Not that that's a long-term solution.
I also used Entourage before the problem. My mailbox is fairly big (over 3GB) and that caused huge problems for Entourage (data file over 100GB), so I switched.

Mail.app slow to include new messages


Can the Wizard's "Spell Blending" Arcane Thesis be used to convert spell slots of one tradition to another?

Question: For example, if a Wizard takes Cleric Multiclass Archetype feats to gain Cleric spell slots, can he use the Spell Blending Arcane Thesis to transform the Cleric spell slots into Wizard spell slots of a higher level? Conversely, can he transform his Wizard spell slots into Cleric spell slots of a higher level?
Answer: Strict RAW, the Spell Blending ability applies to all spellcasting a character has.
That is to say, you would be able to convert Cleric spell slots to higher level Cleric spell slots (that you have access to) or Wizard spell slots and vice-versa. The ability is somewhat vague in it's description, but everywhere else in the PHB is pretty explicit. The relevant text

When you make your daily preparations, you can trade two spell slots of the same level for a bonus spell slot of up to 2 levels higher than the traded spell slots. You can exchange as many spell slots as you have available.

does not restrict you to "Wizard spell preparation" or "two Arcane spell slots... bonus Arcane spell slot" or anything of the like. As an example of explicit test, just look at the next Arcane Thesis, Spell Substitution (PHB p. 206)

You can spend 10 minutes to empty one of your prepared spell slots and prepare a different spell from your spellbook in its place.

Sidenote: regardless of which spell slots you gain/lose, you are still restricted by the other portion of the Spell Blending feature

Bonus spell slots must be of a level you can normally cast, and each bonus spell slot must be of a different spell level.

So you could not gain more advanced Cleric spellcasting than normally available, nor gain a 3rd level Wizard and a 3rd level Cleric spell on the same day.

Make sure to check with your GM. There is a portion of the Class Features description itself that some GM's will interpret that specialized class features are intended to work only for their class, and others may not feel like it fits Lore that you would be able to Blend the different traditions. The flavor text of Spell Blending supports this use of the ability, though.
From the Class Features section:

All classes include the class features detailed below, and each class also gets special class features specific to it.

And the Spell Blending "it was intended to work" text

You theorize that spell slots are a shorthand for an underlying energy that powers all spellcasting


How to add database layer in core data application

Question: I am fairly new to core data technology and i searched a lot on how to add the database to a core data application.so can anybody guide me on how to integrate the database layer? i have seen the iphone tutorial on core data (i.e books example) but i am not able to understand how to .sqlite file has been included in that application
Answer: The SQLLite file is automatically generated at startup by core data, by the persistent store manager.
If you have a project generated to start with Core Data, look in the App Delegate at the persistentStoreCoordinator method - that's where it manages the file created and sets the path where it will exist.  If there's an existing one it will make use of it, though you'd have to copy over a pre-loaded one into the writable path it sets up for the database.
Answer: Core Data is NOT a database, it is a persistent object store. You have no control over how the data is stored in the file. (So trying to get it to use your own designed database is a bad idea.) You only get to chose wether it uses XML, binary or sqlite as its backstore.
To see how your app gets the data from the file, look in the app delegate. (That is where most sample code put it.) You'll find some methods for the managed object context, and the persistent store coordinator. The latter will create the file if needed. Besides the save call during quit, or other relevant times, you don't have to do much with it. (You can do some stuff, but I can't recommend that when you're new to Core Data.)


Upload word document as answer

Question: This might seem as a stupid question but I would like to upload a word document as an answer to a question. I can convert the document to html and copy its contents but most of the formula disappear when pasting into the stack exchange answer box.
I dont have a website, which could refer the interested people to an URL. I do have Google Drive and a shared folder, but how can I reference this folder in the answer box.
Comment: Is there some reason you cannot type the formulae as MathJax?
Comment: FYI posting a link to a Word document would probably get deleted as not-an-answer, so even if you did have a website, I wouldn't recommend doing that.
Answer: We generally like answers to be written using the markup facilities provided so they are searchable. That's why we deprecate the posting of images containing the working. If your answer was a screengrab of the document or just a link to the document it would not be very popular.
Whenever I want to compose a long answer I generally write in Word then copy and paste into this site. However I will have already used MathJax to format equations. I'm guessing you've used the Word equation editor or something similar for equations. In that case the only option is to rewrite the equations using MathJax.
If redoing the equations is impossibly time consuming then I'm afraid the best option is not to answer at all.
A last desparate option might be to post a link to the document in the chat room and ask if anyone would be interested in converting the equations to MathJax. If it's one of the areas I'm particularly interested in (e.g. GR) then I might be willing.
Comment: I agree with this, though I would point out that we do extend some leniency on MathJax to new users who may not have heard of it before. If a new user posts unformatted formulas, someone will usually go through and help with the formatting the first few times. Of course we do expect people to learn it for themselves before too long.
Comment: Another option for editing long answers before posting is https://stackedit.io. You can edit posts in mardown, see them live, and save them to google drive and similar services. (No relation; I find it useful but don't use it that often.)
Comment: I have had a similar issue with Word.  It would be convenient if an experienced programmer developed an application that converted Word equations into MathJax equations.
Comment: @DavidWhite: on that subject [I found this post that might interest you](http://superuser.com/questions/198358/differences-between-mathtype-and-equation-editor-format-in-microsoft-word).
Comment: @JohnRennie, thanks.  I'll read your link in detail and play around with it to see if I can avoid retyping Word equations.

Upload word document as answer


Point Sampler Python Error in QGIS?

Question: I downloaded the point sampling tool for QGIS and I'm trying to run it. A few days ago it worked fine, but now it gives the following error:
An error has occured while executing Python code:

Traceback (most recent call last):
File "C:...pointsamplingtool    \doPointSamplingTool.py", line 262, in accept
<code>   self.sampling(outPath)
</code>
File "C:....pointsamplingtool\doPointSamplingTool.py", line 315, in sampling
<code>   if pointGeom.wkbType() == QGis.WKBMultiPoint:
</code>
AttributeError: 'NoneType' object has no attribute 'wkbType'

Python version:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
QGIS version:
2.10.1-Pisa Pisa, d20c5b7
Does anybody know how to fix it?
Comment: What are your points stored as? Data type? There is something wrong with them.
Answer: I had the same I was trying to get point sample working in data extracted from CSV file and raster file
Solved by:
Saving the data from CSV file as shapefile then create the point sampling against the shapefile and the raster data and it worked fine .
hope this help u :)
Answer: This looks like a bug in the plugin. I would suggest to open an issue report. Please note that gis.se is not a bugtracker and it is unlikely that this post here will help to fix this issue.
For further possibilities to proceed, please have a look at this answer.
Comment: Thanks - was hoping that somebody else would have had the problem and know how to fix it.

Point Sampler Python Error in QGIS?


How can i get my adult hound dog to come when called?

Question: Ive got a bluetick coon hound, about 3.5 years old. When he was younger he would come when called pretty much all the time, he will come still if we are indoors but im forced to keep him on a leash any time i let him outside because he loves to go hunt other animals like raccoon and such. If i were to let him outside like i used to be able to do, he will not come on command anymore and will infact run away from me because he knows i will take him away from his fun by bringing him indoors with me... any help would be much appreciated by both me and my hound as i would love to let him have his fun but on my terms!
Comment: I've had mostly Border Collies - real people pleasers - who wouldn't dream of running off. But I've had a coonhound mix now for three years. He's a terrific dog, and he's much loved and appreciated, but the sad fact is he prefers rabbits to me. He will come when called (see below: I follow that excellent advice) but if he sees or smells a rabbit, all bets are off.
Answer: You've already realized the core problem:
Chasing animals is more fun than coming back to you.
As long as you are less fun and rewarding than whatever your dog is currently doing, he will ignore you. Any amount of shouting or punishment is completely irrelevant. The only thing that can tip the scale is rewards.
So you should test which kind of reward your dog likes best.

Most food oriented dogs like treats.
Most toy oriented dogs like a ball or a tug toy. But the reward is not the toy itself, but you playing with them.
Some very social dogs like a verbal praise, but it's very rare that verbal praise alone is enough for a dog. And you'll have to over exaggerate a lot to make the verbal praise really worth it.

Once you know what your dog likes best, you start recall training. Don't just call your dogs name, but always a command like "come here" as well. You can even add a gesture (like pointing at your feet) to make the command more clear. Your dog gets a reward every single time he comes to you, without exception. Rewarding him as soon as possible increases the effectiveness of the training, so start praising him as soon as he walks into your direction and give him his toy or treat as soon as he reaches you.
First start training in your home, where it's easiest for your dog. This phase of the training is to teach him that coming to you yields a better reward than in the past.
Then start training outside, while he's still on the leash. Reward him every single time.
Once that works well, you can try letting him off the leash in a safe environment like a fenced area. continue training as usual, rewarding him every single time. Here you can increase the difficulty by calling him back while he's distracted by other things or sniffing around.
This training will take several weeks to be effective. You should only let your dog off the leash if you can throw a ball or stage another distraction in the fenced area and can successfully call your dog back from that distraction. It also means that you have to take his favorite toy or treats with you on all walks because you have to reward him every time you call him back.
As soon as you stop rewarding him for his obedience, he will start ignoring you again because if he chases this raccoon, there's a 100% chance he'll have fun (even if you reprimand him later, he only sees the fun). But if he comes back to you, there's only a 50% or less chance he'll have fun. The math is easy. You want obedience, you have to pay for it in treats or play time.
Comment: @anongoodnurse Yes, that's a very valid point. Some people are also not able to train often enough with their dogs (we all have lives and they don't always follow our plans) to ever achieve pervect recall. That's why I recommend doing the training in a fenced area and testing the success of the training by distracting the dog. There's no shame in keeping your dog on a leash. But it is a shame if your dog causes harm to other animals or people or even itself (by running in front of a car) because it wasn't kept on a leash and you couldn't call it back.
Comment: I agree completely with this answer, so please know that. I'd upvote it more, for all the good points you make (like food-motivated vs. toy motivated, and really doing up the praise. Bubbly praise is really fun for many dogs.) But there are some breeds (especially scent breeds) that, no matter what the reward of coming back, will naturally take off after an interesting scent, and even trainers recommend that they not be off leash when the dog might stray pretty far. Unless you're carrying a rabbit with you, of course.
Comment: Yes, exactly! I have a coonhound mix that jumped out of an open car window after a rabbit on the opposite side of the road, with a car coming. No one was hurt, but I was thoroughly shaken. The windows only go so far down now, every time.


Is the 2 to 1 MUX universal?

Question: Is the 2 to 1 multiplexer universal? Can it create a 7 to 1 multiplexer by multiplying its logic circuit?
Answer: It is not universal by itself. Here is how you can implement the AND and OR gates using it:
(I am going to use the more conventional notation - I.e. the s for the selector, d0 for the first data input and d1 for the second)
The general function of such a MUX is
f = s'.d0 + s.d1

If s=a, d0=a and d1=b you get
f = a'.a + a.b = a.b

Which is AND function.
If s=a, d0=b and d1=a you get
f = a'.b + a.a = a'.b + a = a + b

Which is the OR function.
There is no way to implement the NOT function though. But! if you can use constants in addition, then it becomes possible:
If s=a, d0=1 and d1=0 you get
f = s'.1 + s.0 = s'

Which is the NOT function.

Is the 2 to 1 MUX universal?


How to give wheat to a hungry follower?

Question: My follower showed minus wheat, and I didn't know how to feed him. He had good strength. Eventually he died. I had plenty of wheat, but how could I have given it to him?
Answer: He was probably stuck without a path home, or at least a path that he recognized.
In the iPad version, after you tap a follower, the left button on the bottom of the screen "boosts" him (regenerates his stamina) for either free, or 1 wheat.

How to give wheat to a hungry follower?


Can there be traits which aren't possible objects of selection, e.g. beneath a "threshold of genetic noise"?

Question: Is it possible that there are traits that might not be possible objects of the selection because of highly sensitive dependence on genotypes? The context of my thought came when I was having a discussion, more philosophical/political, with someone who was asserting individual characters (e.g. being good or bad) are innate in some sense. My impression is that, to whatever extent genetic determination of observable personality is the case, it'd be a highly complex phenomenon that could depend on many genes, and such matters are very much up in the air. This led me to thinking more abstractly about whether there could be such a thing as a trait that depended on so many genes-- to make it simple, let's say the entire genome-- and depended on in in a way that made it essentially a random trait.
For example, let's say there's a trait T, and we are looking at a creature that has a genome of only three base pairs, and to make it simple let's suppose the genetic code was binary, 1s and 0s (so eight possible genomes). So 100 represented an entire genome for whatever this is. And suppose that T was completely determined by genome (or else, that probability of T was determined by genome), and that the trait T was distributed over genomes such that T={000,110,101,011} and not T={100,010,001,111}. Visually, one could picture the genomes as corners on the unit cube in three dimensions, and T has been distributed so that any two corners separated by a single edge are opposite with respect to T, or, equivalently, that any two corners that can be connected by a minimum of two edges are of the same class with respect to T.
If there is no copying error in genomes then we can have selection for T; for instance, we can have pressure that favors one of the four genomes that cause T. But suppose there is always some random genetic error when a new individual is made. Say, for instance, the third spot is always randomly 1 or 0 with probability .5, and that there's no reducing the genetic randomness below this threshold. Then it seems impossible for there to be selective pressure for or against T, for any non-random distribution on the first two digits still just moves probability around genomes that give a net 50% probability of T being instantiated or not, because in the way I've assigned T, it is statistically independent of the value of any particular (or even any two) genes.
In essence, the trait is so very sensitive to changes in genome-- changing any single gene completely changes the trait-- that whether or not it is instantiated is swings back and forth with any random genetic changes. This is reminiscent of chaos in classical mechanics; some systems are simply so sensitive to underlying conditions that they are no subject to control and prediction in the fullest sense (though that doesn't mean they have to be fully random like the thing I've made here). Just on this basis a phenomenon like this seems formally possible, but my question, as someone who doesn't actually know the field, is whether it's in fact a known or theorized phenomenon, and if so what it would be called. Do there exist, or is it possible there exist, traits that are so sensitive to changes in genome that they can't be objects of selection because they fall under some barrier of genetic "noise," or perhaps things that at least start to look like that on a spectrum? Or are genomes always more "continuous" than this, so that, for pretty much everything, a small change in genotype leads to a small change in phenotype? If that were the case for some reason, then I think what I'm describing couldn't happen.
My apologies if my question is amateurish and my use of the language isn't quite right; I've never posted here before, and I'm a mathematician who's only just beginning to go back and self-educate on chemical and biological sciences, and this was a random thought I had while brushing my teeth, and didn't have the vocabulary to successfully search for and recognize answers.
Comment: some people suggest that the entire genome does affect certain traits and these traits are still the target of selection: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5536862/
Answer: Don't want to get too down into the weeds here, I think you are making things rather complicated (thus someone else's downvote), but here are a few notes:

I would recommend looking up epistasis, which is a fundamental concept in genetics. (https://en.wikipedia.org/wiki/Epistasis). There are many ways in which a trait can be non-responsive to selection, one way is complex epistasis, which can have an effect on selection similar to what you say, in the case of (for example) sign epistasis.

Another way a trait can be not affected by selection is just not being important - if the selection coefficient (https://en.wikipedia.org/wiki/Selection_coefficient) is smaller than the inverse of the population size, selection will not work.

When I was first learning to code I made a toy model of a genotype:phenotype map here that can simulate both cases I think: https://github.com/maximilianpress/teaching_code/blob/master/EvoSim.r. It won't win any prizes but it illustrates the issue rather clearly IMO.

I would suggest reading a bit and maybe playing with the toy model to think about this more.


Are there any tricks to prevent last second losses on eBay?

Question: So you're the winning bidder all week until the last 5 seconds when someone shoots in and outbids you.  Is there anything to help prevent that from happening or is that just a fact of web auctions?
Answer: Bid the real maximum price you're willing to pay, then if you lose you don't mind because you didn't want to spend that much anyway.
As for a real answer, I don't think there's a trick beside bidding at the last second too.
Comment: @squillman eBay uses an autobid system to ensure that your current bid is only just higher than the next highest bid - it won't automatically bid up to your maximum bid unless there is another high bidder.  You should read up on how eBay works.
Comment: .. but you *do* have to be willing to spend more than everyone else is, if you want to buy the item. The only way to know if you are willing to spend more or if someone else is willing to spend more is to bid your real maximum. You don't figure out the answer to the question "who wants this the most?", Ebay's system does.
Comment: Yeah, but if I don't have to spend even as much as I'm willing to spend then I'd rather not...  I suspect you're right, just thought I'd throw it out there in case anyone's come up with something.
Answer: Those people that outbid you might be using an eBay sniper application which places bids at the closing seconds of an auction (e.g. gixen.com). You could use one of these utilities yourself.
Unfortunately, using these snipers is actually better for the bidder than using eBay's functionality (auto bidding) since you can keep your interest in the item, and the amount you are willing to pay, a secret up to the last seconds of the bid. By using eBay's feature, someone can figure out what your maximum bid is by placing a higher bid incrementally. It's unfortunate, since it makes sniping apps required to win some bids at a reasonable price.
Comment: I use SnipeSwipe for this and am very happy with it. It's a web app, so nothing to install.
Comment: I wouldn't go so far as to say sniping apps are "REQUIRED to win most bids at a reasonable price"... that's absurd! It completely depends on the market for any given item and they vary to all extremes.
Comment: I find that sniping has few downsides so even if it is not strictly required I may as well always use it. It certainly reduces the amount of "risk" you are taking on.
Comment: If eBay would change their bidding model (or allow the seller to pick an alternate) then sniping would be unnecessary. But their own interest (and generally the seller's) is of course to encourage bidding up early which means they tacitly / morally accept the consequences. Its just part of their social engineering approach.


Why is the x509 standard for certificates called "x509"? What is meaning behind "x" and/or "509"?

Question: X509 is the name of the standard which defines Public Key Infrastructure and the format of SSL/TLS Certificates. My question is:  What does x509 mean?
Answer: X.509 is a standard number/index defined by ITU-T, telecommunication and standartization commitee.
X stands for Data networks, open system communications and security standards track and every standard has a number. X.500-X.599 standards define directory services (such as DAP, LDAP, etc.). And 509 is just a number of standard in X track.
Comment: Excellent!  Thank you so much!  -- Do you by chance know why certain numbers were skipped?  (502-508, 512-517, etc)
Answer: According to Wikipedia:

X.509 was initially issued on July 3, 1988 and was begun in association with the X.500 standard.

X.500 is a series of computer networking standards covering electronic
directory services. The X.500 series was developed by the
Telecommunication Standardization Sector of the International
Telecommunications Union (ITU-T). ITU-T was formerly known as the
Consultative Committee for International Telephony and Telegraphy
(CCITT).
X.500 was approved first in 1988.[1] The directory services were
developed to support requirements of X.400 electronic mail exchange
and name lookup. The International Organization for Standardization
(ISO) was a partner in developing the standards, incorporating them
into the Open Systems Interconnection suite of protocols. ISO/IEC 9594
is the corresponding ISO identification.

X.400 is a suite of ITU-T Recommendations that defines the ITU-T
Message Handling System (MHS).

I could not find why X.400 is named X.400 though, also why X509 and not X.502.


Images in MvcContrib Grid

Question: Topic question:
If i already have helper which returns me image according with parameter (true or false)
I called it like this
and it is returns me
I was thinking to use MvcContrib but i cant use <%= %> syntax in embedded blocks
Then i find out that it is possible to do like this:
p => "img tag src=/images/Available.png/>").Named.("A").DoNotEncode();

But i want to put conditions, somth that like that:
if(item.Availible)
     column.For(p => "img tag src=/images/Available.gif").Named   ("A").DoNotEncode();
else
     column.For(p => "img tag=/images/Notavailable.gif").Named("A").DoNotEncode();

i was tried to make it like this:
column.For(p => ((item.Availible==false) ? "img tag src=/images/Notavailable.png" : "img tag=/images/Availible.png").Named("A").DoNotEncode();

but it is doesn't working properly.
is there any way of doing this?
Answer: I think this is what you're looking for:
column.For(p => p.Available(true) ? "" : "").Named("A").DoNotEncode();

Images in MvcContrib Grid


Place to save playlist in music application after exit

Question: I try to create music application and now I am in place where after exit from app I want to save somewhere my playlist to when reopen I have my songs in app.
Where application like winamp save that information ?
Answer:
You can use Isolated storage. This way is quite easy and transparent. Then you can put some sort of XML into your Isolated storage.
Or you can use some sort of in-proc database engines to store your settings. I would recommend using SQL Server Compact as it is quite natural to use it in .NET.

So you have two options. If you have little amount of information to store (playlist only), I would select Isolated Storage. And when your application grows and settings become more complicated you could switch to SQL Server Compact.
Answer: You can use the Isolated Storage API to read and write files specific to your application under the user's profile directory. You can store the playlist in a file in any format you choose; using .NET serialization would be quickest, using XML or JSON will let you arbitrarily customise the output.
Answer: Take a look at the Isolated Storage feature, see Introduction to Isolated Storage
Answer: string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MyApplication")

Answer: Winamp save the last used playlist in this directory
C:\Users\<username>\AppData\Roaming\Winamp
As for your application, I'd suggest that you use the Isolated Storage API
Answer: You could use Application settings which are stored in the user's profile folder.
Answer: I dont know how winamp does this, but you can do it in many ways. I would create a xml file, or save it in application settings like Darin Dimitrov says it. with the content i need and save it on windows close event. Open it on application start to "restore" application state.
Answer: You can save in a text file or an embedded database like SQLite.
Comment: database is an overkill for such a small amount of data


Is there actually a correlation between emotional trauma and homosexuality

Question: One of the key talking points I hear to disparage homosexuality is that it stems from "a lack of a strong male figure" or some variation of that, putting aside the obvious irrelevancy of argument. I still am curious, is there any truth to the idea that trauma is correlated with homosexuality? And if so, can someone elaborate on it ie. is it equal across both genders? Does it result in Bisexuality or Gay more often? etc
Comment: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3535560/
Answer: The widely accepted answer to this question is that homosexuality is not a choice but science has no concrete answer as to exactly why people are homosexual, heterosexual, or bisexual (or any other sexual orientations that one may identify with).
The Wikipedia page, Homosexuality, offers many great references and indicates that science has not definitive answer for what the 'cause' of homosexuality, only that it may be an interplay between generics, hormones, and environment.
Answer: No. We now know that some fathers react negatively to the gender nonconformity of their sons (i.e. their femininity) which is present and visible often from a very early age. The distant father hypothesis was discredited in the early 1980's when large studies were carried out and found most gay men came from normal backgrounds. Further, the hypothesis would have to hold up cross-culturally. In Finland, gay men rate their fathers as warmer than straight men did. This is because Finn's may react more affectionately to feminine boys than we do in the Anglo-sphere. The trauma model is useful to the religious because they can get self-hating men to put all of that guilt on their parents. Warren Throckmorton, a former gay conversion therapist, said most of the time the trauma model did not fit at all. But as conversion therapists, they told parents it was their fault and it led to some pretty awful familial disputes (even divorce) as parents quibbled over who "made their son gay".
Generally speaking, most of the evidence points towards prenatal environment such as androgen exposure. Twin studies have conclusively shown the social environment and upbringing has little to no effect on male sexual orientation. Trauma models are ridiculous but popular. All of the evidence indicates sexual orientation is determined early in development and relies heavily upon biology set in the womb. Take a look at the Fraternal Birth Order effect for example, in which antibodies from earlier pregnancies interfere with male-typical brain arrangement leaving the attraction in the default 'female' position.
Comment: You make a number of very interesting points.  So as to avoid personal opinions, are you able to provide references to the authoritative sources of the studies you cite?


is there a term besides span or interval to desribe the distance between two frets on the fret board?

Question: I'm a programmer who struggles naming his variables (go figure). Working on a guitar chord api, and already have a designation for the names 'span' and 'interval'. I'm not overly familiar with guitar terminology, and was wondering if there exists a technical term for the distance between any two frets on the fret board. If not, then I'm just going to name is 'sectionInterval' or something else that's made up.
Comment: FWIW, the Mel Bay [Glossary of Guitar Terms](https://www.melbay.com/Pages/About/Glossary_Of_Guitar_Terms.aspx) doesn't list anything.
Comment: Interval won't work well, but span would. So why not find a different label for span, and dedicate span to the distance between frets? Lateral thinking...
Answer: "Stretch"
Of course, this is really referring to what your hand does, but I've heard a "3 fret stretch" or "4 fret stretch" plenty of times in casual talk.  "It's a big/difficult stretch", etc.
This only works in the context of a single chord or consecutive notes, and maybe that's what you're already using "span" for.
A possible alternative is "reach".
Answer: I assume you mean the musical distance, not the linear measurement, since that depends on the scale length of the guitar and becomes less with each higher fret. In musical terms, each successive fret represents a "half step" or a "semitone". The terms are interchangeable.
I know you're already using interval, but I thought I'd mention that
interval is a poor choice for a variable name here. Interval has a technical meaning in music, and it requires musical context. For example, notes 3 frets apart could be said to have an interval of a minor third, but it could also be an augmented second. To know which, you'd have to look at the music. So I would advise against anything like this:
<code>Interval = 3;
</code>
(Musical interval is actually complex enough to warrant its own class within your software, assuming interval is relevant to your software. Anyone who reads your code and knows about music theory will be left in a state of confused ambiguity upon seeing such an assignment, until they understand the big picture of what your code is doing.)
As far as I'm aware, span doesn't have a technical musical definition, so there no issue using that. You could also call it fretDistance or fretSpan or anything else of that sort. Personally, I would (and have) used halfSteps or semiTones. For example, the distance from fret 3 to fret 6 is 3 semitones.
Answer: This is a thing of more relevance to instrument builders than players. Here we'd use terms such as fret spacings or fret distances or even fret-to-fret spacings for the distances between the adjacent frets, or fret positions or fret-to-nut spacings for the distances between the frets and the nut.
So I think in your API fretSpacing could be an option?


Asymptotics of the survival function for Anderson Darling distribution?

Question: I am using the ADinf procedure of Marsaglia & Marsaglia to compute the CDF of the Anderson Darling statistic. I am interested in the survival function, 1 minus the CDF, for large values of the test statistic. The implementation given by Marsaglia & Marsaglia does well up until roundoff issues creep in around $z=30$:

This is somewhat to be expected. I was wondering, however, if the asymptotics of this function are known. If so, I could just approximate the tail for $z \ge 30$. Alternatively, if there is an implementation of the CDF that gives the upper tail, I would be happy with that.
Answer: An asymptotic form for the AD distribution in
C.D. Sinclair and B.D. Spurr, Journal of the American statistical association, 83, p. 1190-1191, (1988)
Comment: In referencing this paper, the Marsaglia and Marsaglia paper (2004) states that this asymptotic expression "also suffers from lack of a method for its accurate determination."


Will someone become a disbeliever/kafir by watching shows or reading books which have elements of shirk/kufr in it's name?

Question: Assalamualaikum , If someone reads books , novels or watches anime's , shows , web series , tv serial etc which have elements of kufr or shirk in their name or in the name of a certain episode/volume will the person become a kafir or a mushrik by reading or watching them?
Answer: Becoming a kafir/disbeliever has solely to do with the intentions of that person. If you just watch it for entertainment then obviously it is not shirk. But instead if you actually believe in anything that has shirk in it, then that is surely kufr.

Prophet Muhammad (SAWW) once said "The reward of deeds depends upon
the intention and every person will get the reward according to what
he has intended." (Sahih Bukhari, Kitab-ul-Imaan, Hadith No. 53)

This hadith itself clears many misconceptions that we mostly have.


Thunderbird: answer with different color as in Outlook

Question: In thunderbird, I would like to intersperse my answers within the body of the message I am responding to, with all my new text appearing in some other color.  I only know a very tedious way of doing that.  Any suggestions?
Answer: How do I reply in-line in a new colour?

I would like to intersperse my answers within the body of the message I am responding to, with all my new text appearing in some other color

You can use the Formatting Bar.
The Quote Colors 0.3  addon allows the colour of quoted text to be configured (but this appears to be only for reading emails).

How do I change the reply colour using the Formatting Bar?

Make sure the Formatting Bar is displayed.
View > Toolbars > Formatting Bar
Click on the foreground font colour button, select a color, and press OK.
The foreground font colour button is the black area shown by the read arrow:

The selected colour will be used when you start typing your reply.

What is the Quote Colors addon?

Quote Colors is an add-on for Thunderbird and the mail & newsgroup client of SeaMonkey.
It allows you to assign text and background colors to different quote levels which are applied when reading or printing mail/news messages. Five quote levels can be configured with distinct colors.
  You can choose between two quoting display modes: graphical quoting with colored bars around quoted paragraphs (default), and traditional plain text quoting where each quoted line starts with one or more ">" characters. In graphical quoting, the color, position and style of the bars is adjustable.
Additionally, this add-on enables you to set up some basic message display options such as text, background, link and signature colors.

Source Quote Colors 0.3
Comment: I find the formatting procedure you described cumbersome for interspersing responses in a detailed email.  - -  Apparently Quot Colors is not compatible with my version of Thunderbird, 31.5.0.  (The most up-to-date version is 38.1.0 but I like to let the dust settle a little before I update.)
Comment: @aparente001 Is this addon any better [Color Text Compose Buttons 3.3.0](https://addons.mozilla.org/en-US/thunderbird/addon/color-text-compose-buttons/)?
Comment: It's one click to select a color ...
Comment: thanks for the suggestion also; I have used that on a different computer that is running an older version of Thunderbird.  But now either I'm doing something wrong or it's not compatible with this version.  I have done Customize but can't find the icon to drag.
Comment: I got it to work on the second computer.


After Live Trace in Illustrator, I can't figure out how to change some of the lines' color

Question: I auto traced an image and am trying to change the color of all the black lines and sections to brown, but some of the lines I can't change with the Paint Bucket tool (because it fills in a large section of white instead). Is there a way I can change these lines' color?  If not, what should I do differently when applying Live Trace so that such lines don't exist?
Comment: I ran into this same problem and fixed it with the edit colors option. I believe it was because I was saving the original scan in Photoshop as a bitmap. The bitmap is a black and white image and had to be converted back to CMYK.
Answer: Select the art and click the Expand button on the Control bar.
Comment: It's worth noting that my existing object, which I colored most of (i.e. in my screenshot), didn't offer me the Expand button -- maybe because I somehow left Live Trace mode(?) (re-applying Live Trace didn't help).  However, when starting over with my object (e.g. `Place` -> `Live Trace` -> click `Expand` button -> `Paint Bucket`), this works perfect. Thanks for the help!
Answer: The best way to handle auto  traced images in Illustrator is to expand them and then color the images.
I typically do the following:

Select the entire image: Choose Objects > Expand to break the image into individual pieces.
Use the Direct Selection Tool (A) to select the white chunks, delete the white
Group the remaining bits (all the colored parts)
Change the fill color for the entire image at once.
Answer: The main key is to choose "Expand" and then selecting the image by using the Direct Selection Tool (A).
You're image may also be in greyscale so change the Color options (the down arrow with the menu bars) choose CMYK or RGB.
Answer: Nothing mentioned here worked. I had to select the traced object and do Edit -> Edit Colors -> Convert to CMYK
After that I got rid of the greyscale color limitation and could choose CMYK-colors.
Comment: Welcome to Graphic Design SE. Can you please [edit] your answer to explain why it works?
Answer: I like the expand method described a couple of times above. But if you still want to tweak colors further after you already finished your live trace you can still easily recolor either a single section of color or all like-colored sections.
1) To pick a specific section to recolor. Just click a specific section with the direct select tool then change the color to one of your liking via the color palette tool/window.
2) To recolor all "like-colored" sections (all sections that resulted with the same live trace color) just switch to the Direct Select Tool and pick one of those areas with the color you want to change.  Then go to "Select" in the menu > "Same" > " Fill Color". Now just change the color in the color palette tool or window and you're set.


Accrued Interest on a bond

Question: If I were to price a bond on one of its coupon payment days, does that day's coupon payment gets added to the cashflows, if so, do we just discount that by 1 (same day)? ie, C1*df1 + C2*df2 + ... Should C1 be that day's coupon payment, or the next period's coupon payment?
Comment: On coupon dates, accrued interest = 0, and $C_1$ is the next coupon payment.
Comment: That coupon hits your cash account. It is gone from the bond price.
Comment: That's right. On the coupon date a new coupon cycle begins. The next coupon is (say) 182 days away. Zero days have elapsed in the current (new) coupon cycle and therefore the accrued is 0*coupon/182 = 0.
Answer: There is the concept of ex-div on stocks and bonds. This is short for ex-dividend (or ex-coupon). If you transact a bond or a stock on an ex-div date then, as the investor, you will not receive the dividend or the coupon which is imminently due to be paid, usually within a few a days or weeks. Instead, as an investor, the first coupon you will receive is the one after that.
This is why you see stock prices fall on ex-div dates since they reflect the value of the different cashflows for investors. It is also apparent in the dirty price of bonds, however most bond price charts are clean prices and already exclude the accrued interest so this is not noticeable on those charts.

Accrued Interest on a bond


Is there any International standard for representing phonemes?

Question: While for phones we use IPA but it seems that there is no equivalent for phonemes
Comment: Since every phonemic system is particular to one language or dialect, and therefore has its own unique structure, there can be no international standard.
Comment: Incidentally, [APA](https://en.m.wikipedia.org/wiki/Americanist_phonetic_notation), a strange variation in my view, is still in use internationally. Does not contribute much to your hope for a standard.
Answer: IPA is neutral as to analysis: it is used to represent sound at any level, including underlying, intermediate form, phonemic transcription and surface realization.
Comment: There is no standard way to use IPA as a phonemic system for a given language in general, but there is also no good reason for there to be one, since a single language often has multiple possible analyses which are not just "different conventions" but represent different underlying assumptions about the language. For this reason, I think a standard would be actually detrimental.
Comment: There is: if a language has a high front round vowel as a phoneme, you use *y*. If it instead has a mid front round vowel as a phoneme, you use *ø*. All transcriptional decisions are *decisions*. IPA simply tells you what the conventional letters are. So *ʃ* is IPA, and *š* is not. IPA does not do the analysis for you.
Comment: Once you decide what the constituents of a phoneme are, you can represent them more or less unambiguously. But that decision is not the notation's to make.
Answer: As @user6726 points out, IPA can be used for phonemes, and in fact is.
The IPA guidelines (at least the 1948 version) suggests that if you're using IPA for a broad transcription (and a phonemic analysis is broad), you should prefer the more familiar-looking, Roman glyph over the less familiar. So if you have a choice of <e> or <ɛ> for a phoneme, use <e>.


Show how much reputation you'e earned today/How much more you can earn

Question: A nice feature addition would be if I could see how much reputation I've earned in the "Stack Overflow" day and/or how much more reputation I can earn "today". This would be available in each user's profile somewhere and would be private knowledge to the individual.
Comment: This is easy enough to see in your Recent Activity page.  Click the envelope to bring up the page, Reputation tab, click "today".
Answer: If you go to your summary (click the envelope icon at the top of the page) then click the "today" tab you'll see how much rep you've earned today.

The reputation cap is 200, so you can figure out how much you have left to go.  (Of course you can always earn more by having answers accepted after you've reached the cap.)
Comment: No points to Stack Exchange for ease of use, eh? Thanks, now I know.
Comment: @mririgo: It probably is one click and a math op too many from a usability standpoint.  The default time frame when you click the envelope is roughly "since the last time you clicked the envelope," which arguably *is* useful, so I can see why they made it the default.
Answer: You already can see how much reputation you've earned in a day.  Click on the envelope next to your name, then Reputation/Today.  As for how much more you can earn... do some simple math, the Rep limit is 200 a day (not including accepted answers and bounty).


Will transformer operate a door bell/chime 200ft away?

Question: I want to install a doorbell with two bells and one button so it can be heard in two places. One location is within 25ft of the button. The other is about 200ft from the button. Will the transformer work from 200ft away or should I place it so it's 100ft from each bell?
Comment: Depends on the wire, but probably. You'll need to calculate voltage drop and compare to the requirements of your bell. (Not enough information provided.)
Comment: We need to know the voltage, AC or DC, and the current requirement for the doorbell for a good answer.
Answer: Not a standard door bell transformer no.  #1 A standard door bell transformer is sized to drive one chime only.  If you want a second chime you need to design a system.  I recommend you call a manufacturer of chime kits and ask for a tech rep. Broan, Nutone.  Tell him your situation. He will tell you what you need.  A standard chime transformer are 16-volts.  I have used 24-volt transformers on longer runs with success.
Comment: That or go to an electronic chime, I had one in my last home that could handle non lighted buttons at 70' with a second speaker. It was great played wesminister chimes full set front door 1\2 set at second door
Answer: You're better off dealing with the long run as a separate issue, rather than making your long runs even longer.  Remember the power has to come to the button first and then split to the 2 bells, so moving the transformer halfway between means you now have a 300ft run.  Put the transformer near the button.
Heed Paul Logan's advice about overloading the transformer. But you need to do a voltage drop calculation on the long run.  For that you need to know the current drawn by the bell - the maker will know.
Pick a candidate wire size, e.g. 18 AWG. Look up that size wire resistance, 6.385 ohms per 1000 ft.  Your round trip is 400 ft, so

6.385 x 400 / 1000 = 2.554 ohms per 400 feet.

Now you have your current, I, and you plug it in to Ohm's Law.

E (voltage drop) = I R
E = your I x 2.554

Now  compare your voltage drop E with your transformer voltage.  If drop is more than about 10%, that's a big problem.  Go redo the calculations with a larger wire size.
You should know which wire sizes are unusually cheap because they ae made in mass quantity. 18AWG thermostat cable is widely used and comes in 2-conductor.  16AWG cordage might  be a value, but it's not legal for permanent building wiring.  14AWG in /2 cable is cheapest for its conductivity because it's massively produced for building wiring.
If that isn't big enough, it's time to look for a new approach, like a relay that draws a tiny amount of current and switches power from a local transformer.  The relay method would also solve Paul Logan's concerns about overloading the transformer.


Peel first, wash first, or don't peel at all vegetables?

Question: Which vegetables should be washed before peeling them? Which should be washed after peeling? Which can (and should) be eaten without peeling them? What is the logic behind this?
Comment: I'm going to say this depends on personal preference and also the specific recipe. I think that makes it too broad/opinion based for this site. For example, I like to peel my potatoes to make mashed potatoes, but almost never peel them if I'm roasting them.
Comment: @Johannes_B Please do not use comments to answer questions. This is not how they are meant to be used in SE.
Comment: Have you ever dug out some potatoes? That should give you a first clue. All packaged grocery store veggies are washed.
Comment: @Johannes_B if my mushrooms are washed, they're very badly washed - but I doubt they are
Comment: @Chris Good point, would be a bad idea to wash them.
Answer: Wash/rinse before peeling or eating the produce, especially if wanting to eat the skin (for example apples...)
It'll help reduce the risk of contaminating the flesh of the produce with residual pesticides (and other contaminants like dirt).
Some vegetables like potatoes can be rinsed after peeling to remove some of the starch, you can also rinse onions to remove some of the "raw-ness" when wanting to eat the onion raw
It depends on the final application/recipe.
Answer: Just a personal preference, nothing scientific going on in my answer. But I like to keep the skin as much as possible, so the key for me is to use a veggies brush, and I scrub them hard as I'm washing.


Facebook API domain errors documentation

Question: Anybody knows where I can find documentations of frustrating domain errors from facebook API?
Like: error domain 1000, 603, 3, 601, etc..?
I can not find exact explanations what they means. I would help to debug API requests.
Answer: Don't you love it how no body wants to answer FB Connect questions? I got a 601 and I just NSLogged out the query and found I was passing in a bad uid for something.
Answer: Here's a list of error codes that's returned by Facebook:  http://fbdevwiki.com/wiki/Error_codes


Multiple SFDC Users on one PC

Question: We are implementing Live Agent, and I am trying to simulate testing 20 or so live agents online at the same time.  To do this, I need to setup 20 different users.  From what I can see, the only options I have for this is to either use a different browser for each user - which is limited to the number of different browsers I have installed on my PC - or to use Chrome in incognito mode, which seems to limit me to one extra user.  So the question is, is there any other way to have 20 different users logged into one PC at the same time?
Comment: For quite a few $ you can run multiple browser instances at e.g. https://www.browserstack.com/pricing.
Comment: This isn't really a salesforce question at this point, but one suggestion would be to go in to Users on your computer, add a bunch of new User accounts, and then use Switch User to switch between users. Alternatively, get a VM server, and spin up 20 copies of Windows. Or, if you've got a really beefy system, install Microsoft Virtual PC, create 20 new copies of Windows, and go from there... Point is, there's no way you're going to just get 20 logins in the same org in a single OS user account.
Comment: Fox, does the SFDC session for a user stay online when you switch to another user?
Comment: @hamayoun Looks like there's some tricks I didn't know about, but to speak directly, yes, processes running on users other than the one you're currently logged in as still run. I'm not sure if a "normal" computer could handle 20 logins at once though, unless you had 16-32GB of installed memory or so. Try the browser extensions and see if those work for you.
Answer: This is a question many Salesforce consultants will face - we will need to open many Salesforce instances and many of them are under the same domain.
I would recommend using some multi-session plugins for this purpose:
multi-fox for firefox: https://addons.mozilla.org/EN-us/firefox/addon/multifox-toolbar-button/?src=search
Sessionbox for chrome: https://chrome.google.com/webstore/detail/sessionbox-free-multi-log/megbklhjamjbcafknkgmokldgolkdfig?hl=en
multi-login: https://multiloginapp.com/
I haven't used them for quite a while now and I remember the last time I worked with SessionBox and multi-login I had some small issues - which are not show stoppers though. The last time I used multi-fox I didn't have much issue.
If anybody is interested in how those plugins work underneath, here is a simple explanation: https://stackoverflow.com/questions/26519835/how-does-multi-login-extension-works
Comment: Multi-fox... what an awesome word pun!
Comment: @sfdcfox I added a link about in stackoverflow about how it works underneath. But I am not quite sure how much memory it will take though. In the maximum I have only opened up to 10 sessions in the past.
Comment: Multi-login was the best one, allowed me to test with upto 10 users.  Only caveat is that you need to use a supported browser version, and it does not seem to support the latest versions of Chrome/FF.  So I had to install an old version of FF, and then switch off auto update.  Thanks Lance!
Comment: for me, multiple browsers + private/incognito browsing, which doubles things (2 for safari, 2 for firefox, 2 for chrome), layering with the above solutions could multiply how many you get
Comment: Lance - the multifox link is broken
Comment: @cropredy Thank you for the reminder. I have updated the link.

Multiple SFDC Users on one PC


Magento 2.3.2 widgets on home page showing twice

Question: I am using magento 2.3.2 with zemez theme. I added 8 widgets including slider, featured products and featured brands.
Widgets were showing fine on admin and frontend when checked a month ago. Today when I checked again there weren't any widgets on backend but showing all 8 widgets on frontend. So I imported widgets database tables from a backup and they started showing on backend too.
But the issue I am facing now is that all widgets are showing twice (i.e. 16 widgets) on frontend but on backend 8 widgets.
Seems to be a cache issue. So I Removed var folder and ran all commands but issue is still there
Answer: Check the database table cms_block. It seems that you've created new entries for your widgets.


Why can't I enable motion blur on certain pre-comps in After Effects?

Question: I'm working on a fairly simple After Effects project where I can enable motion blur for most layers, but I can't turn it on for two pre-comps and I'm not sure why. The pre-comps contain only a few shape layers and the only effects applied are some fills. Why can't I enable motion blur?
Answer: It's because you have the collapse transformations button selected on those comps - the little sun icon on each layer.

This changes the order in which after effects renders video.  There's a good explanation of it here, but it doesn't go into motion blur.
Essentially, you either need to turn collapse transformations off, then apply motion blur to the one layer in your main comp, or go into your inner comp, and switch motion blur on for each layer inside it.


WWDC scholarship

Question: I submitted my WWDC Scholarship app and the first time I tried submitting it, it just logged me out. The second time it worked but my .app file was in the Xcode project, is that ok?
Answer: Do you mean your app was still located in the "Build" folder where Xcode put it, and you hadn't moved it out? I don't think the path to the app is part of the submission, and even if it is, Apple will figure it out.

WWDC scholarship


Why does Orochimaru's Laboratory have this item to hand?

Question: During episode 22, we see a test between Sarada's DNA and Karin's preserved umbilical cord. I can understand Orochimaru being the type of person to keep DNA on all his staff, but is there any symbolism, cultural significance or plot reason why in particular an umbilical cord?
Comment: I think there might be something cultural about it, it came up once in Mushi-shi once.
Comment: There are some weird rituals out there. Karin is kind of weird personality wise, still loving Sasuke even after he actively stabs her and says she is unneeded. Its not that big of a shcoker that since she helped deliver Sasuke and Sakuras Baby, that she would want some kind of memento that she was there, delivering Sasukes baby. Its probably the best thing she can get in the current situation, since she cant actually get Sasuke.
Answer: I don't think there is, my guess is that it's just a real life reference to the medical field where umbilical cords are kept, as they have stem cells that are helpful to treat some conditions.
Those cells can differentiate into different types of cells, which would give some scientific base to some actions he has done, as injecting Hashirama's cells.
Answer: That wasn't Karin's preserved umbilical cord, as Suigetsu wrongly led us to believe at first. In fact, it was the umbilical cord that belonged to Sakura and Sarada from when Sakura gave birth to Sarada, as it was explained by Karin herself in the manga "Naruto: The Seventh Hokage and the Scarlet Spring" (chapter 10)/in the anime "Boruto: Naruto Next Generations" (episode 23).
Keeping in mind that the DNA from an umbilical cord is the same as the DNA of the child, this was the reason why there was a perfect match between the DNA belonging to the umbilical cord and the DNA from the sample provided by Sarada herself.
The inclusion of the umbilical cord in the story took place mainly because there had to be something that (wrongly) made Sarada's doubts seem true for a while in order for the story to be able to move forward. Having a DNA test done in order to seemingly concretize Sarada's suspicions about her parentage for a short while and not receiving a concrete answer to any question about this subject until the very last chapter represented pretty much the only way this kind of plot could evolve.


How can we calculate the area of dense and sparse vegetation from NDVI image in QGIS?

Question: I'm trying to obtain values of area covered by dense and sparse vegetation through NDVI classification. I'm using QGIS (2.18), ERDAS 2014 and ArcMap.
Answer: It depends on what are you trying to achieve. The categories such as dense and  sparse are subject to your understanding of that area or some previous research or study conducted.
NDVI calculation provides output in range of -1 to +1 barren to greener. Each pixel in the image would be in that range. If you happen to know the intervals of the classes you mentioned in this range or take the help of this, you can classify the images accordingly, there are tons of documentation available on how to do that.


Adding Z dimension to 2D postgis table

Question: Is it possible to add a z dimension to an existing 2d postgis table for future records without having to create a new table?
Answer: Use this for changing the geometry type into POINT Z and updating existing XY points into XYZ points.
<code>ALTER TABLE d2d ALTER COLUMN geom type geometry(pointz) USING  ST_Force3D(geom);
</code>

Adding Z dimension to 2D postgis table


Is Satan the master of music?

Question: Many argue that Satan is the master of music, referencing the KJV, NKJV and others, of Ezekiel 28:13 "the workmanship of thy tabrets and of thy pipes was prepared in thee in the day that thou wast created."
However, other translations including the LXX Septuagint do not include this mention of musical instruments.
I have found no other scripture that references Satan involved with music, other than this one (possibly incorrect) addition to scripture.
Does the original text include musical instruments in this verse, and if not, why do several translations include it?
Answer: It is interesting that so many people think that Ezekiel 28:13 refers to Satan. The One Year Bible Companion says great care must be taken to read this passage with discernment. It says it is clear that Ezekiel describes this king in terms that could not apply to a mere man. Ezekiel may therefore have been condemning not only the king of Tyre, but Satan, who had motivated the king to sin. For others, this possibility is a certainty and has been elaborated on, with the ambiguous reference to pipes demonstrating that Satan was the master of music in heaven.
Looking at the context, we see that Ezekiel talks about the destruction of Ammon, Moab, Seir, Ammon, Edom and the Philistines in chapter 25, then Tyre and Sidon in chapter 26 - so the reference to Tyre is not an isolated reference. Ezekiel 27:1-26 is an expression of jealousy that Tyre had been so much more prosperous than Jerusalem, followed in 27:27-36 by the description of Tyre's downfall.  Chapter 28 continues this lament, before moving on to the city of Sidon and finally promising to gather the people of Israel for their forthcoming return to Israel (28:25-26). Ezekiel seems to have singled Tyre out because of its former prosperity, emphasised by the reference to various gems and perhaps the pipes. Some translations refer to the Hebrew נֶ֫קֶב as 'pipes' because this fits the context, although the more literal translation appears to be 'sockets' used in jewellery, or to holes or hollows.
Akio Moriya and Gohei Hata (Pentateuchal Traditions in the Late Second Temple Period, page 159) say that Ezekiel is taunting the king of Tyre in verses 13-16, noting that what appear to be allusions to the biblical story of Adam could actually be from another, parallel story that Ezekiel knew about primal man.  When we see this as a  taunt, and when we see the allusion to what may be an extra-biblical creation story, it becomes hard to sustain a secondary meaning of an allusion to Satan.
Comment: Yeah, I had read a commentary that said that there was a Tyrian tradition that their King had been in a type of "Eden" and that Ezekiel was mocking it. I couldn't locate it in my library though so I can't cite it. But that the idea that this is about the Satan or that the Satan is lord of music is very, very far off the mark based on the addressee of the taunt within Ezekiel.
Comment: @WoundedEgo If you do come across that reference, I'd love to read an extract of it. (You could post it on chat). As Moriya and Hata point out, Ezekiel's reference does not appear to be from Genesis.
Comment: Will do. I believe it was Anchor Bible Ezekiel vol 2 by Moshe Greenberg.
Comment: Thank you. Your comment, "Some translations refer to the Hebrew נֶ֫קֶב as 'pipes' because this fits the context," I don't see in the text indications of musical instruments, only gems. Although I understand v13 is difficult to translate, how does "pipes" better fit into the context than sockets?
Comment: @Chris We think of wealthy kings as enjoying music. It "fits the context" but whether more so than sockets depends on the understanding of the translator - I did not express a view on this.  Gems (also enjoyed in abundance by wealthy kings) are placed in sockets for display.

Is Satan the master of music?


no power what so ever anywhere after replacing battery fuse box & battery ground harness.and battery

Question: After fuse box on top of battery melted i replaced it also alt was replaced. i noticed the battery ground harness was very corroded so i replaced it too. i then had to buy a new battery after doing all of this,within a matter of 4 weeks car has 256,000 miles i installed the battery and get in to start car and no power to anything!i am at a loss on what to check next. the car is a 2004 vw 2.0L jetta wagon.
Comment: if your fuse box melted, you need to check your entire wiring loom - it's a sign something went badly wrong...
Comment: i am getting power to fuse box but no power to dash,ignition,anything inside no lights nadda
Answer: Make sure there is no corrosion in side the positive and negative wires, there should be no bumps or warped looking rubber around them, if there is then split the rubber and clean it out further and electrical tape it back up.
Id check fuses under the steering wheel as well. Get a fuse light tester and turn ignition on and see if anything turns that light on.
If not then maybe take it to a professional to have a look at it because  you might have short and thats difficult to find.


Why can't I merge DEM rasters in QGIS 3.10?

Question: I recently downloaded QGIS 3.10 and am trying to merge several raster DEM .tif files via the Ratser tab > miscellaneous > merge. I tried several output data types like Float32, Int16, and Byte, and high and low compression profiles but they all yield the same error message: "The following layers were not correctly generated (insert layer name). You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm." I am not sure where to find this information or what it means. Do I need to install a plugin to run it? What can I do to make this command run successfully?
Comment: The message that contains phrase `insert layer name` seems to tell that you have not given a valid name for the output file.
Comment: I did name the layer I just didn't include the specific name in my question. Thank you for your answer though!
Comment: This issue is still not resolved. After opening Raster > Miscellaneous > Merge and then selecting the ... for Input Files, at this point, no matter what you select or do not select, the whole dialog will close and go back to the main QGIS project screen, as if nothing has happened.
Answer: May be different reasons about why you can't merge them. Most of them can be deducted from the complete error message, not just the end part.
About the end part, it is just saying that you can find that log in the Log Messages panel (View ~> Panels ~> Log Messages), generally in the Proccesing Tab. But the text in the Log tab of the processing window is the same as the text logged in the Proccesing tab of the Log Messages panel.
For instance, check this Log:
QGIS version: 3.10.3-A Coruña
QGIS code revision: 0e1f846438
Qt version: 5.11.2
GDAL version: 3.0.4
GEOS version: 3.8.0-CAPI-1.13.1
PROJ version: Rel. 6.3.1, February 10th, 2020
Processing algorithm…
Algorithm 'Merge' starting…
Input parameters:
{ 'DATA_TYPE' : 5, 'EXTRA' : '', 'INPUT' : '', 'NODATA_INPUT' : None, 'NODATA_OUTPUT' : None, 'OPTIONS' : '', 'OUTPUT' : 'TEMPORARY_OUTPUT', 'PCT' : False, 'SEPARATE' : False }

GDAL command:
python3 -m gdal_merge -ot Float32 -of GTiff -o C:/Users/Gabriel/AppData/Local/Temp/processing_7b398423d55540609fc7426a5b406a0b/processing_ef4d9c14a2ca4bf08bd09c0d1c53d5e4/0dcfa065d9f440fcb971f60d43f55e01/OUTPUT.tif --optfile C:/Users/Gabriel/AppData/Local/Temp/processing_7b398423d55540609fc7426a5b406a0b/processing_ef4d9c14a2ca4bf08bd09c0d1c53d5e4/47fa46a83f0647018e0d6704bab4c501/mergeInputFiles.txt
GDAL command output:
No input files selected.

Usage: gdal_merge.py [-o out_filename] [-of out_format] [-co NAME=VALUE]*

[-ps pixelsize_x pixelsize_y] [-tap] [-separate] [-q] [-v] [-pct]

[-ul_lr ulx uly lrx lry] [-init "value [value...]"]

[-n nodata_value] [-a_nodata output_nodata_value]

[-ot datatype] [-createonly] input_files

[--help-general]

Execution completed in 0.43 seconds
Results:
{'OUTPUT': 'C:/Users/Gabriel/AppData/Local/Temp/processing_7b398423d55540609fc7426a5b406a0b/processing_ef4d9c14a2ca4bf08bd09c0d1c53d5e4/0dcfa065d9f440fcb971f60d43f55e01/OUTPUT.tif'}

Loading resulting layers
The following layers were not correctly generated.

C:/Users/Gabriel/AppData/Local/Temp/processing_7b398423d55540609fc7426a5b406a0b/processing_ef4d9c14a2ca4bf08bd09c0d1c53d5e4/0dcfa065d9f440fcb971f60d43f55e01/OUTPUT.tif

You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

It have the same last part, but the error is described before, at:
GDAL command output:
No input files selected.

I have just opened the process and press Run without selecting any input layer ...
Comment: Thank you, I just checked the log and it came up with a message saying "No module named gdal_merge." There is a similar link on reddit: https://www.reddit.com/r/QGIS/comments/ed6fky/bug_on_a_fresh_download_of_qgis_3101_no_module/ so I know someone else is also facing the same issue. Appreciate all the help!
Answer: Have you considered creating a virtual raster of the DEM? I use this often when combining 1 sq.km tiles of LiDAR data. You can then use the virtual raster like any other raster, or save it as a new (but very large) single raster file.
To create a virtual raster go to Raster > Miscellaneous > Build Virtual Raster
Select the DEMs to be joined in 'Input Layers'.
Uncheck 'Place each input file into a separate band', as you will want the DEM to be a single band.
Check 'Allow projection difference' if your DEMs are projected in different Coordinate Reference Systems (CRS).
Choose 'Overide projection...' if you want the virtual raster projected in a specific CRS.
Choose which resampling algorithm you want – I generally use the default Nearest Neighbour.
The rest of the fields are optional.
I would recommend saving the virtual raster [file ending .vrt] to the same folder as the DEMs.
When this is executed, you will have a virtual raster file which is small, but behaves like single DEM file which you can use for geospatial analysis, 3D views, creating contours etc.
You can save this virtual raster as a single raster file if you really want, but be warned the resulting DEM raster will be very large. Right-click the virtual raster in your layers panel, choose Export, and 'Save As'.


Numeric value of the electrons drift velocity in superconductors

Question: Somebody knows the numeric value of electrons drift velocity in superconductors? How this value depends from the used superconductor material? What's about the current? Since the electrical resistance tends to zero, how many electrons can pass an area (a layer) that is occupied e.g. by 100*100 atoms?
Comment: Such value might depend on the electric field strength, doesn't it? And what means "electrical resistance tends to zero"? Also, for your record, not only electors can drift. There are other things in semiconductors (and even such rare metals as beryllium) that can do it.
Comment: @incnis mrsi: I'm more asking about is there im general a difference in electron speed between the drift velocity in a metallic wire and a superconductor.
Comment: In which conditions would you compare them? For the same current density the drift in a semiconductor will be much quicker because there are fewer carriers than in a metal. But for the same electric field strength the situation can be opposite.
Comment: The answer was always present http://physics.stackexchange.com/questions/36053/relativistic-drift-velocity-of-electrons-in-a-superconductor?rq=1
Answer: From:
Carver Mead's "Collective Electrodynamics"
Section
Magnetic Interaction of Steady Currents
1.11  Current in a Wire
Speaking of superconducting currents in a wire:

At long last, we can visualize the current distribution within the a
superconducting wire itself. Because the skin depth is so small, the
surface of the wire appears flat on that scale, and we can use the
solution for a flat surface. The current will be a maximum at the
surface of the wire, and will die off exponentially with distance
into the interior of the wire. We can appreciate the relations
involved by examining a simple example: A 10-cm-diameter loop of 0.1-
mm-diameter wire has an inductance of $4.4*10^{-7} $ henry (p. 193 in
Ref. 40). A persistent current of 1 ampere in this loop produces a
flux of $4.4*10^{-7} $ volt-second, which is $2.1*10^8$ flux quanta.
The electron wave function thus has a total phase accumulation of
$2.1*10^8$ cycles along the length of the wire, corresponding to a wave
vector $k=4.25*10^9 M^{-1} $. Due to the cyclic constraint on the wave
function, this phase accumulation is shared by all electrons in the
wire, whether or not they are carrying current.
In the region where current is flowing, the moving mass of the
electrons contributes to the total phase accumulation. The 1-ampere
current results from a current density of $6.4*10^{10} $ amperes per
square meter flowing in a thin $"skin" \approx \lambda$ thick,
just inside the surface. This current density is the result
of the $10^{28} $ electrons per cubic meter moving with a velocity of
$v \approx 20$ meters per second. The mass of the electrons moving at this
velocity contributes $mv/ \hbar=1.7*10^5 M^{-1} $ to the total wave
vector of the wave function, which is less than one part in $10^4$ of
that contributed by the vector potential. That small difference,
existing in about 1 part in $10^6$ of the cross-sectional area, is
enough to bring $k$ and $A$ into balance in the interior of the wire.

The  (p. 193 in Ref. 40) is from
Fields and Waves in Communication Electronics
by Simon Ramo, John R. Whinnery, Theodore Van Duzer
The velocity in this example is about 20 meters per second. The velocity has no dependence on the material as long as it is superconducting.


why can't I throw any more pain au chocolats?

Question: I had gotten the game save as text, so I could change my number of pain au chocolats. I saw something that said, 'wishingWellWeArePainAuChocolating=false', so I changed it to true, wondering what would happen. After that, I re-saved, and went to the wishing well, and now I can't throw any more pain au chocolats in there. I click the button and nothing happens. I know it's my fault, but I was wondering whether there's any way that I could reverse the effects, or if anyone knows what happened.
Comment: And, yes, I did try to change it back to 'false.'
Comment: Could you include a picture?
Answer: If changing it back to false didn't do anything, try once more, make sure you have the right line, and load it. If it still doesn't work, you might have to reload or restart your game.


Windows does not detect my PDA anymore

Question: I have been developing an application for my pda for several days but today something weird hit me. I worked for a few hours, i closed my laptop and when i opened it again Windows Mobile Device Center couldn't find my mobile device. I am trying for few hours and i really don't know what to reinstall to get it back. This is getting really ridiculous, please give me a hint.
I am using windows 7 64bit.
Answer: Try system restore to the last restore point if its available.
Also to se if its USB issues try to use this utility USBVIEW to uninstall it.
Comment: I reinstalled all(3) usb drivers and also reinstalled windows mobile device center(WMDC) but with no results. The only time windows detects something is when i install WMDC and it sais that the device cannot be installed.
Comment: Wonderfull...not! How about the system restore using an old restore point prior to this issue? Remember that restore point doesn't touch the files you created, only touches the system files/regedit/programs

Windows does not detect my PDA anymore


switching windows in twm with keyboard shortcuts

Question: I am using a system that runs twm and I am wondering if it is possible to switch between windows using keyboard shortcuts, as I do in gnome with Alt+Tab.
Answer: The f.warpring function is close, but you have to define a list of windows that are part of the ring, and there doesn't seem to be a way to say "all of them". This, for example, sets up Alt+Tab and Shift+Alt+Tab to cycle among xterms:
WindowRing { "XTerm" }
"Tab" = m     : all : f.warpring "next"
"Tab" = m | s : all : f.warpring "prev"

Have you tried the icon manager? It shows a 2-dimensional grid of window names and you can bind keys to up, down, left, and right in the grid. Here's a fragment of my setup:
ShowIconManager
IconManagerGeometry "320x200+0+0" 3
"h" = m | c : all : f.lefticonmgr
"j" = m | c : all : f.downiconmgr
"k" = m | c : all : f.upiconmgr
"l" = m | c : all : f.righticonmgr

Window selection using Ctrl + Alt + the vi cursor keys. Hooray for unix!
Truly the biggest thing that makes twm an improvement over window managers of the gnome generation is that all of the features I just showed you are properly documented ("properly" means "in the man page"). The configuration file is not SGML/XML-ish; it's intended to be understood by humans, and edited with an editor, not a maze of menus on top of 3 layers of configuration-abstraction-libraries.
Answer: Yes, the "Ring" needs the names of the programs which will be included in it. But, assuming all windows you have also yield an icon, you can navigate over the Icon Manager by programming keys (I use Shift, Alt or Ctrl and F9, F10 and F11 to move left, right or down and F12 to deiconize the Icon Manager if it gets iconized. This will work whether the window is iconized or not.
For stacked windows, I likewise use F5 and F6 to up or down the stack, and this works whether or not the windows are in the "Ring" or not. I have F7 and F8 to go left and right in the "Ring".
You can also hit Shift and Num Lock to turn the numeric pad into mouse movement keys, with Num Lock, / and * then acting as the left, center and right mouse buttons, and 5 to emulate a click. Turn that functionality off by hitting Shift and Num Lock again.
As to the "focus", you can make it operate like on windows (i.e. click to get focus on a window with the f.focus function. See the manpage).
You can do quite clever stuff with .xsession, .Xresources and .twmrc files in combination. On some X11 setups, the first two will be .xinitrc and .XDefaults but fill the same roles.
I've been using twm for 20 years, fast, reliable, no clutter, and supports multiple logins over a client server network (GNOME and KDE tend to dislike multiple sessions).
Answer: I don't think Twm can provide the Alt+Tab behavior where you cycle between windows by holding Alt down and pressing Tab repeatedly. There are facilities to switch between windows with the keyboard, but they're limited.
Twm applies a focus-follows-mouse policy: the focused window is the one that the mouse pointer is in. The function f.warpring navigates between a fixed set of windows, determined by the variable WindowRing. For example, the following .twmrc snippet lets you cycle among xterm windows with Alt+F2.
WindowRing { "XTerm" }
"F2" = m : all  : f.warpring "next"
"F2" = m|s : all  : f.warpring "prev"

The function f.warpto warps to a window by name.
"E" = m|s : all : f.warpto "Emacs"

There's a patch to allow f.warpring to cycle over all windows, but as far as I can tell, it hasn't been accepted by the maintainers.
You don't have to use Twm if you don't like it. It is assuredly very primitive. You can invoke a different window manager in your ~/.xinitrc or ~/.xsession. Even if there is no other window manager installed on your system, you can compile it and install it under your home directory. If your system is very resource-constrained, try Vtwm or Fvwm or Blackbox or Ratpoison or many other low-footprint window managers.
Answer: Cycling by holding Alt down and pressing Tab repeatedly may be achieved via 3rd party application: https://github.com/sagb/alttab
It works fine in twm.
Answer: ############################################################################################
######                  Alt-Tab no wildcard add applications as required              ######
############################################################################################

WindowRing
{

"abiword"
"audacity"
"claws-mail"
"dillo"
"geany"
"geeqie"
"gnumeric"
"gnucash"
"gogglesmm"
"lilyterm"
"leafpad"
"lowriter"
"localc"
"mpv"
"mumble"
"pidgin"
"ROX-Filer"
"runner"
"Seamonkey"
"spacefm"
"utox"
"xterm"

}

"Tab" =             m     : all         : f.warpring "next"
"Tab" =             m | s : all         : f.warpring "prev"

############################################################################################
######                                   Alt-Tab end                                  ######
############################################################################################

Answer: # Hold Alt and Tab cycles through windows bringing up focus
Function "winup" { f.circleup }
"Tab" = m : root|window|frame|title : f.function "winup"


How do I run small python scripts in a html website without using frameworks like flask, and django?

Question: I have 10 line python code and a third party python library that I want to use in a html website. I do not want to use a full fledged framework like django to complete the task. I want to use the following library https://github.com/nficano/pytube in my project.  Thank You looking forward for some assistance.
Comment: http://werkzeug.pocoo.org/
Answer: The most simple thing come to my mind is following.
1) You'll need to use some sort of WSGI (https://uwsgi-docs.readthedocs.io/en/latest/, for example), to serve your script as a web service.
2) You'll also need a little bit of JavaScript code to make AJAX (for example) requests to that script.


What's a good method for generating an artificial gravity field for both the exterior and interior surfaces of a hollowed asteroid?

Question: I am writing a story where the main setting is a hollowed out asteroid with an interior biosphere and an exterior city.  In this case, using centripetal force to simulate gravity would not work, because the biosphere is covering the entire interior surface, and the city is covering the exterior.  I would like some ideas for creating a true artificial gravity field that would pull the people living on this asteroid towards its shell.
Comment: What do you mean by a "true artificial gravity field."  Such a thing does not exist in real life.  It would be more helpful for you to specify what gravity-like traits are important to you, such as perhaps r^2 losses.  That would help us also identify what traits are not so important to you.  Otherwise, our options may be limited to a thin layer of neutronium in the shell, because the only know way to make gravity is mass.
Comment: @CortAmmon The shell theorem would mean that there wouldn't be any gravitational acceleration for anything inside the neutronium shell.
Comment: See also: https://worldbuilding.stackexchange.com/questions/66247/how-to-explain-earth-like-gravity-in-small-asteroids
Comment: Some of the answers to https://worldbuilding.stackexchange.com/questions/63178/gravity-on-a-hollow-non-enclosed-world are applicable here.
Comment: See ["grav plating"](https://worldbuilding.stackexchange.com/questions/56671) as on a sci-fi ship, for use inside.
Comment: Welcome to Worldbuilding, if nobody did that already! While every Stack Exchange site has its own distinct differences, Worldbuilding is "more different" in some ways. In particular, you ought not Accept an answer before waiting at least 24 hours. A full explaination can be found on [this meta post](https://worldbuilding.meta.stackexchange.com/q/5023).
Answer: Couple answers here:

centripetal forces would still work, you spin the asteroid so
that the interior is walkable (the poles wont be, but a good portion
of the interior would). You build your cities on the exterior
inverted so that floors are pointed toward space and ceilings toward
the core.
Magical gravity field emitters placed across the surface that would exert a pull on the cities built on top of it and the biosphere built below it. -this would probably be the most realistic way to achieve this if we could actually harness gravity.

But if you are shopping for a scientifically grounded way of controlling the sub-atomic force known as gravity. We still know nothing more than adding mass.
Comment: You still have problems with the inside, even if your emitters are artificial.  The force from the opposite side cancels out the one under your feet!
Comment: no, they cancel out on the inside, as I stated.  [As Cort commented earlier on the OP](https://en.wikipedia.org/wiki/Shell_theorem#Inside_a_shell), and explained again *every time* Dyson spheres come up…  You said it: pulling in all directions.  Standing inside the shell, look up—you see a nuge expanse of plating, pulling you in that direction!  It's farther away than the one right under your feet, but the inverse square exactly balances the increase in area that subtends any solid angle as it gets farther away.
Comment: No if the surface is covered with gravity emitters than it will be pulling in all directions, so it pulls the outside inwards and the inside outwards creating the desired effect.
Comment: This may not be what the OP had in mind, but I love the idea of the "upside down" city. Everyone would grow up with the thought in their subconscious that basements are deadly dangerous - if you keep going downstairs far enough, and open a door in the floor, or puncture it, it leads to deadly vacuum and an infinite fall... As if we weren't *already* hardwired to feel unease in poorly-lit cave-like basement areas.
Answer: If you imagine that we eventually succeed at a unified field theory, then we may be able to manipulate gravity as easily as we manipulate electromagnetism and electron flow.
That hand waving argument would allow for pretty much any gravitational field strength and direction you desire within limits of energy supply and ability to afford the required equipment.
Answer: Our current understanding of physics does not have a mechanism for creating artificial gravity. Any science based explanation of this effect requires a science sufficiently advanced to be indistinguishable from magic.
Call the technology something cool and skip over the explanation for how they work.


How to connect to an HTTPS WebDAV Folder on Windows 7?

Question: I'm trying to connect to an HTTPS WebDAV folder on Windows 7.  I go to a "Computer" Explorer window, right click, and click "Add a Network Location."  I follow the prompts and get "The folder you entered does not appear to be valid.  Please choose another."  It works fine on Windows XP.  How do I make this work?
Comment: Did you create a second account to answer this?
Answer: Instead of going through the GUI it said you should go to a command prompt and type in a command similar to this one:
net use * https://webdav.example.com:port/folder
It prompted me for a username and password and then mapped the drive.
I was able to access my files this way. Hope it works for you.
-Source
Comment: Should that be `net use * https://webdav.example.com:port/folder *`?  According to the docs, the second `*` means it should prompt for a password.
Answer: This works for Windows 10:
net use drive_letter: \\sitename@ssl@port/folder/subfolder password /user:userID
The @port is the port number if required. For example
net use x: \\webdav.example.edu@ssl@5050/proj/xyz correct.horse.battery.staple /user:stu

Comment: This one worked, but I also had to start a service called `WebClient`. I set it to `Automatic`, just in case.
Comment: Thanks a lot !! The best answer here. I wonder why it doesn't work with GUI...
Answer: Go to a "Computer" Explorer window, right click, and click "Add a Network Location.
In the dialog box you write like this
\\yourserverfqdn@SSL\folder

for example if your webdav URL is https://www.netshahr.com/tech  should be
\\www.netshahr.com@SSL\tech

Notes:
Don't add 'https://' at start of you address
Your SSL certificate should be added to windows store if it is self signed.
Sometimes it fails at first time but with second try it works .
Comment: Now, how does get the certificate and add it to the store?
Answer: By default, the Webclient service is not running on windows 8.1+ client. But for windows 7 client this service is running by default.
So please try to start the WebClient service on windows 8.1+ client to check if it helps.
I just got it working by doing this =)
Answer: You can also use mklink in Windows 7+
mklink /J "%appdata%\Microsoft\Windows\Network Shortcuts\RemoteResourceName" \\remoteserver.com.pl@SSL@2078\DavWWWRoot

Answer: In my case, I got it going with a combination of the answers above, so I am posting it here for future reference.
In a Windows 10:
Enable WebClient Service, and use the below command:
For context, the address used is for a webdav address in Nextcloud.
All uppercase letters should be changed accordingly
net use X: https://WEBDAV.DOMAIN.ADDRESS/remote.php/dav/files/USERNAME/  PASSWORD /user:USERNAME


Create automatic Title in SharePoint list 2013 by InfoPath

Question: hi we have a list in SharePoint 2013 and we want after create a new item in SharePoint 2013 it automatically generate a Title or Code Like HSE -1 and the number increase for each new item in SharePoint list  we don't want to use the SharePoint ID
Answer: Your question has two sub questions.

How to create Auto Increment column for SharePoint list?
How to customize the Title or Code (the auto incremented column)?

1. How to create Auto Increment Column  for SharePoint list?
Below are two possible and easy ways which you can use.
1. Calculated field
Using this we can accomplish it without doing any programing and it is a relatively simple way of doing it. By using "Calculated" column in SharePoint List we can create auto-increment field. We can accomplish this by creating a new column and choosing the column type as "Calculated (calculation based on other columns)". And in Formula field, we have to enter [ID]
In fact this will be using the values from "ID" field from SharePoint list that starts from 1.
For example, if we want to start our auto-increment column from 100, we can modify the "Formula" field of Create New column screen, we can have to enter [ID] + 99
2. Item Event Receiver
By using this strategy, users have advantage to edit the existing values, we can also avoid it by making field read-only on feature activation. Using item event receiver, on ItemAdded event, we have to find the highest value among previously added items and then save the incremented value to current newly created auto-incremental column.
In code given below, its looks up for the highest value in the existing items, and adding the incremented value to the newly added item.
<code>public override void ItemAdded(SPItemEventProperties properties)
        {
            SPWeb web = properties.OpenWeb();
            bool allowUpdates = web.AllowUnsafeUpdates; //store original value
            this.EventFiringEnabled = false;

            try
            {
                web.AllowUnsafeUpdates = true;
                /*get the current list*/
                SPList list = web.Lists[properties.ListId];
                var highestvalue = 0;
                var objQuery = new SPQuery
                                   {
                                       Query ="<OrderBy><FieldRef Name='" + ColumnName
                                       +"' Ascending='False' /></OrderBy><RowLimit>1</RowLimit>",
                                       Folder = list.RootFolder
                                   };

                SPListItemCollection colItems = list.GetItems(objQuery);
                if (colItems.Count > 0)
                {
                    highestvalue = int.Parse(colItems[0][ColumnName].ToString());
                }

                var currItem = properties.ListItem;
                currItem[ColumnName] = highestvalue + 1;
                currItem.SystemUpdate(false);

            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex.Message);
            }
            finally
            {
                this.EventFiringEnabled = true;
                web.AllowUnsafeUpdates = allowUpdates; //restore original value
            }
        }
</code>
See here for more details.
2. How to customize the Title or Code ( the auto incremented column)?
For that you can either modify the same column that incremented or create a new column. If you want to modify the same column, make your change in it while making it a calculated field to add "HSE - " with your ID.
OR
You can create a new calculated column which will add up "HSE -" with the Auto Incremented column. I'll prefer this one as the original Auto Incremented column will be separate from my customized one.
Hope that helps.


Replace a column of various strings

Question: I am doing some EDA on the PUBG data from the Kaggle competition. I would like to convert the common game modes into the standard form Solo, Duo, Squad, Flare and Crash
Here is a list of unique values:
{'flaretpp', 'crashtpp', 'squad-fpp', 'duo-fpp', 'crashfpp', 'normal-squad',
'normal-squad-fpp', 'normal-duo-fpp', 'normal-duo', 'normal-solo', 'squad',
'duo', 'solo-fpp', 'solo', 'normal-solo-fpp', 'flarefpp'}

I basically want to remove the "normal-", "-fpp", "fpp", and "tpp" substring from the values.
I have some code that works, but is very slow (There is approx 4.5M rows). I'm wondering if there is a faster/better way to do this?
for i in range(len(data['matchType'])):
    data['matchType'][i] = data['matchType'][i].replace('normal-','')
    data['matchType'][i] = data['matchType'][i].replace('-fpp','')
    data['matchType'][i] = data['matchType'][i].replace('tpp','')
    data['matchType'][i] = data['matchType'][i].replace('fpp','')

Comment: I presume you have the data in a file somewhere, so instead of loading the entire file into memory and scanning over it 4 separate times to do the replacements, I'd say iterate through the file line by line, writing to a new file and performing any changes on a line by line basis, which should reduce memory consumption.
Answer: Load your data into a Pandas Series and do it with a single command:
mymode.str.replace(r'normal-|-fpp|fpp|tpp', '')

Using your example data, that gives you:
0     flare
1     crash
2     squad
3       duo
4     crash
5     squad
6     squad
7       duo
8       duo
9      solo
10    squad
11      duo
12     solo
13     solo
14     solo
15    flare

Replace a column of various strings


iPhone - iOS4 - is there a Step-by-step guide on how to upgrade OLD Apps to new SDK?

Question: Is there a Step-by-step guide on how to upgrade OLD Apps to new SDK ?
Especially, which features from old version will not work in new one?
Creating this guide will help companies create toolkit for people who are struggling
Comment: I think it is really hard. If you want for a specific like iOS 4
Answer: There's no official step-by-step guide, there are however documents on developer.apple.com showing the API Differences between specific versions of the SDK.
Example: iOS 4.0 to iOS 4.1 API Differences
Besides reading & examining the changelogs yourself, you can always open your project with the new SDK. If I'm not mistaken will the compiler show warnings for deprecated API calls. After you have fixed these warnings and the project compiles without errors/warnings you should be all set and your app should run on the newer SDK version.
Remember that this could potentially break your app on older SDK versions.