Can I upgrade to OSX 10.9 and format my HD along the way?

Question: I want to upgrade from ML to Mavericks but I want to erase and format my HD to a single partition along the way. Is this possible?
Answer: Yes you can use disk utility to reformat the Macintosh HD partition during the installation of Mavericks, however if you want to create a new partition using disk utility the you will have to create a Mavericks install USB so you can boot from there.
You can't create a Partition when booted from the same drive hence the need to boot from a USB installer.
Creating a USB installer is as follows, Format the USB thumb drive as a Mac OS Extended (Journaled) and name the USB thumb drive Untitled
Download Mavericks from the Mac App Store,
Copy and paste this command into terminal,
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app —nointeraction
Comment: You're wrong. You can load up Internet Recovery and make any changes to the file system from that. It replaces the need for a USB installer.
Comment: Wrong about what? What part of my answer is wrong?
Comment: "You can't create a Partition when booted from the same drive hence the need to boot from a USB installer." You don't need a USB installer with Internet Recovery.
Answer: If time (and bandwidth) is not an issue, you could upgrade your current drive to 10.9 first, which would also create the 10.9 recovery partition.  Then, after booting into the 10.9 recovery partition, you could partition the drive via disk utility and then cleanly (re)install 10.9.
Comment: I'm downloading now. Then I was thinking to just install it and erase  whatever that's old. Is that what you mean?
Comment: No ... I meant to follow these instructions AFTER you've installed 10.9 for the first time:  http://support.apple.com/kb/PH14243     This will redownload the OS again, and go through the installation process a second time.  From another Apple support page (http://support.apple.com/kb/ht4718): "If you use the Recovery System stored on your startup disk to reinstall OS X, it installs the most recent version of OS X previously installed on this computer."  That's why you would need to first go through the regular 10.9 installation first.
Comment: Using Internet Recovery is a better option. It will save you a lot of time and you won't need to install OS X twice.
Comment: @cksum, As stated in the second link above, "If you use Internet Recovery to reinstall OS X, it installs the version of OS X that originally came with your computer"; not an upgraded version.
Comment: That's not true. It consults the recovery partition and takes it's cues from that. If you have Mvx installed, it will pull Mvx down. That info is consulted upon load, safe from reformat.
Comment: Ok ... assuming that's correct (and, I'm not completely convinced) can you explain how to get the 10.9 recovery partition onto the hdd without first installing 10.9 ?


Bulk insert posts is really slow and skips entries

Question: I'm writing a plugin to parse a bunch of XML files with the NewsML standard and insert them into the database as custom post type. Everything works fine and as intended, but especially at the first activation of the plugin, there are many files to import and this takes a long time. I'm talking about up to 2000 files.
The parsing process takes about 20-30 seconds which is ok for me but the whole import process takes up to 6 minutes or more and I don't think that it is the best practice to raise the execution time limit.
Sometimes my script just skips all files after the execution time limit and shows a blank page, in my last try I got an php error and sometimes it just works. (I assume it works when it does not reach the time limit).
Here is my code to import the array of entries in the database. Since I began developing wordpress plugins just 6 weeks ago I know that it's not the best code you've ever seen.
https://gist.github.com/inrebinfo/0dba270e7fa1bca60a79
So I'm looking for a solution with 2 goals:
1: Don't skip any files. I don't know how to bypass the execution time limit. (Maybe split the array and import the single parts?)
2: Speed the process up. The 20 seconds for the parsing is okay, but the insert takes way to long in my opinion.
I would be happy for any advice and tips.
Answer: A queue may be your solution.
The individual items that should be imported can be put into a queue (e.g. in a database table) which can then be worked on 1 by 1 during the WP Cron process.
See how other plug-ins handle job queues
Hope that helps.


Haskell lazy exceptions -- distinguishing between multiple exceptions?

Question: The Haskell "zlib" library wraps the C library and lazily decompresses. The "decompress" function in this library can throw exceptions only catchable in the IO monad.
The type is this:
<code>decompress :: ByteString -> ByteString
</code>
It uses the following:
<code>  foldDecompressStream L.Chunk L.Empty
    (\_code msg -> error ("Codec.Compression.Zlib: " ++ msg))
</code>
Obviously it's possible for a data stream to be corrupted, which will cause an exception to be generated.
If I need to be catching multiple exceptions due to different causes, how can I tell one exception from another, other than by trying to match on the text (which has all sorts of negatives) ? I need to recover intelligently.
Answer: The way the code looks you can't do any better than match the string.
You need to change something, maybe use foldDecopressionStream yourself?


How long can olives be left out of the refrigerator?

Question: I left a bottle of garlic stuffed olives out overnight. Are these still safe to eat?
Answer: Traditional pickles made with brine and vinegar are very hardy, and where used in the days before refrigeration to store food over many months
The secret is to only use a very clean utensil to remove a single daily portion from the main storage vessel, and otherwise keep the main storage vessel tightly closed and in a cool and dark location
With modern pickles, who knows? Read the side of the jar, if it seems to have a decent amount of salt and/or vinegar it should be just fine
If you haven't put dirty utensils or your hands in it, it will last a long time (weeks or months, depending on the ambient temperature level)
Otherwise, just keep them in the fridge :-)
Comment: Garlic can grow botulism but upon my own further reading, is more succeptable in a low-oxygen, low acidic environment such as olive oil.
Comment: @TFD-because I'm curious by nature, I dug a little more and found this very informative article on botulism.  Though I'd bet the OP's olives are OK, I feel better informed now! :-) http://www.fsis.usda.gov/FACTSheets/Clostridium_botulinum/index.asp
Comment: Since these olives are garlic-stuffed, a cited source might be more helpful.
Comment: @Kristina Lopez Why? What's special about garlic stuffed?
Comment: @Kristina Lopez Pickled olives have a pH around 4, (though some taste close to zero :-( ). Botulism is not common in all of the world, and can be in any food that has been near the ground


Where does the energy come from when a magnet moves a compass?

Question: My very limited understanding of magnetism is that it is essentially stored energy. However what I'm confused on is about the following situation: If you have a compass and you move a magnet close to it the compass will move. My question is, where is that energy coming from? Is the magnet losing some magnetism or energy related to the magnetism? And if so does that mean that a "permanent" magnet would actually lose magnetism faster if you were to bring it around things that react to magnets easily than if it were left in an area devoid of such things?
Comment: (answering in comments because I'm sure this must be a duplicate) The energy comes from whatever is moving the magnet around.
Comment: Sugar and petrol are also stored energy and it is not very specific to describe magnetism as such.
Answer: When you move a magnet near a compass, you are changing the field to
do so.   After the compass needle settles into position, moving
the magnet away takes a bit of extra force (because of the nearby
compass needle).   So, ultimately the energy source is your hand
moving the compass body, or moving the magnet.
The immediate energy source is the stored magnetic field energy, though:
a nearby magnet and an aligned compass needle has less stored
energy than a distant magnet and nonaligned compass needle.
Magnetic field energy is the square of the local field times
the local volume, summed over all space.   A compass needle
takes magnetic flux in at the near-the-magnet end
and releases it at the far-from-the-magnet end, but that
lessens the field adjacent to the needle (in field lines model,
the field lines converge into the needle, and that leaves
fewer field lines per square meter, i.e. less magnetic field,
in the space flanking that needle).
Solving magnetic field energy and force problems is the major
theme of motor and generator design.

does that mean that a "permanent" magnet would actually lose magnetism

Permanent magnets are only stable in some odd electron-orbital-overlap
materials (ferromagnetism is almost a chemical bond effect).  So,
only application of more energy can lose the magnetism of such materials (like melting an ice cube).   When one demagnetizes a non-permanent magnet, it isn't really (microscopically) nonmagnetic,
it's just randomly re-oriented patches.   External field can
be diminished by that randomness, and the rate at which this occurs is the
difference between permanent magnet "hard" ferromagnets, and "soft" ferromagnets.
Comment: Can you explain how "ferromagnetism is almost a chemical bond effect" ? In my book it is caused by iron atoms having five aligned electron spins in a half filled d-shell and getting aligned by magnetic coupling.
Comment: @my2cts a covalent bond is formed by a few atoms cooperating with each other and properly aligning the spins of their outer orbit electrons. A ferromagnet is formed by many atoms in a crystal of macroscopic scale having their electrons in specific orbits aligning their spins properly. Both are  spin -spin couplings.
Comment: @my2cts - true magnetic coupling would not put N poles of adjacent atoms' electrons together, but would put N next to S (and this can happen, it's called antiferromagnetism).    The reason those spins align instead is the  'exchange force' of identical electrons with aligned spins.   Itinerant model magnetism is related to metallic (covalent) bonding.
Comment: @hyportnex The spins are aligned by Pauli exchange., so indeed not by magnetic coupling.


Do I have to have the Legend of Zelda BotW DLC to keep the master sword on full energy?

Question: Do I have to have The Legend of Zelda: Breath of the Wild DLC to keep the master sword on full energy? Because I have to keep going back and reclaiming it over and over again.
Comment: What do you mean by "going back and reclaiming it over and over again"?  With or without the DLC, the Master Sword can't leave your inventory, and though it can run out of energy, it's restored several minutes later.
Answer: As part of The Master Trials DLC, there is a quest called Ex Trial of the Sword.  After completing this quest, the Master Sword will retain is powered up state.
The DLC Wiki page states:

EX Trial of the Sword allows Link to increase the Master Sword's power; after the Trial of the Sword, the Sword will permanently retain its powered-up state with 60 Attack and 188 Durability.

Thus it sounds like you do need this DLC and you also need to complete some quests.
Answer: When you draw the master sword, it permanently gives you the Master Sword, which has its own slot.
When it runs out of durability, the message "The Master Sword has run out of energy" displays, and you have to wait ten minutes for it to recharge so you can use it again.
It starts at 30 damage and in the presence of a guardian or boss (not a mini-boss), or when you're in Hyrule Castle, it starts glowing, its attack power rises to 60 and its durability increases.
When you get 'The Master Trials', the first of two DLCs for BotW, you unlock the quest EX Trial of the Sword, which allows you to permanently upgrade the Master Sword in 10-damage increments by completing the Master Trials.
You access these trials from the pedestal in the Lost Woods where you draw the sword. Note that you can't do these trials when the master sword is out of energy. The trials are split into three segments, which can be taken on one at a time. Each segment takes away all of Link's equipment except for Key Items. This includes the Master Sword. You have to defeat every enemy in each room to progress, and the challenges aren't easy. It's like Eventide Island all over again. Make sure you have remote bombs + before starting this challenge. Also, note that you can take in a 30-minute attack buff as well as golden health and stamina.
I can't think of any reason why you would lose the master sword, unless you used some kind of glitch to drop it.


How to run a (java) application at boot time on RaspberryrPi B+?

Question: How do I instruct rPi B+ to run java application at  boot time in ArchLinux, I mean, where do I add java -jar octopus.jar to execute at boot time?
Answer: Find a good overview as how to autostart scripts or services at the Archlinux Wiki. A convenient way for simple testing is the use of cron. Edit crontab by crontab -e and use the alias @reboot to schedule a task to be started after reboot. Use full paths for you executables though.
Another typical way is to utilize the systemd default init framework that allows services to be enabled using the systemctl command.
Answer: I solved the problem by using this tutorial.
To summarize it, here are the necessary steps:

Create the file for startup service: vi /etc/systemd/system/myservice.service
Fill the created file with the information needed to run AND install your service:

[Unit]
Description=myservice custom script

[Install]
WantedBy=multi-user.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/path_to_custom_scripts/myservice_startup_script.sh

Save the file
Edit and save the script file /path_to_custom_scripts/myservice_startup_script.sh
Install the service: systemctl enable myservice.service
Check state of the service: systemctl is-enabled myservcice.service

If the service is running, then the service script has been edited without errors and voila, that's it!
Comment: Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
Comment: You can edit your own answer to include what you learned, how you used it and what seemed important to you. The answer will be improved and the people that downvoted might revoke that vote too.
Comment: @MarkoFrelih On behalf of the community, thank you for sharing your experience :-) I'm sure that will help other people.
Comment: First it is not my opinion, but rather a standard set for all of the stackexxchange sites. The rational behind it is to avoid link rot, and keep answers useful despite what may happen to the linked resource. Each down vote counts as -1 so if you see a big drop it is not one person's opinion, but rather the community. If you do as @Ghanima suggested and improve the answer I will remove my down vote - simply add a comment with an @ before my username and I will see it.


State-space model with strict positive values

Question: I've got a random process of positive observations. I've built a state space model (following an ARMA(1,3) structure), found the parameters that fit the process observations through log-likelihood maximization, and after simulating the obtained model I've seen that negative values occur. I really don't have any idea on how to correct these results. Is it that some type of lower bound must be formulated at the stage of parameter estimation?
Answer: If you require strictly positive values, then an untransformed ARMA may be inappropriate. One option is to transform the observations using, for example, the logarithm which would guarantee your response variable never goes negative. But this assumes that the model is at least approximately linear in log space. This can give very poor performance in predictive settings. Another option is to utilize a nonnegative distribution of errors, for example Gamma. Here is a comprehensive description of such a state space model, replete with the details of likelihood inference.


Is there any objective way to describe ethnicity?

Question: Is there any objective way to describe ethnicity that does not rely on arbitrary sociocultural concepts like referring to racial constructs, modern nations like "Spanish", or even continents like "European", but instead just directly describes what traits/genes you have (skin color, facial structure, etc.)?
Comment: Please define ethnicity as you understand this relatively recent term, and explain how it differs from the term race, and is not a "socio-cultural concept" too. Examples are really needed if one is to attempt a biological (I assume this is what you mean by "objective") definition.
Comment: Ethnicity *is* a sociocultural concept. A description of ethnicity without sociocultural concepts wouldn't be *objective*, it would be *wrong*.
Comment: Ethnicity is a spectrum, with phenotypic stereotypes and with legacy sub-species based on geographical boundaries, which are unacceptable to call subspecies because humans are not animals, sidespecies would work better, although even then... Before 1000 years ago, there were thousands of tribes in relative geographical isolation, even in Europe, and Africa, which didn't have major mixing with other tribes enough to make them similar, for example the Mbuti pygmies of the Congo Rainforest, previous to agriculture booms, almost the entire world was highly differentiated in that sense.
Answer: UN 1950 Declaration
As defined by the UN in 1950, 'race' refers to a biological concept while 'ethnicity' refers to a sociological concept. The same declaration said that the way people used the word 'race' was so out of line with biology facts, it would be better to stop using the word entirely:

To most people, a race is any group of people whom they choose to describe as a race. Thus, many national, religious, geographic, linguistic or cultural groups have, in such loose usage, been called "race", when obviously Americans are not a race, nor are Englishmen, nor Frenchmen, nor any other national group... Because serious errors of this kind are habitually committed when the term "race" is used in popular parlance, it would be better when speaking of human races to drop the term "race" altogether and speak of ethnic groups. [Italics in the original]

Even that document is wrong however, in that it still proposes a definition of race could be rigorously defined, but we now know that is untrue.
Phenotypes
A phenotypic definition of race would determine if people were part of the same race using expressed traits. This basically amounts to phrenology, or the methods of phrenology applied to other traits, most notably skin color and intelligence. Even by 1950 most of these traits were shown to result from environment (e.g. nutrition, education) and not something inherent.
Genealogy
A genealogical definition of race would determine if people were part of the same race using family trees. In 2004 Nature published a study showing that the most recent common ancestor for all living human (the most recent person to shows up in every family tree) was probably from Eastern Asia and lived in ~50 AD. It further showed that the identical ancestors point, beyond which the family tree of everyone alive becomes identical, is ~2,100 BC. As the authors put it, "no matter the languages we speak or the colour of our skin, we share ancestors who planted rice on the banks of the Yangtze, who first domesticated horses on the steppes of the Ukraine, who hunted giant sloths in the forests of North and South America, and who laboured to build the Great Pyramid of Khufu."
Genetics
A genetic definition of race would determine if people were part of the same race using genetic similarities. The problem with this is that Africans are so much more genetically diverse than anyone else. One 2002 study even found the Africans have more in common with Eurasians than with each other. There has actually been a recent push to stop using race as a factor in genetic studies.
How should we understand race
The Stanford Encyclopedia of Philosophy as an article on race, which is a good place to start although it can get a little technical. It also has the section 'Race verses Ethnicity', which you would probably find interesting. Another interesting resource is The Price of Whiteness by Eric Goldstein, which describes how whether Jews were considered part of the White race changed in American multiple times, but always to the benefit of the upper classes.
Answer: Race and Ethnicity are not biological traits. They are both inherently sociocultural concepts. They often have biological components associated with them, and sometimes (not always) those biological features help to define a person's race or ethnicity (more commonly with race). But they always have a social/cultural component. And to be clear, if someone is of European or African decent, that is an objective statement about them, even if it's not the most descriptive biologically.
The more objective biological traits can always be studied or talked about in isolation, and then related back to the non-biological components based on their frequency or infrequency in those populations. This is common in public health research. For example, you could talk about specific allelic signatures that occur more commonly in members of the Greek diaspora, or the frequency of sickle cell disease in people whose ancestors came from sub-Saharan Africa.
My primary source is the cultural anthropologist that I'm marrying in a few months. When we met, she taught a university course on the subject of Race, Ethnicity, and Biology, so we had this discussion many times early on. This natgeo article also does a fair job of explaining it in general terms.
Comment: How can you answer a question in a scientific manner if you do not define the term that you are discussing? Citing an acquaintance as evidence compounds the unsatisfactory nature of this answer. Other defects are misinterpreting the question as about "biological traits" — a term that the poster does not use. Until the poster gives examples of what he means by ethnicity, it is better to ignore the question.
Comment: @David Thanks for your very useful feedback. If you think the question should be ignored due to incompleteness, you should vote to close and explain why in a comment so that others may be convinced to do the same.
Comment: I commented to the poster with a request for specific clarification, as is one of the stated purposes of comments. It is only when that is not forthcoming that I vote/ have voted to close, choosing as the reason "lacks detail or clarity" which requires no further comment on my part. As you had answered the question I felt it appropriate to point out that you too were discussing something without defining it, and that I felt your answer unsatisfactory for that reason. Again, I was asking for clarification but from you, and may downvote / may have downvoted on that basis.
Answer: Describing ethnicity can be a complex and multifaceted topic. It often involves elements such as cultural practices, language, religion, shared history, ancestry, and sometimes geographical or national origins. While ethnicity can include objective elements like genetic markers or historical data, it's often self-identified or identified by others based on a mix of subjective and objective criteria. There isn't a universally accepted objective method to describe ethnicity because it encompasses a wide range of factors that can vary in significance and interpretation across different contexts and societies.
Comment: ethnic classifications based on "objective" genetic data are themselves subjective. there are a lot of subjective decisions that go into how you do that work.
Comment: Like the poster, you do not define or give examples of what is meant by ethnicity, so  your post is futile. Please finish the [Tour] and the Help on answering questions. Your answer is just an expression of opinion with no evidence in its support. This is not appropriate for this scientific question and answer site.


Is it possible to build a bicycle with magnets that somehow will ease required muscle power?

Question: Sometimes, when I have magnets in my hands, I think - maybe it is possible to integrate this magnets into wheels or chain and move using their passive energy, without muscles at all?
Comment: First law of Thermodynamics, read it.
Comment: Yes. They are called e-bikes. The magnets are part of the electric motor.
Comment: This question is most likely a trolling attempt. At best it belongs to physics SE or Reddit's eli5
Comment: Some commenters think it's possible to build an electromagnet-based motor mounted in the rear wheel. The thing is that this would require power input. @mattnz's reference to the First Law of Thermodynamics is instructive: if you had a motor that didn't require power input, you have a perpetual motion machine. This isn't possible. If you can show otherwise, you would most likely win the Nobel Prize.
Comment: "Lisa!  In this house we obey the laws of thermodynamics!"
Answer: This question is a variation on perpetual motion - "motion of bodies that continues indefinitely"
According to the wiki article:

A perpetual motion machine of the first kind produces work without the input of energy. It thus violates the first law of thermodynamics: the law of conservation of energy.

In the case of the original post magnets in some arrangement would create movement - work - without muscles, energy.
There is a nice section in the wiki article that talks about the allure of using magnets for perpetual motion machines.

The seemingly mysterious ability of magnets to influence motion at a distance without any apparent energy source has long appealed to inventors.

Bottom line, unless you find a way around the first law of thermodynamics it can't be done.
But it might be worth trying as a learning experience.
Answer: No.  Permanent magnets can generate force but not energy.  For energy, you need batteries, fuel, solar cells, or a hill.  In theory you could press two permanent magnets very close together before your ride, storing energy, and release it during the ride to drive the bike.  The amount of energy you can store that way is tiny and taking it out as high force, low motion is hard.
Answer: Mechanical Doping is a thing. My understanding is you have a small magnet in the rear rim and a device in the downtube that turns on and off a magnetic field as the magnet spins around. For that matter, any electric motor is essentially using a magnetic field to generate torque. This obviously isn't really passive, but it is propelling the bicycle without muscle power. There are still thermodynamic limitations on any system.


Are charges always uniformly distributed on conductors?

Question: As the title says. For example, if I take a fat metal wire with non-negligible thickness, and then wind it into a spiral, but such that none of the parts touch one another (there are no topological 'holes'), then if I add a charge to the wire, would it equally distribute over the wire? Or would the charges from neighboring 'loops' of the spiral interact with one another somehow, similar to a capacitor almost?
Comment: The electric field of - for example a charged needle - is on the tip of a needle stronger as in the other areas
Comment: Do you mean that you place some charge $q$ ,not a unit charge, on the wire?
Answer: It is the electrostatic conditions that are more fundamental than determining the charge distributions, namely, that the field has to be inside a conductor, otherwise, the charges will be flowing and there won't be any electrostatics to study.
So, if you leave the conducting wire alone, it will come to electrostatic conditions and whatever will be the charge distribution that could match that would be the one that'll be present.
It just turns out that when you study simple conductor systems like one spherical conductor, it is so that the electrostatic condition is achieved when there is uniform distribution.
So, finally the answer to your question is that yes other loops will definitely interfere.
Also, these are all ideal cases, every conductor's molecules and atoms and atoms have some bonding energy which the electric field has to always overcome, so no perfect conductor will have absolutely 0 elecrtic field inside, but yes, to a great extent they can be approximated. So, you can define a conductor by a material whose binding energy of electrons is less(depending on your tolerance of error) and can approximate it using ideal conductor which are an extremal mathematical model following Maxwell's equations.
Answer: I think that the either ends of your wire no matter how you fold them have higher amount of surface density of charge than the middle, however, the amount of charge is different as follow.
Imagine your wire to be approximated by the figure below

The first three spheres have the same radius and the rest have different ones. Same potential dictates that:
$$\frac{Q_1}{r_1}=\frac{Q_2}{r_1}=\frac{Q_3}{r_1}=\frac{Q_4}{r_2}=\frac{Q_5}{r_3}=\frac{Q_6}{r_4}=\frac{Q_7}{r_5}$$
Hence you see that the charge on the first three spheres are the same and it changes as you move to the last sphere. This as a result gives a higher surface charge density on the smaller sphere.
If you need a perfectly uniform distribution you need a very long wire.
About the curves in your wire I should say they change the distribution because geometry of is very important.
Comment: How can you say that $\frac{Q_1}{r_1} = \frac{Q_2}{r_2}$ etc. since the potentials of each of the spheres will be affected by all the other spheres close to it and that must also be taken under consideration. I agree that their potentials will be equal, but their potentials won't be $\frac{Q_1}{r_2}$ etc, they'll be something else.


Share via option on Android 5.1

Question: When one selects the option to share a file on Android 5.1, there is list of apps populated by the OS.  Is the order of the list populated by Android based on most used apps? I have noticed this keeps changing time and time again. Can anyone help out as to what is the default criteria of order of this list populated by android. Thanks.
Answer: This is different in different roms, but in most cases apps will initially be sorted alphabetically and then by last used. The last used options will be at top.
Is there a specific reason you're asking this?

Share via option on Android 5.1


How standardized are LCD panels?

Question: I have a project in mind where I would like to re-use LCD panels from old monitors to save them from landfills. I'd like to bypass the existing driver and implement my own controller to bypass all of the menus, source control, etc.
I know how to drive LCDs on a technical level, but I'm unfamiliar with how standardized their interfaces are in production models. Will panels of the same resolution use the same ribbon cable regardless of brand or make of the monitor, or is there a lot of proprietary stuff going on here? I'd rather not take apart 20 monitors to find out :)
Comment: Locate part numbers, find their data sheets and look up the info you are likely to need. Then also note that LCDs have a [lifespan of 5 years](https://insights.samsung.com/2022/05/23/the-truth-about-led-lifespan-and-the-longevity-of-your-display/#:~:text=Swapping%20LCD%20for%20LED&text=LCDs%20have%20a%20lifespan%20of,half%20the%20lifespan%20of%20LED.) and that means that any product that reuses an old LCD might have a future lifespan of 2 or 3 years. I don't think your bank manager would like your business plan but, maybe you haven't revealed things about your project that change my mind.
Comment: @Andyaka Good tip about the lifespan. Should be ok for my application, and I would explicitly market them as being 'upcycled', but certainly something to keep in mind.
Comment: About as standard as the number of monitor sizes there are.
Comment: Not standard at all. Even two displays of the same size, with apparently similar characteristics, from the same manufacturer, may have different connectors or different pinouts on similar connectors.
Answer: They have single, dual or quad LVDS interface, there's two different bit mappings and two bit depth options. And they may use different supply voltages for driving. And all that is still missing different options for driving the backlight. So no proprietary things, just many differences.
Comment: Although everybody calls it LVDS, that's just the physical layer interface. The actual name of the standard is [Flat Panel Display Link](https://en.wikipedia.org/wiki/FPD-Link).
Answer: It is a bit standardised, but there are many variations, so much that some incompatibility may result in a non working display, or just fry the power supply (I've seen that).
For protocol, there is mainly LVDS (old) and eDP = embedded DisplayPort (new). High resolution display may need several channels. Some screens have EDID ROMs which allows for auto-detection of the screen geometry.
For backlight, some displays have an internal regulator that drives LED backlight, some have direct connections to the backlight diodes, and some use CCFLs with a separate high voltage regulator.
So, be careful. Having the screen datasheet is far less risky.
Answer: Get onto any Chinese LCD sourcing site, select 20 random LCDs, and download datasheets, that should give you an idea.
While this may vary depending on screen sizes, generations, and original intended use (e.g. laptop screen v. TV v. computer monitor), my limited experience with smaller sizes (around 7 to 10 inches) is that while there is a limited number of "protocols" (e.g MIPI DSI):

There are a lot of parameters for the "standard stuff" such as number of channels and lanes;
There's a lot more variation when it comes to the signals relating to backlights;
Even if the signals are all exactly the same, the actual pinout may vary a lot (number of connectors, number of pins, order of pins…).

Even when looking at two screens from the same manufacturer, for the same size, with apparently close characteristics, you can end up with completely different pinouts.
So while you can certainly design a board for each of those displays, you are probably going to have a hard time having a single board which is able to drive a large variety of different displays, even if it's just a matter of changing the pinout and nothing else (and given trace length and other requirements for LVDS, this is not always trivial).
Unless you find a source of many displays of the exact same model, or the displays all use an interface which is more strictly defined (e.g. eDP), it's probably going to be quite difficult.

How standardized are LCD panels?


question regarding group permutation computation

Question: In S6, let $\alpha=(135)(156)(135)$ how do I compute $\alpha^{24}$? I'm given the hint that I first have to express alpha as a product of disjoint cycles which I computed as (15)(36) and then I have to find $\alpha^2$.
Answer: Hint: $\alpha^{24}=(\alpha^2)^{12}$
Alternative hint: Don't even rewrite $\alpha$ as product of disjoint cycle. Just note that it is a permutation of $\{1,3,5,6\}$ only and that $|S_4|=24$.
Answer: HINT: What is the order of this permutation? The lowest common multiple of the lengths in its disjoint cycle notation.
Now what is the identity permutation multiplied by itself 12 times?


How to share a photo album with people on restricted list on Facebook

Question: How can I share photo album with friends from restricted list? When I go to New Album > Custom Privacy > Specific people or list... and manually add them in the text field, they still can't see the album, and Facebook says, the album is visible for List1, Friend1, Friend2 except Restricted (Friends 1 & 2 are on the restricted list).
Comment: Just for clarification.. you have friends on your "restricted" list (I'm assuming you don't want them to be able to see posts), but you are adding an album that you DO want them to see?... while still restricting them from status updates. Is that correct?
Comment: @NathanFrancy yes, that's correct
Answer: This isn't possible. The only way they can see the photos are if they are tagged in them.
Scenario
You have a restricted list with your family and share your jokes to your friends. Having just come back from a family event, with family members from restricted list, you tag them in the respective photos. These users will now be able to see those photos.


Forward Windows 10 "Windows" To X11

Question: Let's assume that I have a Windows 10 VM running under Qemu, there is a way to forward to X11, the windows application.
Something like I start the virtual machine, and I can see only the program without seeing the whole windows desktop.
Comment: This is basically asking "How do I make Windows use the X11 protocol?". IMHO, that's primarily a Windows-related question, but I'm not 100% sure.
Comment: if your windows program can run under wine, then wine apps can either run in a virtual desktop or as a window on the linux desktop.
Comment: Search for SeamlessRDP which could then be used with the `-A` option of `rdesktop`. For that to work, you'll have to install stuff on the windows side.
Answer: I manage to achieve this using freerdp with the /app option like for example /app:mspaint
And on the guest you should add this to the registry:
Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppAllowList]
    "fDisabledAllowList"=dword:00000001

Answer: It requires the installation of Virtualbox Guest Additions or VMWare Tools on the guest OS but this does exist, just not through the X protocol.  It's also not entirely reliable and you may never get it to work, depending often on how much the client OS uses GPU features.  On Virtualbox this is called "seamless mode" and is a transparent-window-based alternative to fullscreen.  VMware has a similar feature called Unity Mode which I have no experience with.

Forward Windows 10 "Windows" To X11


Can the capacitance of a proximity sensor be increase by adding layer to the capacitor?

Question: Would adding layers to the capacitor of a proximity sensor from lets say 1 (A) to 4 layers (B) help with increasing the capacitance and at the same time the distance that can be sensed with a proximity sensor?
Comment: What signal does the finger  carry?  Stray line signal , RF from PCB?. Is it a ground loop or bridging 2 electrodes on a differential signal on board thru the surface dielectric or air?  So is your detector sensing the emitter being shunted by the finger to gnd or bridged between vertical plates.
Comment: Remember adding a large C in series to a small C in finger to plate does nothing to increase C sensitivity. But shunting  a signal could with a smaller source capacitance. << 10 pF
Comment: Use a Schmitt trigger relaxation Oscillator with 10M feedback and x pF to gnd. oscillator. Then maybe keep electrodes far apart so hand can bridge them from gnd on PCB so you from 0.5m away might be detected and observe frequency rise as you get closer. inverse squared sensitivity
Answer: Unfortunately, this won't work.  In order to increase the sensitivity, you'd have to increase the area of near contact between the capacitor plate and your hand.  Since all the plates you've drawn are connected to the same node, there's no electric field between them...only between the top plate and the finger.  Reducing the thickness of the insulator would proportionally increase the capacitance.
Comment: The sensor works by measuring the capacitance from the plate to your body.  That is determined primarily by the capacitance between the plate and the finger touching the insulator, which in turn is proportional to the area of near contact and the dielectric constant, and inversely proportional to the distance (which is determined by the thickness of the dielectric).  Adding interleaved plates to ground would increase the total capacitance, but the change in capacitance between touching and not touching would be the same; it would just be a smaller percentage of the total capacitance.
Comment: Would interleaving the 4 plates by another 4 grounded plates help?
Comment: What's your theory? How would it help?
Comment: I should note that flexible interleaved plates with spongy, compressible dielectric could be made into a pressure sensor, but I don't think that's what you're going for here.


How to perform cold signing with JS?

Question: How can I construct a transaction using a watch only wallet RPC and cold sign using any nodejs library? In the end, I have to send this to the blockchain using the daemon or watch only wallet RPC.
Answer: Using the wallet RPC on your view only (hot) wallet, you can call transfer with get_tx_metadata: true and do_not_relay: true which will yield an unsigned_txset in the response.
Then on the spend wallet RPC (your cold wallet), call sign_transfer, passing in the unsigned_txset from above, which will yield a signed_txset in the response.
Back on the view only (hot) wallet RPC, call submit_transfer, passing the data from signed_txset above in the tx_data_hex parameter.
The linked methods all have examples of these steps using curl. The calls are just simple HTTP POST requests, so libraries are not really needed.
Comment: It's not solve my problem. I can't use cold wallet in my solution, I want to sign transaction in my nodejs application. In other words, the private spend key should not leave my code.
Comment: Doing this *without* the RPC is far from trivial and there is no javascript library that has all the code you would need. My [answer](https://monero.stackexchange.com/a/11677/7493) to a previous question of yours applies.

How to perform cold signing with JS?


Can I say "all you had to do is"?

Question: I know that I can say, "all you have to do is" but may I say, "all you had to do is" when you actually talk to someone at present tense, but you want to refer to the past event specifically?
Comment: You can, but you'd be wrong.  It's "was."  You aren't saying what they have to do now but what they had to do back then, so "was" is what you need to say, not "is."
Comment: I'd say "all you had to do ***was***"
Answer: You certainly "can" say any of these:

All you have to do is take out the trash.
All you had to do was take out the trash.
All you had to do is take out the trash.

It's easy to find examples of all three on the internet, in speech, and in print.
The first two use coordinated tenses that match, either both present or both past. No one in the world would emit the least complaint about either of those two.
The third one uses past in the first part and present in the second. People certainly do say things like this. And everyone will know what you mean; few would read into the third example as meaning something different from what the second meant.
A careful writer, or a careful copyeditor, might well change the third version back into the second so that the tenses match up.
But most people would neither notice nor care.

Can I say "all you had to do is"?


Fullscreen games makes mouse go haywire

Question: I don't really know how to describe this one, but it's been happening on two Ubuntu computers of mine.
In some games, when I make them fullscreen, any mouse input makes it go absolutely insane and just decides to move to the left. The more I move the mouse, the more it moves to the left. This makes playing first person games absolutely impossible to play. I have no idea where to even start looking, does anyone have any suggestions? So far this has happened to me in Heavy Bullets, Interstellar Marines, and Sir, You Are Being Hunted. I thought it might be a problem with the engine some of these games run on (Unity), but I have run other Unity games just fine.
Answer: I found that the Unity game engine has compatibility problems with the Unity user interface.
A solution that worked for me was to install XFCE: see
How can I install XFCE along side unity?
Be warned, this will change the default greeter to something much less attractive.  Here are some notes on reverting that: Restore Unity Greeter

Fullscreen games makes mouse go haywire


"command | less" vs "less <(command)"

Question: A common "idiom" for viewing large amounts of command output is to pipe it to less, via command | less. However, it's also possible (perhaps only in bash, haven't tested in other shells) to use the less <(command) syntax, but less tends to complain /dev/fd/63 is not a regular file. After poking around in /proc/*/fd, I see that in both cases, it's reading from a pipe. The only difference is that in the first case, it's stdin being redirected. In the second case, it's getting /dev/fd/63 as a file name. Does less somehow "ignore" the regular file check when reading from stdin? Also, how does it determine that /dev/fd/63 isn't a regular file, even if the contents are text?
Comment: `file <(command)` says: `/dev/fd/63: broken symbolic link to pipe:[10973768]'`
Comment: Command substitution writes to the file `/dev/fd/63` and then pipes this into the command. The problem is, is that this file is not `seekable` meaning it can only be read as a full file without random access. One of the main features of less is that it doesn't read the whole file at once, and so causes this error message.Using a text editor that reads the whole file at once will work. Etc `Vi`
Comment: @Jidder what about piping to `stdin`? Isn't that not seekable as well?
Comment: No i dont think it is seekable, possibly i had misunderstood but i found this `Programs that explicitly check the type of a file before opening it may refuse to work with process substitution, because the "file" resulting from process substitution is not a regular file.`
Answer: less normally refuses to open non regular files like pipes or also binaries. You can use the -f operator to force less to open non regular files:
less -f <(command)

Another approach is to use process substitution:
less < <(command)

This causes the pipe that was created with <() to act as standard input (STDIN) for less.
Comment: I believe that you're a bit confused on the nomenclature. `<(command)` ***is*** process substitution. Changing that to `< <(command)` is just making it complicated.
Answer:
less tends to complain /dev/fd/63 is not a regular file

The solution to that, under GNU less at least, is the use of the -f option:
less -f <(command)

Under normal circumstances, less will not open non-regular files (stdin excepted, obviously).  This is for your protection.  -f forces non-regular files to be opened.

"command | less" vs "less <(command)"


how to uninstall viber completely from Ubuntu 14.04?

Question: How can i uninstall viber completely from Ubuntu 14.04? I did not find any option.
Answer: Viber is available as a .deb package and also as tarball. If you installed viber through the .deb package, then you can easily uninstall it using sudo apt-get remove viber
But instead, if you installed through the tarball, then you must have extracted the viber files into a single folder such as /opt/Viber. Just delete that folder and any .desktop files (shortcuts) that you created for it.
In addition, Viber user configurations are stored in ~/.ViberPC. You can choose to delete that as well. Note that if you do this, the next time you install viber, you would have to make any customization you made this time , again.
Answer: If you want to uninstall Viber but keep the configuration files in case you will install it again in the near future, use :
sudo apt-get remove viber
In case you want to uninstall Viber and DO NOT keep the configuration files, use :
sudo apt-get purge viber
Answer: 1- Installed by apt-get:
sudo su
apt-get remove --purge viber

2- Installed by dpkg
sudo su
dpkg --purge viber

3- Installed compiled,
sudo su
cd <uncompressed directory>
make clean
make uninstall


Bluetooth Issues with Airpods Pro 2 on Debian 12

Question: I'm currently trying to move from Ubuntu 22.04.2 LTS to Debian 12, and everything is so much more stable and reliable here. But there is one problem:
My Airpods Pro (Generation 2) don't really work. Let me elaborate.
With stock settings, they cannot connect at all, so I added this line to the bluetooth config file (/etc/bluetooth/main.conf) at the right place:
ControllerMode = bredr
I got this information from this AskUbuntu Post: https://askubuntu.com/a/1429341
This fixed the problem of not being able to connect the Airpods, and made them work with A2DP on Ubuntu. But here on Debian, only the Hands-Free audio is working (which sounds horrible).
I tried following some advice from this arch wiki page in a live install, because I didn't want to break my system, and it didn't really help:
https://wiki.archlinux.org/title/bluetooth_headset
I tried connecting my other pair of Bluetooth Headphones, Sennheiser 450BT, and they worked flawlessly.
I also tried switching btmgmt ssp on and btmgmt ssp off, the second one broke everything and I had to restart the live session.
I don't know what is different on Ubuntu 22.04.2 LTS, and why my Airpods Pro 2 work there, but not here.
Suspicion: The Airpods send some sort of non-standard/proprietary signal, and if they get the response that they are not connected to an iThing they start mocking up.
I'd like to add that the experience on Ubuntu wasn't flawless either, and they would disconnect/the audio would glitch to static noise/corruption every now and then. I would guess around every 3-4 hours of use once, but sometimes 4-5 times in a row. Then you'd have to restart bluetooth and connect them again. It was a bit annoying, but acceptable.
So can anybody help me with this problem? I'd greatly appreciate it!
I'm using a Lenovo ThinkPad Yoga 12.
Answer: Experienced the same issue.
Was able to resolve it thanks to this reddit forum. The issue is related to the AAC codecs, which aren't included in PipeWire by default due to licensing issues which prevented the owners from actually compiling the implementation, even though it is still in the official repository.
You can either (1) install this package, which is a re-compilation of PipeWire's dependency to include the AAC (and aptX) codecs (more info here), however this may involve tampering with existing OS installations.
Alternatively, you can (2) install the libfdk-aac-dev library and download the precompiled binary dependency of the said package, extract it and all its sub-compressions, and place /.../libspa-0.2-bluetooth_0.3.65-4~glasgall1_amd64/usr/lib/x86_64-linux-gnu/spa-0.2/bluez5/libspa-codec-bluez5-aac.so in /usr/lib/x86_64-linux-gnu/spa-0.2/bluez5/. Then, just give the computer a good ole' reboot.
After either method you should be able to pick the AAC codec:
P.S.: Or you can (3) rebuild libspa from scratch yourself with the AAC codec if you're up for the challenge, though I do not recommend. :)
Answer: With the help of markkoszy's answer, I wrote a script that builds a package whose sole function is to place the libspa-codec-bluez5-aac.so file in the right place. In addition, this package requires libfdk-aac-dev as a dependency. So all you need to do is install this package to solve the problem properly (without manually copying a file into the system tree).
https://gist.github.com/jpasquier/65e95707089f79d9406fa8e7f9e96eb0
running with script as current user will create the package in the current directory


Why is the enthalpy of combustion higher for n-butane as compared to 2-methylpropane?

Question: N-butane has an enthalpy of formation of $\pu{-125.6 kJ/mol}$, whereas it is $\pu{-134.2kJ/mol}$ for 2-methylpropane. When comparing the heat set free at the combustion process, why is it higher for n-butane? Isn't the enthalpy of formation the negative of enthalpy of combustion and therefore 2-methylpropane should be higher?
Comment: "Isn't the enthalpy of formation the negative of enthalpy of combustion" – No.
Answer: Take 4 moles of carbon and 5 moles of H2. Synthesize a mole of n-butane and measure the heat evolved (125.6 kJ). Then repeat the process, but make 2-methyl propane (you'll measure 134.2 kJ). Then, with sufficient oxygen,  prepare 4 moles of CO2 and 5 moles of H2O from each of the previous two procedures and measure the heat of combustion (more for n-butane).
The total heat evolved to form the final oxidation products from carbon and H2 will be the same, but since the paths are different, the heats evolved in the two steps of each procedure will be different. n-Butane evolves less heat upon formation, therefore can (must) evolve more heat in the next step when it is oxidized to final products.
Answer:
Isn't the enthalpy of formation the negative of enthalpy of combustion

No! That certainly isn't true.
Consider this equation: $\ce{CH4 + O2 -> CO2 + H2O}$. If you reverse it, you'll get: $\ce{CO2 + H2O -> CH4 + O2}$ which is clearly not an enthalpy of formation because:

the left hand side of the reaction does not have elements instead compounds
the right hand side of the reaction should have had a single product, but instead has two

I cannot comment on the second part of your question because I could not find standard data for heats of combustion of both the compounds.


transfer function over a uniform distribution to generate a two-fold variation, but result is also s uniform distribution

Question: I think, I am stuck at a transformation problem where I believe there is a solution, but I don't know what it is. I have uniform distribution $u_1(x) = \frac{1}{b - a}$, where $b=-1$ and $a=1$, and want to utilize it to generate two fold variation around a scalar quantity $p$. Currently, I am generating this two fold variation by using $p.(2^x)$, which makes $2^x$ the transfer function. Eventually, it gives me an exponential distribution $f(x)=p.2^{x}$. However, I want also the resulting distribution to be an uniform distribution and not exponential. Is there any such transfer function (presumably some hyperbolic function) which I can utilize over the uniform distribution $u_1(x)$ to generate a two fold variation as well as the resulting distribution is also an uniform distribution $u_2(x)$.
Comment: why does your pdf contain negative values
Comment: Please define `two fold variation`.
Answer: Let me rephrase the question. The problem is basically the random variable transformation. $Y=\phi(X)$ The random variable $X$ has a uniform distribution $U(-1,1)$ and I want to transform it into $Y$ which is also an uniform distribution $U(\frac{s}{2},2s)$, where $s$ is some scalar quantity. Does anyone know a transformation function $\phi$ which transforms $X$ into $Y$ with these constraints?
Presently, I am using the function $Y=s2^X$, which unfortunately gives me an exponential distribution of $Y$ and not uniform distribution. Thank you in advance


How are oracles (chainlink) deterministic if they can change their value with each call?

Question: I've been playing with the chainlink getRandom call which returns a random number every time it's called. What I'm confused by though is the blockchain should be deterministic so if we were to rebuild this entire network from node 0 wouldn't that same call to getRandom be a different number and this not be deterministic? Same for external api calls, what if that node goes away and when you rebuild that data is no longer available, wouldn't that change the entire chain going forward?
Answer: You're correct in saying that blockchains are deterministic, oracles however, operate outside of blockchains. Oracles deliver data the same way that people make transactions.
When you replay a blockchain that uses oracle data, your replay what the oracle returned. In the same way when you replay a blockchain that has human transactions, you replay the result of those transactions.
An oracle works by delivering data in a transaction. So the oracle only delivers the data once, and that becomes a part of the historical transaction data of the blockchain.
Does that make sense?
Comment: It does, for some reason, I was thinking the "playback" would include the call to the oracle but it's basically just running through all transactions that were recorded. Thanks
Comment: I have the same question as Ryan but regarding the Price Data Feed. For example, in chainlink documentation there is a simple contract called PriceConsumerV3 (https://ethereum.org/cs/developers/docs/oracles/#chainlink-data-feeds) that calls the "latestRoundData" function on the feed. If a PriceConsumerV3 's transaction  is replayed after some time doesn't the "latest" value change?
Comment: No, since the data is included in the transaction, when you replay it, it will include the exact same data that was done the first time.


How to request re-opening question placed "on hold?"

Question: How do I request re-opening a question that was placed "on hold"?
Answer: Now that you've edited it, it should automatically enter the reopen review queue for people to look at. It is then up to reviewers to decide if they want to vote to reopen (VTRO). People (with at least 3k reputation) can also VTRO directly from the question, if they come across it.
Answer: To add to, not supplant, Scimonster's excellent answer:
You can comment on the question with an <code>@</code>-ping for whoever closed the question to draw the revision thereof to his or her attention. This may be rude if the question was closed by votes (after all, it was closed by random passersby or a queue, so let it be reopened thereby also), but I think is wholly appropriate if it was moderator-closed.


How to create SharePoint page layout based on existing .aspx file

Question: I have an existing page layout that I want to slightly modify and use. When I upload the modified file to a pages library it works fine but I would like to be able to select that page as a layout going forward, is there any way to do this?
Answer: Instead of uploading the page to page library you should upload it to Master pages and page layouts by going to

Root Site > Site Settings > Web Designer Galleries > Master pages and page layouts

Or navigate directly to
http://SiteCollectionURL/_catalogs/masterpage/Forms/AllItems.aspx

Note : Not all ASPX files considered as a page layout so you should make sure that it's a page layout page as you mentioned in your question.


How to load a ComboBox with Items from a text file

Question: What is the simplest way of importing items from a text file into a ComboBox control?  The text file contains multiple lines.  I need to add each line from the text file as an item in the combo box.
Comment: What's the format of the text file?  One item per line?  What type of combo box?  WinForm, ASP, WPF?
Comment: one item per line. havent a clue what WinForm, ASP, WPTF are am just ussing vb.net
Comment: WinForm vs. ASP vs. WPF is the type of UI technology you are using.  All of these (and others) are types of UI's which are supported by VB.NET.  Typically, the type of UI you are using is determined by the project template you choose when you created your project.  If you chose "Windows Application", then it's using WinForm.
Answer: If the format of the text file is one combo box item per line, and you want to load them into a WinForm ComboBox control, then this would be the simplest way to do it:
ComboBox1.Items.AddRange(File.ReadAllLines(filePath))

You'll need to add Imports System.IO to the top of the code file.  Either that or specify the full name of the File class:
ComboBox1.Items.AddRange(System.IO.File.ReadAllLines(filePath))

Comment: This is starting to go the right direction though now i get an error  Name 'File'is not declared.?
Comment: sorry its a simple thing though im more home with visual lisp (autocad programing) thanks
Comment: No problem.  I understand.  We were all beginners at everything once :)  Happy to help.
Answer: There are a couple ways of doing it. These are two ways you can do it with error handling:
1
Try
  ComboBox1.Items.Clear()
  Dim objReader As New System.IO.StreamReader(File Path)

  Do While Not objReader.EndOfStream
    ComboBox1.Items.Add(objReader.ReadLine)
     Loop
  objReader.Close()
Catch ex As Exception
    MsgBox(Messege)
End Try

2
Try
  ComboBox1.Items.Clear()
  ComboBox1.Items.AddRange(File.ReadAllLines(filePath))
Catch ex As Exception
    MsgBox(Messege)
End Try

Either one of these will work for you. It is always good practice to use error handling so your program doesn't crash and can do something else in case it fails to read the file. I did add a ComboBox1.Items.Clear() in the beginning because what will end up happening is if you have your code in a subroutine where it is refreshing and constantly reading the text file live, it will keep on adding to the list the the things that are already in the combobox and will have repeated values. For Example, lets say you have in the textfile the words EARTH MARS In the combobox, you will have the word EARTH MARS. But if you have it to refresh constantly lets just say 4 times, the combobox will now display EARTH MARS EARTH MARS EARTH MARS EARTH MARS. Now if you use my code, it will read EARTH MARS and put in the combobox EARTH MARS and if it refreshes 4 or how many ever times, it will still display EARTH MARS because it is clearing the items in the combobox before going back to the textfile and reading what is on it. Now if you add the word JUPITER to the text file, your combobox will now append the word JUPITER to the combobox items list, and voila, nor repeated values.
Answer: ComboBox1.Items.AddRange(System.IO.File.ReadAllLines(local path))
Ex:
Public Class Form1
  Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

  ComboBox1.Items.AddRange(System.IO.File.ReadAllLines("C:\zone\target.txt"))

  End Sub

notice, under form_load trigger


How to use the verb "ride"?

Question: To describe cars and busses going up and down Fifth Avenue,can I say:" Cars and busses were RIDING up and down Fifth Avenue"?
Comment: It might be useful if you were writing dialogue and you wanted one character to have a weird manner of speaking. Or it might be off putting.
Answer: It would be a most unusual way of expressing things.
It's people/passengers/travellers/individuals who ride up and down in buses rather than the buses themselves that ride.
Cars and buses conventionally travel/drive/hurry/move/pass (and many more) up and down.
However, it would not be unusual, after test driving a vehicle with heavy suspension or steering, to say that the ride was heavy/uncomfortable or similar, referring to the way that the vehicle handled.
So, you could talk about vehicles riding, and people would understand you, but it would not be idiomatic.

How to use the verb "ride"?


Future is returning empty List

Question: My below code is returning an empty list, even though it SHOULD return data corresponding to my data stored in my firestore database. Also to note: The otherUserId print statement is not getting printed. How can I fix this issue?
 Future<List<String>> getChattingWith(String uid) async {
  List<String> chattingWith = [];
  try {
    // create list of all users user is chatting with
    final rooms = await FirebaseFirestore.instance
        .collection('rooms')
        .where('users', arrayContains: uid)
        .get();
    for (final room in rooms.docs) {
      final users = room['users'] as Map<String, dynamic>;
      final otherUserId = users['uid1'] == uid ? users['uid2'] : users['uid1'];
      print("otherUserId999: $otherUserId");
      chattingWith.add(otherUserId);
    }
    print("chattingWith: $chattingWith");
    return chattingWith;
  } catch (error) {
    print("error: $error");
    return [];
  }
}

Comment: So it jumps in the catch block? What is the error?
Comment: So your room.docs is empty, can you check it?
Comment: No, it just prints "chattingWithList: []"
Comment: No, it is not empty. I am trying to fetch all rooms where the users array contains the uid. After that I create a list of the user ids which are not equal to the uid. So basically I want to create a list of all uids which a user is chatting with. But the data is fine, just the query is not working.
Comment: I have added an image of the users array. Maybe my query is wrong?
Answer: This part of your code does not match your data structure:
final rooms = await FirebaseFirestore.instance
    .collection('rooms')
    .where('users', arrayContains: uid)
    .get();

Your users is a Map and not an array, so arrayContains won't work here. As said in my answer to your previous question, you have to use dot notation to test nested fields:
final rooms = await FirebaseFirestore.instance
    .collection('rooms')
    .where('users.uid1', isEqualTo: uid)
    .where('users.uid2', isEqualTo: otherValue)
    .get();

That  is closest to what you tried in your previous question: Firestore conditional array query. It performs an AND condition on the uid1 and uid2 subfields of users.
If instead you want to get all rooms that the user is a participant in, you need an (additional) field that is an array with the UIDs of all participants.
participantUIDs: ["uid1", "uid2"]

Then you can do:
final rooms = await FirebaseFirestore.instance
    .collection('rooms')
    .where('participants', arrayContains: uid)
    .get();

Comment: The GOAT himself. Thank you a lot for your time and help! Learned a lot today thanks to you!

Future is returning empty List


What is the difference between accelerating and boosting?

Question: My professor claimed in class that there was a difference between an acceleration and a boost. I don't really understand the distinction. If you want to go to a different inertial frame of reference, wouldn't you need to accelerate?
Comment: "*If you want to go to a different inertial frame of reference, wouldn't you need to accelerate?*" If this were true, studying cosmic rays would be exhausting for sure!
Comment: what subject was this in?
Answer: Boosting means you are changing a frame of reference; boosting frames doesn't imply any actual motion. When you talk about boosting, you are talking about changing the way you are observing something instantaneously.
Acceleration on the other hand, is a type of motion inside a frame of reference. When you talk about acceleration, you are talking about a particle (or something) changing velocity over time without changing the way you are observing it.
Answer: Let's say you are doing a typical SR experiment and you have Alice and Bob flying around in spaceships and such and you have each ship feeding you data. Things outside look one way to Alice and a different way to Bob because of their inertial frames. Let's say they're observing two supernovas and trying to determine their timing relative to each other, and you have all the data you need from the two feeds: apparent distance, redshift from each experimenter's frame of reference, apparent timing etc. You take all Alice's data and all Bob's data and work so Lorenztian mathemagic and you determine that in their center of mass frame, the two supernovas are a certain distance apart and happen one so long after the other, etc...
That's a boost. You used a mathematical adjustment to "see" things in a frame of reference that you can't see. You can do this from your inertial, non-accelerating space station because it's about the data, not the observer.
Then you, Alice and Bob all turn on your rockets and accelerate toward home because its almost time for dinner. You can't do that with a simple mathematical transformation, it requires real energy and physical interactions.
Answer: I might use "boost" for a short burst (more like an impulse) and "acceleration" for a more prolonged burst - but both imply a force applied for a certain time in order to effect a change in momentum.
I recommend you ask your professor for clarification. He/she must have had a particular application in mind. In the case of orbital mechanics, the calculations are easier if you "boost" (make a near-instantaneous change in momentum) than if you "accelerate" (accelerate over a sufficiently long time that the orbit changes during the acceleration - which in turn changes the calculations for how the orbit evolves).
Comment: Hmmm I am probably wrong, but I assumed OP's *boost* is the change of frame of reference used in SR. Thus, when we perform a boost, we multiply a vector times a matrix. If I understood OPs question properly, then the difference is: a boost is s mathematical operation.
Comment: If you are right, perhaps the tags on the question need changing...


Programmable DS1077 Oscillator: Cannot set the DIV register

Question: I am trying to run a Maxim DS1077 programmable oscillator through the I2C bus from an Arduino Uno development platform. I am able to run the oscillator at the different pre-scaler values 1,2,4, and 8. My oscilloscope shows that the changes in Out 1 are appropriate. However, I cannot set the divider DIV register. It always seems to be set to N=1, i.e. it is as if the divider is not in there at all. I set the MUX bit for activating the divider correctly - tride both settings etc...but to no avail. Hardware set-up: both control ports are tied to GND, the serial communication lines are tied to 5V via 3.9kOhm, and I have 0.1 and 0.01uF between GND and Vcc. The serial lines are connected to the Arduino's analog ports 4 and 5, and I am using the wire library. I think the fact that I can set the prescaler shows that the I2C is not the issue...any tips would be appreciated! Thanks!
Comment: A quick guess - what have you got the DIV1 bit in the MUX register set to?
In the datasheet it says if this bit is set it will bypass the DIV register, routing the clock straight to OUT1. So it needs to be set to 0. It should be set to 0 as default so it's probably not this, but worth checking just in case..
Answer: I finally found out why I was not able to set the DIV register. I contacted Maxim and they told me that the MUX register bit for activating the DIV needs to be set AFTER setting the DIV. I had it in the opposite order in my initial program. After flipping the commands, everything worked!
Comment: I had exactly the same problem and the solution above worked INSTANTLY!!! Thanks!!!!
Comment: Could you post the code that you used to get this working? I'm also trying to get the DS1077 working properly in a microcontroller setup and am having an absolute pisser of a time!


How can I Intimidate (demoralize foe) as a Move or Swift action?

Question: I would like to make Intimidate a major part of my PC's fighting style. I think it's cool, and themey; I don't like the fact that it takes a Standard action, though. Is there any way to speed it up a notch? (Particularly a Feat?) My PC is a beguiler/warblade (gestalt character).
Answer: Demoralizing Quickly
As Dungeons and Dragons 3.5 wound down, it seemed like designers realized the fighter had very little into which it was worthwhile he sink his 1-3 skill points per level. One option was the Intimidate skill, which--unlike many of the fighter's feats--scaled reasonably well. This made the Intimidate skill something for which late-cycle authors wrote quite a few options.
You'll struggle to make use of some of these options if you stay exclusively a beguiler//warblade, but the beguiler has the skill Use Magic Device as a class skill, making some of these options more accessible.

The general feat Bloodsoaked Intimidate (CoR 17) grants you the ability, as a swift action, to make an Intimidate skill check to demoralize 1 adjacent foe who witnesses you taking a trophy from a fallen foe. Note: Not a horrible feat, but has as a prerequisite a feat that has literally no game effects.
The armor special ability fearsome (DrU 97) (5000 gp; 0 lbs.) grants the wearer the ability, as a move action, to make an Intimidate skill check to demoralize a foe. Further, it grants the wearer a +5 enhancement bonus to Intimidate skill checks and grants the armor spiked armor/armor spikes (PH 121, 124). Note: Originally published on page 11 of the Magic Item Compendium (Mar. 2007) then superseded by Drow of the Underdark (May 2007) then possibly superseded again (with text identical to the original) in the Magic Item Compendium (July 2013). Ask the DM.
The general and fighter feat Intimidate the Enemy (Dragon #335 91) grants you the ability, as a move action, to make an Intimidate skill check to demoralize a creature. Further add your favored enemy bonus to Intimidate skill checks made to demoralize versus creatures of the picked type. The creature type this feat affects must be picked when the feat's gained and the creature type must match one of your favored enemies. Note: The regional feat Foe Hunter (PG 38-9) grants a creature the ability favored enemy but only versus either demons, dragons, goblinoids, orcs, or yuan-ti.
The general feat Intimidating Rage (CW 79) grants you the ability, once per encounter as a free action, to make an Intimidate skill check to demoralize 1 foe within 30 ft. You can only take the free action while raging. If successful the foe is shaken until your rage ends. Note: The shoulders slot item mantle of rage ("New Magic Items" 1) (6,000 gp; 1 lb.) grants the wearer the ability to rage like a Bbn1 1/day. Also, the fiendish symbiont gutworm (FF 220) grants its host an ability "identical to a barbarian's
rage" at will, but finding a gutworm's usually at the DM's discretion. Finally, the drug chiff (Dragon #298 46) (300 gp; 0 lbs.), once within 1d3 hours of inhaling it, allows the creature "the ability to Rage [sic] (as the barbarian class feature)"; the drug's side effect, overdose effects, and Addiction: High make this a risky and expensive workaround.
The fighter and general feat Intimidating Strike (PH2 34) grants you the ability, as a free action, to make an to make an Intimidate skill check to demoralize a foe you've struck with a standard attack. You can, before making the standard attack, suffer a cumulative -1 penalty to your attack roll (up to your Base Attack Bonus) to add a cumulative +1 bonus to the Intimidate skill check. Note: While not a very good late-game feat, for a creature only making standard attacks anyway and who's eligible to use the retraining rules (PH2 194), it's actually a decent choice.
The 2nd-level Sor/Wiz spell Phade's fearsome aspect [illus] (Dragon #333 72) for 1 min./level grants 1 creature a +10 bonus to Disguise skill checks to alter his appearance but not for impersonation, a +5 bonus to Intimidate skill checks, and the ability to take a swift action to make an Intimidate skill check to demoralize a foe.
The general feat Supremely Confident (Dragon #334 88) grants you the ability, as a free action, to make an Intimidate skill check to demoralize a foe when you score a critical hit versus that foe.
The level 9 fighter substitution level for Zhentarim soldier (Champions of Valor Web enhancement "Benefits of Membership" 6-7) grants the creature the extraordinary ability swift demoralization, allowing the creature as a swift action to make an Intimidate skill check to demoralize a foe. Note: Although other class features improve a creature's ability to use the skill Intimidate, this is by far the most popular. Comments would suggest it were it omitted, despite it being an unlikely option for a beguiler//warblade.

For Further Consideration
The following feats, items, spells, and skill trick affect the skill Intimidate in some fashion. Many other treats grant bonuses to the Intimidate skill; I've listed a combination of very good ones and often overlooked ones.

The throat slot item amulet of word twisting (MIC 71) (6,000 gp; 0 lbs.) grants an orc wearer a +4 insight bonus to Bluff, Diplomacy, Intimidate, and Sense Motive skill checks and the ability to use a command word 1/day to use on himself an effect like the spell tongues [div] (PH 294). Note: Any creature can make a Use Magic Device skill check to emulate the orc race (DC 25) once per hour (PH 85-6) to continue to gain this item's benefits; only 1 race can be emulated at a time.
The perpetual flank tactical maneuver from the tactical feat Clarion Commander (ToB 34) grants you the ability, as a standard action, to make an Intimidate skill check (DC 20) versus 1 foe. If successful, and you make a successful melee attack versus that foe next turn, allies treat the foe as flanked for 1 min.
The slotless item clasp of the elder (AE 131) (6,000 gp; 0 lbs.) grants a dwarf possessor a +2 enhancement bonus to his Wisdom score, a +5 competence bonus to Diplomacy skill checks, and a +5 competence bonus to Intimidate checks. Note: Any creature can make a Use Magic Device skill check to emulate the dwarf race (DC 25) once per hour (PH 85-6) to continue to gain this item's benefits; only 1 race can be emulated at a time.
The sneering glower tactical maneuver from the tactical feat Combat Panache (PH2 93-4) grants you the ability, as a swift action, to make an Intimidate skill check to demoralize a foe you've wounded that, if successful, makes the foe suffer a penalty to attack rolls versus you equal to your Charisma bonus's absolute value until the encounter's end or you use the maneuver again.
The face slot item crystal mask of dread (MIC 91) (10,000; 0.5 lbs.) grants the wearer a +10 competence bonus to Intimidate skill checks.
The specific magic weapon the cudgel that never forgets (MIC 49-50) (20,312 gp; 8 lbs.) uses its standard action on your turn to make an Intimidate skill check to demoralize a foe. Note: Hilariously awesome.
The 2nd-level Clr spell divine presence [trans] (CC 119) for 10 min./level grants the caster a +5 sacred (if the caster's good or neutral) or profane bonus to Intimidate skill checks that's +10 versus creatures with one opposed alignment component or +15 versus creatures with two.
The 0th-level Sor/Wiz spell fleeting fame [illus] (Dragon #326 73) for 1 round/level grants the caster a +2 bonus to his next Bluff, Diplomacy, or Intimidate skill check.
The armor and shield special ability hideous (CoR 40) (3,750 gp; 0 lbs.) grants the wearer a +5 competence bonus to Intimidate skill checks, but the wearer suffers a -2 penalty to Diplomacy skill checks. Note: The competence bonus can be increased to +10 (15,000 gp; 0 lbs.) or +15 (33,750 gp; 0 lbs.). Table 7-33 (DMG 285) estimates these costs instead should be 10,000 gp and 22,500 gp, respectively. Nope. No idea.
The general feat Imperious Command (DrU 50) grants you the ability to make a foe you've successfully demoralized gain the condition cowering for 1 round then the condition shaken for 1 round. Note: In a campaign where the primary foes are not immune to fear this feat is problematic, and in a campaign where the primary foes are immune to fear this feat is pointless. Ask the DM.
The alchemical substance mad foam (Dragon #357 38-9) (25 gp; 0.25 lbs.) for 2d6 minutes grants a canine a +2 bonus to Intimidate skill checks; the canine's obvious master also gains this bonus.
The skill trick Never Outnumbered (CAd 87) grants you the ability, once per encounter, to make an Intimidate skill check to demoralize all foes within 10 ft.
The item quality ornate (Dragon #358 42) (400 gp for light armor, 500 gp for a weapon, 600 gp for heavy armor; 0 lbs.) grants the armor's wearer or the weapon's wielder either a +2 circumstance bonus to Diplomacy skill checks or a +2 circumstance bonus to Intimidate skill checks, chosen when the quality is applied. Note: Circumstance bonuses stack (DMG 21) if circumstances differ; talk to the DM.
The 3rd-level Sor/Wiz spell rain of terror [necro] (Dragon #348 76) for 1 min./level grants the caster a +10 bonus to Intimidate skill checks. Note: My personal favorite D&D 3.X spell.
The 1st-level Rgr spell towering oak [illus] (SpC 221) as a swift action for 1 round/level grants the caster a +2 enhancement bonus to Strength and a +10 competence bonus to Intimidate skill checks. Note: Also a 1st-level consecrated harrier (CD 28) spell with a minimum caster level 1.
The drug vodare (BoVD 43-4) (40 gp; 0 lbs.) for 1d4 hours grants a +2 alchemical bonus to Intimidate skill checks. Note: Even fantasy cocaine makes your character act like a jerk.
The 4th-level Sor/Wiz spell voice of the dragon [ench] (SpC 232) for 10 min./level grants the caster the ability to speak but not read the language Draconic and a +10 enhancement bonus to Bluff, Diplomacy, and Intimidate skill checks. As a standard action that otherwise ends the spell he can use an effect like the spell suggestion [ench] (PH 285).
Comment: To readers with short attention spans, who may have skipped past: This answer is great, comprehensive, and **worthy of its length**. +1, would read again.
Comment: Although downvotes never *need* to be explained, I'd like to make this answer more useful, and if I've made a mistake I'd like to correct it. Feedback *really is* appreciated.
Comment: Note: **Supremely Confident** is actually in Dragon Magazine 335.
Comment: @MatthieuM. I am so sorry if I sent you on a wild goose chase. My apologies.
Comment: @HeyICanChan: Oh don't be, at least with the feat name I could look it up; before reading this answer I didn't even know it existed!
Answer: The only thing I am aware of in Paizo material is a Barbarian rage power called Intimidating Glare, which allows you to make Intimidate checks as a move action.
Edit: Not directly related to the question, but maybe helpful. The APG has 2 feats that allow you to situationally make free Intimidate checks.
Dreadful Carnage gives you a free Intimidate check when you drop an enemy to 0 or fewer hit points against all enemies within 30 ft.
Enforcer Gives you a free Intimidate check against someone when you deal non-lethal damage to them.
Also, those are Pathfinder Specific answers. :)
Comment: +1 for the suggestions. 3.5 material is good, too. Enforcer would work, except that it's marked as Fan Content... not sure what the source of that is? Dreadful Carnage is good too, but kind of situational. I can't use barbarian rage powers (I edited the question to mention my class)
Comment: I think the fan tag is a mistake as it is listed here www.d20pfsrd.com/feats/feat-tree which just has core and apg. but I will double check the apg when I get home.
Comment: Yep, Enforcer is in the APG, page 159. I'll leave 3.5 suggestions to others, as I don't have any of the expansions. (I bought 3 right before they switched and rage-quit D&D for a little while. :()
Comment: I'm marking this because it's the best answer with a couple of options; Bloodsoaked Intimidate is equally good, though. I actually ended up using the Frightful Presence feat, since it doesn't require me to have already killed something - strictly speaking, that doesn't fit the bill posed in the original question, though.
Answer: For DnD 3.5. There is the feat Bloodsoaked Intimidate from the book Champions of Ruin. This is where you can use intimidate as a swift action.
Answer: Cornugon Smash (Combat)
Prerequisites: Power Attack, Intimidate 6 ranks.
Benefit: When you damage an opponent with a Power Attack, you may make an immediate Intimidate check as a free action to attempt to demoralize your opponent.
This is one is fun to add to it... Hurtful (Combat)
Prerequisite(s): Str 13, Power Attack.
Benefit(s): When you successfully demoralize an opponent within your melee reach with an Intimidate check, you can make a single melee attack against that creature as a swift action. If your attack fails to damage the target, its shaken condition from being demoralized immediately ends.


GODOT - C# referencing current node

Question: I have specific problem in coding in GODOT(I'm using C#, I'm new to godot). I need to reference current node that has attached script. Let's say - I have 3 buttons and all of them inherits from base class called "menuButton" that has attached script called "menuScript" that includes code for changing text color onHover. And I need to reference current node, so that I can change the color of child label node.
Answer: this
Typically, you don't need to do this. Functions and parameters of the node can be accessed without a node reference

Child of current node: GetChild(i) (shortened version of this.GetChild(i))
Name of current node: GetName() (shortened version of this.GetName())

You may need to use this for other functions that have a node parameter. Most notably:
- Connect("signal", this, "MyMethod")
Answer: I got it
Just use GetNode(this.GetPath())
Comment: This isn't a good method! You may want to check the answer I posted...

Also, for future questions, you should mark answers as correct if they answer the problem, even if you solved it yourself.
Comment: Just saw it now. BTW, I don't know why, but referencing "this" does not work for me.
Answer: Some examples, there may be more combinations:
private CollisionShape2D charCollider;
private Node3D child1; //godot4 new name
[Export] public NodePath characterPath; //this define on editor
private Control control;
private Camera camera;

public override void _Ready(){
    //by string path
    char_collider = (CollisionShape2D) GetNode("child0/char_collider");
    //by child index or null if no exists second child
    child1 = GetChildOrNull<Node3D>(1);
    //by nodePath with editor
    control = GetNodeOrNull<Control>(characterPath);
    //"this" is not necessary but work
    var node = this.GetNode("banana") as Node;
    //you can use "parent()" or ("../..")
    camera = node.GetParent();
    camera= node.GetNode("..");//same
    //Any Node inheritance can use these functions
    node = camera.GetNode("child");
    //You can use uniques names on editor
    GetNode<Button>("%buPlay").Pressed += onClickPlay;
}

Comment: absolutelly a lovely answer, thank you!

GODOT - C# referencing current node


Disabling animation of the Wifi connection icon

Question: On Android 7.1 the wifi icon does not only show the signal strength by the well known circular four bar image, but also underneath it there are two tiny arrows, one pointing up and the other one pointing down. They are used to indicate correspondingly the activity for the upload and the download. This feature although seems cool at first can be very distracting at times, when you read for example. My question is can you disable the animation? Ideally just remove two tiny arrows and only leave out the curved signal bars just like it looks on iOS for example.
Answer: You cannot just tweak the arrows from the UI. But you can disable the notification icon.
Since you're on Marshmallow, first enable System UI Tuner by long pressing the Settings icon in the pull-down notification shade for 5 seconds. Then go to
Settings->System UI Tuner->Status bar->Disable WiFi.
Done.
Comment: This must be another question, but regardless of how long I press the gear icon the ui tuner does not show up? Htc u11
Comment: @exebook Seems HTC has blocked access to system UI Tuner. If youre root you can download https://play.google.com/store/apps/details?id=mobi.pruss.tuner to enable it. Also there's a video for unrooted phones https://www.youtube.com/watch?v=-O5t6j29tjc&feature=youtu.be might be helpful. Try it out


Is the "that" optional in "my idea was that (...)"?

Question: I wrote the following sentence in an essay: "My idea was that, since A is B, B might be A". However, word count matters in this essay, so I'd like to know if the "that" is optional in this sentence. More specifically, I want to know if "My idea was, since A is B, B might be A." is also correct.
Comment: It basically functions as an oral colon: _My idea was: 'Since A is B, B might be A'_, introducing a tensed clause and identifying it with the subject. Since _that_ is a complementizer, introducing and identifying clauses is its primary function; complementizer _that_ is optional everywhere, except at the beginning of a sentence, where it's necessary to identify the clause as subordinate: _That you forgot is no excuse_, but not *_You forgot is no excuse_.
Answer: Yes, it is optional.  'That' is a demonstrative pronoun that has evolved to also work as a relativizer ("the girl that kissed me"; "the boy [that] she kissed") or a complementizer ("I know [that] she kissed him.")
Answer:
My idea was that [since A is B, B might be A.]

Yes, the subordinator "that" is optional here, where it introduces the bracketed declarative content clause.
But note that in such clauses, "that" is sometimes inadmissible, for example when it is complement to a preposition like "before", as in in *"I left before that he arrived".
And sometimes it is obligatory, for example when the content clause is subject of the matrix clause, as in "That I need help is clear". Elsewhere it is generally optional, though it is more likely to be omitted in informal than formal style, and after short and common verbs.


Plotting shapefile on map using ArcGIS API for JavaScript?

Question: We are using Dojo framework to develop our portal. We have bound the ArcGIS map in our web portal. Is there any ArcGIS JavaScript API which will accept the path of the shapefile and plot that shapefile directly on map. If it is free API then that will be great and if it is paid API then how can we purchase that?
Answer: Simplest solution is to use ArcGIS Online, they allow you to upload and plot your shapefiles.
Though I'm guessing by the way you phrased your question, you want to build the map and interface around it yourself and you don't have ArcGIS for Server. In that case, one way to do it would be to build an intermediate service that takes the uploaded shapefile and converts it to a csv lat/lon. You could easily build something that uses ogr2ogr in gdal... and even build off of what has already been done by the community such as this for example: https://gis.stackexchange.com/a/19178. Once they are in csv, you can create a FeatureLayer in javascript with the data and it will plot on the map. Esri has a nice demo with drag and drop functionality of csv files: https://developers.arcgis.com/javascript/jssamples/exp_dragdrop.html
The other route you could go is use an intermediate service (with ogr2ogr) to convert from your shapefile to GeoJSON. Something like:
<code>ogr2ogr -f GeoJSON data.json data.shp
</code>
Once you have GeoJSON, you can plot that on the map... though Esri needs ArcGIS JSON instead of GeoJSON. Esri has already taken care of this for you with the geojson-layer component in their github repo.


Why do I keep getting a Certificate Verification Failures when trying to pull a github repo?

Question: I am trying to pull this git hub repo but whenever I execute a git clone commend it just tell me that the certificate verification failed ad then stops.Why is this happening?
Answer: It could be that your certificate store is outdated. Try updating your system (sudo apt update/sudo apt upgrade) and the problem might go away.
It's also possible to disable certificate check in git, if you're sure your connection is not being tampered with:
git -c http.sslVerify=false clone https://github.com/path/to.git

Answer: I'm guessing it may be a similar problem to this; check the output of date and see if it is something sane.
SSL certificates are valid from a certain point to a certain point.  Generally the "from" is when they were created, so it should be in the past.  However, if your pi believes it is, e.g., early January 1970 (which it might if ntp never connected, because there is no clock built in and the last day of 1969 is a default time for historical reasons), then there is probably no SSL certificate around that will validate (although some may be made to catch this possibility).


What are the implications of entanglement swapping for the Pusey-Barrett-Rudolph (PBR) theorem?

Question: The derivation of the PBR theorem makes an assumption that "systems that are prepared independently have independent physical states". However, it is known that it is possible to entangle two particles that have never interacted using a procedure known as entanglement swapping. This is a situation where two particles that have been prepared independently do not have independent physical states. What are the implications of this fact for the validity and scope of the PBR theorem?
Answer: The PBR theorem is a proof by contradiction that (if its assumptions are true) you can't always have a psi-epistemic interpretation of quantum experiments.  If you change the experiment, and entangle the two initial states via entanglement swapping, that doesn't alter the original argument in which you instead prepare individual states.  And if there is one case that proves that a psi-epistemic interpretation impossible, that's enough for the PBR argument to go through.
Now, you may have noticed that the "^" geometry in spacetime is the same for entanglement swapping experiments as it is for the PBR theorem.  (Two separate particles come together for a joint measurement.)  Some people interpret entanglement-swapping experiments as indication that the eventual joint measurement must have some retrocausal influence on the initial state.  If that were true, and this retrocausality also held for the similar PBR geometry, then one would doubt the validity of the assumption that the initial states were prepared independently.  (The future measurement would serve to correlate those initial states.) And once you broke one of the assumptions of the PBR theorem in this manner (or in any manner), the usual PBR conclusions would no longer follow.  That's one reason why physicists who like psi-epistemic explanations (including Pusey himself , the "P" in "PBR") are often intrigued by retrocausal explanations of quantum phenomena.
Answer: "Prepared independently" means that the systems are prepared in separate labs which are isolated from the outside world (including each other). It's impossible to produce entangled systems under that constraint, whether you use entanglement swapping or not.
In quantum-circuit terms, the preparation process has to split into two independent circuits with no lines running between them. If you look at entanglement swapping circuits, such as the ones here, you'll see that they don't have that property.
Comment: @KenWharton "send[ing] one particle from each lab to a single joint measurement" violates independence. Also, you can't create entanglement that way—if A and B are a Bell pair and C and D are another Bell pair, there's nothing you can do to B and C alone that will make A and D into a Bell pair. That would allow for FTL communication. You have to operate on A or D using information obtained from B and C to complete the entanglement swapping protocol.
Comment: Impossible?  Well, you could make two entangled particles in one lab, and two entangled particles in another isolated lab, independently.  Then send one particle from each lab to a single joint measurement, which creates entanglement between the remaining two particles (via entanglement swapping).  Those two particles can then be sent into a PBR experiment.  You could say that these labs aren't isolated, but if they stayed so isolated that you couldn't do entanglement swapping then you couldn't do the PBR experiment either.
Comment: Okay, yes, depending on what precisely you mean by "entanglement swapping" (ES), that's right.  You can't use ES to make one particular certain entangled state between A and D without breaking the independence between the labs.  But even without that final step of the ES protocol, you can indeed make A and D "entangled", in one of 4 possible entangled states, which one determined by the outcome of the external B-C joint measurement.  You can do that without breaking the independence between labs (except in the way already required for PBR).


iPhone simulator fails

Question: I have a fresh iPhone project. When I "Build and Go":

Error from Debugger: Failed to launch simulated application: iPhone Simulator failed to install the application.

Why is that?!
Comment: I had this same problem and the below answer didn't seem to help. While I had restarted xcode, someone suggested rebooting my computer, and that cleared up this problem.
Answer: You need to remove the folder as sudo ~/Library/Application Support/iPhone Simulator
<code>sudo rm -Rfv ~/Library/Application\ Support/iPhone\ Simulator
</code>
It looks like previous versions of the SDK have some kind of permission trouble.
Comment: It works! Close iPhone Simulator, close Xcode and paste this command in the Terminal. Be aware that data created within your simulated application will be lost (database, files, etc).
Answer: You don't have to sign code to run in the simulator, only for running on real devices.
Was the app running in the simulator successfully before? If so, did you make changes to the app since? Maybe try rolling them back until it starts working again to identify where the problem is.
Can other apps run in the simulator, or is the problem isolated to one particular app?
Take a look at this article.
Answer: Have you tried opening the simulator from /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app
and checking if anything (ie Mail, Safari, etc) works in the simulator?  That'd tell you at least whether the Simulator is broken or there's something wrong with deployment.
Answer: I had this problem too!  I deleted the folder "/Library/Application\ Support/iPhone\ Simulator" in my user directory.  Started the simulator again and it started right up.
Answer: I ran into a similar situation where my home directory was on an NFS share.  Deleting my "~/Library/Application Support/iPhone Simulator" directory didn't help, but sym-linking that directory to a location on my local disk did fix the problem.
Answer: I just solved this problem by reinstalling the SDK (iphone_sdk_3.1_beta_3__leopard) and restarting my machine.
Answer: After renaming the application the app would not launch in simulator. I was getting the above error. I tried most of the suggestions above, checked all my settings in the plist, also checked the build settings, and nothing worked. What worked for me was to reset the simulator.
Answer: try to "reset content and settings" on ios simulator menu

iPhone simulator fails