What is the noun phrase whose head is "China"?

Question: What is the noun phrase whose head is China in the sentence "It looks a lot like the China May and I used to see in movies brought to Shanghai from Hollywood."
Comment: The noun phrase is *the China May and I used to see in movies brought to Shanghai from Hollywood.*  Did you have something more specific to ask about it?
Comment: Are you asking about what it means?  About the conversion of *China* into a common noun?
Answer: What you may be finding confusing regarding this sentence is the dropped 'that'. It is relatively common in English for words to be dropped if their presence can be inferred by the context. For clarity, I include it in italics with the noun phrase bolded (exactly as per snailboat's comment)

It looks a lot like the China that May and I used to see in movies brought to Shanghai from Hollywood.

What follows from where the 'that' should be is a relative clause, but it is still considered to be an element of the noun phrase (refer to the links for more information on this).
Answer: The sentence is potentially confusing for several reasons. But to break it out:
The subject is "it".
The verb is "looks ... like".
That is, "it", the thing that he is talking about, looks like something else.
The object of the verb is "the China". The thing that it looks like is China. But not just China in general, rather, the China that "May and I used to see in movies". Presumably "May" is a person's name, likely the writer's wife or girlfriend. Perhaps the larger context makes clear who she is.
And finally, what "movies" is he talking about? Movies "brought to Shanghai from Hollywood".
I stumbled over the sentence on first reading because it's fairly complex, and seeing the capitalized words "China" and "May" together made me for a moment think that "China May" was the name of something. I had to read it a second time to realize they were two separate names.


Can we get siblings in Jannah if we don't have them in this world?

Question: If someone does not have an elder sister or brother in this world, but he or she always wanted one, so will it be possible in Jannah?
Comment: You will get whatever you desire in Jannah. So the answer, in short, is yes
Comment: Allah  knows best because what you desire involves not only your wish but the agreement of your parents (for it be to technically your sibling) ... what if you say yes but they say no ... also I'm not even if sure if the concept exists in Jannah as it involves najas. Remember while the dwellers of Jannah will eat & drink, they won't excrete like on earth. Instead, their sweat which will smell as sweet as musk will do that function ...how? Allah Knows Best.
Answer: It's not really possible to understand what Jannat is like. But given that in the Islamic umma we are encouraged to think of all Muslim men as our brothers, and all Muslim women as our sisters then it's possible in Jannat that you will find that you have many brothers and sisters.
Answer: Yes,It Is Possible As You Can Get Anything You wish in Jannah.As In Jannah There Is Everything What Souls wish and desire.


system resource monitor for cron jobs

Question: I have a linux server which encounters high cpu usage which cause server not responding to any request even ssh login. After manual reboot the server comes back to normal.
The server has many cron jobs running at different time interval. Checked the sar logs but could not get clear detail of the process causing the issue.
Can anyone help with this if any tools available to record the periodic individual process, crontab script resources usage for troubleshooting the issue.
Answer: Read man top, especially about the -b Batch mode and -n Number of iterations. Redirect the top output to a file (I'd do one per top invocation, to facilitate comparison)
Comment: Usage: `top -b > ~/top.log &`
Comment: @pa4080 How do you stop that before it fills the disk? How do you compare this time period with the previous? Seriously, read `man top`.

system resource monitor for cron jobs


How do microbes spread from a small place to a very large place?

Question: Bacteria are very small, so they cannot move very far on their own. Viruses cannot move themselves at all. So how does a specific type of bacteria or virus spread from a small place to a very large area (such as the whole Earth)?
Comment: Studies of the human microbiome suggest that gut and skin bacteria strains are localized to regions not larger than 1000 km so transport in general is limited. Look at works about ocean microbiology and aerobiology for transport through water and air. If you travel around the world and defecate, then your gut bacteria are extremely lucky.
Answer: Birds migrate for thousands of miles, carrying diseases on a time scale of months or less.  With climate shifts, insects and animals shift their ranges on a time scale of hundreds of years or more.  Bacterial spores like anthrax can be in a form that is easily blown around the whole Earth, ready to thrive wherever they touch down. Plant diseases travel with their plant hosts, and over time scales of thousands of years the plants - e.g., dandelions and conifers - can spread thousands of miles of latitude and longitude.
Comment: Or for a more topical example, the COVID-19 virus travels mostly by airplane and cruise ship.
Comment: @jamessqf technically the vast majority of its "trips" are over distances of <2m, but yes - most long-distance introductions occur via rapid international travel. :)
Answer: The answer by @SMcGrew is essentially correct, but let me add a technical term (at least in the context of infectious diseases): the bacteria and viruses a carried by vectors. Since word vector is a kind of overused, even if we limit ourselves to biology, it is also common to be more specific and call the disease vectors.
Vectors are classified into biological vectors and mechanical vectors, depending on whether they biologically interact with the microbe (i.e., they get infected) or whether they are simply carried from one place to another.


6-1/2" over 7-1/4" circular saw

Question: Why would anyone get a 6-1/2" over a 7-1/4" circular saw? Is there something a 6-1/2" can do that a 7-1/4" cannot?
Answer: The 6-1/2" circular saw is great for working due to its smaller size and weight over the larger saw. But you are limited to depth of cut that can be achieved. For example some saws this size will not cut all the way through a 1.5" thick lumber with the blade angled at  45 degrees. The lighter saw can be a real benefit for jobs such as cutting sheet goods on a roof job.
The 7-1/4" saw will support a deeper cut which is particularly useful when making certain types of cuts. For example the Dewalt DW364 saw is capable of a cut depth of 2-7/16" when set with the blade in the normal 90 degree position. At a 45 degree angle this saw can cut 1-7/8" deep which is needed when cutting things like rafters that require cutting though conventional 1-1/2" thick framing lumber.
Comment: 6.5" will cut a 2x at 90 degrees. It won't go all the way thru at common angles.
Comment: Can you cut 2x lumber with 6-1/2 ?
Answer: The main advantage of the smaller saws was that the smaller blade required less torque to drive, letting them run on smaller motors and stretching the battery life. The weight reduction is an incidental outcome.
In other words, full-size is better, all things being equal -- but all things may not be equal.
Answer: The 6 1/2 is great for sheet goods.  I bought a 20V version and it's great for cutting plywood.  With the smaller saw & lack of electrical cord I'm able to cut a straighter line than with my 7 1/4 saw.  I own a power miter saw for cutting 2x4's so i found that depth of cut hasn'tbeen an issue for me.

6-1/2" over 7-1/4" circular saw


Prove for any integer $a$, one of the integers $a$, $a+2$, $a+4$ is divisible by $3$.

Question: Prove for any integer $a$, one of the integers $a$, $a+2$, $a+4$ is divisible by $3$.
I know I would use the division algorithm but I am really confused how to go about this. Step by step explanation please? thank you so much!
Comment: Each number leaves a remainder of either $0$, $1$, or $2$ when divisible by $3$, according to the division algorithm. Convince yourself that no two of them are the same, and think about Pigeonhole.
Answer: For every number $a$: $a \equiv {0, 1, 2} \pmod{3}$
In the first case: $a \equiv 0 \pmod{3}$
For the second one:
$a \equiv 1 \pmod{3}$ =>
$a+2 \equiv 3 \pmod{3} \equiv 0 \pmod{3}$
For the third one:
$a \equiv 2 \pmod{3}$ =>
$a+4 \equiv 6 \pmod{3} \equiv 0 \pmod{3}$
Answer: Hint $\, 3\mid a\!\iff\! 3\mid a\!+\!3.\ $ $\ a\!+\!2,a\!+\!3,a\!+\!4\,$ are $3$ consecutive integers, so $3$ divides one of them.
Answer: Try working modulo 3:
So we have:
$$a \equiv a \pmod 3$$
$$a + 2 \equiv a-1 \pmod 3$$
$$a + 4 \equiv a+1 \pmod 3$$
So those three numbers have same remainder when divided by 3 as $a, a+1, a-1$ and we know that exactly one of 3 consecutive number is divisible by 3.
Answer: $a$ is either odd or even. Write $a=2k$ in the first case. Then we are looking at $\{2k, 2(k+1), 2(k+2)\}$. And we know that any three consecutive integers has an integer divisible by three, thus so do this set.
In the second case write $a=2k+1$. Then we are looking at $\{2k+1, 2k+3, 2k+5\}$. This is the same as $\{2(k-1)+3, 2k+3$, and $2(k+1)+3\}$. Likewise one of $\{k-1, k, k+1\}$ is divisible by three. Thus when you multiply by two and add 3 to that one element you still have something divisible by three.
Answer: You really only have to check the three possible cases for $a$. (Normally I wouldn't suggest this "proof by exhaustion", but this problem is simple enough.)
Case I: $\displaystyle a \equiv 0 (\mod 3)$
$a$ is divisible by $3$, problem solved.
Case II: $\displaystyle a \equiv 1 (\mod 3)$
$\displaystyle a+2 \equiv 1+2 \equiv 3 \equiv 0 (\mod 3)$, and $a+2$ is divisible by $3$.
Case III: $\displaystyle a \equiv 2 (\mod 3)$
$\displaystyle a+4 \equiv 2+4 \equiv 6 \equiv 0 (\mod 3)$, and $a+4$ is divisible by $3$.
Answer: $\newcommand{\+}{^{\dagger}}%
 \newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
 \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
 \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
 \newcommand{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}%
 \newcommand{\dd}{{\rm d}}%
 \newcommand{\down}{\downarrow}%
 \newcommand{\ds}[1]{\displaystyle{#1}}%
 \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}%
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}%
 \newcommand{\fermi}{\,{\rm f}}%
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}%
 \newcommand{\half}{{1 \over 2}}%
 \newcommand{\ic}{{\rm i}}%
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}%
 \newcommand{\isdiv}{\,\left.\right\vert\,}%
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}%
 \newcommand{\ol}[1]{\overline{#1}}%
 \newcommand{\pars}[1]{\left( #1 \right)}%
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}%
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}%
 \newcommand{\sech}{\,{\rm sech}}%
 \newcommand{\sgn}{\,{\rm sgn}}%
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}%
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
$$
a + x = 3p + \delta\,,\quad x = 0, 2, 4\,,\quad p,\delta \in {\mathbb Z}\,,\quad
\delta = 0,1,2
$$

$$
\begin{array}{}
\delta = 0 & \imp & x = 0\,, & 3 | a
\\
\delta = 1 & \imp & x = 4\,, & 3 | \pars{a + 4}
\\
\delta = 2 & \imp & x = 2\,, & 3 | \pars{a + 2}
\end{array}
$$


How to listen all touch events on a jailbreak ios device even the app is running in background

Question: I want to know how can I listen all touch events on a jailbreak ios device even the app is running in background. This feature was implemented in an app named AutoTouch. Any ideas or suggestions?
Comment: What have you tried so far? Can you post the code and explain the exact problem you have.
Answer: It is possible to capture system wide touch events just by private api without jailbreaking (ofcourse it will work on jailbroken device too).. Here's the link. It also contains link to github example.
Answer: take a look at the libactivator, the standard tool on jailbreaked iDevices to handle touchevents -> https://github.com/rpetrich/libactivator


GAE app access to closed server behind firewall

Question: I have an application on google app engine servers and private master server behind firewall. Accesss to master server closed by default. So I want to open access for my GAE app. Application sends by XML-RPC requests to master server. How can I do what? How to add GAE servers to my firewall access list?
Comment: http://code.google.com/appengine/docs/python/urlfetch/overview.html#Secure_Data_Connection
Answer: From http://code.google.com/appengine/docs/python/urlfetch/overview.html#Secure_Data_Connection:
"Your application can connect to systems behind your company's firewall using the Google Secure Data Connector (SDC). With the SDC Agent set up on your network, App Engine applications running on your Google Apps domain can authenticate with the Agent and access URLs on your intranet. The SDC Agent ensures that only your applications can connect to your intranet, and that they will do so only for users signed in using an Apps account on your domain."
Comment: What if I cannot force my client to use SDC?
Answer: If not for GAE, you could use Reverse Port Forwarding Wizard:
http://www.upredsun.com/reverse-port-forwarding/reverse-port-forwarding.html
Comment: That doesn't really answer the question.


Tagging in php and sql

Question: I have the following tables in my database:
thread --- thread_replies --- replies
thread --- thread_tags --- tags
thread: id, title, content, created, author_id

thread_tags: id, thread_id, tag_id

tags: id, name

I can select tags for a certain thread using the following:
   SELECT GROUP_CONCAT(DISTINCT tags.name ORDER BY tags.name DESC SEPARATOR ',') AS tags
    FROM tags INNER JOIN thread_tags ON tag_id = tags.id
    INNER JOIN thread ON thread_id = thread.id
    WHERE thread.id = 20

However what I want to do is when I select all the threads, I want to select all the tags associated with each thread as well...
I want to build a multidimensional array like the following:
    Array
(
    [t_id] => 20
    [title] => this is a title
    [content] => This is content
    [username] => username1
    [a_id] => 35
    [tags] => tag1, tag2, tag3
)

I want to know what sql statement I can use to create this for each thread?
So if I select all the threads and their associated authors, how can I also get the tags associated with each thread?
Currently I use this to get each thread and its author:
SELECT thread.id AS t_id, thread.title,
                         thread.content, author.username, author.id AS a_id
                         FROM thread INNER JOIN author ON thread.author_id = author.id

Answer: I think this should work:
SELECT distinct thread.title, thread.id as t_id, thread.content, author.username, author.id as a_id,
GROUP_CONCAT(DISTINCT tags.name ORDER BY tags.name DESC SEPARATOR ',') AS tags
from thread join thread_tags on thread.id = thread_tags.thread_id
join tags on thread_tags.tag_id = tags.id
inner join author on author.id = thread.author_id
group by thread.title

Tagging in php and sql


Cheap payment processing options apart from credit card

Question: I receive check payments from some customers who mail it to me. Recently, some priority mail express packages have had to be redelivered or lost.
Yes, they do lose mail!
I spoke to a local mailman who told me to file a claim, but that is not the point. It is a lot of hassle to request the customer to send the check again as they ask me why don't I take their credit card. I can not afford credit card processing my margin is around 4% and bulk of it will go to Stripe, also I do not make a lot of sales.
Q. What can I do to receive payments without spending a lot in transaction costs?
Both I and my customers are based in the US. I do have a business checking account.
Comment: Are your customers business (B2B) or consumer (B2C)?
Comment: It is B2C with payment ranging between 400-2000 USD.
Comment: You could charge a payment processing fee for credit cards so you'll end up coming out even either way.
Comment: @xyious I have tried that before. Did not work so well in terms of conversion. My niche is very price sensitive.
Answer: For businesses paying you, ask them to send you money via automated clearinghouse (ACH). This is the same system as direct deposit and is equivalent to writing you a check. You will need to provide the routing number and account number for your bank. In fact, if you ever do business with the US Government, they are required by law to use ACH instead of sending a check.
Consumers can pay you by ACH, but most are not familiar with the system and some banks charge a fee to originate one. The consumer version is Zelle, which uses e-mail and phone numbers. Most banks support Zelle on small business accounts but large businesses do not use the system.
For huge purchases, you can use wire transfers, but those cost tens of dollars on both sides to send and receive. The benefit is that they are instant and irreversible. You typically don't use them for anything that costs less than a house.
Note that all of these services don't offer consumer protections like credit cards do. Also, some companies have simplified purchasing procedures for credit card (P-card) purchases. These services are not substitutes: if your customers really want credit card payments, then you need to adjust your cost structure to take processing fees into account. It's just cost of doing business.
Comment: I understand that customers like the convenience and security of a credit card. But my customers are able to sacrifice that for a much effective price and service. So, I don't plan to offer credit card processing. Can I use zelle for a business checking account?
Comment: @Hustlepreneur My bank supports Zelle on a small business account, it all depends on the bank.
Comment: Can you please name the bank you use?
Comment: @Hustlepreneur BofA. I just checked, they take incoming Zelle payments but not outgoing. These things may also vary by state.


How do you find Duriel again?

Question: Once you've completed the quest to kill the oversized slug-thing that is Duriel, the correct Tal Rasha tomb symbol no longer shows up in your quest log.  How do you find him to kill him again?  Is there an easier way than going into all 7 tombs?
Answer: If you created the game and still remember the symbol, it shouldn't have changed. Otherwise, the symbols on in the Summoner's chamber in the Arcane Sanctuary show the false tombs. The one symbol that doesn't appear there is the true tomb.
The 3 prime evils (also NM Andariel and Pindleskin) are better choices for boss farming as they drop better loot.
Comment: +1 My method usually involves just going to the tombs and exploring them until I find the right one. I know I could go back to the Sanctuary to find the symbol, but I like the extra looting and leveling.
Answer: I checked a couple threads, and it looks like you need to revisit the summoner in order to locate the correct tomb. However, it would also seem that Duriel runs are not that popular since the other act bosses have better loops drops, and are easier to kill.
Answer: Also, If you find a glittering chest, then you know that you are in the wrong tomb and can start your search in the next one. Only the wrong tombs have the glittering chest. Maybe that helps to speed things up a bit.
Answer: Unless you're dead-set on exploring all seven tombs, here's one method I use:
I start from the rightmost tomb, head left until I find the correct tomb, and then go in, ignoring any other tombs.
Then the leftmost tomb on the map will always be the correct tomb, because tombs further left won't show up on the map.
Comment: It should be noted that this technique only works in single player.

How do you find Duriel again?


How can Ethereum's supply shrink 2% in the future if most holders just hold onto them?

Question: It is commonly said that Ethereum supply will shrink about 2% per year going towards ETH 2.0.  However, if most people holding it only stake them, and get additional ETH as reward, and don't spend gas fees to transfer them around, then there is nothing to burn, and the supply can only go up.  So how can we know the ETH increased per year will be less than the burned number?
Comment: How will you measure 'most people'? Predictions about future supply are based on the current network usage. They are just predictions. It is highly unlikely that people will stop operating on the blockchain.
Answer: Here is a cool website that lets you test different settings and see the evolution of the ETH supply accordingly. And as they say:

The ETH supply decreases whenever more ETH is destroyed via fee burn than ETH is created via issuance.


ROS2 Industrial on Physical Hardware

Question: I'm trying to use ROS2 to control a Fanuc CRX25ia arm.  Following the Industrial Training docs, I got it working in Melodic, which was the latest version of the fanuc driver, and was planning to port my support, moveit, and the relevant fanuc_driver components to ROS2.  However, the 'Industrial Training' for ros2 is missing the section "Using MoveIt! with Physical Hardware", and trying to port the previous launch file it looks like many of the package's dependencies (industrial_robot_client, industrial_msgs,industrial_utils, industrial_robot_simulator, etc) no longer exist in Ros2 industrial.  Are there alternatives, or another way to get the robot interface part working without rewriting those packages?
Answer: There's some information about this in this issue:
https://github.com/ros-industrial/industrial_core/issues/253
in particular:
https://github.com/ros-industrial/industrial_core/issues/253#issuecomment-1726007620

Thanks to all those that have posted here on this topic. We are
jointly going to more explicitly line out our strategy relative to
drivers and comms with manipulators and in parallel update Industrial
Robot Driver Specification. As Gijs above illuminated there are now
more OEMs offering external motion interfaces, and now more extensible
and versionable ways to support ROS 2 interoperability with those
interfaces, be it via microROS (Yaskawa) or ros2_control (UR). We will
try to provide the resources to enable OEMs to develop, deploy and
maintain ROS 2 support, in a way that benefits both developers and
OEMs and sustains over changes to ROS 2 and to OEM controllers.

It seems like there aren't plans to update industrial_client.

ROS2 Industrial on Physical Hardware


Why doesn't ZIP Compression compress anything?

Question: A 398MB directory was only compressed to 393MB using 7Z and Normal ZIP compression. Is this normal? If so, why do people continue to use ZIP on Windows?
Answer: If you're compressing things that are already compressed (AVI, JPEG, MP3), you won't gain much other than packing everything in a single file.
Comment: And I've even seen it operate in reverse causing the compressed archive to be larger than the individual compressed files.
Answer: Compression works by looking for repetitive patterns inside the items to compress. Also because you do not want to lose any data while compressing your files, the compression must be lossless(*).
Now with that in the back in your head, think about the way files (items) are stored on a computer. At the lowest level, they are all just a bunch of 0's and 1's.
The question can thus be transformed to: "How can I represent a bunch of 1's and 0's in a more compact way than the original representation?"
So lets start from the beginning, how can you compact the normal representation of a single bit (a single 1 or a single 0)?
The answer is really easy: you can't!... a single bit is represented in the most compact manner possible.
Fair enough, let us take a bigger example, how would you compress a binary string like 0111 0111 0100 0111?
Well because we already know that looking at the individual bits won't help us at all, we know that we have to look at a bigger scale. For example, let's take 4 bits at a time.
We now see that the binary string "0111" will occur 3 times in the example, so why don't we represent that with a single bit: 0? but this still leaves 0100 in the dark, so let us represent that with "1"
We know have compressed the original to: "0010"
That's really good! However this is just the basic of basics of the "Huffman encoding algorithm", and in the real world it will be a little more complicated than that (and you would also need to store a table with the encoding information in it, but that's a bit to far for answering this question).
Now to really answer your question: why can't all data be compressed that good?, well let's take another example: "0001 0110 1000 1111", if we would use the same technique as above we would not be able to compress the data (no repetition is found), and thus would not benefit from compression...

(*) there are of course exceptions on this. The most known example of this is the compression used for MP3 files. here some information about the sounds will get lost while converting it from the raw, original file, to the MP3 format, this compression is thus lossy. Another example is the .JPG format for images
Answer: The process of compressing takes repeatable patterns and tokenizes them to shorter patterns.  The output is then mostly non-repeatable and therefore cannot be compressed by much, if at all.
Answer: From the Limitations section of the Wikipedia article on Lossless Compression:

Lossless data compression algorithms cannot guarantee compression for all input data sets. In other words, for any (lossless) data compression algorithm, there will be an input data set that does not get smaller when processed by the algorithm. This is easily proven with elementary mathematics using a counting argument. ...

Basically, it's theoretically impossible to compress all possible input data losslessly.
Comment: It's harder to compress data that was already compressed. Images, videos are mostly compressed since the original size would be very large
Answer: Is this normal?
No. Not with "normal" files. What kind of files were you compressing? If they were already compressed, e.g. they are JPGs, GIFs, PNGs, videos or even other zip files, then they won't be compressed much by any algorithm. If you try compressing Text, XML, uncompressed BMP, source code etc. files, zip will provide good compression, but probably not the absolute best.
Why do people continue to use ZIP on Windows?
One reason is that there is nice zip handling built into the system - you can right click anywhere and create a new zip file, then drop stuff into it. You can just double click a zip file and it opens like a folder. You can copy stuff out of it and sometimes even use it in place. You don't need to install WinZip or 7z or any other program. I usually recommend people don't.
Answer: In a zip archive containing many files, each file is compressed independently. If there is a great deal of similarity between the files, then a different tool might give much better compression.
For example, tar.gz joins the files together, then compresses the results. Likewise a "solid" rar file makes use of similarities between files.
The downside of tar.gz or a solid rar is that you can no longer extract a single file from a large archive without decompressing the archive up to where the file you want is.


Solve $(3x^2y^4 +2xy)dx + (2x^3y^3 - x^2)dy=0$

Question:
Solve $(3x^2y^4 +2xy)dx + (2x^3y^3 - x^2)dy$

This is not one of the standard forms and neither is it an exact form. How do I go about doing this question?
Answer: I tried an integrating factor of the form $\mu(x)$ and failed, but when I tried a function of $y$ it worked! Your equation becomes exact upon multiplication by $1/y^2$.
Answer: The rearrangement $y'=\frac{y(3xy^3+2)}{x(1-2xy^3)}$ suggests we should consider $z=xy^3$. Rearranging $z'$ into a result of the form $\int\frac{7dx}{x}=\frac{1-2z}{z(z+1)}dz$, and integrating to $x^7=\frac{kz}{(z+1)^3}$ and rewriting in terms of $x,\,y$, we find $x^3y^3-ky+x^2=0$ with $k$ an integration constant. This is the same result as user1337's method gets, but it doesn't require you to spot which factor to use.
Answer: $$
(3x^2y^4 + 2xy)dx + (2x^3y^3 - x^2)dy = 0
$$
$$
\implies 3x^2y^4dx + 2x^3y^3dy + 2xydx - x^2dy = 0 \tag{$1$}
$$
We know that:
$$
d\left(\frac{x^2}{y}\right) = \frac{2xydx - x^2dy}{y^2}
$$
Substituting this back into $(1)$:
$$
\implies 3x^2y^4dx + 2x^3y^3dy + d\left(\frac{x^2}{y}\right)y^2 = 0
$$
Assuming $y \not= 0$:
$$
\implies 3x^2y^2dx + 2x^3ydy + d\left(\frac{x^2}{y}\right) = 0 \tag{$2$}
$$
Also:
$$
d(x^3y^2) = 3x^2y^2dx + 2x^3ydy
$$
Substituting this into $(2)$:
$$
\implies d(x^3y^2) + d\left(\frac{x^2}{y}\right) = 0\\
\implies x^3y^2 + \frac{x^2}{y} = c
$$
I don't know if this is formally legal in mathematics (I only have high school mathematics under my belt), but this is how I would have done it.


Identify a copper fuzzy moth

Question: Photographed in 2003 in Panama. Not sure of size.
Comment: Its a relative of dirphia horcana and dirphia brevifurca
Answer: Cerodirphia avenata, a moth of the Saturniidae family. An anonymous person identified it. The person did not give any evidence, and I know nothing about moths, but its seemingly-distinctive wing markings wing frontal edges, and antennae match this example image on wikipedia and those I can see on iNaturalist also made in Panama.
Comment: Thank you for posting the answer you found elsewhere. Please note that you are more likely to get a positive response to your answer if you explain why your identification is correct. Specifically, please [edit] your answer to add discussion of key features that support this conclusion and supporting references or at least validated images. Without this post is indistinguishable from opinion and thus is not appropriate as an answer on this site. ——— You may also wish to take the [tour] and then consult the [help] pages for additional advice on [Ask] and [Answer] effectively on this site.
Comment: thanks, I've added a (quite likely naive) justification

Identify a copper fuzzy moth


Trying to install JGit to install EGit and getting error requires package org.kohsuke.args4

Question: Trying to install JGit to install EGit and getting error:
Cannot complete the install because one or more required items could not be found.
  Software being installed: Eclipse JGit Command Line Interface 220.127.116.11209190230-r (org.eclipse.jgit.pgm.feature.group 22.214.171.124209190230-r)
  Missing requirement: JGit Command Line Interface 188.8.131.52209190230-r (org.eclipse.jgit.pgm 126.96.36.199209190230-r) requires 'package org.kohsuke.args4j [2.0.12,2.1.0)' but it could not be found
  Cannot satisfy dependency:
    From: Eclipse JGit Command Line Interface 18.104.22.168209190230-r (org.eclipse.jgit.pgm.feature.group 184.108.40.206209190230-r)
    To: org.eclipse.jgit.pgm [22.214.171.124209190230-r]

~~~~ Update ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I gave it the new update site and it said EGit was already installed
So then I went to uninstall it and only one of ~6 Egit entries had the Uninstall button enabled when selected. (Why won't it let me uninstall them? - ed) I uninstalled that one hoping maybe it would manage uninstalling all of the entries. (Why isn't the Uninstall Software option next to the Install new Software option? -ed)
I then tried to install EGit again and said some plugs were not necessary to be installed because they were already installed (Why won't it let me over write it? -ed). So it let me continue based on the other plugins already being installed.
I restarted as recommended.
I now get this alert and can't open up Flash Builder (Eclipse).
Cannot complete the request.  See the error log for details.
"Eclipse EGit" will be ignored because it is already installed.

The log contains this information:
!SESSION 2012-10-17 16:38:16.346 -----------------------------------------------
eclipse.buildId=I20100608-0911
java.version=1.6.0_35
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_US
Framework arguments:  -keyring /Users/me/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86 -keyring /Users/me/.eclipse_keyring -consoleLog -showlocation

!ENTRY org.eclipse.osgi 4 0 2012-10-17 16:38:16.892
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

*Another developer I know said he tried for a few days to get EGit installed and couldn't. Is this normal? *
Any suggestions?
Answer: Did you use the h t t p://download.eclipse.org/egit/updates repository? This seems to be incomplete, see this bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=392087.
If you want to install EGit, just use this repository: http://download.eclipse.org/releases/juno/
It contains the latest version of EGit (2.1) plus all necessary dependencies (including JGit).


Python code for 2 buttons

Question: this is a beginners question, I suppose.
How can I write a python code that allows the use of 2 (or more) push buttons connected to the GPIO?
Each button should start a different shell script.
The buttons are connected to the 3.3V pin and through a resistor to a GPIO pin.
Also, I think, de-bouncing is necessary for the plan.
All the simple tutorials deal only with one button and the more complex projects have a lot of code I don't understand. I tried a bit of copy/pasting, but without success.
Help would be appreciated.
Bye
SG
Comment: Do the simplest project for one button.  Get that working.  Understand how it works.  It will then be trivial to add another button/script.
Comment: post your code and explain hiw it does not work as expected
Answer: Almost sounds like a homework issue :-) As such (and that this is not really a programming site) I would break the problem down as follows:

Understand how to import the GPIO Zero, time and subprocess modules into your program
Understand how to use the sys module to call to trigger the shell scripts AND report their return codes (assuming they do)
Understand how to use the basic button function of GPIO Zero using the wait option.  Test pull up / down, wait and bounce options.  Check both switches work the way you want by testing each in its own program
Create a basic loop in Python that waits till you press ctrl-c and end without an error message
Change the loop with sleep so other things can run
Change one of the button functions to use the callback capability to action the call to the script
Change the final button function to use the callback to run the other script

Try not to use copy and paste (though I guess we all do) - it never teaches you the basics of coding or how to solve problems...
Done - voted close as the issue was way too wide ranging.

Python code for 2 buttons


Transfer Exodus Wallet to Mist

Question: How do I transfer my Exodus wallet to Mist? I have some Eth based tokens (DRP) and I'd like to be able to see them, but they don't show up in Exodus. I'm baffled by the import function or opening GETH (it wants me to make some contract.
Answer: Haven't used Exodus, but generally -- attempt to locate the keystore file (starting with UTC--) for upload or use your private key/mnemonic to open the wallet on e.g. MyEtherWallet (under "Send Ether & Tokens").
Comment: Thanks.okay, I imported the 2 keystore files - one for my ETH and one for my ECR20 token (DRP). MIST imported them, but I don't see the coins. Still waiting on the sync - it'll never happen with my internet. Should I just bag MIST and get myetherwallet? Exodus won't show ETH based coins, only ETH itself.
Comment: @misterkel yeah. MEW requires zero sync.

Transfer Exodus Wallet to Mist


Is a query about contextually-appropriate (including vulgar) expressions on topic?

Question: I'm a non-Italian speaker, seeking contextually-appropriate expressions for shocked surprise, even better would be seriously shocked/scared surprise.  (This is for a novel.)  A literal translation of, "Oh, shit!" is doable, but is that colloquial or simply not what an Italian speaker would say?  Is such a question OK here, or close-bait?
Answer: Welcome to Italian.SE!
I think this would be an acceptable question: it's about Italian usage, after all, and not simply a translation.
Maybe it would be better to try and make it more general.
I suggest to add a description of the situations in which the character happens to be shocked or surprised: the context is important for finding the right words and this would perhaps make for increased generality.


Getting Vanille AI to cast Death

Question: I've recently gotten the spell Death for Vanille in Final Fantasy 13. In general I have the AI control Vanille and it's done quite well in controlling her. However I've noticed ever since getting Death she's failed to cast in once. Even after completely debuffing all enemies she prefers to sit idle and do nothing rather then cast Death. I tried taking control of her to make sure she indeed has it and there wasn't some funky bug but I was able to cast it while I was in control. Is there something I'm missing on why the AI won't cast death?
Answer: Each character has one unique ability that none of the others have. The AI will never use them, so they're only available if you're controlling the character and you use them manually.

Vanille: Death
Fang: Highwind
Snow: Sovereign Fist
Lightning: Army Of One
Sazh: Cold Blood
Hope: Last Resort

This is kind of unfortunate for Vanille, since if you like to use her as a medic the AI does a much better job and you're rarely in control of her.
(source)
Comment: True but I've seen it do a lot of damage even on miss. Ah well, my current setup hasn't failed me yet, just would kinda like to mess with the ults
Comment: Yeah I don't normally like to be in control of her cause, as you said, the AI does an awesome job already and she's my second weakest character so I'm busy keeping her alive a fair amount of the time. Sad to hear the AI won't use it on it's own =/
Comment: On the bright side though, Death has a really, really, *really*, **really** low chance of actually working, at least in my experience. You're not missing much.
Comment: It's just like summons - if you wanna mess with them, be prepared to swap around a lot.  When was the last time you used Hope or Vanille's summons...oh, right, the one battle where you're forced to.
Answer: Death is a Full ATB Skill.  The AI will not use a Full ATB Skill; you must select this action manually:

In order to perform these moves player must manually select them during the battle, meaning the A.I.-controlled battle members will never use them and auto-battle will not select them.

This implies that Vanille must be the leader of the battle team to use Death.

Getting Vanille AI to cast Death


Pantone printing on a roll-up banner?

Question: I heard most of the roll-ups are printed in CMYK. I am wondering if it is possible to print with a Pantone on a Roll-up (canvas)?
Comment: Just curious but why did you use a Pantone color to begin with?
Comment: It is likely possible, but it depends both on the artwork and the printing process. If you could show us the design, we would be better equipped to give you an accurate answer
Comment: Thank you. It's basically 3 cmjn images and 2 pms, but they never overlap. The only full-bleed element is the pms. I cannot show you the artwork unfortunately...
Comment: What about if I simply convert the PMS in cmyk in Indesign?
Answer: Digital printers are not built to allow for Pantone colors.  Some digital printers get close if they are offering 6 and 8 color printing but I never seen some guarantee it.  Typically if someone wants a roll-up with Pantone colors we find the CMYK companion from the the cards.  Another alternative since the cards are very expensive is this or this.  Be advised if you buy the cards (guide) they should only be stored in a dark room or drawer to prevent color fading.
Comment: What about if I simply convert the PMS in cmyk in Indesign?
Comment: you can do that.  I would.  Some charge, but in the end its up to the client and what they are after.
Answer: I am not sure what is your concept of Pantone.
1. Pantone could mean spot color, this is an ink prepared with a specific formula to achieve a specific color to be used directly.
No, an Inkjet printer is normally not prepared to do that.
Of course, you could temper your printer, especially one that can be feed on a tank using different mixtures of ink to shoot a specific color. But probably those base colors will be the basic CMYK ones, so there is no real added value there.
2. But if you simply are using Pantone to choose a color, for example assigning that from your vector based application (Illustrator, Corel) This color will be translated using the appropriate ink combination using the printer´s color profile to emulate the color as close as possible.
In some cases, it is a good approach to leave the spot colors as such all the way, so the the color conversion is made by this profile, not before.
Most Pantone colors will be reproducible using this CMYK "simulation" or conversion, but not all colors can.

Pantone printing on a roll-up banner?


Does there exist an upper bound on the Fourier coefficients of the reciprocal theta function $\frac {1}{\theta}$?

Question: Define the theta function as
$$
\theta(x) = \sum_{n=-\infty}^\infty e^{-\gamma(x+n)^2}
$$
where $\gamma>0$. Clearly, $\theta$ is 1-periodic, non-zero and smooth. Therefore, the reciprocal map $x \mapsto \frac{1}{\theta(x)}$ is 1-periodic and smooth as well and can be expanded as a Fourier series:
$$
\frac{1}{\theta(x)} = \sum_{n=-\infty}^\infty a_ne^{2\pi i nx}.
$$
I'm interested in upper bounding the Fourier coefficients, i.e. I want to find a non-trivial map $f$ (with a fast decay) such that
$$
|a_n| \leq f(n).
$$
Are there any results in this direction? Thank you!
Comment: Your best bet would be to analytically or meromorphically continue $1/\theta(x)$ into a strip around the real axis and shift the contour of integration for the Fourier coefficients to either the upper half-plane or lower half-plane, depending on whether the frequency $n$ is positive or negative (i.e., use the saddle point method).
Comment: Please refer to A Characterization in the space of Convolution Operators- B.R.Nagaraj,Proc.AMS,Vol.94,July(1985)
Answer: As @TerryTao stated correctly in the comments, a bound on the Fourier coefficients can be obtained by the saddle point method: The extension of $\frac 1 \theta$ to a meromorphic function on $\mathbb C$ has poles which are bounded away from the real axis. This implies that the Fourier coefficients of $\frac 1 \theta$ decay at least exponentially. In fact, the Fourier coefficients can be derived explicitly from which we can show that the decay is exactly exponentially:
First note, that your map $\theta$ is essentially the Jacobi theta function of third kind. Using Poisson's summation formula we have
$$
\theta(t) = \sqrt \frac \pi \gamma \sum_n \left ( e^{-\frac{\pi^2}{\gamma}} \right )^{n^2} e^{2\pi i n t} = \sqrt \frac \pi \gamma \vartheta_3(it, e^{-\frac{\pi^2}{\gamma}}).
$$
Hence, for $q = e^{-\frac{\pi^2}{\gamma}}$ and $z=it$ we have
$$
\frac 1 {\theta(t)} = \sqrt \frac \gamma \pi \frac 1 {\vartheta_3(z,q)}.
$$
In the paper A.J.E.M. Janssen, Some Weyl-Heisenberg frame bound calculations,
Indagationes Mathematicae,
Volume 7, Issue 2,
1996,
Pages 165-183, Janssen obtains on page 178 the Fourier expansion of $\frac 1 {\vartheta_3}$:
$$
\frac 1 {\vartheta_3(z,q)} = \frac 1 C \sum_k (-1)^k a_k e^{2ikz}
$$
$$
C = \sum_{n \in \mathbb Z} (-1)^n (2n+1)q^{(n+\frac 1 2)^2}
$$
$$
a_k = 2 \sum_{m=0}^\infty (-1)^m q^{(m+\frac 1 2)(2|k|+m+\frac 1 2)}
$$
From the value $|k|$ in the exponent in the definition of $a_k$ it follows directly that the $a_k$'s decay exponentially assuming that $|q|<1$. Applying some trivial bounds on $a_k$ gives you the desired map $f$ so that $|a_k| \leq f(k)$.
To derive the above formula, Jenssen refers to an exercise in the book Whittaker, E., & Watson, G. (1927). A Course of Modern Analysis (4th ed., Cambridge Mathematical Library). He essentially solves this exercise which leads to the above expression.
The above formula should agree with the one derived in the answer of @მამუკა ჯიბლაძე.
Comment: Great, that's it! It indeed agrees, taking into account the famous expansion $\prod_{n\geqslant1}(1-x^n)^3=\sum_{n\geqslant0}(-1)^n(2n+1)x^{n(n+1)}$. Except for one minor detail: $a_0$ must be replaced by $\frac12a_0$ (this is stated correctly in Whittaker & Watson, though, and my $c_0$ agrees with that too).
Answer: By no means anything like a complete answer, but what I have is an empirical explicit formula for the coefficients $a_n$ which might be useful.
For $\theta$ itself,
$$
\theta(x)=\sqrt{\,\frac\pi\gamma\,}\ \left(1+2q\cos(2\pi x)+2q^4\cos(4\pi x)+2q^9\cos(6\pi x)+...+2q^{n^2}\cos(2\pi nx)+...\right),
$$
where $q=e^{-\frac{\pi^2}\gamma}$.
It seems that the following holds (checked in Mathematica to about 100th power of $q$):
$$
\frac1{\theta(x)}=\sqrt{\,\frac\gamma\pi\,}\ \frac1{\left((1-q^2)(1-q^4)(1-q^6)\cdots(1-q^{2n})\cdots\right)^3}\ \sum_{n=0}^\infty c_n\cos(2\pi n x),
$$
where
\begin{align*}
c_0=&\ \,1-q^2+q^6-q^{12}+...+(-1)^kq^{k(k+1)}+...,\\[.5ex]
c_1=-2&\left(q-q^5+q^{11}-q^{19}+...+(-1)^kq^{k(k+3)+1}+...\right),\\
c_2=2&\left(q^2-q^8+q^{16}-q^{26}+...+(-1)^kq^{k(k+5)+2}+...\right),\\
c_3=-2&\left(q^3-q^{11}+q^{21}-q^{33}+...+(-1)^kq^{k(k+7)+3}+...\right),\\
\cdots\\
c_n=(-1)^n\times2&\sum_{k=0}^\infty(-1)^kq^{k(k+2n+1)+n}
\end{align*}
Again empirically, these $c_n$ are of order $q^n$, but I do not know how to prove this. Here is the plot of their absolute values for $\gamma=100$:
Comment: Looks like some Ramanujan formula.
Comment: @SylvainJULIEN Whittaker & Watson (Example 14 on page 489) refer to the Mathematical Tripos of 1903 (see another answer).


98% plugged in, not charging

Question: I just purchased a new laptop Asus which has Windows 10, my concern is the battery meter showed a 100% charge in the first 6 days, and when laptop is plugged in to the mains and  continuously used ( for approx 8-9 hours a day)  i could see this message when i keep my mouse over the battery icon i get this notification "98% available (plugged in, not charging)"  what does this mean? is there a problem with my computer?
Answer: Some laptops won't charge the battery back to 100% until it falls below a certain threshold, e.g 95%. This is to prevent unnecessary charging that would reduce the battery's lifespan, since batteries constantly self discharge.
Try using the laptop on battery for 30 mins or so to discharge it a bit then plug it in to see if it charges up to 100%.
Also, you may want to check the BIOS to see if there are any options for battery charging management as some laptops have very specific behaviour that can be configured.
Comment: When you charge a phone to 100% and keep it plugged in, most phones will lie to you and keep showing 100%, even though it is actually going through a short 2-5% charge-discharge cycle, so that the battery is not always charging. Windows 10, on the other hand, appears not to lie to you. It reports the true percentage of the battery, at the risk of confusing users. My Surface Pro 3 is showing "95% available, not charging", even though it's plugged in, but sometimes it does actually show 100%.
Answer: It can mean 2 things.

Your battery is not calibrated right
You have software running that prevents your battery from charging until a certain level has been reached in order to prolong the lifespan of the battery.

In case it is 1:
Basically it is charged up to 100% but the computer thinks its still at 98%.
Some BIOS have the option to calibrate the battery. If yours doesn't, the following trick will work too (not just for laptops, works for phones and other devices with a recharchable battery too)
First completely drain the battery. Once the battery is drained, turn it back on, and again wait for it to go dead. Keep turning it on until it really won't turn on anymore. You may want to go into the BIOS when doing this because windows will automatically do stuff to reduce battery life such as hybernating the laptop.
Once the battery is fully drained, connect the powercord and charge the battery. Make sure the battery has at least 5% to 10% charge before turning it on, and ensure that you will be able to charge it to the full 100% in one go. Aborting somewhere may cause it to revert to the above behavor. Once the 100% mark has been reached on that first charge, you should be able to use your battery normally charging when you want upto when you want without much issue.

98% plugged in, not charging


Block plugin update possibilities (but not by hiding notifications)

Question: Is it possible to block specific plugins from updating, manually too? I don't want to block this by hiding the notification, changing the plugin version or anything like this. I'd like the notification to show, show the new version number, but when hitting the update manually it should block/disallow this - preferably displaying some sort of (cusomized) notification in the plugin section (eg. "Update for this plugin is not possible").
Comment: if it's a free plugin of wordpress.org, you juste have to rename the directory name of the plugin.
Comment: I was more looking into commercial plugins.
Comment: there is a lot of different way to update a commercial plugin then you have to read the code of the plugin to find how to stop the update.
Answer: Try this:
<code>add_filter( 'http_request_args', 'dm_prevent_update_check', 10, 2 );
function dm_prevent_update_check( $r, $url ) {
    if ( 0 === strpos( $url, 'http://api.wordpress.org/plugins/update-check/' ) ) {
        $my_plugin = plugin_basename( __FILE__ );
        $plugins = unserialize( $r['body']['plugins'] );
        unset( $plugins->plugins[$my_plugin] );
        unset( $plugins->active[array_search( $my_plugin, $plugins->active )] );
        $r['body']['plugins'] = serialize( $plugins );
    }
    return $r;
}
</code>
Credits: https://stackoverflow.com/questions/17897044/wordpress-how-to-disable-plugin-update
Comment: Useful link: https://markjaquith.wordpress.com/2009/12/14/excluding-your-plugin-or-theme-from-update-checks/
Comment: This would work, but I don't want the plugin not to check and show updates. I want them visible but restrict the actual update process for manual updates.
Answer: Assuming you are still planning on updating plugins yourself but don't want other users to be able to do it, according to wp-admin/update.php you can revoke the 'update_plugins' permission from a user to prevent this. They will get a wp_die message 'Sorry, you are not allowed to update plugins for this site.'
For permissions management you can use User Role Editor or similar.
Comment: Well, I'd need that option for admins as well. Deciding by role is nice and easy, but I need to achieve the same, but for all users. If I ever want to update plugins myself, I'd have to delete the extra code I've put there for this block to work...
Comment: Put every other admin but you in a lesser role without upgrade privilages. It seems like you're making this more complicated than it needs to be.


1996 Ford Explorer Speedometer and Shifting issues, O/D light flashing

Question: My 1996 Ford Explorer began having issues at the end of a moderately long drive home while going approximately 60 miles per hour (not sure if related; I drive that speed often). The speedometer dropped to 0 mph and would only jump up when the car shifted into a higher gear, and it has been doing this since. The overdrive light also flashes sometimes, usually during high speeds. In addition, the shifting feels uncomfortable, as if the car doesn't know when to shift. I believe this problem is with the VSS or ABS Sensor, but I'm not sure. I have not had issues with ABS kicking in inappropriately, and if it's relevant, when driving near 70 mph my car has a tendency to make a rather unpleasant noise like it's failing to shift, so I avoid that, but it may have happened on the drive. Any suggestions? Thanks!
Comment: Does the transmission change into all the available gears?
Comment: @HandyHowie Coincidentally, no, it hasn't shifted into the higher gears in a long time, meaning I haven't been able to get past 70 for a year now. But I don't think it's been aggravated.
Answer: I think you may be correct about the VSS.  It certainly would confuse the automatic transmission and would cause problems on the speedo.  Why it would spring into life when the transmission changes gear is a bit puzzling.  The VSS could also be involved in comparisons of speed by the ABS system, so could be affecting the ABS.  If you are not able to get error codes to back up your thoughts, then the VSS sounds like the first sensor to change.
Comment: VSS = Vehicle Speed Sensor
Comment: Thanks! Yeah, the whole coming back to life thing is really weird, and has me concerned the issue might be deeper than I thought. I'm relenting and taking it into a electric specialist today, who I think will be able to provide more insight.


Other benefits of 64-bit OS apart from memory expansion?

Question: I'm trying to convince somebody of the benefits of switching to a 64-bit OS but I'm having a hard time finding arguments other than "you can use more than 3GB RAM". Are there any other clearly-communicable benefits in having a 64-bit operating system?
Comment: Good question, I've been thinking the same.  Maybe you should clarify what sort of person you are trying to convince, because some of the answers below would be far too technical if we are talking about a casual computer user.
Comment: ashh: that is because the benefits and drawbacks of 64-bit operating systems are all very technical. At least on Linux, for nontechnical end users there is almost no noticeable difference (even I constantly forget whether the machine I'm using is a 64-bit or a 32-bit one); on Windows, there are more incompatibilities and oddnesses to deal with on 64-bit, but other than that again a nontechnical end user will hardly notice the difference.
Answer:
For x86-64 compared to IA-32, there is twice as many registers, which allows compilers to generate better code.
On most operating systems, the 64-bit ABI allows the generation of better code than the 32-bit ABI (by passing parameters on registers instead of on the stack, for instance).
Some things which are extensions on IA-32 are always present on x86-64, so programs can use them without needing to code a fallback (for instance a certain level of SSE).
Last but not least, 64-bit time_t, which will be more and more important as we get near 2038.
Comment: ashh: Registers are the storage locations the CPU has fastest access to, but on x86 they are a *very* limited resource. So if you have many local variables to need you would have to constantly shift them from registers to the stack and back again which takes time. With more registers you can hold more of them in reach at a time without needing to use the stack. Compare with you only having two hands: You can only manipulate two things at a time; with fourhands, you can do twice as much (if your brain keeps up, but that aside for now).
Comment: You need to explain what you mean by:  "twice as many registers, which allows compilers to generate better code".  What is "better code"?
Comment: Also I have noticed that operations with 64-bit integers are roughly four times as fast in 64-bit code against 32-bit code (I regularly pick the wrong C compiler here and then wonder why Lua is faster than C :))
Comment: You gave several technical reasons without explaining what any of them mean. What is "better code" and how does it benefit the user?
Comment: @Johannes, you should add your comment as an answer to this question!  I was asking rhetorically so that Cesar would add such a clarification.
Comment: ashh, Cesar said nearly everything there is to say, so I think leaving that as comment here is entirely appropriate. If s?he is inclined to do so it can still be integrated into the answer itself.
Comment: I've decided to go with this response as an answer. Thanks for the help!
Comment: You don't need a 64-bit processor architecture to have a 64-bit time_t. For example, Microsoft Visual C++ 2005 and later supports 64-bit time_t for 32-bit build targets.
Comment: The code can be smaller (takes less memory) and can run faster.
Comment: code written for a 32 bit application will probably need to be re written for a 64 bit one I suppose. I don't know if that is the case. Might need to be , n order to take advantage of the additional registers.
Comment: I think the answer is fine. Conciseness is necessary and jargon is acceptable.
You can get into a loop of explaining each term you use, but that raises new terms that need explaining, repeat ad nauseum . If someone is curious what a register is he can look it up.
Answer: In fact, you can run more than 3 GB (or more than 4 GB) of RAM on 32-bit operating systems.  PAE provides a means for an x86 or x86-64 processor to access up to 64 GB of memory even on a 32-bit operating system.  It's not quite as straight-forward as just running a 64-bit OS, mind you.  The memory is paged, and so each process is still limited to a maximum of 4 GB.  Additionally, not all operating systems support this.  Some versions of 32-bit Windows made use of PAE, but unfortunately, so they could support badly written drivers, most versions limited support to 4 GB of memory.  For example, Windows XP and Windows Vista are limited to 4 GB (and, as noted, tend to only expose around 3 GB).  On the other hand, Windows Server 2008 Enterprise, Datacenter supports 64 GB of RAM.
The Linux kernel supported more than 4 GB as part of the 2.6 kernel.  However, the Linux distributions sometimes make you install a "server" kernel image in order to make use of this feature.
Comment: Good point.  I can't really figure out why people still believe they need a 64 bit OS to utilize more than 4GB of RAM.
Comment: With Linux another option is to run a 64bit kernel and a 32bit userspace, which gets you full access to >= 4GB RAM, although processes are still limited to 4GB each.
Answer: It really depends on what you want to use the OS for. For the vast majority of "normal" users, the move to 64-bit doesn't really give them much of anything. The only areas currently where 64-bit is really useful is if you want to use more than 4GB of memory (as you stated), or doing calculations with numbers that won't fit into 32-bits.
Eventually, all PCs and OS's will only come in 64-bit varieties, but for now if all they want to do is surf the internet or check e-mail, there isn't a pressing need to move to 64-bit.
Comment: @marc, most casual users are not going to feel that way unless software vendors start writing email clients, web browsers and word processors programs that need >4GB RAM.  Then again, I'm sure it will not be long before that happens.
Comment: For me, the extra memory support really already is a good enough reason to upgrade. I bet over time, most casual users will feel that way, too :-)
Comment: @ashh my Firefox already likes to use ~2 GB RAM. It won't take that long :)
Answer: Not only can you have more than 3 GB of RAM, any software compiled/written with 64-bit in mind can use 64 bit registers and data types which can definitely speed up applications that move around enormous amounts of data, such as 3D programs, CAD, Photoshop, etc.
However, if you're just an average Joe that doesn't work with creative programs, and just reads e-mail, surfs the web, watches YouTube videos, you probably won't even notice unless you plug in a device that requires 64 bit drivers, but the vendor has not released any.
Comment: I have had this problem on many occasions.  If you use a x-64 bit system you have lying around as a server, you might find out a nasty surprise when you start adding additional hardware you have lying around.  A good illustrative example of the dilemma I experienced was when I attempted to add a 3COM 3c509 NIC card to the system.  There are NO drivers anywehre for legacy hardware.  I found that I was over a barrel and had to buy a premium intel NIC card to get a 64 bit driver that worked.  This problem will go away over time. There is insufficient incentive for vendors to support old hardware.
Comment: @Axxmasterr: ISA slots and x64 CPU support on the same motherboard? Seriously? There can't be that many of those out there. Is this some sort of industrial PC?
Answer: The .NET JIT (Just-In-Time) engine contains more advanced optimizations in x64 version (tail-recursion optimization, for example). This means .NET applications have potential to run faster on 64bit systems.
Answer: If you can find some good 64-bits versions of your popular software then yes, upgrading to 64-bits will be an advantage. And there are 64-bits versions of certain applications available. However, these applications tend to be related to image manipulations, movie editing and of course sound editing. Basically, just applications that will handle loads of data. The quality of watching a DVD movie on your PC will also increase since the system can handle the data a bit faster and it can store more data too, if your system has more RAM available.
There's also a small performance gain if you tend to run lots of applications simultaneously. (Even if all those applicatuions are 32-bits versions!) Why? Because the OS itself can handle the additional memory a bit easier, thus allowing more applications to stay in-memory which results in less swapping to the swap file. (And you can have a lot bigger swap file too!)
But I upgraded to 64-bits because I do a lot of image manipulations, which requires a powerful system and lots of memory. (Well, I need a lot of memory, at least.)
Answer: Switching to 64bit provides:

more ram in some operating systems. (those that do not support PAE)
faster. due to increase in register count, utilization of new processor instructions, more modern compiler optimization that was not backported to 32bit, and removal of windows on windows emulation. the improvement varies but some programs have shown massive increase in speed during testing, up to several hundreds percent faster. other programs have shown no difference in speed.
more secure. there are certain memory protections that were added with 64bit that help protect against certain attacks.
more stable. multiple companies have observed that simply recompiling their code in 64bit drastically reduces the number of crashes. They are not sure why. My personal best guess is that it has to do with the emulation layer

it should be noted that all desktop and laptop CPUs made by intel and AMD after 2006 are 64bit. (intel made a couple of 32bit atom CPUs for ultra portables like tablets after 2006). It is extremely hard to find hardware that is not 64bit compatible.
Answer: No. That's about it.
For general home users there is no advantage to x64. If anything, because all your pointers and now 64 bit, you may find you use more memory to do the same thing.
The only significant advantage to x64 is more memory, and currently that is only really being utilised by servers.
Comment: This answer being downvoted below 0 drew my attention back to it. Given that it's now 11 years old and things have somewhat changed to the point that the question is not really relevant any more. Nobody needs convincing to switch to a 64 bit OS in 2021. I'm leaving the answer as it stands though as I still believe that in 2009 prior to the release of Windows 7 when Windows XP Pro 64 bit edition was the most likely 64 bit OS around the answer was entirely accurate. For the average home user being able to utilize more RAM was the only real reason to switch at that time.


Configuring Eclipse for the OA Framework?

Question: Anyone know the steps to configure Eclipse to work with the Oracle Applications Framework?
Alternately, does anyone know of a resource to do this?
I'd like to avoid using JDeveloper if possible.
Answer: To develop OA Framework pages OA Extension is required. OA Extensions are available for Jdeveloper. Unless there is a OA Extension for Eclipse it may not be possible to run OA pages with it.


Which children's television series from the 1980s featured a puppet who slid down a tube to its lair?

Question: This children's television show was broadcast in Australia in the 1980s, most likely on the ABC, and featured children befriending a creature that might have looked a little like E.T. The children and the creature would slide down an organic-looking brown/green tube to get to the creature's lair, which was fairly small and may also have been the base of operations for the children and the creature - it may have had computers in it. I'm afraid that is the only clear memory I have of the show. I think the children were the main characters, along with the creature, but I can't remember anything that they did.
Comment: It wasn't [Oakie Doke](https://youtu.be/EbqaxWjIgOg?t=20) was it?
Comment: No tube sliding that I recall, but [Five Children and It](https://m.imdb.com/title/tt0245622/) had a creature that might match your description.
Comment: @Möoz No, it was much more organic and slimy-looking in my memory, and the sliding tube lead underground.
Comment: @HorusKol That doesn't look familiar, and it says it was released in 1991 in the UK and 1995 in Australia, whereas I would definitely have watched the show I'm trying to remember in the early to mid 1980s.
Comment: Unfortunately, there's not a lot else to go on. If you're definite about those details, update your question and delete the comments. And if you can remember anything else, then also please update. Otherwise, all I can suggest is looking through https://en.wikipedia.org/wiki/Category:Australian_children%27s_television_series and seeing if anything there rings a bell.
Comment: Thanks very much for all these suggestions! I'm afraid none of them look like what I'm remembering - I will keep reading through the list suggested by @HorusKol and will add any extra details I can remember to my question.
Comment: From that list, I'm wondering about Nargun & The Stars - https://www.youtube.com/watch?v=PCHGgzV35lE - but I can't find any more footage that that short collection of clips.
Answer: I wonder if you are thinking of the 1981 tv adaptation of "Under the Mountain"? The children, Rachel & Theo, don't befriend any alien creatures, rather they are trying to stop them from taking over New Zealand (and the rest of Earth).
There is a clip here that shows the Wilberforce's lair.  https://www.nzonscreen.com/title/under-the-mountain-episode-four-1981
They are giant slugs so their lair is very organic, and the children slide down into it.
The tv program (and 2009 film) are based on the book of the same title by Maurice Gee.
Comment: Wow, that it a lot scarier than the show I'm remembering :) The slide in my memory was short and brown/green. Thanks for trying!
Answer: Maybe this is too obvious, but this made me think of Fraggle Rock.  It is from the 1980s, was broadcast in Australia, and features an intro with puppet traveling down a tunnel to their lair.

There were also interactions between the Fraggle world and real humans, through the adventures of Traveling Matt, e.g.
Comment: I'm afraid that doesn't look right :( The show I'm remembering was much smaller than Fraggle Rock, and I think the children were the main characters, along with the creature.


How is Karst topography formed on land?

Question: I read that the source of Karst topography is coral reefs, when coral reefs are found in water bodies, how is karst topography formed on land?
Comment: Is your question how does a karst topography develop or is it a question about how the coral reefs end up on land which makes it possible for a karst topography to develop?
Answer: Karst topography on land is characterized by sinkholes, springs, losing streams, and caves.  They are formed by the dissolution of easily dissolved carbonate rock such as limestone and dolomite.  The rock is dissolved by carbonic acid in rain.
From Wikipedia:

The carbonic acid that causes karstic features is formed as rain
  passes through the atmosphere picking up carbon dioxide (CO2), which
  dissolves in the water. Once the rain reaches the ground, it may pass
  through soil that can provide much more CO2 to form a weak carbonic
  acid solution, which dissolves calcium carbonate.

Here is an illustration of karst topography:

Source:  //www.wandelgek.nl/?p=18828&lang=en
Here is an illustration of karst formation:

Source:  http://slideplayer.com/slide/3400196/
Comment: Also corals can reach the surface because of tectonics, even they all are formed on the sea.

How is Karst topography formed on land?


Using ActiveX with Silverlight

Question: I would really like to use Silverlight for a project I'm working on but I will need to interact with an application running on the user's desktop.  Is it possible to do this with Silverlight, or am I stuck with ASP.NET + ActiveX?
Answer: You can use Silverlight as an ActiveX component in a standard windows application...  See alternate hosting:  http://code.msdn.microsoft.com/silverlightalthost
If you have to do this via a Web application, you could write a custom signed ActiveX component and interact with it from Silverlight (via JS bridge)
Answer: Silverlight applications run in a sandbox on the client and cannot communicate outside except through sockets or ports.  You'll probably have to go ActiveX.

Using ActiveX with Silverlight


Maximizing the length of a right-triangle hypotenuse

Question: Given different continuous ranges of values for the legs, how can I find the values that maximize the length pf the hypotenuse of the right triangle? In other words, given that A lies between X and Y and B lies between C and D, how can I find the values that result in the highest possible value of sqrt (c^2)?
Answer: You want to maximize the function $\;f(a,b):=\sqrt{a^2+b^2}\;$ given that $\;a\in[X,Y]\;,\;\;b\in[C,D]\;$ . But it's easy to see this happens when $\;a=\max\{|X|,|Y|\}\,,\,b=\max\{|C|,|D|\}\;$ as we have a sum of squares within that square root...
Comment: so you're saying that it's again just the maximum values of the range?
Comment: Isn't that obvious, @JoeStavitsky ? I mean, the square root function is an ascending one...


how electron can go towards nucleus and then go far apart from it as in p orbital?see discription

Question: In p orbital shape is dumbbell shaped which means electron go in the shape of dumbbell means first towards nucleus then go away from it. How can be this possible because first electron is attracted towards nucleus now it is very close means attraction force will be more and how it can go away from nucleus?
Answer: Dont think of orbitals as an orbit of the electron around the nucleus. Thats a HUGE no no. The orbitals are solutions to the wave function for a specific value of energy that characterizes each shell. This purely means that an orbital captures the area where the probability density of finding an electron is high, not where the electron orbits. So the dummbell shape results from the probability density, not the orvit of the electron.
Comment: Consider the 'orbital' to be the electron - it is not a point particle when localized in an orbital. The whole Bohr model, and the subsequent use of 'orbital' as nomenclature clouds the minds of physics and chemistry students. Welcome to the world of quantum physics - it is not classical mechanics anymore.


What knowledge do the people of Westeros have about Daenerys and her dragons?

Question: Does anyone in Westeros know that Daenerys is the mother to three dragons in Mereen aside from the small council? Such as Bran, Tommen, Doran, Ramsay etc? Also are there still many loyal to the Targaryen family who would support Dany if she was to try conquer the Iron Throne?
Comment: Are you asking for a list of everyone in Westeros who knows (definitely knows? might know?) about Daenerys and her dragons? Asking for who might know would probably be off-topic since the list is too long, but asking for who definitely knows might be OK.
Comment: Sorry I wasnt very clear. Does anyone definitely know and are any of these people major characters?
Answer: By the end of A Dance With Dragons, there are a handful of people in Westeros who know about Dany and her dragons. Assume the rest of this answer will have spoilers.

First and foremost is Doran Martell, who sends his son to Essos to bring back Dany and/or her dragons and ally them to Dorne. Those also in the know include his close confident Aero Hotah and Arianne Martell.
Euron Greyjoy tells the Ironborn that there are three dragons still alive in the world at the Kingsmoot. So basically every Iron Islander of note knows about the dragons, but I'm not sure that he tells them that its the Targeryon heir who owns them. The entire Iron Fleet presumably knows once they depart for Meereen, but at that point they're no longer in Westeros.
Archmaester Marwyn learns about the dragons using magical means. But again, he immediately leaves for Meereen as soon as we meet him. But he tells Alleras and Pate (probably actually Jaqen H'ghar) before he goes.
Samwell Tarly and Gilly both learn about Dany and her dragons from the sailors on The Cinnamon Wind, who saw the dragons when they were in Qarth. Aemon Targeryon learns about them before he died en route to the Citadel.
You mention the Small Council, but most of them always dismissed the stories of Dany's dragons as fables. Varys presumably knows the truth, since Jorah was in his employ until Qarth and his good friend Ilyrio knows. Tywin Lannister gave some indication that he believed the tales, but pointed out how the last of the Targeryon dragons all died in their infancy.
You also have to count the countless number of sailors bringing back stories of the dragons from their trips to Essos. This is how Davos Seaworth learns about Dany and the dragons in White Harbor, but we never gets an indication of whether he believes the tales or not.
Answer: We are talking about a kind-of-medieval fantasy world:

There are regular trade links between Meereen and Westeros. The traders transport rumors of dragons in addition to their cargo.
The rumors are distorted during transmission. Listeners might reject the truth as obvious exaggeration or believe exaggerations as the truth.
The court in King's Landing has some sort of foreign intelligence collection, but they are limited by their lack of bureaucracy. Agents pass messages to Councillors, who may or may not a hearing in the Small Council. Again, they may or may not be believed.
There are commercial networks like the Iron Bank of Braavos.

Then there are the more fantasy-like parts of the setting:

The Maesters have their raven mail.
The Red Priests look into flames.

Summarized, important people have heard about the dragons. They might believe it or not, or they might not care.
Comment: Very few people seem to even believe the reports of White Walkers north of the wall.
Comment: @PaulD.Waite: When you are in King's Landing the Wall is _very_ far away.
Comment: @MartinSchröder: well sure, but Essos, even more so. (Actually now that I come to think of it, [lots of Essos is probably closer to Kings Landing than the Wall](http://www.fantasticmaps.com/wp-content/uploads/2013/03/World_Of_Ice_And_Fire.jpg). It is the *Narrow* Sea, after all.)


Cloudinary-React Could not find a declaration file for module 'cloudinary-react' - Not using TypeScript

Question: I am trying to import { Image } from "cloudinary-react"; As instructed at Cloudinary-React
And getting the warning:

Could not find a declaration file for module 'cloudinary-react'.
'/Users/myname/Web
Projects/ProjectName/node_modules/cloudinary-react/dist/cloudinary-react.js'
implicitly has an 'any' type.   Try npm i --save-dev @types/cloudinary-react if it exists or add a new declaration (.d.ts)
file containing declare module 'cloudinary-react';ts(7016)

I am not using TypeScript.
I can not figure out what is going on. Does anyone have any ideas how I can resolve this? I have looked around for a few hours.
Package.json: "dependencies": { "axios": "^0.21.1", "bcrypt": "^5.0.0", "cloudinary": "^1.27.1", "cloudinary-react": "^1.7.0", ...
Thank you for any help.
Answer: The cloudinary-react module should normally be added in the node_modules when it is installed in your project. The following sample code is shown in this sample project.
For the dependencies in package.json:
"dependencies": {
    "cloudinary-react": "1.7.0",
    "lodash": "4.17.21",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-scripts": "4.0.0"
},

And Cloudinary components can be imported as shown below:
import React from "react";

import { Image } from "cloudinary-react";

class ImageDisplay extends React.Component {
  render() {
    return (

        <Image cloudName="demo" publicId="sample" width="300" crop="scale" />

    );
  }
}

export default ImageDisplay;


MySQL Point in Polygon Queries and DB Setup

Question: I am trying to set up a table which consists of regions as POLYGON. I want to be able to query the table to find whether a given POINT lies in any of the stored regions or not.
I read that MySQL spatial extensions provide two types of functions to operate with geometries:

ST_* for operating on object shapes
MBR* for operating on minimum bounding rectangles

I tried following what worked in this post. Here's how I set up my table:
CREATE TABLE `region` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`rpolygon` polygon NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

I inserted a few records in the table after getting the polygon definitions from QGIS. I learned about inserting spatial records into a table from here. Here's how I inserted a record in the table
SET @g= ST_GeomFromText('Polygon ((-117.84293016891291472 33.64825334189644224, -117.8428418279120109 33.64599663087331294, -117.84048874488789238 33.64467151585973426, -117.84002294688312418 33.64517746886491523, -117.83983020288114574 33.64549067786812486, -117.83981414088098916 33.64605284787388939, -117.83983823388122403 33.64646242887808825, -117.84012734988419879 33.64708081588442212, -117.84053693088839054 33.64743417988804453, -117.84130790689629009 33.6479401328932326, -117.84199054190328582 33.64815696989545302, -117.84243224690781915 33.64822121789610776, -117.84293016891291472 33.64825334189644224))');
INSERT INTO region
VALUES(1, 'NORTH-EAST', @g);

Just to do sanity check, I tried running a Point in Polygon query using various methods - MBRContains, ST_Contains etc, all of which result in no results or NULL. Below is a sample query that I tried:
SELECT * FROM region where ST_Contains(rpolygon, ST_GeomFromText('Point(33.646201 -117.841949)'));

I am not sure what is going wrong. Am I storing the values incorrectly, do you set up a geo table in a different way?, or am I querying incorrectly. I couldn't find any good tutorials online or examples that I could follow to do such a setup. Any pointers will be helpful!
Answer: Damn! I feel pretty stupid! The order of the coordinates is wrong in my query where I define the POINT.
Anyway. I hope this serves as a good short tutorial for anyone wanting to get started with Point-in-Polygon queries with mysql


What's the concept of potentiometer?

Question:
So here's a picture of a potentiometer from my book. And my book says that the potentiometer is used for measuring internal resistance (of a cell), emf (of a cell) etc. But I cannot understand the concept behind this as how to find the emf of a cell? Also how to find the internal resistance of the cell? Could someone please explain this concept?
Comment: Is the book written in English? I'm wondering if it's a mistranslation because I've never heard of potentiometer being used to refer to anything other than a variable resistor (which the above isn't). Edit - see that it can have a different meaning http://en.wikipedia.org/wiki/Potentiometer_%28measuring_instrument%29
Comment: Yes, it is a kind of variable resistor because the wire between A and B is not just a wire, actually it is a resistor whose resistance can be adjusted by adjusting the length(because length is directly proportional to the resistance) AJ and JB using the jockey which acts as the VIPER of potentiometer. It means that you can also use a variable resistor(the three legged one) which we also say as a potentiometer. Now can anyone explain the concept of potentiometer??
Comment: Maybe your book means its a resistance which can be introduced in parallel, so that by measuring voltage across it we can measure the voltage of the cell.
Comment: @TheDreamCoder17 Is there an explanation of what K1 and K2 are? Also is there an explanation for R2? Are the show components meant to be ideal or not? If they are, I can't really see what R2 would be doing. R1 could be useful, since it would prevent the potentiometer from burning out in extreme settings.
Comment: Anyway, we could measure the EMF of the bottom cell in in following way: First, connect a voltage which we expect to be higher than the cell voltage in place of the top cell. If the bottom cell is disconnected, the resistance which the top cell sees is equal to R1+Rpot. Note that Rpot is constant. Then we connect the bottom cell and slide J until G shows zero current. At that point, I think we can use the voltage divider rule to calculate the voltage of the bottom cell: Vcell=(Raj)/(R1+Rbj+Raj)*Vtopcell
Answer: Yes, indeed while "potentiometer" nowadays means "variable resistor" - a fresh glance at the word itself will show that it really means "potential measuring device".
And that was its original purpose.
I have seen and used a real Potentiometer exactly once, at a six hundred year old university, as an exercise. (The lab equipment was much newer, and quite splendid!)
EDIT : the form of potentiometer described here is also known as a "metre bridge".
It is a length of resistance wire, stretched out along a board (mahogany, of course) over a metre ruler, with a very solid brass (what else!) bar alongside it, and a sliding right-angle knife-edge contact between the bar and the resistance wire. It is connected as your illustration shows, to the top cell, an unknown but steady voltage source (usually a 2V lead acid cell) with an unknown series resistance. The precise values of V,R don't matter.
The metre rule can be engraved on the brass bar, and with a Vernier scale on the sliding contact, the instrument can give four digit accuracy, better than many a digital multimeter today.
I believe K1 and K2 are brass tapered pegs which fit into tapered gaps in the brass bar, i.e. switches.
Now carefully connect up your unknown cell via G, which is preferably one of Lord Kelvin's fine mirror galvanometers, moving a focussed spot of light to amplify the smallest motion, and adjust the knife edge contact for zero current. At this point you have a length (measured from the ruler) representing the potential of the unknown cell.
Because you don't know the driving voltage, you also need to make the same measurement with a "standard cell" usually a Weston cell to get the length representing 1.01864 volts; the ratio between them gives you your actual cell voltage.
CAUTION : if you are careless in this step and draw significant current, you will wreck your valuable standard cell.
Now you can return to the unknown cell. Re-establish its open-circuit voltage (length) - any change shows that the driving cell needs to be recharged.
Then insert peg K2, connecting known resistance R2, and establish the new voltage (length) when driving current through R2.
The rest is mere arithmetic...
Answer: Brian's answer is quite thorough.
I'll just contribute a photo because I don't think many people are aware of what these things looked like.
Here is an instrument called a "portable potentiometer". It is a bit disturbing to find an instrument that I have used to make serious measurements and calibration of thermocouple instrumentation as a museum display.

What's the concept of potentiometer?


Is it possible to use P4VS and P4SCC together?

Question: The project I'm working on uses a .NET Solution file, and multiple C# projects. The IDE is Visual Studio 2012, and Perforce is used for source control. The .sln and .csproj files contain the SCC binding information, for example, for .csproj files:
<SccProjectName>Perforce Project</SccProjectName>
<SccLocalPath>..</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>MSSCCI:Perforce SCM</SccProvider>

... and the .sln file:
Global
    GlobalSection(SourceCodeControl) = preSolution
        SccNumberOfProjects = 43
        SccLocalPath0 = .
        SccProjectUniqueName1 = AnotherProj\\AnotherProj.csproj
        SccLocalPath1 = .
        SccProjectFilePathRelativizedFromConnection1 = AnotherProj\\
        SccProjectUniqueName2 = MyProj\u0020Domain\\MyProj\u0020Domain.csproj
        SccLocalPath2 = .
        SccProjectFilePathRelativizedFromConnection2 = MyProj\u0020Domain\\
    ... etc ...

According to Perforce, there's a process for migrating from P4SCC to P4VS:

Migrating from P4SCC to P4VS To migrate your solutions and projects
  from P4SCC, the Perforce SCC Plug-in, to P4VS, you must do the
  following:
  1.     Strip the bindings from the solution (.sln) file and all of the project files (csproj, vcxproj, etc.).
  2.     Remove MSSCCPROJ.SCC and other source-control-specific files.
  3.     Move all developers to P4VS and have them uninstall the old P4SCC plug-in. For detailed instructions, see
  www.perforce.com/perforce/doc.current/user/p4vs_p4scc_migration.txt.

However, due to the testing status of the project, these files may not be modified. Further, some developers prefer to use P4SCC.
Whilst I understand that the official process is that the projects and solution be migrated (from P4SCC) to use P4VS, I do remember reading a comment online (for which I don't have a link) where someone asserted that he was able to use both together without modifying the project files.
Is it possible to do this without having to change the Source Control provider upon each start-up, and click through a series of warning/error messages about mismatched bindings? If so, how?
Answer: Sorry, this is not possible. It is possible to have both P4VS and P4SCC installed and used with different projects, but individual projects must be bound to a single source control provider.
Answer: I've found that you can put a condition on the SCC bindings that live in the .vcxproj, such as below, meaning that you never have to check out the .vcxproj, only the .sln, which for us never really changes.
So now I can work with P4VS whilst others work with P4SCC without ever being interrupted by annoying dialog boxes (at least after initially removing the source control from the .sln).
In the example, I just set BUILD_USE_P4VS=1 in my environment vars. Anyone using P4SCC does not.
<PropertyGroup Label="Globals" Condition="'$(BUILD_USE_P4VS)'==''">
    <SccProjectName>Perforce Project</SccProjectName>
    <SccLocalPath>..\..\..\..</SccLocalPath>
    <SccProvider>MSSCCI:Perforce SCM</SccProvider>
</PropertyGroup>


Custom Event data for audit log

Question: I was wondering if it is possible to add custom information to the Eventdata field in audit log table.I am specifically interested in the Security group and Security group member delete events.By default, these events only have the GroupId and EventID in the EventData field.
My question is: Is it possible to add the GroupName and Username to the Eventdata field for these events in the audit log?
Reference:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spauditentry.eventdata.aspx
Answer: There is no way to add custom parameters to standard SPAuditEventType's EventData.
But you could get GroupName and UserName in your code from ids.
To do it, try that code:
<code>var xml = new XmlDocument();
xml.LoadXml("<event>" + entry.EventData + "</event>");

XmlNode userNode = xml.SelectSingleNode("/event/userid") ?? xml.SelectSingleNode("/event/user");
int userId = Int32.Parse(userNode.InnerText);
int groupId = Int32.Parse(xml.SelectSingleNode("/event/groupid").InnerText);

SPUser user = web.AllUsers.GetByID(userId);
SPGroup group = web.Groups.GetByID(groupId);

// use group.Name and user.Name
</code>
Comment: Hi @Andrew - Thanks for your reply.Your suggestion works fine for other events but once the user has been deleted,there is no way to get the username based on the id(or is there??).Do you see my problem now?
Comment: If user has been deleted from group, web.AllUsers collection would still contain that SPUser item and you are able to get it.

Custom Event data for audit log


Do you know any open source projects that use Java Web Services?

Question: For my diploma project I am creating a tool that will study a Java project and extract the parts that declare or use Web Services in order to study the classes that communicate in this way other the network, the communication channels that are created, etc.
In order to test my tool I need some open source projects because I would like to see how it works when put in front of a real system not only some random test classes. I have searched for such projects on sourceforge.net but I found out that many of the projects returned by the search are not completed or just unusable.
If you have worked on such a project or you just know any projects that could help me please give your input, it will be most welcome.
Basically I'm looking for projects created using Apache Axis 1.2/2, Apache CXF and SpringWS
Answer: soapUI is OS and uses web services.  It's a web service testing tool as a matter of fact.


Returning an InputStream from a public method

Question: I have a class where on the one hand, it feels right to return an InputStream from a public method, e.g.
public class MyClass {

    private File _file;

    ...

    public InputStream getInputStream() {
        return new FileInputStream( _file );
    }
}

However, I'm also very cautious about doing this, as it puts the onus on the caller to close this stream. What ways can I potentially avoid this problem?
Comment: While I'm a fan of trying to make an API that reduces the likelihood of errors, there's a certain minimum you can expect from the people using it. I think closing `InputStream`s is one of those things - if they don't remember to do that they've only got themselves to blame.
Comment: I don't think that this is a problem. It's already done in Java APIs (for example, `ServletResponse.getOutputStream()`).
Answer: Depends on why this is a problem in your eyes. If you absolutely must return an InputStream and the file in question is not too large, you could buffer the entire file into a byte array, close the original stream and return new ByteArrayInputStream(buf). Closing a ByteArrayInputStream is not necessary (and in fact has no effect).
However, if it "feels right" to return an InputStream, does it not make sense that the caller should be expecting an InputStream, and all that goes with it, including the necessity of closing the stream when finished?
Answer: Returning InputStream is not intrinsically a bad thing. Now if you want your caller to access the data without being responsible for closing the resource, you can do that:
interface InputReader {
    void readInput(InputStream is);
}
public class MyClass {
    void feed(InputReader ir){
       try(InputStream is=new FileInputStream( _file )){
          ir.readInput(is);
       }
    }
}

The caller specify an instance of InputReader that will receive the closable resource as argument and is no longer responsible for closing it.
MyClass myClass = ... ; //Get the instance
myClass.feed( new InputReader() {
    @Override
    void readInput(InputStream is){
       ... ; // Use at will without closing
    }
});

One should consider to decorate the InputStream before passing it to the InputReader so that .close() throws and exception.
Answer: Realistically there's not much you can do without knowing more details about the class. You could provide file processing through methods in MyClass (which requires knowing what the file contents mean) and close the stream when it's empty. Aside from that though, the user of the class is responsible for this object, and you can't really avoid that. Without the capability of destructors, as in C++, you cannot be 100% responsible for any object that you let leave the scope of your class.
What you can do is put a close() method on your class which cleans up any open file handlers, connections, etc., and require the user of the class to be responsible for calling close(). See this question for some discussion of how to use the finalize method to keep track of whether callers are properly closing your class.
Answer:
...as it puts the onus on the caller to close this stream.

Yes, the caller is responsible for handling the closing operation of the stream(s) returned.
As there is no way for your method to track its returned thing, this task completely belongs to the caller. There is an analogy between this case and using exceptions. Developers use exceptions because the API authors cannot always control what they present to us. We have to be careful, e.g. when there is a possibility of dividing a number by zero.


How to execute programs from geany using the GUI?

Question: well i recently installed geany .. the ide is great and worked great for python programs ,
but when i try executing c/c++ programs from the executed button i get an error saying ./geany_run_script.sh: 5: ./rsa2: not found    ( rsa is the name of my program )
well i did try googling out but could find a case like mine.
Answer: If you want to run a program, you need to compile it.
By default, the compile key in geany is F8.
Then, you can run the program. (F5)
You can define flags in project>properties (click on the "construct" tab).
Answer: I tried doing F8 and F5 and the problem was same as yours. But then i did build, compile and run and it worked.(This post may help someone !!)


CartoDB: How to generate automatic labels and then move those labels around the map

Question: I'm working with CartoDB and hoping to automatically generate labels that can then be moved around the map. I'm able to generate the labels, but it won't let me edit their placement.
Answer: You would need to open the CartoCSS wizard of the CartoDB sidebar menu to edit the position of the labels.
In order to change the labels placement, you could use the CartoCSS properties   text-dx and text-dy. Here you can find a lot of text properties to use with CartoCSS in CartoDB.
You can also find a lot of information of placing labels with CartoCSS here


IF(CONTAINS) question from an MPL

Question: I am trying to aggregate data from an MPL into a separate field with fewer values. When I run the formulas, it is only returning the first value. Is there a way to rewrite the formula so that all true values are returned?
if(includes(Race_or_Ethnicity__c,"White or Anglo"),"White or Anglo",
if(includes(Race_or_Ethnicity__c,"White or Anglo (e.g. White English / Welsh / Scottish / Northern Irish / British / American / etc.)"),"White or Anglo",
if(includes(Race_or_Ethnicity__c,"Black"),"Black",
if(includes(Race_or_Ethnicity__c,"Negra"),"Black",
if(includes(Race_or_Ethnicity__c,"Black / African / Caribbean / Black British"),"Black",
if(includes(Race_or_Ethnicity__c,"Asian"),"Asian",
if(includes(Race_or_Ethnicity__c,"Asiática"),"Asian",
if(includes(Race_or_Ethnicity__c,"Arab"),"Middle Eastern, North African or Arab",
if(includes(Race_or_Ethnicity__c,"Middle Eastern, North African or Arab"),"Middle Eastern, North African or Arab",
if(includes(Race_or_Ethnicity__c,"Middle Eastern"),"Middle Eastern, North African or Arab",
if(includes(Race_or_Ethnicity__c,"North African or Arab"),"Middle Eastern, North African or Arab",
if(includes(Race_or_Ethnicity__c,"Árabe, Norte-Africano ou de origem no Oriente Médio"),"Middle Eastern, North African or Arab",
if(includes(Race_or_Ethnicity__c,"Árabe"),"Arab",
if(includes(Race_or_Ethnicity__c,"Latinx or Hispanic"),"Latin",
if(includes(Race_or_Ethnicity__c,"Latina or Hispânica"),"Latin",
if(includes(Race_or_Ethnicity__c,"Indigenous"),"Indigenous or Native",
if(includes(Race_or_Ethnicity__c,"Indígena"),"Indigenous or Native","Other")))))))))))))))))

Answer: Use concatenation operator &
if(includes(Race_or_Ethnicity__c,"White or Anglo"),"White or Anglo;",null) &
if(includes(Race_or_Ethnicity__c,"Black"),"Black;",null) &
...

I assumed a delimiter of ; but you could use anything

IF(CONTAINS) question from an MPL