What microphone is used in these videos?

Question: What microphone (and mount) does this girl use in her videos?
Examples:

Also:  Would using a pop filter help her?
Answer: I wanted to add that she has very pleasing tone and natural voice.
After careful visual inspection, I am pretty certain that this is an AKG Perception 220 Condenser mic.
The mount comes with it, at least at this site:
http://www.musiciansfriend.com/pro-audio/akg-perception-220-condenser-microphone
"Spider-type shock mount and metal case included"

A Pop Filter is generally a good idea, but she is not on top of the mic as she is back a bit playing the keyboard, so in her case a pop filter probably will not make any difference. However, in the Elton John tune she is on top of the mic and I really don't hear any objectionable pops, she has her "puffs" right.
:>
Comment: It's very hard to tell whether she's got a 120 or 220 since the bodies are almost identical. Both are condensers, which need power via their XLR connectors. Power can be supplied by a mixer. An alternative is the Perception 120 USB. Like its name suggests, it has a USB connector which can plug right into your computer. No extra power needed.
Comment: When I did my visual examination I noted that the 220 has a slight gold tone to the mic screen which is consistent with the target where as the 120 has an aluminum tone screen.
Comment: is it possible the microphone alone made the difference between "Pray" and "ET" ? Suddenly there is a very noticeable difference .
Comment: @OlivierS I don't think she used this microphone for either of the videos you've mentioned. In E.T. she used a different camera though, and probably the camera-mic, if that's what you meant.


Storing a brined turkey

Question: Is it safe to cook a brined turkey 5 days after taking it out of the bridge if it has been refrigerated the whole time?
Answer: I'm assuming you mean that you removed it from the brine 5 days ago but kept it in the refrigerator the whole time?
If you brined your turkey for at least 12-24 hours then removed it from the brine and kept it in the fridge...it should be okay to cook after 5 days. I wouldn't let it go much longer before cooking, however. Check to make sure that none of the turkey has any slimey parts and smell it. If there is any odor that is off...don't eat it. If it smells funky...it's junky. And if in doubt...throw it out.
A few years ago we had a death in the family that caused a delay in our Thanksgiving meal. My turkey sat in the brine for 5 days and another 2 days before cooking. Ended up being one of the best turkeys I've ever made.

Storing a brined turkey


Restoring color/shade of leather boots

Question:
My 3-year old leather boots that originally had a light brown color, have darkened quite a bit, especially  at the toes. I think this is partly because I used to care for the leather with macadamia oil, but there are also little black stains. I may also have scrubbed off the original wax.
Currently I clean them with water, saddle soap and apply leather conditioner before polishing them with light brown wax.
Is it possible to restore the original light brown color?
Answer: You can go with any of following techniques:

Saphir Reno'Mat Cleaner:The Renomat is actually a leather cleaner, but if you rub it hard enough it will help to remove some of the finish of the shoe as well as
the dirt build up that might have been accumulated. The Renomat would be good for medium to lighter colors,
but you would most likely need to use the white spirit/nail polish removers for trying to strip darker colors.
Depending on the strength of the finish, it may take several applications of stripping. You do not need to take it down to the bare color
of the leather, only unless you really want to get a light color as the base for having greyish/tannish textures in your new color.
Once stripped, allow the shoe to dry overnight, especially if you have done several applications.
Saphir's Teinture Française Shoe Dye:
Professional patina artists use small paint brushes that apply the dye.
Therefore,you can have one for applying a lot to a bigger area of the shoe and another for applying a little to a smaller area.
If you want brogueing in a different color, the finer brush that was provided with the dye will do. When ready, simply apply the dye onto the shoe.
Always start with a little to see how easily the leather absorbs it. From this point, you can tell whether or not adding a little or a lot is going to suffice.
More likely than not, you are going to have to do a few applications if you really want a rich color. Always allow several hours between applications, if not overnight,
as the dye is quite harsh on the leather and can easily over-soak it.

Once you have applied the dye, the rest of the job is quite straightforward really. Now you just need to seal it all in with a good polish
(in reality it is already sealed as the dye is permanent, but shining it up will bring out the colors). As you just subject the shoe to all kinds of chemicals,
first things first is to apply the mink oil renovator to ensure that the leather does not dry up. Then after doing that, use a cream polish
to enhance the color that you just applied and then finish it off with a wax polish in order to give it the shine that it deserves.
Over time, if necessary, you can simply use the dye as a touch up tool for when the color naturally fades.
Comment: Thanks for the reply. Have you tried this? According to the Saphir page, the cleaner is for "removing dirt marks and deposits of products based on resin and silicone. " No mentions of oil or general discoloration.
Answer: Well, to restore color of leather (in your case leather boots) I´ll try with leather cleaner which can be make easily at home (homemade cleaner is much more affordable than commercial leather cleaning products); but an advice - test before using: first you should test this on small portion of leather.

Clean it (again) with water and soap, to remove macadamia oil and wax.
Use white vinegar - mix lukewarm water and white vinegar (1:1), apply it on boots and leave it a couple of minutes before clean it with rag.
Alternatively: use toothpaste - use small amount of whitening toothpaste; rub it on leather using a soft cloth and wipe off.

After you restore color, use neutral (or light brown) wax to care it. And avoid to use any oil to protect leather.
If you interesting about cleaning other leather cloth you can find it here.
Answer: Just to follow up on this: I was hesitant to try some of the earlier answers, but I did try toothpaste. Didn't work for me, I think because the darkening was mainly caused by my macademia oil treatments.
Almost one year has past now and the original color is back. I have regularly scrubbed the boots with a rough brush to get dirt off. That removed the black spots too. Then I applied saddle soap with warm water with a soft brush. I let the saddle soap do its work for a couple of minutes, after which I rinse the boots with warm water again. I apply yellow (!) polish. I think the saddle soap and warm water washes were key in removing the oil.
Answer: You can use petrol for cleaning leather boot.
Petrol can remove all type of dust speedly.
Comment: Petrol will also remove all the wax and natural oils in the leather.

Restoring color/shade of leather boots


Performance difference between drawBitmap and createScaledBitmap

Question: In order to support different size of screen resolutions, I programmatically scale the bitmaps in my android game application using SurfaceView. I performed it by using drawBitmap(Bitmap bitmap, Rect src, RectF dst, Paint paint) method. I saw a Bitmap method named as createScaledBitmap that can create a new bitmap scaled from an existing bitmap. Is there a performance difference between them?
Comment: Since you're drawing on a `SurfaceView`, have you considered setting a fixed size and letting the hardware do the scaling?  See http://android-developers.blogspot.com/2013/09/using-hardware-scaler-for-performance.html
Comment: I added an example of this to Grafika -- see "Hardware scaler exerciser" in https://github.com/google/grafika .
Answer: Yes, there is.  They do different things.  createScaledBitmap takes a bitmap and creates a new scaled copy in memory.  It does not place it on a canvas, this is a new bitmap object that can later be drawn to a canvas.  drawBitmap draws the bitmap to the canvas (which may be backed by a bitmap, surface, or the screen), scales it, applies effects from the paint object, respects clipping regions, etc.
You should not use drawBitmap unless you actually want to draw it to a canvas-  using it just to scale is inefficient.  If you need to draw it and scale it-  if you'll need to scale it repeatedly and memory isn't an issue, use createScaledBitmap first and then draw that scaled bitmap.  If you don't need to draw it again or memory is an issue, use drawBitmap to scale it as you draw it.
Answer: Creating a scaled bitmap does not draw the bitmap. It provides a means to include options before drawing. For example you can use different interpolation techniques depending on the size, rotation, etc. of the original image vs. where it will be drawn:
What does the filter parameter to createScaledBitmap do?
So if you are not satisfied with the results of drawBitmap, you can try to improve the Bitmap with scaling options. drawBitmap uses "automatic" scaling but does not specify what is used.
Specifically related to performance, createScaledBitmap uses the native method "nativeCreate" and drawBitmap uses "native_drawBitmap" - so it will vary by platform implementation of the native methods. Regardless, you will need to draw the bitmap onto a canvas once it's scaled, so "drawBitmap" will be required either way and even if the bitmap is already scaled it's very unlikely to improve performance. However, if you are not drawing it, then there's no point in using "drawBitmap" because it autoscales and uses resources to perform the draw.


moving a product from default category to correct category

Question: If a product is incorrectly assigned to a category - in my case, to the default, how does one change the product to the correct category? I want to move a product that is now in "default" to "earrings"
Comment: Don't you mean `Attribute Set` instead of `Category`?
Answer: 1) Click on the Default Category and click on the Category Product tab.under it uncheck the check box of the product which you want to remove from the Default category and click save product.

2) Click on the Earring Category and click on the Category Product tab.under it click on the reset button and check the checkbox of that product and click on the save product.

Answer:
NOTE: Assuming that you mean that the product is incorrectly assigned to an
  Attribute Set instead of a Category.

Changing the Attribute Set of a product in Magento from one Attribute Set to another Attribute Set is not possible out of the box. You would need to make quite a few changes to the database (manually) which is very risky. So I don't recommend doing this.
What I can recommend is using the Flagbit Change Attribute Set extension for this purpose. I have this extension installed in my own store and it works flawlessly. It is free and you can download it from Magento Connect.
As always, make sure that you have a good backup of your Magento file system and database before installing the extension.
Answer: Go to  catalog-> Manage productsclick on the edit to product you want change->categories->uncheck the current assigned categories and check the new categories in which you want to assign the product.   Hope this will help!!!


Is it possible for the universe to be deterministic at one level, but not at a higher level?

Question: I know that it is certainly possible for the universe to be stochastic at one level, but deterministic at a higher level. For example, I have read that while quantum mechanics is a stochastic theory, at the scale of molecules and higher, the stochasticity "washes out", and the phenomenon becomes deterministic. But what about the reverse? That is, is it possible for the universe to be deterministic at one level, but not deterministic at higher levels? For example, while the scale of molecules might be deterministic, the scale of human behavior might be stochastic. Personally, I believe that "once deterministic at one level, always deterministic at all higher levels". But have any philosophers argued that a deterministic base level can give rise to a stochastic higher level?
Comment: "Stochasticity washes out" is inaccurate. Although this is roughly true in many situations, there are also many others where stochasticity is amplified and propagated to the macro-level. [Geiger counter](https://en.wikipedia.org/wiki/Geiger_counter) is a classical such amplifier. If we similarly relax "not deterministic at higher level" then the so-called ["deterministic chaos"](https://en.wikipedia.org/wiki/Chaos_theory) would fit. At the "higher level", such systems appear stochastic and their behavior is unpredictable. If quantum effects are taken into account they are even indeterministic.
Comment: @Conifold I appreciate (and +1) you bringing up amplification of the quantum to the macro level, but quantum mechanics is a deterministic theory. QM deals in values correlated to probabilities, but its models are strictly deterministic. Every state is the inevitable consequence of a previous state; and, applying the time reversal operator, every previous state is the inevitable antecedent of a following state.
Comment: Your computer is completely deterministic. So how did it give rise to your Question? Just add more turtles.
Comment: @ScottRowe As long as you're clear that determinism is subject to the whims of gremlins. ; )
Comment: If this a question about how nature behaves, it should be settled with physics, not philosophy.
Comment: The question is too broad to have a single answer. There are different paradigms, each with their own consequences. The question should restrict the assumption more explicitly.
Comment: Also it would help to speak about special systems first, and not about the actual universe, to avoid answers focussing on pushing ideology about the universe.
Comment: What is deterministic? Any simple example?
Comment: States are deterministic consequences of previous states only during unitary evolution, so-called collapse is a projection (to an eigenspace), and is neither determined nor reversible. On the standard interpretation, QM is indeterministic, and on MWI, it is "deterministic" only in a sense that makes determinism meaningless to observers ("everything happens for somebody" is of no consequence to anybody).
Comment: @Conifold The discussion about QM goes to show that "deterministic" and "indeterministic" is not proper to apply to "QM". Some aspects are "deterministic", some are not. Generalizations from "QM is deterministic/non-deterministic" are bound to be false, because the statement is meaningless. You need to look at a more granular level to make correct statements.
Comment: @ScottRowe In theory, the computer is completely deterministic. A physical artifact might have physical anomalies where the physical computation deviates from the abstractions.
Comment: @JD this comment, courtesy of anomalies in the computer. Why, without nondeterministic behavior of computers, we couldn't get anything done at all! :-) Cars are even worse, they just go rolling off in random directions. But, it is all controlled by one little piece of the car: the nut that holds the steering wheel! Amazing.
Answer: It is not possible for the Universe being deterministic at any level. Only theories can be deterministic, practical reality is never.
Quantum level is clearly probabilistic, but probabilistic randomness does not "wash out" completely at any scale. In large solid objects the probabilistic variation is smaller than the accuracy of any measurement device. Fluids behave stochastically at all levels.
But the measurement error itself says loud and clear that reality is not deterministic. In a deterministic system there are no errors, everything proceeds with absolute precision. Reality is full of all kinds of noises and turbulences, errors and misinterpretations.
Comment: **Comments have been [moved to chat](https://chat.stackexchange.com/rooms/145909/discussion-on-answer-by-pertti-ruismaki-is-it-possible-for-the-universe-to-be-de); please do not continue the discussion here.** Before posting a comment below this one, please review the [purposes of comments](/help/privileges/comment). Comments that do not request clarification or suggest improvements usually belong as an [answer](/help/how-to-answer), on [meta], or in [chat]. Comments continuing discussion may be removed.
Answer: Only ever, approximately deterministic.
Even randomness 'contained' to very small sizes can have large scale impacts, like say in the case of three-body interactions of blackholes where the tiniest variations we think physics can allow will matter. Article on here: The three-body problem shows us why we can't accurately calculate the past. These cases might be rare though. And indeed, it took very careful observations to show the universe is not classical and deterministic, but quantum and indeterministic. The consequences are usually limited to small scales though, and that is the sense in which classical mechanics are a pretty good approximation, in most situations.
The converse, is that emergent behaviours in a deterministic universe, can lead to gigantically more efficient calculations, such that we regard the deterministic 'layer' as only meaningful in principle. A good example is predicting other humans based on their character, rather than the quantum states of their electrons - the latter would require such a complex calculation that it would be a full simulation of a human, and still be extremely sensitive to initial conditions, whereas the character model should likely provide useful insights for a wide set of circumstances.
Answer: Ill-formed question. It is just a speculation sustained on multiple forms of SUBJECTIVITIES, so, no answer, until solving all of them:

Outside of our minds, there are no rainbows, cookies, engineers, rocks or noses; everything is just atoms or fields (or something else, more pure and factual which we cannot know due to or limitations). Every subject can split the same system in different types and numbers of parts (e.g. for A, a house is bricks, wood, sand, etc., for B, it is spaces, walls, etc.). Ergo, systems are SUBJECTIVE assessments about the environment. When you speak about "levels" you are speaking about systems and parts, which are SUBJECTIVE.
Atomic behavior was deterministic in classical sciences, and later it became stochastic. Ergo, deterministic and stochastic are SUBJECTIVE appreciations. You are assuming stochastic/deterministic behaviors are absolute and they are not: they are SUBJECTIVE.
You can describe with a huge precision what will happen to an isolated cloud (e.g.  thermodynamics can do so). But thermodynamic systems are ideals, not realities (starting from the fact that there are no closed systems in nature; thermodynamic systems ARE closed). A cloud, inside the natural environment (e.g. floating in the sky) becomes unpredictable in the long term. Worst even, when we consider that there are no 100% probabilities in nature. Ergo: any type of "determinism", for whatever "level" is SUBJECTIVE. A ball which is predictable with a Probability < 100% is essentially unpredictable. Determinism becomes then PROBABILISTICALLY SUBJECTIVE. All your "washing-out" notion represents only metaphysical ideals (like thermodynamic systems).
Comment: Non-predictability does not imply non-determinism.
Comment: So do you reject the existence of objective reality? Because your answer doesn't really make sense otherwise. If you accept that objective reality exists, then objective reality would behave in a certain way (deterministically or non-deterministically) regardless of our subjective interpretation. We may subjectively believe it to behave in a certain way, that may or may not match how it actually behaves, but that doesn't mean it doesn't have some objective behaviour.
Answer: In terms of reducability, it is possible, depending on specifics, to have a deterministic system reduce to a non-deterministic one. But this is not generally possible.
As an image: if we push a toy boat in a bathtub in one direction, it will move pretty straight no matter tiny waves. But if the waves are big enough, it can move anywhere, chaotically, and it is not possible to make the boat move straight.
We could call a universe with such very tiny waves quasi-deterministic. In a quasi-deterministic system or universe, there still remains a tiny margin of error, but all practical results would be undistinguishable from an actual deterministic system.
Note that due to chaos theory, even tiniest errors can have large consequences (so the boat imagine can be misleading), but for practical purposes like engineering, the same problem exists with certain deterministic systems due to errors in measurement and observation. Measuring with tiny unpredictable errors in a deterministic system would generate quasi-non-determinism. This would be "as good as real random" for most practical purposes.
In a quasi-deterministic universe, it can be possible to tap into the underlying non-deterministic processes to generate non-deterministic large processes, but for most purposes it could be cheaper at similar quality to just use quasi-non-determinism on top of quasi-determinism.
In an actually deterministic system or universe, no truly non-deterministic system can be built if we assume reducability.
However reducability itself is an assumption, and mind-body dualist and spiritual people reject such reductionism for our universe.
Even in a truly deterministic universe with full reducability, for agents inside that universe, it may be impossible to tell whether process are non-deterministic or just quasi-non-deterministic.
In the bathtub image: when nobody is able to exactly measure the tiny waves, it does not matter for practical purposes if they are actually deterministic or not.
In that sense, even if our universe was deterministic (on some scale), due to limitations in observability we might only ever be able to make stochastic models about certain processes, and very weak ones if chaos theory is involved.
One area of reading that can help are text about counter-measures casinos are taking against cheaters using cameras and computers to predict where a ball in a roulette table will settle. That might help understand quasi-determinism and quasi-non-determinism.


Can RAM be specific to chipset like intel or amd only? F3-10600CL9D-4GBNT

Question: Basically i want to know if this ram is compatible with GA-890FXA-UD% motherboard. using a AMD 1055t CPU
Answer: Not specific to your CPU, it depends on your motherboard chipset.
As you can see on this page http://www.gigabyte.com/products/product-page.aspx?pid=3417#sp your motherboard supports:

4 x 1.5V DDR3 DIMM sockets
supporting up to 16 GB of system
memory (Note 1)
Dual channel memory
    architecture
Support for DDR3
    1866(OC)(Note 2)/1333/1066 MHz
    memory modules (Note 2)

So, you need to use 1.5V DDR3 memory running at 1066, 1333, or 1866 MHz.
Note 1 is just about 32-bit Windows' stupidity (basically, use 64-bit Windows if you want to install 4GB or more and actually use it all) and Note 2 says:

To reach DDR3 1866MHz or above, you
must install two memory modules and
install them in the DDR3_3 and DDR3_4
memory sockets.

That makes it sound like you can only use 2 slots for 1866Mhz DDR3 memory.
Generally it's safe to mix RAM of different speeds as long as you run them all at the lower speed. Also, you can install faster RAM than your system supports as long as it uses the right voltage, it'll just run at a slower speed than it's capable of.


How to find if iPhone is unlocked for worldwide GSM use

Question: I am new here. I am looking for an iPhone online but, want to know if a particular phone would work with GSM carriers outside US. Is there a proper way to find that? Specially the iPhones unlocked from US carriers.
Answer: If the Iphone is unlocked just trying with a difference SIM card from another carrier should be work without any problem.
Comment: That seems like quite the hassle if you don't already have another SIM card.


What is the best way for a female voice to hum high notes?

Question: In choir our conductor gave us the advice that your lips should be tingling when you hum, which worked well for lower notes. However, when me and the first sopranos got up to the higher notes, we couldn't hum in the same way and it just felt tight in the throat and not a very nice sound. Is there a good technique to do this or is there no nice way to hum high notes?!
Answer: Choral directors I've worked with have always advised singing "n" instead of "m". They sound nearly the same, but "n" allows for more relaxed sound production.
Answer: Just talking from personal experience, but humming usually needs you you to have you lips closed. This means that the air flow will need to go through the nose. If the air flow through the nose is blocked to some extend it will be harder to do high notes because it is harder to get the air flow required. In such a case it might help to slightly open your mouth.
Also you need the keep resonance in mind. Singing technique is about creating as much sound with as little effort as possible. This means you need to adjust the resonance of your mouth in such a way that you get the most from the note you are producing to strain your voice as little as possible.
The resonance frequency of a cavity like the mouth will increase if we make the cavity smaller or the opening larger (this is similar to how closing the bottom of a wind instrument will make the note lower).
So when singing we would usually adjust this resonance by opening our mouth wider when singing higher notes. This is not something that can be done when humming (unless again if you open your mouth slightly on high notes). What you can do on the other hand is to reduce the space of the mouth cavity by raising your tongue up and close off between palate and tongue, and further by raising the back of your tongue into the palate as you go higher. Optimally you'd find at each pitch the point where you get the optimal resonance.
Answer: Generally, to get a good sound, you'll be inclined to open your mouth a little more the higher you go—mm for low notes, nn for middle ones, then oo, then eventually ah; done right, it should be gradual and not too noticeable. This is the easy way to experience what good resonance feels like at every part of your range, which is a stepping stone to maintaining that resonance with any mouth shape. (Spoiler: the resonance moves to different areas, notably including your nose; it won't feel the same at every pitch.)
My musical theatre teacher knew this well and had us sopranos do some funny things with vowels when we went extremely high in chorus numbers, arguing that resonance was more important to the overall texture than diction up there, and generally she was right.
Do what your teacher asks, but she won't mind if you cross into nn territory, maybe further. Don't forget to open up air inside your mouth as you mm, and don't get stuck trying to resonate in a specific way, just let it happen.


Clausius-Clapeyron - Slope of the best-fit-line

Question: I'm using the equation $\frac{y_2-y_1}{x_2-x_1}$ to find the slope of the best fit line for this problem but I can't get the figure shown in the book (-3773x K).  I've been at this a while and I really need to know so I can move on.  What am I doing wrong?  I've looked at half a dozen general chemistry texts and none of them make this step explicit.
Comment: What values for $x_1$, $x_2$, $y_1$ and $y_2$ did you get from the diagram?
Comment: I used the values .09531-6.25570/.005-.00333= -6.16030/0.00167= -3689
Comment: Then you have done it right and your result is probably within the error bounds. You can use linear regression if you want to treat the problem mathematically more rigorously.
Comment: Thank you both for your input.  I can not tell you how much of a relief it is to get some clarification on this problem.  As I move on I will get a better understanding of what you mean by 'error bounds'.  Linear regression and programming will have to wait, but I will remember your remarks.
Comment: I still have some questions about this kind of graph.  First, on the x-axis, why do we begin with the inverse of 300K?  This creates a negative slope.  Why don't we plot the inverse of 200K as our first point?  Second, and this may be beyond my mathematical understanding, what is it about the natural log that allows us to make a linear graph of pressure as a function of temperature?  Why don't we see disproportional jumps in the natural log of pressure in relation to temperature ultimately producing a curve?
Answer: Using your formula, $\mathrm{slope}=\frac{y_2-y_1}{x_2-x_1}$, and eyeballing the most extreme points on the chart, $\mathrm{slope} = \frac{0-6.2}{0.005 - 0.0033}$, I get a slope of 3647 K, pretty close to the "official" answer.
If you want to get more fancy, you could use a software program to fit this data.
my_data <- data.frame(vapor_pressure = c(1.1, 6, 28, 95, 293, 521),
                      temperature = c(200, 220, 240, 260, 280, 300))

# linear regression on transformed variables
my_data$ln_vp <- log(my_data$vapor_pressure)
my_data$inverse_T <- 1/(my_data$temperature)
linear_fit <- lm(data = my_data, formula = ln_vp ~ inverse_T)
linear_fit$coefficients['inverse_T']

inverse_T: -3787.46829114867

This answer is even closer to the "official" answer.  The remaining difference is probably due to rounding errors or differences in fitting algorithms used.  It only affects the answer by 0.3%.


How can I return an Arduino digital pin to floating state?

Question: I am trying to setup a programmed reset function for a 3.3V BlueTooth module that resets when its reset pin is pulsed LOW for a short period of time.  There is a 47K pull-up resistor in the BT module that keeps its reset pin at 3.3V until the reset pin is grounded or sent LOW.  So there is no issue with random noise due to the BT pull-up resistor.  Can I define the Arduino pin as input and leave it floating, then digitalwrite LOW to reset, then return the pin to floating so the BT module can carry on after the reset?  I can't digitalwrite HIGH because the 5V from the Arduino will destroy the 3.3V BT module.
Comment: This *can* be done by configuring the pin between an output and an input without pullup, which is done by setting/clearing the direction register bit while leaving the output data register bit low.  But you have to accept that any mistake or loading of a program that uses the pin differently will potentially in your words "destroy the 3.3V BT module"  Using a positive output to drive the gate of an NFET which would ground the signal could eliminate that risk.
Comment: I think I will wire up the circuit on a breadboard and measure the voltages at each instruction!  If I load the pin with a 1K resistor, I should be able to confirm its behavior.  Seems the path of least resistance.  I am afraid your suggestions are way over my head!  I will also try to figure out your suggested use of an NFET, as I am aware that a programming mistake or misuse of the Arduino pin would damage the BT module.  Thanks for your help Chris!  If I find the answer through breadboarding, I will update this post!
Comment: As it turns out, someone already answered this question:  Leave the pin as input except when you pull the pin low. e.g.

pinMode(X, INPUT);      // This leaves the pin in a floating state
....
digitalWrite(X, LOW);    // The pin is now defined as LOW but still floating in INPUT mode
pinMode(X, OUTPUT);  // Change the pin to low resistance LOW
delay(100);
pinMode(X, INPUT);     // Return the pin to floating state

OR as you suggested, use an NFET to switch it.  I will do that!
Comment: Are you implying that bit manipulation is required, or will the pinMode and digitalWrite commands do that for me? For example:  Would this work???
- pinMode INPUT                      // by default it will be floating
- pinMode OUTPUT                  // allow a digitalWrite LOW to ground BT reset pin
- digitalWrite LOW                   // reset the BT module
- delay 10 msec                         // leave it low for a short period of time
- pinMode INPUT                      // hopefully this will return it to floating state but I couldn't confirm that anywhere...
Comment: It's quite possible something like that could work, but hard to know - if you want to know exactly what happens, you'd need to either audit the code of the Arduino functions, or directly write to the AVR PORTx and DDRx registers.
Answer: Have you considered using a bi-directional 5V/3V3 logic level converter circuit (typically just an appropriately-chosen N-channel MOSFET with a couple pull-up resistors). For example, search for "logic level shifter" on SparkFun.com (e.g., SKU# BOB-12009). The basic design is shown below in Figure 1.

simulate this circuit – Schematic created using CircuitLab
Figure 1.
Caveat: The 5V logic's output LOW voltage feeds through the MOSFET unmodified and is applied directly to the 3.3V logic input pin. Note that \$V_{OL}\$ for 5V CMOS logic is 0.9V, while \$V_{IL}\$ for 3V3 logic is 0.8V. However, in many cases, the logic LOW output voltage from the 5V logic side is well below 0.8V, and so this logic level converter circuit works fine for those cases.
Answer: You can definitely do that, but should consider using a diode, it is the cheap level shifter for this situation, moreover it frees you from code error concerns.
Comment: How are you suggesting to connect a diode?
Comment: you add a diode from the external pull-up for 3v3 logic to a digital pin at the 5v logic, so you may only drain current from 3v3 to gnd, never sourcing 5v to it.
Comment: Sorry, but you will have to be more specific because I can't visualize what you have described.  Thanks!


How am I supposed to tell if a number is divisible by $13$ (I need a shortcut)?

Question: I've been trying to figure out if a number is divisible by $13$.  As I'm saying this in first person, I think I'm supposed to take the rightmost digit of the number, for example, $39$, multiply it by 9, and finally subtract the digit from the rest of the digits put in order to the left of that rightmost digit.  The final result has to be divisible by $13$.  So, in $39$, $9*9=81-3=78$, and $78$ is divisible by $13$.  I think this is it.  Am I on the right digit track?  I just want some answers with words that will satisfy me.
Comment: One way is presented [here](http://en.wikipedia.org/wiki/Divisibility_rule#Divisibility_by_13) and another one [here](http://www.savory.de/maths1.htm)
Comment: Your method works, but the second link provided by @sonystarmap works similarly, but perhaps slightly better. Your method relies on the fact that $9\cdot10=90=91-1$, and $91$ is divisible by $13$. And that other method relies on $4\cdot10=10=39+1$, and $39$ is divisible by $13$.
Answer: I find that with the possible exceptions of the rules for $9$ and $11$, the digit-based divisibility rules are annoyingly slow to actually use, e.g. in your head. If you've ever passed the time by looking at random numbers around you and trying to find their prime factors (and who hasn't?), you would never used a digit-based divisibility rule for testing for divisibility by even $7$, let alone $13$.
Here is what I do: I start with a number $n$ and a prime $p$ I want to test divisibility for, and then I transform the number in various ways such that the transformed number is divisible by $p$ if and only if $n$ is. The most common transformation is subtracting powers of $10$ times small multiples of $p$ (which ideally should be memorized). Eventually I try to get a number where it's either obviously divisible by $p$ or obviously not divisible by $p$, e.g. because it has a lot of trailing zeroes or is small.
For example, let's take the current year, $2014$. Is it divisible by...

$7$? Well, $2014 - 14 = 2000$, so no. (See how fast that was?)
$13$? Well, $2014 - 1300 = 714$, and $780 - 714 = 66$, so no. (Here I'm taking advantage of my freedom to subtract a number slightly larger than my current number, then take its negative.)
$17$? Well, $2014 - 1700 = 314$, and $340 - 314 = 26$, so no.
$19$? Well, $2014 - 1900 = 114$, and $114 - 95 = 19$, so yes! But let's pretend we didn't notice that so I can demonstrate the method for larger primes.
$23$? Well, $2300 - 2014 = 286$, and $286 - 230 = 56$, so no.
$29$? Well, $2900 - 2014 = 886$, and $886 - 870 = 16$, so no.
$31$? Well, $3100 - 2014 = 1086$, and $1086 - 930 = 156$, so no.

These kinds of arguments are relatively easy to perform in your head because, rather than keep track of two pieces of information (the digits you have left to use, and the digit sum or whatever that you're in the process of computing), you only keep track of one piece of information (a number which is divisible by $p$ if and only if your original number was).
Because you're only testing for divisibility and not trying to find either the remainder or the quotient, you can ignore information and there are more moves available to you: for example, you can at any step in this process multiply or divide by other primes. I didn't use this freedom above, but I did refrain from dividing by $2$; that happened to make some of the arguments more convenient.
Answer: Here is an explanation of why your method works: $13$ is a prime number, and thus has no factors in common with $9$. So $n$ is divisible by $13$ if and only if $9n$ is divisible by $13$.
Now write $n=10a+b$, where $b$ is the final digit of $n$ and $a$ is the number composed of the remaining digits. Then $$9n=90a+9b=91a+(9b-a),$$
and this is divisible by $13$ if and only if $9b-a$ is divisible by $13$ – because $91a=13\cdot7a$ is clearly divisible by $13$.
Answer: For numbers up to $1000$ do what you can. For somewhat larger, subtract off multiples of
$$ 1001 = 7 \cdot 11 \cdot 13  $$ until you get somethng no larger than $1000.$
This way you get $7$ and $13$ at the same time, also $11,$ although $11$ has its own.
Answer: It looks like my own method is pretty much right.  For example, $156$: $6*9=54-15=39$, and $39$ is divisible by $13$.  It looks like this can work any time.  I think this works out perfectly.


In a audio stream of signed data, what difference is there between a positive and a negative sample?

Question: Say I have 16 bit signed data in my audio file.
What is the difference between a sample set to +1,000 and a sample set to -1,000? Since silence is still at 0, I'm not too sure how to interpret these signed values.
Answer: Imagine a simple speaker, or a microphone. Either of these devices (usually) have a diaphragm which vibrates to create or detect sound. The position at any given time of the diaphragm relative to its resting position could be called its displacement. Since it can move in two directions from the resting position, the displacement is a distance that can be positive or negative.
There are various complications and imperfections, but generally speaking, samples in an audio file are proportional to displacements of a speaker or microphone diaphragm. That's the fundamental thing. Everything else is implementation details.
The sample value zero corresponds to the resting position of the speaker. Therefore, if you play "all zeros", you hear nothing. But if you play, say, a second's worth of the sample value +1000, you're in principle telling the speaker "slam forward as fast as you can, then stay there for a second, then go back to zero".
It's that transition from one position to another that produces/is the click you hear. You don't hear anything at a constant +1000 because nothing is moving — depending on your perspective it's either nothing at all or a "zero hertz" signal.
So, what's the difference between +1000 and -1000? The speaker moves in the opposite direction, that's all. This mostly does not make a difference to the sound you hear, but it does have some consequences.

Suppose you have the samples [+1000, -1000, +1000, -1000, +1000, -1000, …]. That's a high-frequency oscillation, so that's a sound you can hear. But if they were all +1000, that would be silent again.
(And in case you're wondering: if you had [+1000, 0, +1000, 0, +1000, 0, …], that would be the same sound but quieter, because there's half as much change in displacement.)

If you take all of the samples of an audio signal and switch the signs around, you have changed the phase of the signal, or in other words inverted it. It'll sound the same by itself, but if you mix (add) them together, they'll all sum to zero (cancellation) instead of being louder, and if you play the original and inverted versions through two speakers, you'll get weird frequency-dependent effects depending on where the listener is. (This is why it is important to pay attention to polarity when wiring stereo speakers.)

One detail I haven't mentioned: most speaker systems are "AC coupled" (high-pass filtered). This means that they will not actually displace the speaker in response to a constant level; instead they will return slowly to zero, slowly enough that this makes no audible sound of its own. This protects the speaker from overheating and saves energy, but, again, has very little audible effect. The clicks and silence you hear from the experiments discussed above are the same as you would hear if this was not done.
Many other audio components are AC coupled too. Generally, this is done so that there are not any constant levels — this avoids unnecessary clicks when you add or remove sound sources, and also makes the best dynamic range — for example, if you have a silence at +30000 in your 16-bit data, then you can't make a very loud sound on top of that silence, because it'd run into the +32767 maximum possible value. So keeping things centered around zero lets the entire range be used.
Comment: Great answer. Thank you. I was not aware that you could move the speaker forward **and backward**. In the really old days, I would just send a pulse to the speaker and so I assumed it could only go forward.
Comment: http://lavryengineering.com/pdfs/lavry-sampling-theory.pdf
Answer: Your assumption that silence is at zero (0) sample value is incorrect.
The values of the 16-bit signed data in your audio file are simply audio samples, which represent the level of an audio waveform at a specific point in time. As you join the dots as it were, you will begin to see the shape of the entire audio waveform.
You should look up digital sampling theory and try to understand how digital audio sampling works. How you get from an analogue waveform, to sampled data and then back again to an analogue audio waveform.
There is no such thing as silence other than the absence of any change in a stream of audio samples.
You can simply interpret the values of +1000 and -1000 as simply two points in time where the sampled value of the original waveform happened to result in values of +1000 and -1000 respectively.
Comment: Why do I think 0 is silence? Well... So I create two 2 second files. One has all of its samples set to 0 and the other with all of its samples set to 15,000. While playing, both "sound like silence". However, when I start playing the one with 15,000 and also when it ends, I hear a small "tick". So there is something _special_ about 0, at least on my crappy audio device.
Comment: Seriously mate. Go read up on Digital Audio Sampling theory. This will answer all of your questions. The 'tick' you are hearing is the DAC jumping from 0 to 15000 and then from 15000 back to 0 again at the end of the file. The other thing that is 'special' about the file is that you have created a file with a massive DC offset. I don't think this will damage your gear, but if you make one long enough.... well you never know. Don't get caught out by the incorrect assumption that any particular value has anything to do with silence. All these samples do is represent a sampled waveform level


Word that is similar to "edgy"

Question: I'm looking for a word which describes people who are annoying because they do something new, they think that this is so cool but actually the new thing and they are silly at all. The people I want to name think that they are romantics (romantics that Dostoyevski mentioned in Notes from Underground), but they are not, so I want a strong word that expresses the level of negative connotation I want.
Comment: How about *phony* or *fake*? They're certainly pejorative.
Answer: Trendster, scenester, fashionista, faddist, dandy, gay blade, Beau Brummel, swell, fop, etc.  In approximate coinage order of newer to older.
With the exception of "faddist", the problem is that during the spring of such words when new and freshly minted, these shiny words tend to be heard in a complimentary sense -- only as they age do they become pejorative, and at which point the words become as quaint as the fashions they derided.
Answer: Right now, 'hipster' might be a decent choice, but this most often refers to people of a particular style. I'd say that the negative connotation is often expressed in mood rather than diction. Accepting that, you could use 'avant-guard' or 'experimental' in the right context, especially with adjectives like 'oddly','absurdly, or 'quirkily'.
Comment: i think only avant-garde express the level of negative connonation i want. people i want to name thinks that they are romantics (romantics that dostoyevski mentioned in notes from underground), but they are not. so i look for stronger words
Comment: If referring to the opinion of statement of a person, 'controversial' could also suffice in a number of circumstances, in the way that 'edgy' is used in most ways today.
Answer: Perhaps, the word quixotic can help here.
M-W:

quixotic
adjective
: hopeful or romantic in a way that is not practical
They had quixotic dreams about the future.
in this age of giant chain stores, any attempt at operating an
  independent bookstore must be regarded as quixotic
Answer: Perhaps you find such people annoying because you consider them full of themselves.
Wiktionary:

full of oneself:
  (idiomatic) egotistical, believing oneself to be superior to others;
  preoccupied with one's own work, interests, point of view, etc.

"They do something new, they think that this is so cool but actually the new thing and they are silly at all." They are full of themselves. They don't see themselves as you see them.
Full of oneself is certainly pejorative.

Word that is similar to "edgy"


Iron python, beautiful soup, win32 app

Question: Does beautiful soup work with iron python?
If so with which version of iron python?
How easy is it to distribute a windows desktop app on .net 2.0 using iron python (mostly c# calling some python code for parsing html)?
Answer: I was asking myself this same question and after struggling to follow advice here and elsewhere to get IronPython and BeautifulSoup to play nicely with my existing code I decided to go looking for an alternative native .NET solution.  BeautifulSoup is a wonderful bit of code and at first it didn't look like there was anything comparable available for .NET, but then I found the HTML Agility Pack and if anything I think I've actually gained some maintainability over BeautifulSoup.  It takes clean or crufty HTML and produces a elegant XML DOM from it that can be queried via XPath.  With a couple lines of code you can even get back a raw XDocument and then craft your queries in LINQ to XML.  Honestly, if web scraping is your goal, this is about the cleanest solution you are likely to find.
Edit
Here is a simple (read: not robust at all) example that parses out the US House of Representatives holiday schedule:
using System;
using System.Collections.Generic;
using HtmlAgilityPack;

namespace GovParsingTest
{
    class Program
    {
        static void Main(string[] args)
        {
            HtmlWeb hw = new HtmlWeb();
            string url = @"http://www.house.gov/house/House_Calendar.shtml";
            HtmlDocument doc = hw.Load(url);

            HtmlNode docNode = doc.DocumentNode;
            HtmlNode div = docNode.SelectSingleNode("//div[@id='primary']");
            HtmlNodeCollection tableRows = div.SelectNodes(".//tr");

            foreach (HtmlNode row in tableRows)
            {
                HtmlNodeCollection cells = row.SelectNodes(".//td");
                HtmlNode dateNode = cells[0];
                HtmlNode eventNode = cells[1];

                while (eventNode.HasChildNodes)
                {
                    eventNode = eventNode.FirstChild;
                }

                Console.WriteLine(dateNode.InnerText);
                Console.WriteLine(eventNode.InnerText);
                Console.WriteLine();
            }

            //Console.WriteLine(div.InnerHtml);
            Console.ReadKey();
        }
    }
}

Comment: HAP is a good solution, I've got a bunch of apps in production using it. I've used Mozilla Html Parser and there's not much difference.
Answer: I've tested and used BeautifulSoup with both IPy 1.1 and 2.0 (forget which beta, but this was a few months back). Leave a comment if you are still having trouble and I'll dig out my test code and post it.
Answer: If BeautifulSoup doesn't work on IronPython, it's because IronPython doesn't implement the whole Python language (the same way CPython does). BeautifulSoup is pure-python, no C-extensions, so the only problem is the compatibility of IronPython with CPython in terms of Python source code.There shouldn't be one, but if there is, the error will be obvious ("no module named ...", "no method named ...", etc.). Google says that only one of BS's tests fails with IronPython. it probably works, and that test may be fixed by now. I wouldn't know.
Try it out and see, would be my advice, unless anybody has anything more concrete.
Answer: Also, regarding one of the previous comments about compiling with -X:SaveAssemblies - that is wrong. -X:SaveAssemblies is meant as a debugging feature. There is a API meant for compiling python code into binaries. This post explains the API and the difference between the two modes.
Answer: Regarding the second part of your question, you can use the DLR Hosting APIs to run IronPython code from within a C# application. The DLR hosting spec is here. This blog also contains some sample hosting applications
Answer: We are distributing a 40k line IronPython application. We have not been able to compile the whole thing into a single binary distributable. Instead we have been distributing it as a zillion tiny dlls, one for each IronPython module. This works fine though.
However, on the newer release, IronPython 2.0, we have a recent spike which seems to be able to compile everything into a single binary file. This also results in faster application start-up too (module importing is faster.) Hopefully this spike will migrate into our main tree in the next few days.
To do the distribution we are using WiX, which is a Microsoft internal tool for creating msi installs, that has been open-sourced (or made freely available, at least.) It has given us no problems, even though our install has some quite fiddly requirements. I will definitely look at using WiX to distribute other IronPython projects in the future.
Answer: Seems to work just fine with IronPython 2.7. Just need to point it at the right folder and away you go:
D:\Code>ipy
IronPython 2.7 (184.108.40.206) on .NET 4.0.30319.235
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.append("D:\Code\IronPython\BeautifulSoup-3.2.0")
>>> import urllib2
>>> from BeautifulSoup import BeautifulSoup
>>> page = urllib2.urlopen("http://www.example.com")
>>> soup = BeautifulSoup(page)
<string>:1: DeprecationWarning: object.__new__() takes no parameters
>>> i = soup('img')[0]
>>> i['src']
'http://example.com/blah.png'

Answer: I haven't tested it, but I'd say it'll most likely work with the latest IPy2.
As for distribution, it's very simple.  Use the -X:SaveAssemblies option to compile your Python code down to a binary and then ship it with your other DLLs and the IPy dependencies.
Answer: Yes, it's possible.
I'm using ironpython v3.4.0 with the latest versions of bs4 (v4.12.2) and soupsieve (v2.4.1).
Copy bs4 and soupsieve folders from your cpython env to your {IPYTHON_DIR}/lib/site-packages folder. Alternately, you can put them elsewhere and call sys.path.append() to add the directory.
Edit bs4\builder\_lxml.py and comment out the following lines:
        # if len(markup) > 0 and markup[0] == u'\N{BYTE ORDER MARK}':
        #   markup = markup[1:]

If anyone knows how to make the above snippet compatible with ipython 3.4, please suggest edits.
Now, fire up your ipy console...
import bs4, soupsieve as sv

text = """

Cat

Dog

Mouse

"""
bs = bs4.BeautifulSoup(text)

bs.select('p:is(.a, .b, .c)')
bs.select_one('p:is(.a, .b, .c)')

sv.select('p:is(.a, .b, .c)', bs)
sv.select_one('p:is(.a, .b, .c)', bs)

Answer: If you have the complete standard library and the real re module (google for IronPython community edition) it might work.  But IronPython is an incredible bad python implementation, I wouldn't count on that.
Besides, give html5lib a try.  That parser parses with the same rules firefox parses documents.
Comment: I don't use IronPython, but what I've read so far about it does not certify the "incredibly bad python implementation" [typo fixed].
Comment: I certainly don't consider IronPython to be incredibly bad.  It does just fine on loads of stuff.  Just don't expect it to be a drop-in replacement for CPython.

Iron python, beautiful soup, win32 app


Why a minimiser of a subset of training dataset is that of the whole training set

Question: In section 3.3 of Bottou et al (2018), under the 'intuitive motivation' paragraph, the authors claim that 'a minimiser of empirical risk for the larger set $S$ is clearly given by a minimiser for the smaller set $S_{\text{sub}}$', thereby arguing that the stochastic optimisation is sufficient over batch optimisation. However I am aware that the loss function surface may contain multiple local minima. Is that where the stochastic method might run into trouble?
Answer: Batch gradient descent (GD) (or any GD) can run into local minima problem because the algorithm is not exact, it is a heuristic.
The paragraph starts with assuming that $S$ is a collection of the same samples in $S_{sub}$ repeated 10 times. So, the minima don't change. It also states that, in large-scale real data, we don't have exact duplicates, but there is approximate redundancy, thus mimicking the duplication assumed above.  And, they say that, due to this redundancy, using all the data in every iteration is inefficient.
The above was my take on the paragraph you mentioned. But, I believe this post can give you some perspective on the noise introduced by SGD and how it may be useful.
Comment: Ah that was my misunderstanding (on how S is related to Ssub). But thanks for the intuitive explanation


building timezone feature in PHP web application

Question: This is almost similar question to this one: -
Dealing with timezones in PHP
I read that thread, and have some more issues, and not sure of how to elegantly build timezone support in PHP/MySQL application.
I am writing an application in PHP, where users can select their timezone.
Here, all timestamps are stored in GMT in MySQL. And I am converting the timezone back to users timezone, when presenting the data.
Now these are the problems I am facing: -
1)
I show the user, a list of timezones populated from MySQL's timezone tables, it is a HUGE list and is  difficult to chose from.
So, I want to implement something like windows time zone list. Offset with region info.
2)
The PHP and MySQL may have different set of list.
3)
Where should I convert timezones, in PHP or in MySQL? I have combination of coding.
Sometimes it is easy to select a column converted from MySQL, sometimes it is easy to convert in PHP.
So, here the previous point becomes very important. For example, in MySQL's time_zone tables
Asia/Kolkata, and Asia/Calcutta both were there, but in PHP 5.2.6's default timezonedb, only Asia/Calcutta is present.
Answer: When faced with this exact issue, I found this reference, which maps the succinct, Windows-style timezone list to a subset of the ridiculously exhaustive Unix-style timezone list.
Users are presented with a dropdown of these windows-style names (e.g., (GMT-05:00) Eastern Time (US & Canada)), and their selection is stored in the db in the unix-style format (e.g. America/New_York)
The work of applying the user's timezone preference is done in PHP at display time, using the DateTime class.  I think I'd recommend this, so you can be confident that the dates you're manipulating in SQL/PHP are always in UTC, until they're displayed.
Comment: @Nathan I'm pretty bummed that that link is dead.  Here's my PHP port of the mapping: https://gist.github.com/frankfarmer/6126446
Comment: Still, I have to execute some queries, where I must convert time zones in MySQL. Oterwise, this will result in 100 queries for 100 users. JOINs can not be used effectively.
Comment: Any reason why such a list couldn't be computed at runtime? As an added benefit one would always be up-to-date with the Olson database...
Comment: The link is broken. Do you know where I can find this solution? I need to make a user-friendly timezone select box in PHP and the link you provided sounds like it would have been perfect for what I need to do.
Answer:
Choosing a time zone from a large list isn't that difficult. Sort the list by standard-time offset so that users can quickly scroll to the correct offset, and from there, look for their exact location.
Choose one list. I would tend to go for whichever list is shorter. Only present those choices to the user.
Do the math where the list that was chosen is. If you're presenting the MySQL list, have MySQL do the date math, if you're using PHP's list, have PHP do the math. This will make so that you don't need to figure out some weird mapping for missing zones in one implementation.

A fancy solution could involve asking the user's location and extrapolating their timezone. (However, have the option to explicitly set it as well)
Answer: This is the sort of situation where a custom class might be the best solution. Then you can move times and dates around with their timezones. Luckily, PHP v5 has just such an object built-in. You just have to remember to code things so that when you rely on an implicit timezone, it's because you know you've earlier set it explicitly. This also means if you don't know what the implicit value is, you go ask, effectively making it explicit.
Looking at PHP's timezone support and MySQL's timezone support, I would do timezone stuff largely in PHP. MySQL's support is largely oriented around it's concept of "now".
Oh yes: you do not want to do explicit date arithmetic (e.g. adding 86400 seconds to add "one day"). Let the PHP object or libraries do that. They will have bugs fixed you will not have thought of. (I once wrote an object for a specialized type of date manipulation and spent weeks battling an intermittent off-by-one-hour bug, until I discovered the one spot that was adding 86400 to make a day transition instead of using mktime(). It turned out that daylight-saving rules were messing things up. Which, of course, I wasn't checking for.)


What is the physical meaning of Fourier Transform having only $\delta(\omega)$ functions?

Question: While calculating the Fourier Transform of the signal $$x(t) = 1 + \cos(6 \pi t + \pi/8)$$ I found that its Fourier Transform is purely in terms of Dirac Delta $\delta(\omega)$, that is its transform is only defined for certain values of frequency. What is the physical meaning of such a Fourier Transform?
Comment: Just to be complete: Mathematical statements by themselves do not have any physical meaning or significance. The meaning is associated by the **mind** of an engineer or a scientist who interprets the results according to the known physical laws...
Comment: it's defined for *almost all points*.  what you mean is that it's *nonzero* only for countably many points.
Comment: the mathematical meaning to having only $\delta(\omega-\omega_0)$ in the Fourier transform is that the time-domain signal is $e^{j \omega_0 t}$.
Answer: Explaining the physical meaning of something without the physical context in which it is encountered is going to be not particularly satisfactory.
$1+\cos(\omega t)$ is no more physical than $\delta( \omega)$ is, it's just that the former has some mathematical properties that some consider having a more rigorous foundation. Without stating what time interval it is defined on, the most parsimonious frequency domain representation will default to time stretching from $-\infty$ to $\infty$ and results in a sum of delta functions.
When time is constrained to something closer to reality, the frequency domain representation becomes more physically reasonable. You can start thinking about things like the uncertainty principle and energy.
The interesting thing about the delta function is that it enters into more realistic calculations in straight forward ways so it isn't fake but more along the lines of an ideal that can't be reached.
Answer: Instead of Dirac delta functions, I would rather use the term distributions or generalized functions. Dirac deltas are not functions. In the most standard sense of Fourier transforms and integration, a non-zero constant function or a cosine is neither integrable, nor square integrable. It is thus difficult to give then a true physical meaning. However, cosines and sines play a central role in Fourier theory.
Hence, basically, the Fourier transform of a complex exponential $e^{ i \omega t}$ in the sense of distributions is a shifted Dirac pulse.
Going back to your question, if your FT is only composed of Dirac pulses, then your signal is composed of a linear combination of  complex exponentials.
Comment: So there is no physical interpretation of this phenomenon? Hence, from such a Fourier transform, I can only say that my original signal is composed of linear combination of complex exponentials. Nothing physical can be stated about the original signal?
Comment: I believe that stating it is a  linear combination of complex exponentials is a strong characterization already. However, such signals are not physically realizable. Could you tell some "physical interpretation" you would have expected?
Comment: What I thought was that you can only view the signal at certain frequencies given within the argument of Dirac pulse. Is it correct?
Comment: I feel I don't really understand your comment: "only view the signal at certain frequencies given within the argument of Dirac pulse." This could be understood differently, depending on the type of frequency analysis you are talking about
Answer: Intuitively speaking, $x(t)$ is periodic signal with infinite extend and consists of a DC term plus a cosine term. Those terms, alone, has infinite energy but finite average powers just as the total signal has.
There are a number of approaches in defining the Fourier transform of such signals. First one is to consider the continuous-time Fourier series (CTFS) of the periodic signal. As one can imagine, such a series decomposition of the periodic signal consists of a discrete set of complex  coefficients each multiplying the corresponding exponential terms. For real signals the coefficients will be conjugate symmetric.
On the other hand, if you insist on using the conventional Fourier transform approach that was suited to finite energy signals, then the formal integral does not converge, but by the allowence of generalized functions such as the dirac delta $\delta(\omega-\omega_0)$ which represents the presence of a single periodic component with a frequency of $\omega=\omega_0$, then the periodic , infinite energy, finite average power, signals will have a valid Fourier transforms composed of discrete set of frequencies signified with the impulse positions.
It can be shown that the Fourier transform expression will have a very close relation to the Fourier series relation and the Fourier transform weights will be a direct function of the Fourier series coefficients at the corresponding dicerete frequencies.
On the other hand, when you consider a practical periodic signal which has a finite duration (therefore which mathematically is not periodic at all) then the Fourier transform will always converge and will have continuous set of frequencies. However you may still observe a very sharp transition at the periodicity frequencies which are not dirac pulses anymore but very narrow sinc pulses.


IIS6 vs IIS7 performance comparison

Question: Are there any graphs or analytics about the performance comparison of switching from IIS6 to IIS7?  I would like to convince my client to switch to Server 2008 IIS7.
Answer: There is some info in this thread at iis.net and some more info in this stackoverflow thread.
Additionally ezinearticles covers some  of the benefits as well.
Comment: I wish there was a better article.  The stackoverflow thread is just their observation.  It would be nice if someone actually gave real stats.
Comment: I couldn't find any better sadly, there are some articles that compares IIS (as a general) against Apache and Nginx etc. but those don't seem to distinguish between IIS 6, 7 and 7.5

IIS6 vs IIS7 performance comparison


Is every complete bounded finite lattice equivalent to a sublattice of a powerset lattice?

Question: More precisely, if I have a complete bounded finite lattice $C$, can I compute a lattice-operation-preserving map $C \to P(S)$? for some $S$. If not, is there another universal lattice structure that has efficient meet and join implementations on a computer?
Comment: $\def\meet{\wedge}\def\join{\vee}$No, the operations in $P(S)$ are distributive (meaning that $x \meet (y \join z) = (x \meet y) \join (x \meet z)$ and vice versa) and this is not true in a general lattice.
Comment: I would consider partition lattices in place of power set lattices.
Comment: Building on what @KeithKearnes mentioned, every finite lattice embeds in a partition lattice of a finite set, as shown [here](https://link.springer.com/article/10.1007/BF02482893). Whether there is some useful computable implementation is another issue though.
Comment: I think your general question about efficient implementation is an interesting one, but needs some thought to make precise. Afterall, a look up table is polynomial size in the number of entries of the lattice, so you have to answer "polynomial in what" for this to be a good question.
Comment: Finite lattices are bounded and complete. They are not all distributive though, which is what you would need for C for an injective map from C into a power set lattice. (One C that does not work has three elements every two of which join to 1 and meet to 0.). There may be decent implementations of general lattices for computer manipulation, but you would have to search for them.  Gerhard "Lattice Be Thankful For Indexes" Paseman, 2018.08.06.
Answer: This answer addresses the vague question "is there another universal lattice structure that has efficient meet and join implementations on a computer?" The question of whether boolean lattices work has already been addressed in comments.
It is important to be clear what efficient means here. If we just want lattice operations to be polynomial in $|L|$, we can just use a $|L| \times |L|$ look up table.
I suspect the intent of the question is to encode elements of $L$ using polylog of $|L|$ bits, and perform operations in polylog of $|L|$ time. I will show that this is impossible. Namely, I will show that, for any subset $W$ of $2^{[n]}$, there is a lattice $L$ of size at most $4^n$ such that computing joins in $L$ is equivalent to testing membership in $W$. Diagonalization shows that some $W \subset 2^{[n]}$ cannot be tested in $O(n^k)$, so there must be some lattice that is hard to compute in.
So, the construction. Let $X \subset 2^{[2n]}$ be those binary words of length $2n$ which are of the form $w \bar{w}$ for $w \in W$, where $\bar{w}$ is the bit complement. So every element in $X$ has $n$ zeroes and $n$ ones. Let $L$ consist of the following binary strings of length $2n$:

all strings with $<n$ ones
the strings in $X$
the string $111 \cdots 1$.

Then it is easy to check that $L$ is a lattice under bitwise comparison; the $\vee$ operation is bitwise $\min$. Now consider computing the joint $(w 0^n) \join (0^n \bar{w})$. This will be $(w \bar{w})$ if $w \in W$, and will be $1^{2n}$ otherwise. So computing joins is equivalent to testing membership in $W$.
Comment: Clever! Resembles spinors somehow...


How to enable autocomplete in gmail login screen

Question: My gmail login screen used to autocomplete my username and password.  Now it does not. I have checked my Internet Explorer internet settings and verified that autocomplete is turned on, but still no  autocomplete when I logon to gmail.  Any suggestions?
Answer: Auto-complete for form fields can be suppressed via the HTML on a webpage. Some password managers ignore it, but most of the ones built into browsers honor it (to be standards-compliant). I use an excellent free third-party password manager called LastPass which fills out my gmail login page completely.


Allow for more than 2 links for <10 rep

Question: Links are helpful, I can't be as helpful as I could if I were allowed to post more than 2 links.
Comment: Can you post more than 2 URL's that *are not links*? Specifically, can you post a full URL [in a code block](http://askubuntu.com/editing-help#code)? What happens if, at the start of a "new paragraph," you  press Spacebar four times and enter a URL like `http://www.google.com`? Are you able to post more than two URL's this way? I'm asking this **not to offer a workaround** (it isn't one, they're not clickable), but because I've noticed the most common situation where people fall afoul of the link limit is when posting error messages containing links (which should usually be in code blocks).
Comment: Close-voters: Please do not close this. This is requesting a feature (which was quite clear even before, but I've added the [meta-tag:feature-request] tag). This is perfectly appropriate for meta, and there's no reason to vote to close this. It's on-topic and the feature being requested is clear. If you believe this *should* be closed, please comment to explain why. Please remember, voting to close a discussion or feature request question on meta because *you think the idea is worthless* constitutes *an abuse of the system*.
Comment: Aren't there several other limitations on <10 rep posters? Don't spammers include a lot of links? I don't fully understand this question.
Comment: @vasa1 It seems like you're trying to *answer* this question...
Answer: Just earn those 10 rep!
For the usually short time you're below 10 reputation, we will happily edit your post to fix the links. This restriction is in place to prevent spam, clutter and all other sorts of fancy schmanzy - gaining those 10 rep is easy for a "good" user, but hard for a bot.
In fact, in your case, there seem to be many posts that don't fit our format, which might be why you lack reputation big time. I'm looking through them right now and informing you of precisely why that's the case.
Answer: Links are not only are links restricted for <10 users because it's a bad habit to get into (we want people write long, informative posts here), the main reason from the system's point of view is blocking spam.
Most spammers want to litter a page with links to random stuff and restricting how much damage they can do is a good way to keep the system adminstration workload down.
If you have problems in legitimate situations, leave the link as text (surround it with  code backticks (`)) and flag it for moderator attention. We can fix things up for you until you're able to do it yourself.
Comment: Can anyone post non-linkified URL's, formatted as code? (I [asked the OP](http://meta.askubuntu.com/questions/6194/allow-for-more-than-2-links-for-10-rep#comment9204_6194) but haven't yet gotten an answer; it seems your post says *this does work* though.) I think the most common reason people come across wanting to post >2 links is when trying to post output of error messages that contain multiple links. If you can confirm anyone may post non-linkified URL's in code blocks, I'll post an answer addressing that in detail.
Comment: @EliahKagan: I don't think we can fool the system by posting non-linkified URL's formatting it as a code. I have seen new users not being able to properly post the contents of commands like `cat /etc/apt/sources.list` or `sudo apt-get update`. They resort to either removing `http://` from all the URLs or put a space after every `http://`.
Comment: @Aditya Are you sure they're using any code formatting at all? Mangling the URLs will work but that doesn't prove giving them code formatting doesn't. In this answer, Oli seems to be saying this *does* work. I'm hoping for some clarification, based on direct experience, or on "authoritative sources" as the saying goes. :)
Comment: @EliahKagan: Maybe you are right - I can't be sure enough (but I feel I have edited atleast one such post where the output was properly formatted as code but still the user had to mangle the URLs). These two examples are where it wasn't formatted as code - [Ex1](http://askubuntu.com/review/suggested-edits/64778) and [Ex2](http://askubuntu.com/review/suggested-edits/64154). I am going through my Suggested Edits (there are so many of them - 475 - it's a daunting task to find that one particular edit) ;-)

Allow for more than 2 links for <10 rep


Research question thesis

Question: I am now in high school and have to do research. But I am not sure which research question to choose. I would like to talk about programming languages and therefore something within computer science. Can someone give me some examples of research questions where you don't need a lot of prior knowledge? Thank you very much in advance.
Comment: Say some more about context. Why do you "have to" do this? Is it an assignment, or just an interest? What sorts of things about programming languages interest you? What sorts of background do you bring to the task?
Comment: @Buffy Thank you for your response! It is an assignment. Everything about programming languages is interesting to me, but not very specific, difficult subjects. I do not have a programming background.
Answer: Rather than try to give you an answer directly, let me direct you to a web site that is full of ideas, not for research, but for how programming and programmers can affect things. Paul Graham is a computer scientist, mostly associated with the Lisp family of languages and has done some very interesting things with Common Lisp.
But his essays are just ideas that are interesting, if nothing else. Reading them is likely to give you ideas as well.
Poking around in them might give you some ideas. But, you might also want to think about not making your research too narrow. Not just programming or programming languages, or even just CS, but how it all relates to the wider world and the other things you've been studying.
Answer: You could do a study on say:

Evolution of programming languages.
How software development has driven hardware development e.g. how increasing size of code drives requirements for larger storage.
Since it's a high school research, you could study how computers have changed  our lives or the way we use time in a day
You may take any programming language and study how it has evolved, the founder(s), versions,  it's major principles, with sample code etc. C++ will be most interesting in this regard IMHO, cos it has evolved and is still evolving significantly from its beginnings in the 1980s.
Hope these get you thinking of something
Comment: Thank you very much!!

Research question thesis


Why does potential energy of an object increase as we lift an object?

Question: If gravitational force is a conservative force, which means it doesn't change the total amount of mechanical energy of a body, why is it that when we lift an object its potential energy increases?
Answer: You have misunderstood the definition of a conservative force. No work is done against a conservative force if an object is taken in a closed loop. However, if the object moves from one place to another, work can be done by or against a conservative force, and so the mechanical energy of the object can change.
An equivalent definition of a conservative force is that the work done by or against the force depends only on the initial and final positions of the object, and not on the path taken between those positions.
Answer: While we are lifting the object, the force we are doing on it is not conservative.
On the other hand, if we throw up an object, after it is released, each $\Delta h$ is paid with a loss of kinetic energy. Because in this case the only acting force is gravity, that is conservative.
Answer: You're right-- the potential energy of the object-Earth system changes when you lift the object. Why? Because work is done on the object by the Earth's gravitational field. The potential energy associated with a given conservative force is always defined so that
$$W_C = -\Delta U. \tag{1}$$
Think of a book (for concreteness, I've assumed that your "object" is a book) being lifted from an initial height $y_0$ to a final height $y_f$ (relative to an arbitrary $y = 0$ line). The gravitational force on it is nearly constant, $\mathbf{F_g} = -mg\hat{y}.$ The work done by $\mathbf{F_g}$ is therefore
$$W_g = \int_{y_0}^{y_f}{-mg\,dy} = -mg(y_f-y_0)=-mg\Delta y.$$
By $(1)$,
$$\Delta U_g = mg\Delta y.$$
So we see that any change in the height of the book produces a change in potential energy.
Now, you might be wondering where the "extra" energy comes from in this example. After all, the kinetic energy of the book is constant (assuming that it is lifted at uniform speed) and the Earth-book system's potential energy is increasing. It seems like mechanical energy is being pulled from nowhere. But it's not. The external agent (you) is doing work against the gravitational force, pumping energy into the system.
Answer: When you lift a mass you do work on the mass to increase its gravitational potential energy. You do the work, not gravity. When you release the mass it falls, releasing the potential energy you put into it. So gravity itself has done no work on the mass. You did work on it lifting it, which was spent as it fell.
Answer: Conventionally, we consider the potential energy of any object within the Earth's vicinity to be negative. Rather that going for a mathematical solution, we can understand it with a general sense.
When we lift an object upwards, we are moving that object away from the vicinity of the Earth. It is like, we are reducing the debt of energy that the object was in.
As for the Mathematical part, it has already been explained by the others.


Making clones of Google,Yahoo or Bing with Drupal,is it possible?

Question: Is it possible to make a clone of any search engine in Drupal, and what can be the complexities in making it. Or what can be the nearest possible search engine to make with Drupal.
Answer: Drupal isn't suitable for making a search engine. Try something like Nutch instead
Answer: I would think you could use drupal for the frontend of your search page, but you definitive needs some seperated search engine/index engine/crawler etc. to be able to get a good amount of data.


What is an appropriate response to "what's up" greeting?

Question: Sorry if it's a trivial question, but when someone uses what's up as a greeting I have no idea what they want to hear. What are the possible answers and what does this question mean exactly?
Comment: Related point: The correct response to someone going "waaazzzzzaaaaap!?" is to punch them in the face. Hard.
Comment: "Nuthin'.  What's up with you."  See the movie "The Sweetest Thing" for details.
Comment: Most of my friends would say 'not down'.  Hackers don't take well to being asked meaningless questions to which honest answers are not just unexpected, but expected not to be given. It confuses and annoys us.
Answer: "What's up?" is a greeting whose meaning is mostly irrelevant in that the asker doesn't want an answer to the literal question which means something like "What is new?" or "What's happening (right now/in your life)?".
The simplest response if you don't have information you want to share immediately with the asker is probably just to say something like "not much", "not too much", or "hey (man/dude)". If you're offered "what's up" in response to a greeting of your own, you should read it as a request for you to proceed to the content part of what you want to talk about.
Comment: I usually prefer the standard "not much" answer, but occasionally go with the very casual "How's it hangin'?" question in response. This is only done among close male friends and never in a business or formal setting. The "it" in the question is a veiled reference to the penis (American English). Non-native speakers should probably never use "How's it hangin'?" in response to "What's up?". For those wondering why I left the ending 'g' of of "hanging", the reason is that is is a casual response and don't make the effort to enunciate it properly.
Comment: Imo, any answer that contains a verb is appropriate.  Not meaning imperatives, of course.
Answer:
"Not much, how about you?"

Unless, of course, you are in the midst of something exceptional.
It's just a greeting meaning "What is happening?", and a reply that nothing's happening means you're fine.
Answer: That is an expression that has about as much meaningfulness as "How are you?" or "How's it going?"  All, including "What's up?" are used as greetings.  Now, each can be taken literally where someone may want to truly know "how you are", particularly if you've been sick, for instance, but all those terms are very commonly used along with the traditional greeting words, "Hi, "Hello", "Hey".

Responses?
What's up? - "Not much, how about with you?"
How are you? - "Fine, and you?"
How's it going? - "OK.  How's it going with you?"
Answer: Depends on the tone in which it's asked - with the right tone, it can be synonymous with "What's wrong?", where, with a less concerned tone, it's more of a "How are you?".
I'd reply very similarly to either.
Answer: If you want to be unconventional, you can reply "the sun" or "me, barely." That usually gives people pause.
Comment: Don't do that..
Comment: @Michael Haren- doesn't it depend on the context?  I might not try this with say, my boss.  But the sarcastic responses like "the sky" or "helicopters" or "gas prices" work perfectly well with friends.
Comment: @Wade: Perhaps – but such responses can also sound very stale and juvenile before too long, and can be grating at times, even among friends.
Answer: It used to be asked only when the person addressed seemed to be in some kind of trouble. Some people, I believe, now use it as a simple greeting. I've never been greeted in this way myself, so I can only speculate that the reply might be something like 'Yeh, I'm good.'
Comment: Barrie: What's up? (I'm honored to be the first to greet you that way.) BTW, you're correct, in the U.S., "What's up?" isn't too far removed from "How ya doin'?" Both are often used as informal greetings, and something as simple as a quick nod might work as a valid reply.  It depends some, too, on which part of the country you're from – some places consider these more of a conversation starter than others, a fact that was brilliantly depicted in [this commercial](http://www.youtube.com/watch?v=igh6A0qFS14).
Answer: Options:

Not much, what's up with you?
Oh, the usual.
Hey!
Comment: All said with the same emphasis and cheerfulness as your questioner exhibits.
Answer: To directly reply to "What's up?" (as a rhetorical question), "'sup" does the job. (American)
Answer: "Stuff, y'know." (The same stuff keeps happening like it happens all the time. You already know what kind of stuff.)
Answer: You can respond using this (pick one):

Thank God, I am doing well (or: Unfortunately, I'm not doing so well today, or: Everything is in order, or: Not much, et al.).

I think it is acceptable as well to reply back with the same greeting:

How are you doing (today/tonight/this morning/this afternoon/this evening)?
Comment: How's this answer wrong?


Is there Unit Test Framework in Orbeon?

Question: I am wondering if there is any Unit testing framework for testing the Orbeon Forms.
The unit testing that we are trying to attain are event check, enable-disable check, navigation checking, elements style checking etc...
I tried selenium IDE(using it as a Firefox plugin) as a POC. It had a ease in creating the test case.
But when I encountered repeated sections in my form, the id generated for each field was differing at times whenever we refresh the form. So had to drop the idea using selenium IDE.
I happen to see this YDT-cleint side unit test link in orbeon wiki. But was not able to get much of idea about the usage of this YDT, or how to integrate with orbeon.
Answer: The unit tests for Orbeon Forms itself fall into 3 categories:

JUnit-type tests, running on the server (e.g. a test for Liferay)
XPL-based tests, running on the server (e.g. for XBL componnents)
YUI Test-based tests, running on the browser (e.g. a test for the autocomplete)

For applications/forms you write on Orbeon Forms, I would recommend you use Selenium. Since you need stable ids for Selenium, make sure to explicitly put an id attribute in your XForms on everything you'll want to test on in Selenium. (If you don't, as you've noticed, Orbeon Forms generates ids, which can easily change when you update your form.)
Comment: Avernet. Thanks for the links. Just one thing, I noticed in the documentation you had written that, you could infact have some sample application that will have the unit tests integrated to it. I found it really difficult to figure out where the code mentioned in the documentation should integrate with the orbeon forms.
Comment: @Babu, I am lost: what is the particular documentation you are referring to?
Comment: I am referring to the 3 categories of unit tests you had mentioned above - JUnit-type tests, XPL-based tests and YUI Test-based tests. All the 3 links that you had mentioned has a sample code for each kind of testing, But I am not able to figure out how those test cases are supposed to interact with Orbeon Forms. For example, if I have a input field in my orbeon form, how is the input field instance accessed in the Junit for testing the values.
Comment: @Babu, OK, got it. So, let's consider the YUI case. You would use `Document.getValue()` as done here: http://goo.gl/Fs9ga. The downside of using YUI Test for this is that you have to write JavaScript (or CoffeeScript) to create your unit test, and can't use a tool, like Selenium IDE. Also, you can only do what can done in JavaScript, e.g. you can't select a file to upload.

Is there Unit Test Framework in Orbeon?


how calculate the energy use for starting a 3 phase motor until return to normal work?

Question: for a project i must calculate the exact energy that used for start of motor until the motor return to normal work
in other words how much energy use for normal work of this motor equals the starting energy ?
the motor is 3 phase 20 Ampere 9KW
will be different when motor is under load ?
Comment: You have not provided enough information to calculate much of anything. To calculate what you want, you need the motor's performance curves including speed  vs. torque, current and input power. You also need detailed information about the load including speed vs torque and moment of inertia reflected to the input shaft.
Comment: @hossein: can you estimate how long the motor takes to start? As a guess, I would say that the motor uses twice the rated power during starting.That would mean one second of start time is like 2 seconds of normal work energy assuming the motor uses the rated power for normal work.
Comment: Starting power * start time. What's the starting current (stall current) of your motor? (Hint : not 20A!) and how long does it take to spin up? Actual figure will be less than the product of these numbers : you might make a linear speed (constant acceleration) approximation and guess at half the product.
Comment: You could probably estimate it from the kinetic energy of the attached load mass at full speed, then apply a factor for motor efficiency  in the start-up phase.
Comment: @CharlesCowie unfortunately i have no complete details but overestimately could you tell me will 10 second of normal work equals the starting energy ?
Comment: @BrianDrummond actually if i know that overestimatly 10 second of normal work equal start time energy i give my answer
Comment: @CharlesCowie ultimately about 3 or 4 seconds
then over estimately i can say energy for 15 seconds , right ?
Comment: @CharlesCowie thanks a lot for your information
Answer: Look on the motor's nameplate.
There should be a figure called Locked Rotor Amperage (LRA).
If you're looking for a way to derive this figure based on other data about the motor, don't bother. Motors differ, which is why LRA has to be put on the nameplate.
Needless to say, if LRA cannot be computed from other data, neither can total energy needed for a machine to start up and reach speed.  However you can derive the rotational mass and friction drag of the machine, and compute the energy needed to get it to target speed.
Comment: thanks for your useful information ,
but for now i have no connect to motor's nameplate ,

then for a guess could i say that one second of motor under load equals three second or 4 second of normal work ?


Are there good ways for an Indian company to wire money to an individual in Mainland China?

Question: Are there good ways for an Indian company to wire money to an individual in Mainland China?
Answer: HSBC, also known as "The Hong Kong and Shanghai Banking Corporation" has banks in India.
I would imagine that might be a place to start.
Paypal, which is commonly used to pay for items on eBay -- is also available in both India and China.
You should, of course, respect any laws regulating this kind of money transfer.
Answer: You could use:

SWIFT transfer : ask your counterparty for his bank SWIFT code and beneficiary account numbers; you can do a SWIFT transfer to most countries from your Indian bank). You will need to fill a form where they ask you what you're transferring the money for, etc. Most Indian banks provide this facility.
Western Union: I'm not sure if WU is in China, but they are very simple to use.
Paypal: They charge heavy fees, but may be the fastest way to get your money across.


Are there any non-cosmetic penalties for damaging the Regalia?

Question: Does damaging the Regalia to a certain point have any other penalties aside from cosmetic appearance (i.e., it won't run and you'll need to tow it, like when you run out of gas)?
Answer: Apparently, physical damage to the Regalia will not hinder your ability to drive it. From here:

Final Fantasy XV's been designed so that other cars actively avoid the player. While you can crash into them, the Regalia won't break after sustaining a lot of damage – only visible aspects such as a broken windshield or body damage will be available, though they have no bearing on the car's actual performance. Final Fantasy XV isn't an action game like Grand Theft Auto so the car must remain functional at all times.

(emphasis mine)
While the vanilla Regalia cannot be damaged beyond repair, it's worth noting that if you fail to land the Regalia Type-F properly, the game will end, as the car will crash and all passengers will (presumably) die. This is explained to you before you take off for the first time, though.
Comment: I will say that there cames a point to where enough damage will penalize performance to a degree. I didn't crash, but had a extremely rough landing and it damage the Regalia enough to where a warning icon appear and max speed was only 30mph
Comment: Happened to me as well, definitely is a thing that can happen.
Comment: @Wondercricket, interesting, I can't find anywhere online that says that... If you have it happen again, could you take pictures? That would definitely make sense, but I was always too lazy to manually drive, so my car was always in pristine condition (just generally pretty dirty).
Comment: @Venonmus If I can replicate it, I will definitely provide that information
Answer: In most cases, @Vemonus's answer is correct for the Regalia not completely breaking down and require towing when enough damage has been applied.
However in rare cases, having a rough landing with the Regalia Type F will cause enough damage to turn on a warning icon while having a max speed of 30MPH.
Comment: Huh, I thought landing poorly was always lethal. How did you manage to not die?
Comment: @Vemonus I'm still wondering that myself


Get ERC20token balance in solidity

Question: Such as ERC20token smartcontract, just is the token balance of accounts, i want to make a smart contract to use token contract address and account address to find out the token balance of different accounts or different token
Answer: Get this: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol
Then,
<code>import "./IERC20.sol";

contract Checker {

  function checkBal(address token, address holder) public view returns(uint) {
    IERC20 token = IERC20(token);
    return token.balanceOf(holder);
  }
}
</code>
That will let you check the balance of any address in any ERC20 token contract you want to inspect.
Hope it helps.
Comment: thanks,it worked ,it's helpful for me
Comment: Awesome. The customary forms of thanks are upvotes and accept so that others might find the answer ;-)

Get ERC20token balance in solidity


Can I use a Canadian passport to leave and re-enter the UK as I have misplaced my British one?

Question: I have lost my British passport. I have dual citizenship and have a Canadian passport. I am due to go on a short trip to Europe shortly. Can I travel out off and back into the UK using my Canadian passport.
Comment: Yes you can. It's not the right thing to do though.
Answer: It's generally true that a citizen of a particular country has an absolute right to (re-)enter that country if they make it to the border, regardless of what documentation they do or don't have. Specifically this is true for the UK.
However, entry may not be a straightforward process. The traveler and border officials will have to find alternative evidence of the person's identity and nationality, which may be inconvenient and time consuming. These days the UK Border Force has access to databases with names, birthdates and photos which can make it easier than it was in the past. Some countries may levy a fine on their citizens for arriving without a valid passport from that country (the US used to do this, but no more - the UK does not).
Also, if not using a road border crossing, the airline or other transport provider may not allow the traveler to board without appropriate documentation - they'll usually check against "TIMATIC". That part is where your valid Canadian passport would come in handy in this situation. It would also help prove your identity at the border, even if it doesn't prove your British nationality.
Comment: the UK does not require its citizens to enter on a UK passport. I'm a UK citizen, Canadian resident for over 50 years, and have entered the UK on my Canadian passport while telling the officer I am a British subject, more times than I can count. Not an issue. (However I am always just visiting and I leave. The OP's situation is different.) Since you raised that a country may require their citizens to use the country's passport, I wanted to make it clear that the UK doesn't.
Comment: The US [does not fine its citizens](https://travel.stackexchange.com/q/85389/19400) for failing to comply with the law requiring a valid US passport.  The penalty was removed in the 1970s when the law was expanded to apply in times of peace.
Comment: @KateGregory +1 your comment is an excellent answer, as you're referencing both UK law and a volume of personal experiences.
Comment: To add more weight, my partner entered the UK as a UK citizen on her US passport just after she got citizenship, providing her US passport and (expired at the point of citizenship) biometric residency permit. The immigration officer at Heathrow managed to link her US passport to her UK citizenship with little problem.
Answer: Theoretically you can enter the UK on a Canadian passport. But a Canadian passport only allows you to enter for a short visit. It doesn't allow you to live or work in the UK.
The problem will come when you return to the UK, and the immigration officer says "Why are you visiting Britain?". If you say "I live here", then they will deny you entry as Canadians need permission to live in the UK. If you claim to be a British citizen they will require you to demonstrate it. There can be alternative ways of proving your citizenship, although I am unclear how certain they are, and how much delay you might experience. Having the number of your lost passport, carrying an expired British passport and/or a birth certificate might be a good idea, as would being prepared for additional delay
Comment: @DJClayworth I beg to differ. He can never be denied once he land at an airport in UK even if he's not holding a British passport. They can and will verify his citizenship by alternative means regardless of how mean an immigration officer he meets. The decision to bounce an arriving person is not taken by one person, it requires the approval of the chief immigration officer. Additionally I doubt if he lies to UK immigration that he's visiting it will have any meaningful consequences.
Comment: @DJClayworth Could the OP carry anything else to prove his UK citizenship? Birth certificate? Also, would it help to have a print of the lost passport report (assuming you get one, I've never had to do it)? https://www.gov.uk/renew-adult-passport/replace
Comment: The Border Force officers can look up by full names, date and place of birth to establish that he holds a British passport.Copy passport photo also available to BF officers. It happens sometimes with British citizens who manage to lose their passports while awaiting outbound flights. They cannot leave the UK but are re-admitted based on passport verification process I described.
Comment: I'm very happy for someone else to write another answer here.