What is the best way to run a Console Application once per day at a certain time?

Question: What is the best way to run a Console application (C#) once per day at a certain time on Windows XP? I want to see the Console window.
Answer: Using Scheduled Tasks

To open Scheduled Tasks
-> click Start
-> click All Programs
-> point to Accessories
-> point to System Tools
-> click Scheduled Tasks.
To schedule a new task:
1. Double-click Add Scheduled Task to start the Scheduled Task Wizard, and then click Next in the first dialog box.
2. The next dialog box displays a list of programs that are installed on your computer, either as part of the Windows XP operating system, or as a result of software installation.
Use one of the following procedures:

i) If the program that you want to run is listed, click the program, and then click Next.
ii) If you want to run a program, script, or document that is not listed, click Browse, click the folder and file that you want to schedule, and then click Open.

3. Type a name for the task, and then choose one of the following options:

Daily
Weekly
Monthly
One time only
When my computer starts (before a user logs on)
When I log on (only after the current user logs on)

4. Click Next, specify the information about the day and time to run the task, and then click Next.
*Note that the information about the day and time to run the task vary depending on the selection that you made in the previous wizard dialog box. For example, if you chose Weekly, you must indicate the day of the week, the time, and if the task should run every week, every 2 weeks, every 3 weeks, and so on.
5. Type the name and password of the user who is associated with this task. Make sure that you choose a user with sufficient permissions to run the program. By default, the wizard selects the name of the user who is currently logged on.
6. Click Next, and then click Finish after you verify the choices that you have made.
Resource from here
Comment: +1 I'll just add that it can even be used to turn the machine on to execute the scheduled tasks, which is pretty cool.
Answer: Use Scheduled Tasks. It does exactly that and lets you choose a specific interval.
Answer: You can use the windows scheduler, something like:
<code>at 5:00pm /interactive "c:\app.exe"
</code>
Or you can do it as a Windows Service and set "Interact with desktop" (or whatever it is called these days).
Answer: On Windows 10 you would use Task Scheduler
(http://www.isunshare.com/windows-10/4-ways-to-open-task-scheduler-on-windows-10.html).
Way 1: Open it in the Start Menu.
Click the lower-left Start button, enter schedule in the empty box and select Schedule tasks from the results.
Way 2: Turn on Task Scheduler via Search.
Tap the Search button on the taskbar, type schedule in the blank box and choose Schedule tasks.
Way 3: Open it in the Control Panel.
Step 1: Access Control Panel.
Step 2: Find and tap Schedule tasks in System and Security.
Way 4: Open Task Scheduler in the Computer Management.
Step 1: Open Computer Management.
Step 2: Click Task Scheduler on the left.
Comment: Just an FYI, the `Scheduled Tasks` mentioned above is Windows XP's Task Scheduler.
Comment: @David - The link does not work for me.  This fact wouldn't be a big deal, if you had quoted the relevant information, from your link.  Consider doing that, so I can reverse my vote, and check the help center to understand the reason link-only answers are forwned upon here at Superuser.
Comment: @Ramhound - Thank you for your comment.  I have added the ways to find/open Task Scheduler on W10.  The link was provided to avoid a copy but I see your point that not all links would work.  I have left the link in my answer to provide images to those that may be able to access the link.


In what octave am I supposed to play a chord progression?

Question: If someone asks me to play I VI II IV in C minor, am I supposed to play them in the same octave? Like, if I start with C minor in the third octave, do I then move 6 steps up to play G# major or can I also move down 2 steps and play the same chord an octave below? Will it still be the same chord progression?
Comment: Usually, using Roman numerals, minors are represented by lower case. And in C minor, VI will be called Ab rather than G#.
Comment: c minor does not have a G#. c minor is the relative minor of Eb Major which has a B, E and A Flat in the key signature with a Bb that would be raised seeing as it is the Leading Tone of the c minor key.
Comment: This is a very broad question. It is basically asking how should you do harmony exercises. Which in itself is something that takes years of education to truly master.
Answer: Yes they are all the same chord progression. When just given the Roman numeral analysis or chord symbols of the progression, the exact voicings do not matter nor does what octave you play them in.
However it should be noted that what voicings you use, what octave you play in, and how much you move from one chord to another affect how what you play sounds. Try different voicings in different octaves and see what you like best.
Comment: There is definite harmonic rules about how the voicing should work. In fact that is the whole point of harmony exercises.
Comment: @NeilMeyer 'define' is a strong word. I wouldn't use it in this case. In harmonic exercises yes. But in a random song these rules wouldn't need to be followed 100%.
Comment: @NeilMeyer I shift a voicing by octaves sometimes to create distance. It's an effect you want sometimes.
Answer: Whether you move up or down, the progression will sound the same. Which way you choose purely depends on the song. There are times were the composer (or some other musician) will specifically ask you to move a certain way; if not, try both of the ways yourself and see what fits best.
If the melody moves up, it might sound nice to move along with it. It will also sound interesting if you moved the opposite way. If the melody goes up, try going down and vice versa.
Also, it might be nice to mix those two ways. The first time go down and the second time go up.


Arrange the following in increasing order of acidity: water, ammonia, ethyne and ethane

Question: I know that ethyne is more acidic than ethane because of more s character. For water and ammonia, I used the fact that oxygen is more electronegative than nitrogen and will be able to stabilize the charge better. So water will be more acidic than ammonia.Now how do I compare ammonia and ethyne?
Comment: sodamide is used to deprotonate alkynes
Answer: The order of acidic nature would be: water > ethyne > ammonia > ethane.
Since oxygen has highest electronegativity amongst the atoms of the compounds, so its hydrogen will be most acidic and hence will be best acid among them.
Ethyne contains $\mathrm{sp}$-carbon and as a result the electronegativity of the carbon in ethyne is more than $\mathrm{sp^3}$ due to increased $\mathrm{s}$-character (50%) in the bonds between the carbon atoms.
The electronegativity of the carbon increases to a great extent when  and turns out to be 3.2, which is greater than the electronegativity of nitrogen which is 3.04. Hence the hydrogen of ethyne is more acidic than that of $\ce{NH3}.$
Ethane does not possess any acidic hydrogen hence it is least acidic.
Comment: If it is ethene in place of ethane then $NH_3$ will be a better acid than ethene as in ethene the electronegativity of $sp^2$ carbon is 2.74 (33%s  character)which is less than that of nitrogen


Wipe mode not working in fdisk command

Question: Does anyone know what it means when the 'fdisk' command returns 'unsupported wipe mode' when trying to delete data on a USB drive? My command was 'sudo fdisk -W /dev/sdb'. I know there are other ways of doing it with 'dd' for example but was wondering why this doesn't work with the fdisk command.
Comment: Since you are trying to run this on `/dev/sdb`, you are running it on a device.  the option `W` (upper case) is for a partition, and you might have better luck using the option `w` (lower case).  See `man fdisk`
Comment: The -w (lower case gave me the same thing), also I tried it from the /media directory as in 'sudo fdisk -w /media/jd/UDISK' but still got the same response.
Answer: The way to write the command: sudo fdisk -W always /dev/sdb (capital W is right if you are trying to wipe the partition signatures)
However, this doesn't actually delete your data. If you really want to clear it then you have to use dd or similar. Otherwise you can use fdisk to make new partitition signatures, and then make new filesystems and write over your old data. And if you don't care about making a new partition table, you can just make a new filesystem on your current partition and not even bother with fdisk.

Wipe mode not working in fdisk command


what things may I need to start withdrawal of bitcoins

Question: I'm new on bitcoins business the problem now is to withdraw my bitcoins to my account or exchange it to normal cash.
Comment: Why exactly is this a problem?  There are MANY services that will trade cash for bitcoin. A simple web-search will find them.  What is the question?
Answer: Transfer them to coinbase.com or gemini.com then sell them. Then add your bank account and withdraw the money you just sold your bitcoin's for.


jenkins git webhook

Question: I am using jenkins as a stand alone. an I want to trigger build when same commit pushed to git.
Jenkins GIT client plugin v1.0.2
Jenkins GIT plugin v1.2.0
Git server plugin v1.1
git-notes Plugin v0.0.4
ruby-runtime v0.10
GitHub API Plugin v1.34
GitHub plugin v1.5
this plugin I have installed in jenkins. and in git I have to put webhook url but which url I should put I don't know about that. and when I configure jenkins git web hook it asking me
I choose option Let Jenkins auto-manage hook URLs
in this there is
GitHub Credentials
i have fill this information in this
API URL:
Username:
Password:
API key:
but I don't know what is API URL,API key.
where can I get api url and ken in jenkins and which url I have to put in git webhook post.
<code>enter code here
</code>
Answer: I was able to get this working using an OAuth token.  Steps to produce one can be seen here: http://developer.github.com/v3/oauth/
General information on the github.com API can be seen here: http://developer.github.com/v3/

jenkins git webhook


Traction, sidesliding

Question: Has anyone experienced poor traction and side sliding using these Kevlar type tyres. My front wheel has slid sideways and caused me to come of the bike on three occasions now since I had them fitted. Would be grateful for your response. Thanks Tim
Comment: Welcome to the site! As you've written it, your post is just a survey, rather than an answerable question. Really, the only possible answers are multiples of "Yeah, I've had that too" and "Never had that problem." So, suppose you get some number of yays and some number of nays -- then what? Are you asking for advice about what to do about the problem? Something else?
Comment: I'm voting to close this question as off-topic because, as currently written, it's a survey, not an answerable question.
Comment: Is the kevlar in a belt as a puncture protection layer, or is it in the bead so that the tyre is "folding" ?
Comment: Which specific tyres? All the tyres I've bought in the last few years have kevlar belts, and they handle differently to each other. Kevlar beads shouldn't make any difference.
Comment: What brand and model of tyre are you using ?  What air pressure are they at front and back?  How wide is the rim?  What surfaces are you sliding on - dirt or gravel or tarmac or concrete, wet or dry ?   What's the tread pattern on these tyres?   What do the three slides have in common - were they sharp or were you leaning or damp?
Comment: After two days with no clarification I've cast my vote. I'll happily retract it or vote to reopen if the question is made answerable
Answer: I'm guessing it's not the Kevlar belt that's causing the issue so much as the correlation between a Kevlar belt and an overall stiff tire. One of the most important qualities of a tire is its suppleness: how easily it deforms and contours itself to the uneven surface of the road. By deforming easily, you maximize surface area and increase grip. By adding lots of layers of puncture protection, some tires become rigid and don't handle sideways load all that well.
I don't necessarily recommend different tires: only you can determine whether the added puncture protection is worth taking more gradual turns. Push down hard on the outside pedal while cornering, and avoid taking turns over manhole covers, raised paint, train tracks, or any other type of road adornment, because they all can be pretty slick.
Comment: Within kevlar tyres stiffness varies because of compound and construction. When I switched to marathon plus from another kevlar tyre (I'd worn out the back) I noticed a reduction in grip. The marathon plus has a stiff sidewall and a compound designed to wear slowly.
Answer: Unless you are slipping due to an abrupt change in road conditions (hitting a frozen puddle, gully, tram rail, etc.) when you are slipping with your front wheel, that's a) a sure sign that your front tire is a bad brand, and b) a significant security problem.
On a): Usually, you have a much higher load on your rear wheel, so that is the first to slip. If you slip with the front wheel first, it indicates that it has significantly lower grip than the rear wheel. The grip is determined by the rubber mixture that is in contact with the road, and that depends entirely on the brand.
On b): Slipping with the front wheel means you instantly fall with no hope of recovery. This is worse than with the rear wheel, where you may still be able to catch yourself when it starts slipping due to ground conditions. In either case, slipping is something that is to be avoided at all costs, so you want the best grip tires you can get.
Kevlar or not, get yourself a tire you can trust. My experience tells me, that there are huge differences in tire grip, find a brand with good grip.
Comment: @ChrisH True. I didn't think about road conditions being the cause because in that case it would not cross my mind to ask about the grip of the tire. I have included a mention of the road conditions in the first sentence now.
Comment: But the front wheel is the first to encounter a slippery patch of road. Assuming constant grip is an assumption too far.

Traction, sidesliding


What is the best way that I can provide a challenge to a PC that can fly?

Question: So I am a new DM and I am running a campaign in Curse of Strahd. I have a PC that is doing a long range build and has picked the Aarakocra race and I want to build encounters that will threaten him as well as the other 5 in the party. I would appreciate any advice that you could give me!
Comment: Related: [Are there any overpowered race/class combinations for the 5e campaign Curse of Strahd?](/questions/135519), [How can I, as a DM, keep an Aarakocra player in check?](/questions/116914), [Exploring with a permanent flyer](/questions/117192)
Comment: This site isn't well suited for idea generation.  There are [other forums](https://rpg.meta.stackexchange.com/questions/5449/ive-been-told-my-question-is-better-suited-to-a-forum-but-where-should-i-go) better suited to do this kind of work.
Comment: Reading in a favourable light: Could this question not to be taken as asking for *useful, general, experience based techniques* for achieving this? Not a list of ideas, but rather what sort of ideas they need to come up with. Colten, if this is what you're asking, you may want to clarify it to that effect. Feel free to steal some words off me if it's easier :)
Comment: Oh, and Welcome to RPG.SE! Take the [tour] if you haven't already and see the [help] or ask us here in the comments (use @ to ping someone) if you need more guidance. Good Luck and Happy Gaming!
Answer: First, a note on dealing with the Aarokocra - don't do the following tips in every fight. Every player wants the chance to shine so let them have it. The ability to fly around the battlefield unimpeded is a lot of fun so remember to sometimes let them do just that. Create scenarios where their ability to fly is instrumental to a quick, clean victory. But don't over do it. The other players need their moments too!
My party that I DM for include an Aarakocra and the best tips I can give are:
Ranged enemies
Obviously enemies that can shoot arrows, slings, spells, etc at this PC should feature in most battles. This isn't unfair at all as any well rounded group of adventurers have the ability to do ranged attacks so their opponents would be just as well prepared.
Special anti-flying tactics or equipment
Include more unusual weapons such as nets and bolos or harpoons with ropes attached (the last two are homebrew options) to be used to bring the Aarokocra down to earth. Getting tangled in something and falling out of the sky removes their advantage pretty quickly and makes them feel far more vulnerable.
Spells
There are some great spells that can control or alter the Aarokocra's ability to fight.
Command, Hypnotic Pattern, Enemies Abound, Thorn Whip (short range), etc can all affect how they participant in the battle.
Flying enemies
Throw in Wyverns, Gargoyles, Imps, anything that can fly to neutralise them and give them some opponents that will focus solely on them.
Environment
Where the battle takes place is very important. Inside buildings, low caverns, in forest or jungle with a low canopy. Simply restrict their ability to get high above the fight.
I haven't found that having a flying character in the team breaks anything, somethings have to change of course, but it is simply a chance to be more inventive with the adventures you come up with.
Answer: You don't need to do anything
If all of your players could fly then you would need to build your encounters accordingly. If you only have one flying player then they will naturally balance out. The key advantages of flying are:

Increased mobility
Getting around cover
Avoiding melee with grounded enemies

Increased mobility is helpful but, unless your challenges are built around enemies being high up or far away, it won't make encounters unchallenging.
Getting around cover is useful but also primarily just makes the archer's regular damage easier to obtain. A similar effect can be achieved by positioning on the ground and with the Sharpshooter feat.
Avoiding melee is already what ranged combatants are trying to do, your player will just not need to rely on effective tanks keeping the melee enemies engaged.
Being able to freely avoid melee combat with grounded enemies can be very powerful but only if the character doesn't care that much about what happens on the ground. Your player's character could likely solo a Tarrasque at level 1 given a couple of hours but not before the Tarrasque destroys several cities.
What will happen if the Aarakocra manages to completely avoid being attacked is the enemies will target the allies on the ground. It is all well and good to be flying in the sky but it is less pleasant when the werewolf is eating your friend. What the player will likely realize is that their HP is a resource and if they never use any of it they will make encounters more difficult for the rest of the party. This will incentivise them to come down from the sky and engage in melee or allow themselves to be attacked.


How are 'explanatory'and 'explanative, ' increase' and 'increasing' different

Question: 'Explanative' and 'explanatory' are both adjectives, and 'increase' and 'increasing' are both nouns. Are the meanings of the words in each pair the same? If the meanings aren't the same, and the words in each pair aren't interchangeable, could you please give me the reason why not?
Comment: Hello. I suspect that your underlying question is "How can I tell which of several possible forms that I find in the dictionary to use in a particular context?" I'm afraid the answer is "You can't except by observing how they are used". A good dictionary will give you usage tips and examples, but in the end you just have to observe and learn from observation. As for "reason": there are usually no reasons in language use. Language is what it is, not what somebody thinks it should be, or what somebody thinks would make more sense.
Answer: The first pair, 'explanative' and 'explanatory' have the same meaning, although 'explanative' is very seldom used and might not be easily understood by many speakers, at least in North America. I would recommend using only 'explanatory' in your speech.
The second pair 'increase' and 'increasing' also have the same meaning as nouns, but again, the second one, 'increasing', is almost never used as a noun. As a noun, 'increase' means a rise in the amount, number or value of something.

There was a huge increase in winners this year. It was even bigger than last year's increase.

If used in the same sentence, the word 'increasing' would be a nominalized verb and would likely be followed by a different preposition. The use of nominalized verbs is rapidly declining in common speech. While many nominalized verbs are still widely used, the use of 'increasing' as a noun sounds awkward and should be avoided.

There was a huge increasing of winners this year. It was even bigger than last year's increasing.

The word 'increasing' is most often used as a verb or adjective.

The amount of daylight is increasing every day.
The increasing difficulty of getting tickets discourages many fans.


Michaelis menten constant motivation behind 1/2?

Question: So the michaelis constant is defined as the substrate concentration at half maximal "reaction-speed".
I was wondering why 1/2 ?
I guess for higher values you need more substrate, which could be a problem. But would 1/3 also work ? Or does 1/2 optimize some other parameter?
Comment: 1/2 is *the least arbitrary* choice of a number between 0 and 1. To me, that's good enough.
Comment: in the derivation of the M-M equation using rate constants (lower case k's), the k's are grouped in such a way as to make the entire expression most simple, in particular to isolate [S]. When you then define Km as the other term in the denominator, the coincidental result of that denominator (Km + [S]) is that when [S]=Km, we can replace Km with [S] and get rate = Vmax/2. This definition of Km is also conceptually useful because as $k_{-1}/k_2$ goes to infinity, Km becomes equal to Kd for the ES complex in the simple case.
Comment: The "least arbitrary choice" is defined in which way? Smalles sum of denominator and nominator ? Seems kinda odd to me, that there is no further considerations defining such a important constant
Comment: If you need a formal definition, then yeah, this one will do.
Comment: @Andrew I think that's an answer.
Comment: So i see the connection to the mm equation but i guess that is the same problem: where does the mm equation comes from? Can you provide more information about the limit of Km with the small ks?
Comment: You could define a new constant $K_\mathrm{Paul}$ that is twice as large as $K_\mathrm{M}$. In that case, the rate expression would be $\displaystyle v_0 = v_\mathrm{max} \frac{[S]}{0.5 K_\mathrm{Paul} + [S]}$, and the rate would be two-thirds of the maximum for $K_\mathrm{Paul} = [S]$.
Answer: To see why the $K_m$ is equivalent to the substrate concentration at which the rate is equal to $V_{max}/2$, we need to look at the derivation of the Michaelis-Menten, which is usually included in detail in any introductory biochemistry book. Here is a brief version.
We will consider an enzyme-catalyzed reaction described by the following scheme:
$$\ce{E + S <=>[k_1][k_{-1}] ES ->[k_2] E + P},$$
where "E" is enzyme, "S" is substrate and "P" is product.
To get an expression for the rate, we start by noting that the rate of formation of product is $k_2[\ce{ES}]$, so we need to find an expression for $[\ce{ES}]$ using known quantities. Next, we make a steady-state approximation, setting $\frac{d[\ce{ES}]}{dt}=0$, so we have
$\displaystyle k_1[\ce{E}][\ce{S}]-(k_{-1}+k_2)[\ce{ES}]=0$
$\displaystyle \implies [\ce{ES}]=\frac{k_1}{k_{-1}+k_2}[\ce{E}][\ce{S}].$
To finish, we note that when the reaction has not consumed very much substrate, we can approximate $[\ce{S}]$ as equal to the starting substrate concentration $[\ce{S}]_0$. We also know that the total amount of enzyme in the reaction must be equal to the sum of the concentrations of E and ES, ie $[\ce{E}]+[\ce{ES}]=[\ce{E}]_{Total}$. We already have an equation for $[\ce{ES}]$ in terms of $[\ce{E}]$, so with some algebra, we can find that
$\displaystyle [\ce{ES}]=\frac{k_1[\ce{E}]_{Tot}[\ce{S}]}{k_{-1}+k_2+k_1[\ce{S}]}$.
Combining everything, we get
rate of formation of $\displaystyle \mathrm{P} =k_2[\ce{ES}]=\frac{k_2k_1[\ce{E}]_{Tot}[\ce{S}]_0}{k_{-1}+k_2+k_1[\ce{S}]_0}$.
In order to isolate $[\ce{S}]_0$ in the denominator, we divide the numerator and denominator by $k_1$:
rate $\displaystyle =\frac{k_2[\ce{E}]_{Tot}[\ce{S}]_0}{\frac{k_{-1}+k_2}{k_1}+[\ce{S}]_0}$,
and our final simplification is to define the unwieldy $\frac{k_{-1}+k_2}{k_1}$ as $K_m$ and $k_2[\ce{E}]_{Tot}$ as $V_{max}$:
rate $\displaystyle =\frac{V_{max}[\ce{S}]_0}{K_m+[\ce{S}]_0}$.
Getting back to your original question: Note that we never explicitly defined $K_m$ to be the substrate concentration at half-maximal rate. It simply resulted from our choice to isolate the substrate term in the denominator. However, that was not a completely arbitrary choice.
If we look at $K_m=\frac{k_{-1}+k_2}{k_1}$, we can see that if $k_{-1}$ is large and $k_2$ is small, $K_m$ approaches $\frac{k_{-1}}{k_1}$, which is the equilibrium constant for dissociation of the substrate from ES. For that reason, $K_m$ is often treated as an apparent measure of the affinity of the enzyme for the substrate, and that is an additional reason why we choose to define $K_m$ this way. Always remember that it is not actually the dissociation constant, and in some reactions will be quite far off from the actual $K_d$.
Comment: @KarstenTheis - I've never heard the claim that equilibrium constants must be easily measurable in order to be real. Furthermore, even if one uses applies that constraint, it is incorrect to say categorically that "you can't measure Kd if you can measure Km". It simply requires more and different data so that you can accurately fit to a model that separates k1, k-1 and k2. Pre-steady state kinetics are often used for this. Here's a good review of the subject: https://www.molbiolcell.org/doi/full/10.1091/mbc.e13-01-0030.
Comment: Now i am satisfied, thank you very much
Comment: "quite far off from the actual Kd": You can't have a Km and a Kd at the same time. The Kd is for a molecule that binds but does not react (i.e. inhibitor bound to enzyme, or substrate bound to inactivated enzyme) while the Km is for a molecule that binds and reacts. So there is no "actual Kd", it is a though experiment.
Comment: @KarstenTheis - I disagree. A substrate molecule can react or it can fall back off. There is no reason why we cannot limit our focus to the elementary step of reversible binding, just as we often break down kinetic schemes into elementary steps.  In the most basic M-M scheme, we have $\ce{E + S <=>[k_1][k_{-1}] ES ->[k_2] E + P}$. The $K_d$ is given by $\frac{k_{-1}}{k_1}$, while $K_m$ is $\frac{k_{-1} + k_2}{k_1}$.
Comment: I'm just saying that you can't measure Kd if you can measure Km. In a thought experiment, you can disregard k2, but in reality, the enzyme substrate complex has two fates, not one. You are right that in cases where k(-1) is much larger than k2, Km approaches what Kd would be if k2 were zero. If you simply define Kd as the ratio of k(-1) and k1 (and not as a measurable quantity), then you are absolutely right and the adjective "actual" is appropriate.


How many candies does it take to make the oven happy?

Question: In CandyBox2, I've had 5M+ candies and 180M+ lollipops on hand, and yet when I offer them to the oven, it says I don't have enough. How much do I need to make it happy ?
Answer: The oven wants 100 candies and 1 chocolate bar to become happy.
Comment: @Synetech: See [How do I get more chocolate bars?](http://gaming.stackexchange.com/questions/137169/)
Comment: Dang! I wasted my chocolate bar on enchanting the spoon. Now I have to wait until I find another one. `:-/`
Comment: I already have more (I got four from the squirrel). In fact, I wasted another one on the oven and now have two pain au chocolat.
Comment: @Synetech they aren't wasted, the pain au chocolat's are used on the wishing well to give you a boost in 1 of three areas. I believe you should have a total of 5 of them after enchanting everything you can enchant with chocolate bars, assuming you found all bars.
Comment: @Nil, it was a waste at the time because the boosts are unlimited, and I still had enchantments I could use. *After* you enchant everything, then you can use the rest for boosts.


My question is about the ommision of pseudo forces when we draw the free body diagram from an inertial frame of reference

Question: I have this question, in my physics book where a bob attached to a string is in a slanting position as it is inside a cart moving forward with an acceleration. I understand that if we draw the free body diagram of the bob from inside the cart, we have to include a pseudo force as we are applying newtons laws from a non-inertial frame of reference.
My question is, can we draw the same free body diagram from an inertial frame of reference, i.e. the road? if we can draw it, can someone tell me what the forces acting on the bob are?  are we are supposed to get the same free body diagram as the previous case? THis is confusing me for some reason!
Comment: Is it a sort of pendulum? You will only get the weight and the tension then.
Answer: From the point of view of somebody in the non-inertial frame, the bob is stationary.  Accordingly, the net force on the bob (tension + gravity + pseudo-force) is equal to zero.
From the point of view of an inertial observer, there is no pseudo-force, so the net force on the bob (tension + gravity) is not equal to zero.  This makes sense, because the bob is indeed accelerating in such a coordinate system.
Comment: Let us take the angle made by the string with the vertical as b. Let a be the acceleration of the cart and m be the mass of the bob. So for the non-inertial observer, the equation along x axis would be Tsin(b)=ma. ma is the pseudo force acting in a direction opposite to the motion of the cart and Tsinb, component of tension along x axis. Now, from the intertial reference, how will explain the slanted position of the bob without adding pseudo force? you might tell me that since the cart is moving, the bob is slanted because of inertia, so with the parameters i have given, can you writeanequatio
Comment: @GouthamSwaminathan $\sum F_x = T\sin(\theta) = ma_x$, so $a_x = \frac{T\sin(\theta)}{m}$.  I'm not sure what else you're looking for.
Comment: @GouthamSwaminathan In the non inertial frame you have the equation $T\sin b -ma_x =0$ while in the inertial frame you have the equation $T\sin b = ma_x$, where the lhs is the forces acting on the bob in each respective frame. So the equations are of course mathematically equivalent, it's just their physical interpretation that's different.


Membrane for sht10 (humidity & temperature) sensor

Question: I made a uC powered device to control the humidity and temperature of a room. I used sht10 sensor. The room humidity provided with a humidifier. The sensor was working well. When trying to test the device at the target room, I think the mist at the room made the sensor to malfunction. Now the sensor just reads 100% humidity and temperature of ~50 degrees. When I touch the sensor it reads higher temperature (although not true), but the humidity is always 100%, so I think the sensor is not damaged.
May I recalibrate the sensor or not. And do I need a special membrane to avoid such problem? May I make a DIY membrane Or I can expose the sensor directly to the mist?. Thanks
Answer: The SHT1x sensors can lose calibration if exposed to excess moisture/condensation. Despite this, however, it is not meant to be damaged from excessive moisture and can even be immersed in water (see footnote 13 in datasheet).
From personal experience these sensors normally return to a calibrated state, after being left alone to dry out for 10 hours or so.
If this still does not work you can undergo a reconditioning process. Look at the datasheet here under "Reconditioning". There is a process of baking and then re-hydrating the sensor to return it to calibration.
If the sensor is still returning spurious values after drying out for a day or so it's most likely damaged.
You can purchase filter caps for the sensor, which are available from Farnell,  which are not supposed to effect the humidity reading. However, I've never used them personally. http://www.farnell.com/datasheets/48936.pdf
Comment: thanks for fast and detailed answer... i started backing process by putting the sensor in plastic cover, floating in boiling water... i hope the sensor start working normally after reconditioning...
Comment: Again... Thanks so much. After doing reconditioning completely, the sensor works perfectly.


How was the Giotto spacecraft reactivated from hibernation mode?

Question: The Wikipedia article on Giotto states that:

Giotto was the first spacecraft to be re-activated from hibernation mode.

How was the reactivation accomplished?
Does the statement mean the spacecraft restarted after a shutdown, or something else?
Comment: I suppose [Apollo 13](http://space.stackexchange.com/q/2553/415) did not officially enter hibernation mode, then?
Answer: Giotto woke up from hibernation after a signal from ground control. This meant that at least the radio receiver and parts of the computer still had to be active. The science instruments and most of the spacecraft management systems (e.g. attitude control) were switched off.
The wakeup took several days. After the wakeup, Giotto aimed its main antenna at Earth for new instructions.
A recent question about Rosetta shows that a different approach was used there.
Answer: I think "hibernation" isn't a well defined term, its simply the name ESA gave to that mode of operation.
Here are some extra points beyond those mentioned by @Hobbes
By the sound of it this depended on an omni directional antenna and thus potentially relying on battery power rather than solar array. The lowest power consumption approach would be to power only the command receiver and command decoder and sufficient relays to enable subsequent switching in of a telemetry transmitter and achieve re-orientation. Obviously the last step is critical to prevent further battery discharge but the telemetry path is also pretty important to seeing what the status is on wake-up which could affect how one goes about the attitude recovery.
There is actually no need for a conventional computer in any of these steps, lets remember it was launched in 1985. All that is required is the command decoder function that turns the bit stream into hard-wired relay activations on board.
Thus far, there is very little novel about this sequence other than the apparent lack of telemetry. That aside it is exactly the path most old satellites would have taken as part of an emergency recovery sequence. Where once could have substituted the phrase:

re-activated from hibernation mode

for "recovery from loss of attitude".


Less bounty values

Question: I saw that the bounty values are starting form 50rep. What if we can have values lesser than 50. It is not required to award a question with minimum 50rep. If there can be some more values to award as a bounty starting form 25 then it can be possible to  drag more attention to a question asked by an user who has less reputations.
Comment: Instead of awarding 10 rep. you can upvote that answer!
Comment: Why would you want to give anyone anything less then 50 when an upvote is +10 and an accepted answer is +15. Do both and they already get +25. If they give a good answer they can gain 50 reputation points in one day without even trying hard.
Comment: You mean you want to start bounty when you have less than 50 rep?
Comment: No I want the bounty offers to be less than 50rep.
Comment: Yes. I know that I need minimum 75rep to start a bounty. I appreciate that but I am not getting why the minimum amount is 50? Why can't I award someone with 10reps?
Answer: It is just right. To be considered a fully-fledged member of the site, gaining 50 rep is easy in a single day.
The bounty system is to get attention for questions that are difficult to answer, not an express support queue. A question can only receive a bounty after 2 days anyway, more than ample time to get 50 reputation.
I honestly think 90% of users that set bounties are misusing the system due to lack of understanding. You're paying for advertising your question, not express support.
Also, it's easy to get 25 reputation on a single answer. Just accept it and up-vote it, and you have given someone 25 reputation points. With that in mind, what would my motivation be to answer a question when I don't get any more for my effort then I can normally?
Comment: @user1865284 That sentence makes no sense. Do you understand what the bounty system is really for? Not everyone uses bounties. I never have and I have more then 2k rep on most sites I am active on? Some users get 100 rep because of the association bonus from being a high rep user on another site. I really suggest you read the FAQ around SE and the FAQ tags on meta, and understand how the software works.
Comment: I visited few user profiles and found out that they are not even gaining single rep a day but they are have more than 200reps. So they are eligible for bounty but they can't spare 50 reps out of 200rep for a single question.
Answer: Lowering the minimum rep offered for bounty would only serve to water-down the featured question queue. If the question is genuinely in need of more attention (or is worthy of more attention) then it's worth 50 points (at least!). A 25 point minimum would simply encourage gaming the rep system (i.e. always promoting your own mediocre questions in hope of drawing a few votes) and would make it harder to find genuinely deserving posts.
Just earn a few more votes and offer a worthwhile bounty if the question deserves it.

Less bounty values


How to test and run Liferay portal using Selinium?

Question: I am new to testing, I have done the below steps. I don't know if I am correct or not.

Downloaded Selenium IDE and added it to Firefox.
Recorded tests and imported test cases as WebDriver/Junit.
Created a Java project, then a package, then created a class, then I copied the code from the imported test cases.
Added Selenium related jar files and then executed. It's working fine.

Now my questions are:

In Eclipse I have executed the tests they are working fine. What do I have to do to execute them on the production server?
Is Selenium WebDriver the best way to test?
How do I create test suites and how do I run them?
What are the steps to test in Chrome browser in Ubuntu 10.0.4?
Answer:
1.In eclipse i have executed the tests they are working fine, how i have to execute them in production server?

Your tests can run in every environment. You can have a Selenium Hub and many VMs with different operating systems and browsers. But for the beginning the tests can also run from your local computer.
You can choose against what environment (test environment, production) the test run. You can create a config file and set a property for that. Your testing framework can read this file and decide against what kind of environment the tests run. You can also work with Apache Maven, so you can use your tests with Jenkins and configure them.
You can start your test run from your local machine via eclipse or command line, if you choose Apache Maven. You also can have a Jenkins server and start the tests from there with a Jenkins job.

2.selinium Webdriver testing is best testing?

This depends on what exactly you want to test. If you want to test the GUI of web applications in different browsers and on different operating systems, Selenium 2 / WebDriver is an excellent open source tool for that.

3.how to create test suite and how to run them?

Selenium 2 / WebDriver on its own is no testing framework. It just control the browser. The testing framework is JUnit. JUnit provide different ways to create test suites. You can create them with Suites or Categories.
You can also use another testing framework like TestNG. But this are Java testing frameworks only. If you want to develop in another programming language, you have to choose another.

4.What are the steps to test in Chrome browser in Ubuntu 10.0.4 ?

You have to download the Chrome Driver. For some browsers you need special drivers to control them. Not only for Google Chrome. Internet Explorer do also need one. Here is a  Getting Started page.

Some other tips:

Take a look into the Selenium Wiki.
Take a look into the Selenium Documentation.
Read the Selenium Blog to keep up to date and particularly the A Smattering of Selenium posts for nice articles about how to get things work.


2002 Subaru with strange smell, thin white steam

Question: 2002 Subaru Outback with previous cracked and repaired head gasket about ten years ago. The only thing of note is that it does burn oil a little at a predictable rate. The worst this car has had is a couple of burned-out light bulbs. It has ~86,000 and is typically driven short distances but has done long distances without issue. Oil changes kept up, the only notable thing done in the past year was having the transmission flushed about ten months ago given that the fluid was very old and it felt sluggish. Performance improved and until recently, drove very well.
Coming home about five weeks ago, while at a traffic light, it looked like there was steam escaping from under the hood. It was very fine and this was at dusk - so it showed up due to the headlights of other cars. I drove a couple of blocks home as there was no other place to stop and immediately popped the hood. There was nothing. The temperature was fine, no signs of overheating, no warning lights, no steam after parking, and no signs of anything happening. Thought it was in my head.
Shortly after this, there started to be a periodic smell that wasn't pleasant. Could not source it and it wasn't constant or that overwhelming. Pulling into a gas station a couple of weeks later, I saw the same thin steam escaping under the hood again. I opened the hood and it was gone. The smell was there slightly, kind of like burning but no signs of anything wrong, no steam, no strange noises, no lights, no overheating. I made sure there was coolant, The oil looked fine though it was due to be changed and it was floating at the lower end as it typically does due to the above-mentioned mild oil burning issue.
I wondered if maybe a hose was leaking somewhere and fluid was getting on the engine. I did call the dealer who proceeded to tell me that sometimes when it gets cold there could be steam from the air hitting the engine! What?! It was almost 50 degrees that morning! And I never had anything like this, even on a morning when I had to drive through freezing fog and got ice on the leading edges of the car. They told me not to worry about it.
I took it for its regular oil change and the coolant was topped off. This isn't a car that leaks fluids, and they mentioned they were surprised it was low. It drove alright that morning, but by evening it had that smell, stronger than it had been with the weird whispy steam again.
While driving the next morning trying to sort out a mechanic to take it to, the idle changed. It's hard to describe, it wasn't loud but it definitely felt rougher. The smell was present but the steam was not.
Any ideas of what this could be? Originally, when the head gasket was cracked it had inconsistent symptoms though more typical. Given the age of the car, though it runs really well, I know any part of it could fail.
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Comment: White steam points to coolant. Topping it off is a hint. With many coolant lines and major engine repair, either a very slow coolant leak is occurring from old(?) Coolant hoses, loose hose clamp(s) or..........another head gasket issue. If you are comfortable around engines, check and tighten coolant hose clamps, feel and look for coolant stains. As a rule, hoses bulging in diameter larger than its hose clamps should be replaced.
Answer: The most likely cause of these issues is a coolant leak. The strange smell could be coolant, which probably smells strange if you've never smelled it before.
You could have a worn-out radiator cap, a hose clamp may have rusted and broken, a coolant hose or the radiator, heater core or a freeze plug (if you have them) could have developed a leak or a mechanical part such as the water pump may be leaking. There are other possibilities as well, such as a failed head gasket or a cracked block.
The easiest way to confirm and find the leak is to pump up the cooling system to maximum operating pressure using a hand pump, usually to 15 PSI, and see if it holds pressure or it leaks down. A pressure test kit comes with various fitting that attach the pump to the radiator. If the test pressure leaks down and the leak is in an exposed location, you should be able to locate the leak by spotting the dripping coolant.
If it leaks down but you can't find the leak, it could be the heater core or an internal leak in the engine. Since you have observed apparent steam, it's probably an easily found leak in an accessible place.


Blomberg refrigerator making intermittent loud knocking sounds coming from the ice maker

Question: Sounds and vibration coming from the sealed ice maker assembly in top left side of freezer.  50 seconds knocking, 10 second pause, knocking resumes.   When we unplug refrigerator and plug back in, the knocking stopped for 50 minutes before starting again.  When I unplugged and let defrost for 2.5 hours, and then plugged back in, the knocking stopped for 77 minutes before resuming.  Repairmen can't get here for 3 weeks.  Any ideas?and vibrtion
Answer: Icemakers work by freezing the ice, then thawing the outside, rotating the ice out of the tray, and eventually dumping it in the bucket.
If the ice fails to release from the tray, the gears will make loud gridnging noise until you remove the ice from the tray.
Easiest way I've found to do this is to run a hair dryer pointed at the icemaker until the ice releases.  Longer term, it seems that something is out of adjustment on your icemaker.  You can also shut it off by pushing the bail up.
Answer: An icemaker typically has a little gearmotor that pushes the ice out of the mold when it finishes freezing. Those gears are often plastic and when they wear, the teeth  start to slip and make noises.


Rules schedule force actions

Question: In Drupal I've scheduled, on the future, some e-mail, using rules schedule module. Now I want to force the delivery, before the scheduled time, to check the text of e-mail.
Is this is possible?
Comment: How are you delivering the email? Are you using the message stack or the plain send user mail action?
Answer: Yes, you can do it by clicking the execute link in your components tab.

OR, you can click the schedule link and schedule something to run 1 min from now. Just remember that your scheduled action will only run after cron runs. So if you have set cron to run once a day or every 1 hour, it won't happen until then. So will have to manually run cron, by clicking the run cron button to see if it gets delivered after 1 min from now.
Answer: There is no out-of-the-box solution to force the execution of an already scheduled rule before the "scheduled date". All you can do for such scheduled rules is to "delete" such rules from the list of schedule rules (via admin/config/workflow/rules/schedule), so that they don't actually get executed.
There are indeed the "operations" like execute and schedule, as already mentioned in the previous answer, but using those options you actually trigger a new instance of such rule to be executed (they do not actually release an already scheduled rule).
They only way around this, and to do something similar to what you're asking for, is to temporary adapt (or clone) the rule you already have in place, and schedule the rule to be executed after (eg) a few minutes already. But in this case also, you're not triggering the execution of an already scheduled rule: you're only scheduling another rule after (eg) just a few seconds or minutes after such schedule rule gets scheduled.

Rules schedule force actions


Bus error severity=corrected, type=Physical Layer | unable to boot / login

Question: After installing a driver for a new PCIe Wifi card, my /vars/logs folder started filling up, where it end up filling the entire disk space and wasn't able to boot Ubuntu (more info here) and just got a repetitive console error of pcieport Bus Error severity=corrected, type=Physical Layer, and now I can't do anything beyond this black screen to login.
Answer: After some reading I found this source from it's FOSS: https://itsfoss.com/pcie-bus-error-severity-corrected/

Turn on your computer and just select in the boot GRUB the Advanced Options for Ubuntu

Choose the latest Linux Recovery mode

Then in the Recovery Menu select the root option to open the console below, click enter to activate it.

Enter ls -s -S /var/log to view the largest files, for me was syslog.1 and kern.log

Delete each file by going first to the directory by cd /var/logs and then remove them with the > {name_of_file} (ej. > syslog.1 and > kern.log)

You can check you actually deleted them by running the code of 4, then you should reboot by entering reboot.
After that you should be able to login to your Ubuntu account and quickly should modify your GRUB file to avoid the saving of this errors. For that I recommend the visiting the link above as it's in more detail. But be aware that is a temporal solution as the error will still be occurring in the background.


Interesting results for open Riemann surfaces

Question: As far as I know, interesting results for open Riemann surfaces are quite rare. One of them is the theorem of Gunning and Narasimhan, which asserts that every connected open Riemann surface admits a holomorphic immersion into the complex plane. Another example is given by the theorem of Behnke and Stein, which says that every connected open Riemann surface is a Stein manifold. Is there any more interesting results for open Riemann surfaces?
Answer: The results on open Riemann surfaces are not "rare". They are just well forgotten.
I only list a few books which deal with open Riemann surfaces:
MR0114911 (Zbl 0196.33801), MR0228671 (Zbl 0152.27401), MR0159935 (Zbl 0112.30801), MR0264064 (Zbl 0199.40603), MR1973182 (Zbl 1162.14310).
It is true that there are "too many" Riemann surfaces, and not too much can be said about
"all of them". However, there is a highly non-trivial classification, and some subclasses
are very important. For example, the class of "hyperelliptic" surfaces of infinite
genus plays a very important role in the study of Schrodinger operators and their
finite difference analog, see for example the works of Sodin and Yuditskii, MR1288838 (Zbl 1041.47502),
and Kean, Moerbeke, MR0397076 (Zbl 0319.34024). Abelian covers of compact surfaces is another class
of open Riemann surfaces that was studied a lot: MR0740581 (Zbl 0541.60076).
Added: here is a recent non-trivial result about arbitrary open Riemann surfaces: https://arxiv.org/abs/2103.16702.
Comment: +1 for "just well forgotten".
Comment: @Bettina: I added references to Zentralblatt https://zbmath.org/ which is free.
Comment: Is it possible to decode those MR references without an MR account?
Comment: @AlexandreEremenko Thank you very much, I appreciate it!
Answer: For example, a theorem of Grauert and Röhrl asserts that every holomorphic vector bundle on a non-compact Riemann surface is trivial.
You can find this result (and its proof) in the book of O. Forster, Lectures on Riemann Surfaces.
Answer: The Riemann uniformization theorem.
Answer: I hope that the following result by Bishop and myself might be "interesting": Every open Riemann surface is a cover over the sphere, branched over only three points. Equivalently, every open Riemann surface is equilaterally triangulable.
See
Belyi functions on non-compact surfaces; or: Building Riemann surfaces from equilateral triangles and https://arxiv.org/abs/2103.16702 .


Is it possible to tether a D7000 to a smartphone?

Question: Is it possible to shoot tethered (wired) with D7000 using a smartphone? if yes, which OS, what kind of features and apps are needed?
Answer: Absolutely. There is a great dongle+app, offered by TriggerTrap.
I purchased it and I'm super happy with it. If I recall correctly, the app is available for iOS and Android.
EDIT:
Some of the free app's options are as follows:

Simple cable release
Press and hold
Press and lock
Timed release
Timelapse
TimeWarp (time lapse + acceleration)
DistnaceLapse (operates on GPS movement)
Star trail (for exposure control)
Bramping
Sound sensor release (!!)
Vibration sensor release
HDR modes (including HDR timelapse)
WiFi slave setup

May I add that it connects to your smartphone's microphone jack. Different signals are sent from your phone (as sounds, obviously), which are converted by the dongle to signals known to your camera as shutter release signals. Simple and genius.
The app is quite a piece of art, too. You get a handful of shooting modes, some of which require the shutter speed mode of your camera to be set to "Bulb Mode".
Plus, if you make sure to set your device on some sort of flight mode, then your boss's call won't mess up the time lapse you've been working on all night long.
Answer: If you had the D7100 the answer would be yes via the Nikon Wireless Mobile Utility.
Instead you could use something third party such as: Trigger Happy
Answer: Please check out the cam ranger, works great on my d7000 and d600
Answer: Yes, get a USB OTG connector for your phone and plug in the camera. Then you can download one of many apps available. I presume you are thinking of android because as with most things that is not supported on Apple devices.
Comment: I asked Nikon support about D7000 connectivitiy by OTG and received the response that it's not compatible connection with mobiles. I am surprised by this answer - is it correct?
Comment: @Alfred - what they mean is that they don't have any software to allow that to happen and certainly wouldn't help you with it if you had a problem.  No reason why it wouldn't be possible otherwise.


How do I clean xDB in Sitecore?

Question: Have recently tried working with xDB in Sitecore 8 and now looking for the way of cleaning out current stats from xDB without re-installing Sitecore. I deleted data files for Mongo (as was suggested) but still see figures in Analytics in Sitecore; also did iisreset but also did not help. What am I doing wrong? (I am new to Sitecore so might be missing something).
Answer: Have you tried to clean-up only MongoDB files, without Reporting database?
If yes, I think that is a point of your confusion. The way it works in xDB is that all tracking analytics data is written into Mongo and then by SessionEnd processed and saved into Reporting database, that is SQL database, same way as it was before previously in DMS. In that case you need to clean that database as well.
If you have access to SQL, you may use <code>__DeleteAllReportingData</code> stored procedure as the quickest:

More correct approach that goes well for instances where there is no direct access to DB is using admin tool for that located at /sitecore/admin/RebuildReportingDB.aspx. Also there was a module Analytics Database Manager previously, however I do not know its current state.
Reference: Walkthrough: Rebuilding the reporting database (from official documentation)
Comment: It does create an issue for me; this screenshot is mine, from this page:  http://andrewwburns.com/2015/04/28/clearing-sitecore-analytics-data/  I have replaced this with an obscured one; please use that in the future.
Comment: Might want to obscure the database name in the right hand side - can still see the customer name.
Comment: No worries, that does not make any isues.

How do I clean xDB in Sitecore?


Difference between p-v and pressure and specific volume

Question: what is the difference between pressure-volume and pressure-specific volume curves? since volume is an extensive property why do we plot pressure and volume curves for different processes?
Answer: Generally you can graph a process using any two independent thermodynamic variables. Which ones you choose depends on what you want to analyze or show. For example, if  you want to analyze work, you generally use a pressure volume graph. You can use other thermodynamic variables, but pressure and volume are directly measurable (with instruments) whereas other thermodynamic variables may not be (e.g., entropy and internal energy). For a closed system boundary work done by a process is the area under the PV curve. The net work done in a thermodynamic cycle would be the area enclosed by the PV cycle, and so forth.
Insofar as using specific volume $v$ or total volume $V$ is concerned, you can use either. However, for a closed system the mass is constant (e.g., ideal gas in cylinder/piston). Since the mass is fixed (and can be obtained by ideal gas law), you normally use total volume $V$ to find total work done by/on the mass. For open systems where the mass flow rate  may be a variable, you would use the specific volume (volume per unit mass) to compute the work done per unit mass. Multiplying the work done per unit mass that by the mass flow rate will give you the rate of doing work (power).
Hope this helps.


In the mini-series "The Queen's Gambit", the character Jolene is black. Is this also the case in the novel by Walter Tevis?

Question: In the highly popular Netflix series "The Queen's Gambit", an important character Jolene is portrayed as black. Is she such in the 1983 novel by Walter Tevis, or is there even such a character?
Answer: Clearly, the answer is yes--that is, she is black in the novel--from my reading of the last paragraph in SlateReview . It reads (note phrase "Black orphan" near the end--and repeated "n-word" usage):

The most striking change the show makes to the characterization of Beth's friend Jolene has to do with the girls' time in the orphanage together. In Tevis' novel, when Jolene is 13 and Beth is nine, Jolene comes to Beth's bed in the middle of the night and tries to get Beth to engage in mutual masturbation.  When Beth, "terrified" by the situation, says no, Jolene goes away, but she's angry about it. For a while, the two are enemies; when Jolene calls Beth "cracker" in the hallway, she means it not as a term of endearment, but a curse. Beth, for her part, responds by hissing the n-word. A Black orphan who tries to seduce her younger friend? A white heroine who uses the n-word as a weapon? None of this is in the show, surely too fraught for the escapist fantasy Netflix has created.
Comment: A better source to cite would be a quote from the novel itself (primary source), rather than a third-party review.
Comment: Well, of course, you're right Rand al'Thor. But I don't presently have easy (library) access to the novel. Perhaps someone who has the novel at hand can furnish an additional, more authoritative  answer.
Answer: Yes, in chapter 1 of Walter Tevis's The Queen's Gambit the character Jolene is first introduced as black:

The tallest girl was the black one, Jolene. She was twelve. On her second day Beth stood behind her in Vitamin Line, and Jolene turned to look down at her, scowling. "You a real orphan or a bastard?"

Chapter 1 excerpt available online from the publisher, and the whole book available to borrow from the Internet Archive.


viewing bash output from another shell retrospectively

Question: I have python process running from a shell on a Linux. At the moment I don't have physical access to this machine and only can connect through ssh.
I know that the python process stopped and I suspect there is an error trace in this shell.
I can get pid of the shell but I can't find a way to display what is in this shell. Basically, I am looking to find a way to read what is already there and do not lose this output or close the shell.
What would be the Linux tool to have a second view of what is going on in already running shell?
Comment: Has the shell been run through a terminal (ie did you launch it from a GUI)?
Comment: You could install a VNC server and then connect to it, to view the terminal shell? If you used a tty then I'm not sure how to view it remotely.
Comment: @davidgo the shell was started when on gnome and it is tty. I can't install VNC on this machine
Comment: I would recommend going forward to use: https://linux.die.net/man/1/screen
Answer: There's this answer on ServerFault:

setterm can dump the contents of a Linux virtual console:
setterm -file log.txt -dump [ttynumbers]
However, it does not have access to the scrollback buffer, only to what's currently displayed.

This will work if you want to peek into /dev/tty?, not /dev/pts/*, I think. Use ps -e to identify the tty number of the shell in question. During my tests I have successfully dumped /dev/tty2 with the following command:
sudo setterm -file log.txt -dump 2

Answer: While you cannot view what's already happened (unless you can get that session back) there's an excellent tool called tmux which helps with this.
Simply install (sudo apt install tmux), run it (tmux) and then run the process you want inside the tmux terminal. Then hit Ctrl+B, then D, to detach it - this will get you back to your previous shell and you can close the terminal. Then, connect to it from SSH or open another terminal (whatever you fancy) and run tmux attach. That will get you back to your terminal. There are other options to explore, but this is a basic form of using tmux across different terminal sessions.
Comment: This should be a comment as it does not answer the OP's question.  (Also, the screen utility does something similar)
Answer: The traditional tool for recording a terminal session is script.  It is widely available, usually by default, on most Unix and Unix-like systems.
Some terminal emulators, including xterm of course, and some pc terminal emulators often used on the so-called "console" device of a desktop machine (i.e. the directly connected keyboard and display), do have a scrollback buffer and you can scroll back to see previous activity, and you might even be able to copy and paste it from the scrolled back view.
Indeed, the lesson here is that (most) TTY devices do not record anything -- they simply pass it through.  One must arrange for one's own recording, be that by starting a script or similar recording tool, or by using an appropriate terminal emulator.
(BTW, some systems also have a "console buffer" as well, but it only records output from the kernel itself, and it is accessed with a command usually called dmesg.)
Comment: Can `script` work retrospectively?
Comment: it is a very good tip, but I can't find a way to view an already existing output. Anyway, probably next time will run it with some `script` option.


using a dynamic dns as a name server

Question: I'm playing with hosting my own website on a residential internet connection. I have a dynamic ip assigned but the isp also gives me a dynamic dns domain name, something like xxx.go.ro . I bought a domain name from a registrar and i want to host my own dns server and configure the nameserver of the bought domain to the dynamic dns address given by my isp so the xxx.go.ro will become the ns for my domain. My question is: is it a good idea to have the ip of the domain name server dynamically change? I don't understand if the tld caches the ip address of the nameserver. Should i use an external service for dns like luands and just point cnames to my subdomains? I would really like to host my own dns to experiment with it.
Answer: Bought from a registrar? You need a nameserver with static IP. Even two nameservers with static IPs. You need them to appear in glue records of parent zone; I doubt TLD zones support updating records often enoung, and that they permit setting TTL short enough. TLD DNS zones are really huge and it is likely very hard to update them often.
Also, you likely need to do updates programmatically via some API, rather than usual human-oriented web interface of your registrar. Do they have any?
For the 3rd level subdomain, it is pretty possible. I developed a dynamic DNS service 10 years ago. Something like DynDNS, but I implemented a possibility to have a subdomain delegation with NS pointing to a dynamically-updated glue record. After 10 years passed, no one was found to be using this feature.
There is a caveat, a service itself is hosted on usual static nameservers, and only allows dynamic updates of its hosted domains (just one domain, currently). So if I say it hosts dynamic DNS of example.com, it is possible to delegate sub.example.com to some nameserver with dynamic IP address. You can easily implement such service yourself and "for yourself" with your owned domain name, but it's core nameservers still must live with static addresses; the best you can do this way is to have subdomain of your domain to be delegated to dynamic address.
Answer: You need a static IP if you want to host your own DNS server.  But why do you want to host your own DNS server?  What's the need?  Just let you host do it and you configure DNS records as needed.  Plus, you should have a GREAT understanding of DNS before trying to tackle hosting your own DNS server.  Mistakes with TTL, IP addresses, etc. can leave you in a world of hurt.  And that's before getting into security...
Comment: And we don't support _anything_ at home anyway.
Comment: Well, my goal is to have automatic website deploys with my own infrastructure. That means from code commit to live website without any intervention, that means also automatically configuring the nameserver.

> You need a static IP if you want to host your own DNS server
Why is that? is it a caching issue? Is it something else?
Comment: You can do that without hosting your own DNS server though.  Automated code deployment and authoritative DNS servers are not synonymous.  AT ALL.  I can't tell what you are trying to accomplish at this point.  But you need a static IP, because you need to set an NS record to something for your domain.  I mean, it doesn't have to be a static IP, but you'll have to update it, and you'll have to then contend with TTL after it is updated.  Just trust me when I say if you don't know the answers to the basic DNS questions, you aren't ready to host a DNS server.  Just have your host do it.
Answer: I would recommend you use a service like https://www.dnsexit.com/  point to you domain that.
On there can setup Dynamic to web site at your house.
There is software to install to keep IP updated

using a dynamic dns as a name server


gazebo with player

Question:
I guess gazebo is more often being used with ROS and as standalone, has anyone tried to use gazebo ( version 1.0 and above) with player ? I am cool using gazebo with ROS (Electric) and also as standalone but have never done well with the installation with player. Any first hand experience may be useful. Which version of player to use with gazebo (version 1.0 and above) ? Also, is it advisable to use gazebo with player as player has not been a very active project for nearly the last 2 years (last version release (3.0.2) was in July 2010) ?
I had asked a similar question at email@example.com, however I hope to reach more people at answers.gazebosim.org.

Originally posted by Arkapravo on Gazebo Answers with karma: 1 on 2012-09-20
Post score: 0

Original comments
Comment by Arkapravo on 2012-09-22:
@nkoenig Yo ! I felt the same ! I will be using ROS - ROS is a big improvement on player.
Answer:
There is limited support for Player within Gazebo. I believe it consists of position, camera, and laser plugins.
I haven't used Player in many years. But I think the latest version should work with Gazebo.
In short, I would recommend using ROS.

Originally posted by nkoenig with karma: 7676 on 2012-09-21
This answer was ACCEPTED on the original site
Post score: 0

gazebo with player


How do I communicate with the Ubuntu kernel team?

Question: How do I communicate with the Ubuntu kernel team?
Comment: 1. I'm trying to get some of the most frequently asked questions answered here so people don't have to got to the kernel team wiki pages.

2. I want to point people at the wiki pages as a resource.

3. It doesn't make sense to me to have the question and the body of the question be the same text.
Comment: When you are answering your own question it strikes me as a bit odd for part of the answer to be the body of the question.
Answer: The Ubuntu Kernel Team is located in disparate cities throughout the world. We utilize IRC to communicate with each other as well as the Ubuntu user community. The team hangs out on the #ubuntu-kernel channel on FreeNode. There is usually someone from the team in the channel 24hrs a day Monday through Friday. If you do join the channel, please be patient after asking your question, if you don't get an answer right away.
A good place to look for answers to these kinds of questions is the Ubuntu Kernel Team's wiki specifically the FAQ.


Why do people have the tendency to pick their nose while driving?

Question: It seems that whenever I am driving I've always got to pick my nose. I've also noted that other people do this on a daily basis as well. Why do people have the tendency to pick their nose while driving?
Comment: I'm thinking an NIH grant is in the works for this.
Answer: I suppose one explanation of this observation is that being a driver in a car is a semi-private space. It is semi-private in that it often feels like people can't see you. In addition, even if someone sees you, you will be driving away from them shortly. And it is unlikely that they know who you are and that your nose picking will ever affect your reputation.
Thus, presumably there are many activities that people tend to do more in private, that occur often in a car. E.g., random singing, farting, etc.
Answer: Because it it socially unacceptable to pick ones nose.  However, we all do it at some point or another.  Whether there is a tissue directly involved or not is another story.
Also, typically people are alone in their car and due to "social inattention" (also called civil inattention https://en.wikipedia.org/wiki/Civil_inattention) they may assume that no one is paying close enough attention to care.  Even if they do, the chances that it is someone they personally know are typically low (depending on various factors such as size of the city and neighborhood etc.)  But, I'm betting that most instances happen outside of the proximity of one's neighborhood.  I'd like to see a statistic on that one!
Answer: I think the one contributing factor is that when we are in our cars we may have the vents pointed at our faces or the windows rolled down. As we go about our day it probably isn't too often that we have a stronger wind source blowing directly at us and as we breathe in we may start to notice that our nasal passages are a little blocked up.  Perhaps the added force of the fans or wind as we drive really push the mucus (and whatever dust or dirt it stopped from getting into our lungs) and stimulate the hairs in our noses which causes a mild annoyance. Probably why we know exactly where to reach at it first.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


How to do equality check of a large matrix and get the corresponding index position?

Question: Say I have a matrix A = 1000 x 5, and I want to compare it's first element (uppermost top left) to each of the 5 elements in the first column of matrix B of size 5 x 5. Whenever the first time the equality is flagged to say element of A is less than or equal to the element in B, the corresponding row position of B will be printed, and procedure is repeated with the next element down in A again compared with the same column of B. Similarly, elements in second column A will compare with second column of B, third column of A, compared with third column of B. This is repeated for the whole matrix of 5000 elements in A. So essentially the output matrix C will be of size 1000 x 5, with values ranging from 0 to 5.
Or is this easier in VBA or Matlab?
Comment: Could you rephrase your question a bit? Especially your 2nd sentence I find terribly hard to understand. Perhaps you could add an example? And what did you try before you got stuck?
Comment: @Sjoerd Matrix element C11 would be if A11 <= B11 then print B11 index(1), elseif A11 <= B12 then print B12 index(2)...elseif A11 <=B15 print index(5) else print 0. Then next cell C12 would be if A12 <= B11 print B11 index(1) elseif A12 <= B12 print B12 index(2)...do you see the pattern
Comment: @sebastiancheung Have you considered using [`Position`](http://reference.wolfram.com/mathematica/ref/Position.html)?
Answer: I think this does what you want, though I may have transposed the matrices...
For the example I'll use 3 x 6 instead of 5 x 1000
Create some test data:
{n, m} = {3, 6};
a = RandomReal[{0, 1}, {n, m}];
b = Sort /@ RandomReal[{0, 1}, {n, n}];

Visualise:
MatrixForm[a]

MatrixForm[b]

This is the code:
c = MapThread[Mod[1 + Total[UnitStep[Outer[Subtract, #1, #2]], {2}], n + 1] &, {a, b}];
MatrixForm[c]

Comment: Hi @Simon Woods you are a genius, dont know how to thank you!
Comment: Hi @Simon Woods, is this scalable to A=(1000 x 5), B=(5 x 5) so that C=(1000 x 5)? If so what is the best way to do so?
Comment: @sebastiancheung, the code above works with `{n,m} = {5,1000}`, but I may have misinterpreted the question. In my code `a` and `b` must have the same `Length` (i.e. same number of rows) so you might need to transpose `a`. Note that I've compared across *rows* of `b`, (i.e. element `a[[i,j]]` is compared with the elements of `b[[i]]`). So you might need to transpose `b` too. I've also assumed that the each row of `b` is in increasing numerical order. If that's not the case then my approach doesn't work at all.
Comment: To summarise: you are probably better off with kguler's solution!
Answer:  bb = RandomInteger[{0, 5}, {5, 5}];
 aa = RandomInteger[{0, 5}, {10, 5}];
 Grid[{{"a", "b"}, {aa // TableForm, bb // TableForm}},
    Spacings -> {5, 2}, Dividers -> All]

Using Select do define a mapping between two lists:
ClearAll[selPosF];
selPosF[{ax_, bx_}] := (Function[{xx},
 First[Select[Range[Length[bx]], (xx <= bx[[#]]) &, 1] /. {} -> {0}]] /@ ax);
cc = selPosF /@ Thread[Transpose /@ {aa, bb}];
Grid[{{"a", "b", "c"}, TableForm /@ {aa, bb, Transpose[cc]}},
   Spacings -> {5, 2}, Dividers -> All]

Alternatively, using Pick:
ClearAll[pickPosF];
pickPosF[{ax_,  bx_}] := (Function[{xx},
   First[Pick[Range[Length[bx]], (xx <= #) & /@ bx] /. {} -> {0}]] /@ ax);

For both functions you can also use the inside MapThread as follows:
cc = Transpose@ MapThread[pickPosF[Sequence[{#1, #2}]] &, Transpose /@ {aa, bb}]

Comment: Hi @kguler, you are a great Mathematica user!
Comment: @sebastian, thank you:)
Comment: Hi @kguler, I ran through the first two sections then ran MatrixForm[aa] and MatrixForm[bb] which were fine as expected and run selPosF[{aa, bb}] again but now it simply returned -> {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}. Not sure what I did when calling selPosF[{aa, bb}]?
Comment: Sorry mistake, forgot to run the rest of the code.
Answer: Another interesting old-ish question that popped into the sidebar (Not even sure why no upvotes on it - it is an interesting question!)
My take:
I refactored Kguler's pickPosF, simply changing to
mypickPosF[{ax_, bx_}] := (Function[{xx}, First[Pick[Range[Length[bx]], UnitStep[bx - xx],
       1] /. {} -> {0}]] /@ ax)

This improved performance greatly (about triple in the few tests I did), but surprisingly it still lagged behind selPosF. So I used the latter as my standard.
I next refactored Simon Wood's clever use of Outer to comply with the needs of the OP. Much to my surprise (I really expected the technique to be crushingly fast), it was rather slow. Perhaps I'll revisit the idea at a later time.
My first idea was that this is an ideal place for using a piecewise function:
Map[(pw[x_] = Piecewise[MapIndexed[{First@#2, x <= #} &, #[[1]]]];
         pw /@ #[[2]]) &, Transpose[Transpose /@ {bb, aa}]]

This was indeed quick, in the few tests I did, about the same as selPosF. I wondered how smart Mathematica might be in culling "dead" parts of the function (that is, parts that never need to be checked due to ordering of the comparisons). Turns out, not too smart. Simple fix: do a PiecewiseExpand on the generated piecewise function, which eliminates the dead parts. This turns out to be surprisingly slow, dropping performance significantly.
Ah, we know things about the data and requirements, let's do it ourselves:
Map[(With[{z = #[[1]]},
    pw[x_] = Piecewise[MapThread[{#2, x <= #} &,
                       Split[FoldList[Max, z]] // {First /@ #,
                              Most@Accumulate[Prepend[Length /@ #, 1]]} &]]];
   pw /@ #[[2]]) &, Transpose[Transpose /@ {bb, aa}]]

Now we're getting somewhere: About a 5X+ improvement on selPosF.
But there's got to be a better way...:
newmex[list_, limsx_] := Module[{rows = Length@list, lims, mo, pss, spans, cab, ca, t},
  lims = With[{z = #}, Split[FoldList[Max, z]] // {First /@ #,
                        Most@Accumulate[Prepend[Length /@ #, 1]]} &] & /@ limsx;
  mo = MapThread[Ordering[Join[#1, #2]] &, {Transpose@list, lims[[All, 1]]}];
  pss = SplitBy[Position[UnitStep[Subtract[mo, rows + 1]], 1], First];
  spans = Span @@@ Transpose[{Most@Prepend[#, 0] + 1, # - 1}] & /@pss[[All, All, 2]];
  cab = ConstantArray[0, rows];
  Reap[Scan[(t = #; ca = cab;
       MapThread[(ca[[t[[-1]][[#1]]]] = #2) &, t[[;; 2]]]; Sow[ca]) &,
      Transpose[{spans, lims[[All, 2]], mo}]]][[2, 1]]]

Much faster.
Notes on the above: I've split out parts of the code so readers can see step-by-step what's up. You'd probably want to compact it, though that won't affect performance.
The function takes the comparison array already transposed. So for the OP, simply transpose the comparison array before calling. Doing it this way allows for ragged column comparison lists, kind of useful (row-padding the comparison array with Infinity could also be used, I suppose).
Quick speed comparison to selPosF on a 200 column random integer array, with comparison array columns generated from binning each column of the target by 10, selecting 50 and sorting them. (The latter forces worst-case behavior in my function):


SIM to RJ: emulating SIM card as a RJ connector

Question: i recently got in a Goodwill store one of the 2500 model phones https://en.wikipedia.org/wiki/Model_500_telephone#Model_2500 and i want to use it. the problem is that i don't have a phone line in my house, just a cell phone's SIM card. is that possible to build something (like a box) that in one side of the box you put SIM card, other side a power source and in other side a RJ connector https://en.wikipedia.org/wiki/Registered_jack? i need this box to emulate the SIM card as a RJ connector and use the phone.
Comment: you are under the misguided impression that you only require a SIM card to connect to a cell phone provider and that the rest of the cell phone is somehow just a decoration
Comment: You can do something like that with an pc acting as an ipbx (using, e.g. a software like asterisk), to which you will plug both some gsm gateway hardware and a pstn gateway with a fxs port. Also, you could make some cool stuff with this setup, like custom dials. This is however entirely off-topic here, since it is hardware recommendation and also not electronic design.
Comment: It don't work that way, fella.   This is so wrong, I don't know where to start.
Comment: you are asking how to hardwire a landline phone to a cell phone  ..... why would you want to do that?
Comment: And it will cost more than the phone...
Comment: Buy a *Home PBX* which has a cellphone uplink. They cost about €200. You need a SIM card with internet access enabled (and an affordable payment plan) and an IP phone account.
Comment: i need it to use the antique phone. do you guys have any suggestion? not just SIM method.
Comment: Its a wired telephone.  You use it with an old fashioned wired telephone line.  It has nothing to do with SIM anything, or cell phone anything.  No land line, no telephone.
Comment: @JRE can you find any solution or a way? i realy want to activate the phone!
Answer: You said in a comment:

can you find any solution or a way?

So now that you have removed the requirement in the original question, for connecting to that POTS phone via the RJ-11 connection - yes, there is a way.
Almost the same project was done as a Sparkfun tutorial called the Port-O-Rotary in 2005.

(Image source - Sparkfun Port-O-Rotary tutorial)
The main difference in your case is that your phone has a keypad, and the POTS phone in that tutorial has a rotary dial.
It's too broad to go into every detail here, but some of the challenges in the project include:

Choose a GSM board which fits in your POTS phone case.
Consider which battery will also fit in the case and how you're going to charge it.
Choose an MCU platform, which you will program to control the GSM board, interface to the keypad etc.
Decide if you are going to use the existing on-hook/off-hook switch, or design another method of ending each call.
Test whether you need to design additional analog electronics, to interface between the existing POTS phone mouthpiece and earpiece, and the GSM board analog input and output.
Decide whether you'll use the existing "ringer" in the POTS phone (whatever that is) and design the necessary electronics to drive that, or replace it with a low-voltage buzzer etc.

There will be lots of reverse-engineering for you to do (e.g. keypad and handset connections etc.), as well as programming whichever MCU you choose to use to "drive" your modified phone.
Comment: Sam Gibson. No need for that stuff. There are home PBX out in the wild with a cellphone uplink. They are about €200. +1 anyway for curiosity.
Comment: @Janka - Thanks :-) Yes, there are other ways, but just buying one of those PBX takes all the fun out of it, doesn't it? ;-) Also, if this wasn't going to be an electronics *design* question, then it's more like an off-topic shopping question. Therefore I decided to treat it that the OP was asking about a design question :-) +1 to your comment giving the OP the PBX option.
Comment: Thank you so much! my questions are 1) price of this modifications, 2) how hard is it to build and 3) what components do i need?
Comment: @TheShwarma - If you have to ask how hard it is, even after reading that tutorial, then it's probably too hard for you :-( This site is not a good fit for "whole project" questions. As explained in the [tour] and [help], questions here must be reasonably scoped, not require a book to answer them, and need to have been researched first. Within that scope, I have pointed you towards one possible approach for you to research. However there are several options you could choose, which will affect your questions (1) and (3). When you are doing your design, feel free to come back with questions! HTH


Why is the derivative of the Fermi-Dirac distribution negative?

Question: Why the derivative of Fermi-Dirac distribution function at absolute zero temperature becomes negative of Dirac_Delta function.
 The Fermi-Dirac distribution function is
 \begin{equation}
 f_{0}(E)=\frac{1}{e^\frac{{E-E_{F}}}{k_{B}T}+1},
 \end{equation}
  As $T\rightarrow0$, the Fermi-Dirac distribution becomes a step function
\begin{equation}
f_{0}(E)=\Theta({E}-E_{F}).
\end{equation}
 and \begin{equation}
 \frac{\partial f_{0}}{\partial E}=\frac{-2}{\left(2\pi\hbar\right)^{3}}
\delta\left(E-E_{F}\right),
\end{equation}
how we can get this and why the derivative becomes negative? should it not be
 \begin{equation}
 \frac{\partial f_{0}}{\partial E}=\frac{2}{\left(2\pi\hbar\right)^{3}}
\delta\left(E-E_{F}\right),
\end{equation}
Comment: Actually $\lim_{T\to 0} f_0(E) = \Theta(E_F-E)$. This means that only states below the Fermi energy are occupied. The derivative should be negative since the distribution goes from 1 to 0 when $E$ is increased above $E_F$. You should be able to convince yourself that the derivative must be negative at any temperature. It just means that lower-energy states are more likely to be occupied.
Comment: It's not clear how you define $\Theta(E)$, but you may have it inverted. Notice $f_0(E)\to{}1$ for $E\ll{}E_F$ and $f_0(E)\to{}0$ for $E\gg{}E_F$. Does your definition of $\Theta(E)$ do that?
Comment: @MarkMitchison that sounds like it should be an answer
Answer: The Fermi-Dirac distribution is
$$ f_T(E)=\frac{1}{\exp\left(\frac{E-E_F}{k_{\text B}T}\right)+1}$$
when $T\to0$, the denominator of $\frac{E-E_F}{k_{\text B}T}$ goes to zero and this ratio goes to $+\infty$ if $E>E_F$ and to $-\infty$ if $<E_F$. Therefore the exponential $\exp\left(\frac{E-E_F}{k_{\text B}T}\right)$ goes to $0$ if $E<E_F$ and to $+\infty$ if $E>E_F$. Thus the distribution $f_0$ goes to $1$ if $E<E_F$ and to $0$ if $E>E_F$. This is expressed by the limiing expression
$$f_0=\Theta(E_F-E)$$ (and not $\Theta(E-E_F)$ as you wrote).
So the distribution $f_0$ is constant except at the point $E=E_F$ where it decreases from $1$ to $0$. That is why the derivative is negative.
By the way, we have $\frac{\partial f_0}{\partial E} =-\delta(E_F-E)$.
Comment: The letter $\Theta$ is called *theta*. Obviously, if $$\Theta(x)=\left\{\begin{array}{cc}0&\text{if}\;x<0\\1&\text{if}\;x\geq 0\end{array}\right.$$ then it is not symmetric.
Comment: Why i cannot write \begin{equation}
f_{0}(E)=\Theta({E}-E_{F}).
\end{equation} Delta function is symmetric.


How to determine whether a large number is prime

Question: In the introduction part of "Rational Points on Elliptic Curves", it was mentioned that there are very quick ways to check that an integer is itself a prime although it is virtually impossible to perform a factorization. And I'm curious how to quickly determine whether a large number is prime.
Comment: [AKS primality test](https://en.wikipedia.org/wiki/AKS_primality_test) is a polynomial-time algorithm. There are effectively faster methods, but on the theoretical aspect I think it's considered the fastest.
Comment: Seems like a good place to start: https://en.m.wikipedia.org/wiki/Primality_test
Comment: My favorite is the APR-Test (Adleman-Pomerance-Rumely-Test), but the simple strong pseudoprime test is already very powerful, but the result "prime" is not absolutely surely true.
Comment: The Elliptic curve method (ECM) is both useful to prove the primality of a number and finding prime factors upto $30-40$ digits, with much effort (or much good luck) even upto $50-60$ digit-factors.
Answer: Primality is a much easier problem than factorization in practice, and the best known complexity results are better as well.
As rywit mentioned, the Wikipedia page has lots of good information.
From a practical point of view, this graph gives an examples of times for single threaded implementations of a few primality proof methods on a 4770K, as well as BPSW, a fast probable prime test.  It doesn't cross 1 second for average time to prove primality on random primes until ~250 digits using either APR-CL or ECPP.  BPSW is still under 0.2 seconds at 2000 digits, albeit a probable prime test.  The time for BPSW is 2.5-3x the cost of a single Miller-Rabin test.
Easiest way to test:  use Pari/GP and its ispseudoprime function for probable prime test (using AES BPSW) or isprime function for an APR-CL proof.  Other useful software includes OpenPFGW, Primo, ecpp-dj, mpz_aprcl, Wolfram Alpha, and others.
Algorithms include:

various methods for special forms (e.g. Mersenne, Proth, 2^n +/- 1, etc.).  Some software with at least one of these include OpenPFGW, prime95, LLR, Perl/ntheory, and more.
ECPP.  The fastest method in common use for large inputs.  Primo is the standard, especially for >2k digits.  There are a couple others you can find, including my ecpp-dj open source software.  These give certificates of primality, which is a big advantage over other methods.  This means anyone can independently and quickly verify that it passes all the necessary tests.
APR-CL.  Pari/GP, mpz_aprcl, and alpertron are some implementations.
BLS75 methods.  From the seminal 1975 paper, this shows numerous ways to prove primality based on partial factoring.  Pocklington's test from 1914 is a simple form of this type of test.
AKS.  Landmark theoretical result.  Quite slow in practice, so isn't normally used.  IMO the probability of a programming error in an AKS implementation is higher than the chances a composite will pass a well designed and implemented probable prime test.
Trial division.  Doesn't scale.
Probable prime tests, such as BPSW and running random-base Miller-Rabin tests.  These aren't proofs, but done well they're good enough for almost all purposes, and they're very fast.    Most proof code starts with a probable prime test of some sort so it can quickly give an answer for almost every composite input.


What should I do when I see "Use a more specific tag if applicable" in a tag excerpt/wiki?

Question: I found several times tags like these, and sometimes I found a more appropriated tag, sometimes I don't, but when I do I'm confused. Should I use both tags, the more appropriated and the one that has the message or should I only use the one that I found more appropriated? I kind of read that message as "don't use this unless it can be helped" but maybe I'm wrong?
Answer: I read that as "Use a more specific tag as well, if appropriate". This is in line with the general tagging guidelines, specifically these points (emphasis mine):

Pick tags that show higher counts in the look-ahead prompts, as they are more likely to make your question appear highlighted for a user on the main page or show up in someone's RSS feed.
At a minimum, try to include at least one very broad tag (i.e., java or c#) and one other tag to narrow the topic down within that broader category (i.e., strings or garbage-collection).
You are limited to 5 tags, and you are generally better off trying to use all 5 of them (if there are 5 appropriate matches among existing tags).

I read that as suggesting that broad tags are good. If another tag is applicable, by all means use it, but if you still have tag space left over, include the generic one as well. Broad tags such as hardware are useful since people may be following them who are interested/experts in hardware stuff in general. That makes your question stand out to them and makes it so much more likely that you will get an answer.
That kind of advice on a tag wiki excerpt tells you to try and find a more specific tag as well but not, to my mind, to avoid using the tag in question at all. Tags with that advice tend to be very broad and not very useful by themselves. They should be combined with other tags to narrow the scope but tags are not mutually exclusive. In general, more tags are better than fewer.


L1 norm for compressed sensing

Question: In a paper, I read that this is one problem with the L1 norm for Compressed sensing (the L1 norm function is not smooth). I am curious that why is that a problem? Can anyone explain why is it so important to be smooth? I guess it is about constrained optimization. Thank you.
Answer: Yes, being non-differentiable (at 0) makes it hard to optimize. Most optimization methods require the derivative. Although the L1 norm is convex, being non-differentiable means that special optimization methods have had to be developed to try to solve problems that use the L1 norm, such as in compressed sensing.

L1 norm for compressed sensing


Can I replace the 433mhz modules on my homemade remote controller with a nrf24 transreciever

Question: I built a simple 4 channel 433mhz transmitter and reciever because I can't afford a remote controller, the range is limited to 3 feet and nrf24 transreciever have longer range, so my question is can I replace the 433mhz modules with a nrf24 transreciever and it'll work?
Answer: Not directly, no.  But you can design a system to use the nRF24, you can even make it compatible with the many existing RC systems that use nRF24 or similar radios.
The main issue is that your 433 MHz radio is a crude OOK system where the encoder injects pulses via a single line and the decoder must accept pulses via a single line, distinguish valid ones from noise, and unpack them into some meaning.
In contrast, the nRF24 is a tunable digital packet radio transceiver with an SPI interface.  Various registers are set to configure the mode of operation.  Data is written into a packet buffer, sent as a complete message of some number of bytes, and received into a buffer on the other end where it can be read out over the SPI.
To make use of the nRF24 you'll need an MCU that can implement the nRF24's SPI-based interface.  Most with 5 free signals (sometimes 4, bare minimum 3) can be made to do this.  There are for example quite a few relevant Arduino projects you can find with some web searching, and probably a few for other chips like the STM32F103.


Op-Amp Voltage Regulator

Question: I'm building a linear voltage regulator using the LM 741 (part of school project) but everytime I connect a load than draws more than 1A the output voltage drops down. I'm not sure why this happens and what can I do to solve this ?
Comment: If the input voltage to the regulator drops when you try to draw more than 1 Amp, this is an indication that your raw power supply cannot supply the required current - your regulator may be working fine, but the raw supply doesn't give it enough voltage to work with.
Comment: My crystal ball is broken, post a schematic.
Comment: What happens to the input voltage to the regulator when you try to draw more than 1 Amp?
Comment: @PeterBennett the input voltage drops down as well
Comment: @MichaelKaras I'm restricted to the 741 by project requirements
Comment: LDO's  cannot drive much current if there is a big voltage drop causing excess VI power dissipation from the drop resulting in overtemp shutdown. You may need a better match on supply or LDO choice to not exceed power drop specs.  e.g. 18V in, 12V out at 1A LDO dissipates (18-12)* 1A = 6W and overheats. without a 10W heatsink
Comment: @TonyStewart.EEsince'75 - Where does LDO come into the equation? OP is using the ancient crappy 741 opamp.
Comment: Surely he must know an old Op AMP cannot drive 1A. I wonder how is such lack of basic awareness possible in school unless the student is not paying attention to basic input-output specifications and limitations of an Op Amp.
Comment: @TonyStewart.EEsince'75 This is my first time at a project like this so I'm learning slowly
Comment: @PeterBennett I understand what you're saying let's assume the power supply can deliver more than 1A. Tony raised the point that the Op-Amp can't drive a load that requires that much current. But in my circuit the Op-Amp isn't driving the load so is there anything else that can be wrong ?
Answer:
The TIP31C gain is not very high. In the ST datasheet, some binned parts are guaranteed not to have gain (beta) greater than 50. Other bins are guaranteed not to have gain greater than 24.
This means that your 741's output definitely has to produce at least 20 mA, and maybe as much as 42 mA to drive the TIP31 to deliver 1A.
This is somewhat mitigated by the fact that the TIP31's beta increases as it heats up, but still you're likely trying to get 10's of mA out of the 741.
The 741's short circuit output current is only 25 mA (based on the TI datasheet).
And the output voltage range spec implies an output equivalent resistance of about 150 ohms. (Because the typical output swing drops by 1 V when the ouput current is 6.5 mA)
So when sourcing 20 mA, the 741 output voltage is likely going to drop by about 3 V, giving a maximum output of about 11 V at this load.
Your maximum regulator output is then one Vbe drop lower, or about 10.3 V, lower than the 11 V you were trying to get.

So it looks like you were just trying to get a bit too much out of these parts.
(Also consider Peter Bennett's comment and double check that your 15 V supply is not sagging with 1 A load)
Comment: In addition you are generating your reference voltage from your supply output....you need to move R2 so it's connected to the 15V rail.
Comment: Yes, a darlington should work here. The drop out voltage will be more, but I think still okay to get you 11 V output. You could also use a lower-power but higher-gain BJT for the base part of the pair and reduce the loading on your 741 even more.
Comment: On the binning, ST says they sell TIP31C's in "Group R", "Group O" and "Group Y" with different gain specs, and with no way for you to order a specific group.
Comment: @PeterBennett, well sure, but he said that's an imposed requirement. You'd also still be asking for a lot of output current close to the rail. "Rail to Rail" op-amps tend to get a lot less rail-to-rail when they're sourcing 20 mA.
Comment: Thank you ! But what do you mean by 'binned parts' ? Also, will a darlington pair help me to drive loads that require more than 1A
Comment: A more modern op-amp than the LM741, that can get its output closer to the supply rails, would also help.
Comment: @ThePhoton Why would the dropout voltage be more ? Is it because I'll now have to consider two Vbe drops instead of one ?
Comment: @S, yes, exactly.
Answer: Agree with what The Photon has said, and Jack Creasey's comment on R2 should be connected to 15V.
But since you are stuck with the 741 and not enough base drive voltage, replace the TIP31 with something like below.

simulate this circuit – Schematic created using CircuitLab
Comment: Thank you rioraxe, but why the PNP - NPN configuration ?
Comment: The Photon suggested a darlington to get more gain, but a darlington has two Vbe drops in a row, that is why he said the dropout voltage would be more. This combination moves the Vbe of the PNP "upstream" and avoids adding it to the 741 base drive path.

Op-Amp Voltage Regulator