Temperature of thermally isolated space region

Question: If we thermally isolate a region in space, say using a hypothetical material of $0$ conductivity, and measure the region's temperature, will it be 2.7K?
Comment: You need to get a better definition: the temperature of "deep space" is generally related to the wavelengths being emitted by the material within that space.  If the material is at X Kelvins, it'll stay there if your "0 conductivity" box is also 100% reflective over the entire EM spectrum.
Answer: If you isolate the region by surrounding it with a $\kappa=0$ material (using $\kappa$ for thermal conductivity), then no heat can enter or escape that region and so it would remain at whatever temperature it happened to be when you enclosed it.
Comment: So the temperature would be ?
Comment: It would be whatever temperature it started at. If you took 400 K oven and enclosed it, it would remain 400 K for as long as it was enclosed.
Answer: I think it will be 0K
Because if said hypothetical material conductivity of 0, it cannot conduct any heat, therefore the temperature must remain at 0K
Comment: Because it's wrong? No heat can enter *or escape* the region, so whatever $T$ it started at is what it will be later on.
Comment: Can anyone give me a reason as to why this has been downvoted???
Comment: Ahh right okay. Clearly you know more of the subject than I but thanks for clearing it up :-)
Comment: @kyle kanos-but how come space have temperature? To my understanding, the temperature of space is attributed to cosmic background radiation. Once it is cut off, then there is no meaning of temperature of space..am i right?
Comment: What do you mean 'once it is cut off '?
Answer: It would be the temperature corresponding to the current mass-energy density of the universe, which is $1.003^{+0.013}_{-0.017}ρ_c\approxρ_c = \frac{3H_0^2}{8πG_N} =  1.053 69(16) × 10^{−5} h^2 (\text{GeV/c}^2 ) \text{cm}^{−3}$, where $\rho_c$ is the universe's critical mass-energy density (the amount of density required to make stop the universe from expanding indefinitely), $H_0=100 h \text{ km s}^{−1}\text{ Mpc}^{−1}$ is the present Hubble expansion rate, where $h=0.73^{+0.04}_{-0.03}$, and $G_N$ is Newton's gravitational constant. (source: PDG's astronomical parameters table)
Comment: I'm not the downvoter, but i can suggest that the "global" parameters of the universe are not the right things to apply to a local volume.


One click merge two edge loops into one edge at center

Question: When selecting a ring of edges Blender has a subdivide selected edges command to create an edge that is at the exact center (some call it the equator) of the ring of edges. Is there a way to merge two edge loops into one "equator"? If Blender can make an "equator" edge loop in a ring of edges with the subdivide command applied to the ring of edges, then is there a way to merge two edge loops into that same "equator" edge loop? I know there are work arounds for this. For example, make the "equator" loop in the desired edge ring and then dissolving the outer loops, but that is not a one click solution. Here is an image that I hope illustrates the challenge.
Comment: https://blender.stackexchange.com/a/30937/2214
Answer: There is a one click solution, but it requires different type of edge loop to be selected
CtrlAlt-click - select loop of edges.
M ⇾ Collapse
Comment: Thanks! That's what I was looking for. Collapsing the rings makes them into an edge loop at the "equator".


Why am I not able to comment on my own posts?

Question: I am getting started on the Blender Stack Exchange site and have asked a complicated question and am getting great answers. But I am told need 50 points to comment on answers. How do I deal with this?
Comment: It sounds like you may have two accounts. If you have a question that you posted, you should *always* be able to comment on the question and answers, regardless of your reputation. This is not possible if you're not logged in to the same account you created the question with, however. Do you have access to the computer/device you originally posted the question with? Or a link to the question you can [edit] into your question here?
Comment: The relevant info has been edited into the FAQ, so this is now a duplicate. Please note that it's policy to close questions as duplicates of FAQs even if they're merely related, and even if the information wasn't contained in the FAQ at the time the question was asked. This is to direct all users to the canonical source containing the relevant info.
Comment: @Ano No, that's certainly no duplicate, but an exceptional situation.
Comment: @πάνταῥεῖ I added that text because I've seen one other case where this exact situation happened, so all of those can be closed as duplicates.
Answer: It looks that you managed to create 2 different accounts accidentially
https://blender.stackexchange.com/users/53050/dick-meehan
and
https://blender.stackexchange.com/users/53255/dick-meehan
You always can comment on your own posts and its answers, but since you are logged in with your other account you cannot comment anymore.
I'd recommend you should ask to merge these 2 accounts. Here is a detailed description of the steps how to do so.
Answer: You can actually always comment on a question you've asked or the answers on it, regardless of your reputation. Unfortunately, it looks like you have two accounts, if the question you're talking about is this one: Earthquake visualization in blender?
As such, you can't comment with this account because it doesn't recognize it as your question. To fix this, you'll need to request that your accounts be merged by going to the "contact" link in the footer. You really want to do this and make sure you're logged in and registered and have all of your rep in one place and so that you can respond to the people asking you questions.


Python wait until variable change without stopping rest of program

Question: I'm programming a voice recorder with a UI in tkinter, and when I press a button, it triggers a recording titled that button's name, plus a bit of data. When I press the stop button, I want the program to stop recording that file and save it. Problem is, the only place it works to stop is inside the open file where the program starts recording. Here is a snippet of my code:
def button_click(button_text):
 print(f"You clicked the button labeled {button_text}")
 with rec.open(f"{button_text}_judge{judge}.wav", "wb") as recfile2:
     recfile2.start_recording()
     #wait here until stop_button_click function is called and finished
     print("Finished!")

def stop_button_click():
 print("Stop button clicked!")
 #Do something here to trigger the button_click function to continue

To give some context, the way the buttons are interacting with these functions are like this:
# Create a frame to hold the stop button separately
stop_frame = tk.Frame(root)
stop_frame.pack(side=tk.LEFT, fill=tk.Y)  # Pack it on the left side

# Create the stop button
stop_button = tk.Button(stop_frame, text="Stop", command=stop_button_click)
stop_button.pack(pady=5)  # Add padding

and
# Create a frame to hold the buttons inside the canvas
button_frame = tk.Frame(canvas)
canvas.create_window((0, 0), window=button_frame, anchor="nw")

# List of button labels
button_labels = ["Button 1", "Button 2", "Button 3", "Button 4", "Button 5", "Button 6", "Button 7"]  # Add more buttons here

# Create and arrange buttons within the frame
for i, label in enumerate(button_labels):
 button = tk.Button(button_frame, text=label, command=lambda label=label: button_click(label))
 button.pack(pady=5)  # Add padding between buttons

I thought of using asyncio in some way, but I'm not sure how to get it to work properly, as the stop button is triggered by tkinter and when I do get it to work, the UI freezes when it starts recording (using a while True loop).
Answer: You can do this using Tkinter variables and wait_variable.
recording_stopped = tk.BooleanVar(root, False)

def button_click(button_text):
   print(f"You clicked the button labeled {button_text}")
   with rec.open(f"{button_text}_judge{judge}.wav", "wb") as recfile2:
       recfile2.start_recording()
       root.wait_variable(recording_stopped)
       print("Finished!")

def stop_button_click():
    print("Stop button clicked!")
    recording_stopped.set(True)

This creates a Boolean variable which is initialised to false. When the recording starts, wait_variable blocks until the variable is set by clicking the stop button.


Non-invariance of the Interaction term in QED lagrangian

Question: The interaction term in the QED Lagrangian $$\mathcal{L}_{int}=e\bar\psi\gamma^\mu A_\mu\psi$$ changes under a gauge transformation $$A_\mu\rightarrow A_\mu+\partial_\mu\chi$$ Doesn't it affect the QED Feynman rules? Does it mean in different gauges the Feynman rules are different? But if this is so, isn't the cross-section which is a measurable come out to be different for different gauge choices?
Answer: The kinetic term $$\mathcal{L}_\text{fermion} = i\overline{\psi}\gamma^\mu \partial_\mu \psi$$
changes too, by precisely the right quantity to cancel the change in the interaction term. Thus, the total Lagrangian is invariant, and this is what matters.
Comment: But to identify the interaction term in the gauge transformed Lagrangian, you must look at the whole gauge transformed Lagrangian. A transformation of fields doesn't have to respect a splitting of the Lagrangian into free and interacting parts.
Comment: @ Robin and prahar - That is fine. I know that the total lagrangian is gauge invariant. But I still do not get the point. How does the gauge invariance of the full lagrangian help me out? After all the Feynman rules are dictated by the interaction term only. Isn't it? Therefore, if the Feynman rules change, then the result of all physical calculations will also be different which is not desired.
Answer: As @RobinEkman mentioned, the kinetic term changes as well. This can be easily computed
\begin{equation}
\begin{split}
{\cal L}_D = i {\bar \psi} \gamma^\mu \partial_\mu \psi &\to i {\bar \psi} e^{- i \alpha} \gamma^\mu \partial_\mu \left( e^{i \alpha} \psi \right) =  i {\bar \psi} \gamma^\mu \partial_\mu  \psi  - \partial_\mu \alpha ( {\bar \psi}   \gamma^\mu   \psi  )
\end{split}
\end{equation}
Similarly
$$
{\cal L}_{int} = e{\bar \psi} \gamma^\mu A_\mu \psi \to e {\bar \psi} \gamma^\mu \left( A_\mu + \frac{1}{e} \partial_\mu \alpha \right) \psi = e {\bar \psi} \gamma^\mu  A_\mu   \psi +  \partial_\mu \alpha ( {\bar \psi} \gamma^\mu  \psi )
$$
Adding the two together, we find that under a gauge transformation
$$
\delta \left( {\cal L}_D + {\cal L}_{int} \right) = 0
$$
Thus, the full Lagrangian is gauge invariant.


Install ubuntu on a PowerMac G5 with no CD drive

Question: The PowerMac G5 is a 1.6GHz model. I do not have access to a CD. Can I use usb or a partition to install Ubuntu on a PowerMac G5?
Answer: Powermac G5 does not boot from USB !!!
Either:
- Borrow a CD-Drive and install it (or buy a cheap one)
- Borrow a FireWire-CD Drive
- Take an external Firewire HD and use it same way as described for the USB Stick
- Take an internal disk and use it the same way as described for the USB stick
Answer: If i understood correctly, you are looking for a way to install ubuntu without using a CD?
There are a couple of ways to achieve this.
First of all, all you have to do is grab the latest ubuntu version from the Ubuntu Download Page which will download an .iso file containing the OS.
The burning process of the .iso file to a USB can be achived using Unetbootin, which runs on windows, linux and mac.Download the Mac version and install it.
After burning it successfully, simply insert the usb stick and boot from it after changing the making the usb stick bootable from your  bios.Then proceed to the installation.
Remember that you can also buy ready to go Ubuntu CD's from the Official Canonical Store.
++ Here is information on how to make a bootable USB drive in MACOS X,taken from the Ubuntu Help Page:

We would encourage Mac users to download Ubuntu Desktop Edition by burning a CD for the time being. But if you would prefer to use a USB, please follow the instructions below. Note: this procedure requires an .img file that you will be required to create from the .iso file you download. TIP: Drag and Drop a file from Finder to Terminal to 'paste' the full path without typing and risking type errors.
-> Download the desired file
-> Open the Terminal (in /Applications/Utilities/ or query Terminal in Spotlight)
-> Convert the .iso file to .img using the convert option of hdiutil (e.g., hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso)
Note: OS X tends to put the .dmg ending on the output file automatically.
-> Run diskutil list to get the current list of devices
    Insert your flash media
-> Run diskutil list again and determine the device node assigned to your flash media (e.g., /dev/disk2)
-> Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command; in the previous example, N would be 2)
-> Execute sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m (replace /path/to/downloaded.img with the path where the image file is located; for example, ./ubuntu.img or ./ubuntu.dmg).
Using /dev/rdisk instead of /dev/disk may be faster.

If you see the error dd: Invalid number '1m', you are using GNU dd. Use the same command but replace bs=1m with bs=1M.

If you see the error dd: /dev/diskN: Resource busy, make sure the disk is not in use. Start the 'Disk Utility.app' and unmount (don't eject) the drive.

-> Run diskutil eject /dev/diskN and remove your flash media when the command completes
-> Restart your Mac and press Alt while the Mac is restarting to choose the USB-Stick

Comment: No problem!Don't forget to mark an answer accepted if you it completely answers your question.
Answer: mac don't boot from usb is not a problem with the usb, is a restriction of the EFI until the latest macs, i repeat: old macs refuses to boot form any usb, if the people ask to boot in a G5 don't answer with a better way to create a bootable usb this can't work
Answer: There is a nice write-up in the official Ubuntu documentation on how to create a bootable USB installer. https://help.ubuntu.com/community/Installation/FromUSBStick
Answer: There is a Program Called rEFIt  that you burn to a bootable CD and insert that into the drive and it allows you to boot from USB on a Mac....works on INTEL Macs... have not yet tried it on a PowerPC.. I think it does NOT, but here may be another solution:
http://ubuntuforums.org/showthread.php?t=780320
Comment: OP stated that he does not *have* a CD.
Comment: looking back at this question: rEFit only works on EFI Macs (Not PowerPC)


setxattr fails with errno 2 (ENOENT) on iOS 5.0 or less

Question: I am storing some persistent data in /Documents directory which app gets from an API call and is needed to start the app. Apple rejected the app suggesting to skip the iCloud backup.
I used the code described in https://developer.apple.com/library/ios/#qa/qa1719/_index.html
which is
if (&NSURLIsExcludedFromBackupKey == nil) { // iOS <= 5.0.1
        assert([[NSFileManager defaultManager] fileExistsAtPath: path]);

        const char* filePath = [path fileSystemRepresentation];
        printf("[path fileSystemRepresentation] %s\n",filePath);
        const char* attrName = "com.apple.MobileBackup";
        u_int8_t attrValue = 1;
        int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0);
        NSLog(@"errno %d", errno);
        return result == 0;
    } else { // iOS >= 5.1
        NSURL* url = [NSURL fileURLWithPath:path];
        NSError *error = nil;
        BOOL success = [url setResourceValue:[NSNumber numberWithBool:YES] forKey:NSURLIsExcludedFromBackupKey error:&error];
        NSLog(@"Error excluding %@ from backup %@", [url lastPathComponent], error);
        return success;

    }

It works fine with iOS 5.1 simulator. I checked in filesystem using
$xattr "filename"

and it shows me
filename: com.apple.metadata:com_apple_backup_excludeItem

However its not working on 5.0 simulator and also on 5.0.1 3GS device that I tested on.
I stepped thru the code and in the if part (<=5.0.1), I also printed the global var errno as suggested in the Technical Q&A article by apple. However the call to setxattr is failing and errno is printing to be 2 which is ENOENT as per http://developer.apple.com/library/ios/#documentation/system/conceptual/manpages_iphoneos/man2/intro.2.html
I am also printing out the filePath and its not empty and printing out correctly. I checked using iExplorer, the files are on the device as well as in the Simulator folder, they are getting created.
Has anyone faced this? Not sure how to address this?
Any help highly appreciated!
Thanks for you time.
Answer: Ok ... my bad ... its doing everything correctly. Its supposed to return 0 for successful execution of setxattr ... but its still returning an errorcode which tripped me ... anyways the code is working as expected.


Will 2 male dogs fight for dominance?

Question: I have three Yorkshire Terrier girls now, various ages and we want to get a male Yorkshire Terrier pup and a Goldendoodle male pup. Will they fight for dominance down the line? I am worried about the male Yorkshire Terrier.
Answer: It doesn't matter if you introduce a male or female dog do the family, the hierarchy will always be disturbed and reestablished.
Some dogs are more aggressive, others timid while reestablishing the hierarchy. That's mostly influenced by their individual characters, but male dogs tend to be more dominant. That doesn't mean there are going to be physical fights among your dogs. On the other hand, if 2 dominant females are introduced to each other, they can fight just as fiercely as males.
In general, pups will behave submissive until they reach sexual maturity. If you don't want to breed them, that's also the time to desex / neuter your male, which has the tendency to make him less dominant.
To avoid physical fights among your dogs, you should be the most dominant pack member and keep the atmosphere friendly between all dogs. If your current dogs are obedient and follow your command, and you feel confident to train and care for the new pups just as well, go for it. If your dogs often do things you don't actually want but you feel like you cannot control them, adding more dogs will only make the problem worse. In that case I would advise you to reconsider.
Answer: While ultimately it is going to come down to their personalities, getting two puppies of the same sex at the same time and having both of them hitting maturity around the same time is going to make it way more likely for you to have issues. This does not come down to needing to be a strong pack leader or that you need to be dominant over the dogs.
Sibling Syndrome (also called Littermate Syndrome, but it happens to dogs who aren't littermates as well) is the term for common behavioral problems that arise when two puppies are raised together beyond the typical 10-12 weeks (about 3 months of age) that professional breeders recommend. These common problems stem from improper socialization during a puppy's crucial first 6 months, and are why any responsible shelter/rescue/breeder would deny letting someone get two puppies of similar ages at the same time. It is almost impossible to raise two puppies without them going to one extreme to the other - being so attached to each other they completely shut down or panic without the other, or them hitting maturity and trying to seriously hurt or kill each other.
Given the potential for the size difference, you are right to be worried about the smaller dog in this instance. If I were you, I would look at which dog would be a better fit for your home and lifestyle rather than taking home both puppies. If the two puppies end up coming home with you anyways, I would get in touch with a certified behaviorist right away to prevent any issues from arising.
Here are a few sources to read up on SS/LS:

greatpetcare.com/training/littermate-syndrome-everything-you-need-to-know

k9behavioralservices.com/littermate-syndrome

thebark.com/content/dont-take-two-littermates

offleashk9training.com/dogtrainingblog/littermate-syndrome-in-dogs-off-leash-k9-training-problems-with-littermates
Answer: There is a common misconception that wild wolves, and by extension dogs, form packs in which there is a dominant "alpha male." This idea was based on incorrect research. The research was carried out on wolves that were kept in captivity in conditions that for humans would be considered those of a prison. Wolves in this unnatural situation do not behave as they would in the wild. In the wild, packs are normally family units, and there is dominance only in the same sense that the parents in a human family tend to dominate their children.
Dogs have some behavioral and biological differences from wolves, but the notion of an alpha male and a strict dominance hierarchy is no more correct for them than for wolves. Most of the world's dogs are not house pets but rather they have a lifestyle in which they form more casual alliances and contacts with humans, who give them food. Examples are village dogs in Africa or dogs that live in garbage dumps in Mexico City. These dogs guard resources from each other to some extent, but they do not form dominance hierarchies.
So if you bring new dogs into your household, there is no particular reason to expect that they will fight for dominance because of some behavioral programming encoded in their DNA. Conflict is possible, but can be dealt with by common-sense measures such as making sure that each dog's food dish is far away from the others'.
References
https://www.washingtonpost.com/opinions/five-myths-about-dogs/2014/02/10/c53c6970-8f46-11e3-b46a-5a3d0d2130da_story.html
Mech, L. David. 1999. Alpha status, dominance, and division of labor in wolf packs. Canadian Journal of Zoology 77:1196-1203. Jamestown, ND: Northern Prairie Wildlife Research Center, https://digitalcommons.unl.edu/usgsnpwrc/381/

Will 2 male dogs fight for dominance?


Copy of mutiple files from HD to USB hangs

Question: I am trying to copy music files from my Ubuntu system disk (resides in my home "Music" directory) to a USB stick.I have tried multiple different USB ports attached to different USB controllers with mulitple 3 different File Manager programs. I can successfully move single files 3 times before it hangs on the fourth, Both the File Manager program and the file copy hang.
When I try copying multiple files it hangs almost immediately. I also tried to do it through the Terminal using line commands. It also hangs on a multiple copy. I can't terminate the File Manager programs even though I try to force a termination. It won't accept the termination, it just hanging.
The only way to get out of it is to reboot the system and that takes quite a while as the system still knows a copy was going on.
Anyone have any suggestions?
USB ports used - USB 2, USB 3.1 (tried both)
USB - VFAT format, brand - CoreMicro, 29GB stick with 10GB free
System disks are RAID1, 250GB SSDs, 227GB - 130GB free
O/S Ubuntu 20.04
I have 6GB of memory and the files I am moving range from about 5MB to 12MB each
It should be noted that I can move these files to a mountable SSD disk with no issues.
Also, when I was running Ubuntu 18.04, I did not have this issue. I read about a similar issue on 18.04 and the solution was to add 2 lines to rc.local file which were:
echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes

This did not resolve my issue.
The suggestion to investigate slow transfer rate came up with some interesting information. One article indicated that one should run journalctl --follow and then plug in the USB stick.
Some errors did show up as follows:
sd 9:0:0:0: [sdh] No Caching mode page found
sd 9:0:0:0: [sdh] Assuming drive cache: write through

I suspect this may be an indication of the problem I am having. I need to figure out how to implement caching mode for my USB devices which I think that might resolve my problem.
Stupid me....it was the USB device that was the issue. I tried a different USB device and copy works great. Problem (me embarrased) solved!
Comment: How much memory do you have, and how big (total) are the files you move when things go bad?  Search this site for "slow" "copy" and see problems others have had when system buffers fill up.
Comment: @ubfan1 Responded to your questions in edit of question. Thanks for trying to assist.
Answer: Issue was a faulty USB device (weird failure). Replaced the USB stick with another one and all is working fine.
@ubfan1 thanks for your assistance


What would happen if an ideal voltage source was connected to an ideal wire?

Question: I've seen it mentioned in discussion that an ideal wire doesn't exist (all wires have resistance), but even if it did, an ideal voltage source doesn't exist (all batteries have internal resistance); but what if both existed and they were connected together in a circuit?
Comment: You get the big bang, I think?
Answer:
but what if both existed and they were connected together in a
  circuit?

This is entirely academic since an ideal voltage source can source or sink unlimited power for unlimited time and an ideal wire has 0V across for any current.
Thus it shouldn't be surprising that the 'answer' is not well defined:

there is 'infinite' current which allows for the possibility that an
ideal wire can have a non-zero voltage across.  In this case, the
ideal voltage source is delivering infinite power which the ideal
wire dissipates.

Clearly, this is absurd but this shouldn't be surprising since, in fact, the equation this ideal circuit yields is (assuming a 1V voltage source)
$$1V = 0\Omega \cdot I_S $$
which has no solution for any finite \$I_S\$ which is, in fact, the most correct answer in my opinion.
The fact is, there are rules for connecting ideal circuit elements to avoid such contradictory mathematical expressions including the rule that one does not connect two ideal voltage sources in parallel.
Yes, that rule covers this case since an ideal wire is identical to an ideal voltage source with voltage equal to zero.
Surprised?  But that's how an ideal voltage source is defined - an ideal voltage source is that two terminal circuit element with a given voltage across for any current through.
Set the given voltage to zero and you have an ideal wire.  In fact, this is why, in superposition, when voltage sources are zeroed they are replaced by wires.
Answer: Since current flowing in the wire creates a magentic field and subjecting a wire to a changing magnetic field creates an opposing voltage, you will get a continuously incresing current flowing through the wire (the wire will behave like an inductor).  And it will eventually become the world's most powerful magnet.  Incidentally, this is how superconducting magnets work.  They have a very large inductance and hence take a very long time to ramp up and ramp down.  And the results of heating up before ramping all the way down can be catastrophic (see: the explosion in the LHC the first time they tried to turn it on due to a bad joint between two of the magnets).
In a superconductor, eventually you will reach a point where the material will no longer superconduct.  This is called the critical current.  If you exceed this current, the resistance will increase dramatically.  This also happens when the magnetic field reaches a certain point, called the critical field.  In your 'ideal wire,' you would not see this as the assumption is that the resistance is zero.  I'm really not sure what would happen for extremely high currents and high magnetic fields - any physics experts out there who might have some ideas?
Comment: And as such, you would be putting infinite electrons per second into a finite area of material (the wire) and as such have electrons travel at infinite speed? Beginnings of warp theory?
Comment: Also, reaching this critical current would likely happen in a very loud and bright fashion :)
Answer: The current would begin to ramp up linearly from zero amperes at a rate dependent on then inductance in the circuit (even a straight wire with zero resistance has inductance).
The current would become bigger and bigger the longer you left the source attached, but it would never become undefined. Increasing amounts of energy would be stored in the inductance, proportional to the square of the current.
If you applied a 100V perfect source across a 1uH (very small) inductance perfect wire, in about 10 years the energy stored would be equivalent to the total daily energy output of the sun.
Answer: Anyone who reaches for Ohm's law and Kirchoff's laws and saying voltage/zero = infinite current is in error!   Those are low-frequency approximations.  Things can happen only at the universal speed constant (speed-of-light).  (It will be assumed that the original poster has not called 1-800-GOD-PHYSICS-REQUEST to have the speed of light limit removed.)
What would happen when an thick all-temperature superconducter wire is attached to a one-trillionth ohm internal resistance battery?
The wire has to be at some potential value. Maybe halfway between the potential values of the two battery terminals.   Where the wire touches the (-) terminal, electrons in their random fuzzy wavefunction wanderings fall into the wire.  More and more. As they move into the wire an electric potential builds, an electric field appears in addition to what was naturally around the battery.
At the other end, electrons fall out of the wire into the battery (-) terminal.
The leading edge of the crowd of electrons at the (-) end can propagate only at the speed of light at best.  Same for the leading edge of the dearth of electrons at the other end.   Moving regions of charge = moving electric fields = magnetic fields.  Changing electric and magnetic fields = radiation.
For an "ideal" zero resistance wire, how do those regions of charge move, and how do new charge carriers enter in?   If it runs away to infinity, then also an infinite about of radiation can be expected.
What happens when the crowd of extra electrons meets the dearth of electrons near the middle of the wire?   Then, for regular devices, a steady current would be established. Where the cloud of extras meet the cloud of dearth, they cancel out. We have a growing region of normal electron density.   More changes to a moving electric field, affecting radiation.
Soon that normal region reaches the battery terminals.  Then - we have the original situation where we just touched the wires to the battery!  Have we made some kinda oscillator?  I doubt it.  Electrons are quantum particles, and randomness plays a role, so the leading edges of the various regions aren't sharply defined but fuzzy and maybe get fuzzier.    A proper treatment would require using equations for semi-classical electron transport (found in, for example, Ashcroft & Mermin) except, being laws of physics, they'd be hard to apply to a nonphysical system.

Another way to look at this is by inductance.
In this absurd example, the current is destined to reach a steady state of infinity, the magnetic fields are going to be, uh, rather strong.  The inductance of the wire is something to think about.  Inductance exists anywhere charge moves through space.  "Ideal" wire isn't going to be lacking inductance.  Current always takes time to get flowing, to reach its steady state value.
I'm not totally sure, but I suspect that the rapidly increasing magnetic field created by the increasing current offers resistance to the current.  Remember, inductors 'like' to maintain steady current flow.   The runaway current will increase linearly.  The inductor equation
\$V_L(t) = L\frac{di(t)}{dt}\$ is easily integrated to give
\$i(t)=\frac{ V \over L}{t}\$ where \$V_L(t)\$ has been set to the battery voltage \$V\$.
At some point, the magnetic field will be strong enough to twist Earth out of whack and we'll finally have winter in San Diego :)  I like winter, so I'll fund your experiment...

Skin Effect
Another thing to think about is the skin effect.  Currents like to squash themselves out to the surface of the conductor they flow through.  At some point, the current will be so great and so squashed, that even in a superconductor or ideal conductor, the graininess of matter will put a stop to the runaway growth.
Comment: The first sentence is true *only* if you interpret ideal wire to a be conductor with zero resistance.  But, "ideal wire" is typically defined has having zero volts across for *any* current through.  For example:  "*we will assume that an ideal wire has zero total resistance, no capacitance, **and no inductance**. A consequence of these assumptions is that these ideal wires have infinite bandwidth, are immune to interference, and are — in essence — completely uncomplicated*"
Comment: Dang, the inductor equation isn't showing properly. Not sure what dumb mistake I made this time.
Comment: I have edited it. Just waiting for its approval
Answer: An ideal battery always maintains its voltage no matter what. An ideal wire has no resistance, inductance, or capacitance.
But I=V/R, so the instant you closed the switch it would cause a Divide by Zero. Depending on how this error is handled, one of the following may occur:-

The Universe crashes and has to be rebooted, but we don't notice because we are part of the simulation!
The calculation is cancelled and nothing appears to happen. Scientists then invent a new field of physics to 'explain' the anomaly.
Out of nowhere a disembodied voice says "I'm sorry, Dave. I'm afraid I can't do that."


Cardinality of two equivalence classes and quotient set

Question: In the set $\mathcal{P}(\mathbb{N})\setminus \{\emptyset\}$ we define an equivalence relation as:
$$X \equiv Y \iff \left( \forall n \in X \ \exists m \in Y \ (m \ge n) \ \land \forall k \in Y \ \exists l \in X \ (l \ge k)\right)$$
I want to consider the cardinality of two equivalence classes: $[\{2\}]_\equiv$ and $[\mathbb{N}]_\equiv$, and the cardinality of the quotient set $(\mathcal{P}(\mathbb{N})\setminus \{\emptyset\})\ / \equiv$. This is a relatively new topic for me. How may I approach this problem?
Comment: first you have to understand when are two elements of power set (or subset of natural numbers) equivalent. If you get a hold of that, you are there.
Answer: hint
As HumbleStudent pointed out in the comment, the key is to understand the condition given for equivalence. Here is the hint:
For $X=\{2\}$, the possible $Y$'s can be only $\{1,2\}$ and $\{2\}$. The reason for that is: if $a \in Y$ is such that $a>2$, then it will violate the criterion for equivalence as there is no element in $X$ that will be greater than or equal to $a \in Y$.
This shows that $|[\{2\}]_{\equiv}|=2$.
Can you now deal with $X=\mathbb{N}$?
Comment: So, for $X=\mathbb{N}$, the set of possible $Y$'s is $\mathcal{P}(\mathbb{N})$ and $\lvert [\mathbb{N}]_\equiv \rvert = \mathfrak{c}$? At the same time, the quotient set would have $\lvert (\mathcal{P}(\mathbb{N})\setminus \{\emptyset\})\ / \equiv \rvert = \lvert \mathbb{N} \rvert$. Is this correct?
Comment: @Zelazny I made a mistake in my comment. The equivalence class of $\mathbb{N}$ will contain every "infinite" subset of $\mathbb{N}$. For example, $\mathbb{N} \equiv \{10, 20, 30, \ldots\} \equiv \{1,23,56,987,\ldots\}$. So the size of this equivalence class will not be $1$ as I indicated in my previous comment.


Can the Return URL within forms link to an external url?

Question: I'm building a form and would like to either have the "submit" button drive to an external URL, or to a page on my site that redirects to an external URL. I can't find a way to make this work. Is this possible?
Answer: You can control the URL that the browser sends form requests to using the action attribute. If you leave this attribute empty or don't include it at all, the request will just go to same page (URL) the form is on. But you can point it to an external URL as well:
<form method="POST" action="https://example.com/path/to/form/submissions">

</form>


Why non-regular curves have cusp(s)

Question: I'm very confused about the author's explanation of regular curves in my calculus book. The author says that a regular curve $\gamma:[a,b]\to\mathbb{R}^3$ is a curve such that $\gamma'(t)\neq 0$ for all $t\in[a,b]$. The author then says that this is to ensure that there are no "kinks" or "cusps" in the curve, but I'm having difficulty understanding, visually, or intuitively why this is so. More precisely, does $\gamma'(t_0)=0$ if and only if the curve has a kink the point $\gamma(t_0)$? And why does it look like a kink? In my mind, I imgaine an insect flying in space, slowing down, stopping at some point $p$, and continuing it's flight from $p$. On an intuitive level, I think there could be a kink at $p$ because as the insect approaches $p$, it slows down along one line spanned by a tangent vector $v_1$ at $p$, but once it stops, it can continue its flight along another line spanned by a different tangent vector $v_2$ at $p$ (option A below). But it would also have the choice of stopping at $p$ and continuing in the same fashion it was before it slowed down and stopped (option B). So with the option B, it seems like you could have $\gamma'(t)\neq 0$ at $p$, and yet there would be no cusp at $p$. So just by looking at the graph, you wouldn't be able to tell if $\gamma$ was regular or not. Could someone please clarify?
Comment: A great animated plotter can be found here: https://christopherchudzicki.github.io/MathBox-Demos/parametric_curves_3D.html
Answer: It's easy to confuse the image of the curve with the "animation" of a point tracing that curve. Think about that for a second.
You can have a perfectly smooth looking image, even a straight line, and still have $\gamma'(t)=0$ for some $t$. You just need to imagine a point tracing the line, slowing to a stop, and then picking back up again.
On the other hand, if the curve's image is smooth, you can imagine a point tracing it out at nonzero speed at all points in time. So if the curve's image is smooth, it's possible to parametrize it with a $\gamma$ that never has $\gamma'(t)=0$.
Now if there is some sort of kink, then what will happen to the point when it reaches the kink? It can either jerk suddenly to move in a different direction (making $\gamma'$ discontinuous) or it can slow down to a stop, turn, and accelrate back up again in a new direction. And this would make $\gamma'(t)=0$ at that point in time. So if there is a kink, and if $\gamma'$ is continuous, then there would have to be a $t$ with $\gamma'(t)=0$.
By outlawing $\gamma'(t)=0$ (and I assume also requiring $\gamma'$ to be continuous) the author is outlawing kinks. A side effect is that the author is also outlawing parametrizations of smooth curves where the point that is doing the tracing slows down to a stop before possibly accelerating back up again in the same direction. But that's fine. If it's a smooth curve, it admits some (other) parametrization that doesn't slow to a stop, so the author is still considering such curves.
Comment: Not quite. If $\gamma'(t)\neq0$, that _does_ imply there is no kink there. If $\gamma'(0)=0$, then that doesn't necessarily mean there is a kink there. Maybe there is, maybe there isn't. And no, a regular curve does not have a cusp. A cusp necessitates that the point tracing it slows down to a stop for a moment, which would make $\gamma'(t)=0$, which would make it not regular.
Comment: Ok, I think I see now. Thank you :)
Comment: Also, a curve such as $\gamma(t) = (0,0,t+\sin(2t))$ has an image which is a straight line (the $z$ axis), but each time the particle stops, it changes direction (from upwards to downwards, or vice versa). Another example, where each point on the line is visited infinitely many times, is $\gamma(t) = (0,0,t\sin(2t))$.
Comment: Thanks for your nice answer.Can you explain why it is avoiding this non-regular curves,rather 0 velocity at a point case? For example as an example has been given of a straight line which is not regular.In Differential Geometry we need to study geometry of curves like curvature and torsion,which are independent of parametrization. So what it seems that a curve has a kink or cusp iff for all parametrization it is non regular! Is it true?
Answer: $\gamma'(t) \neq 0$ can be seen as "The particle never stops.", since the position always changes.
Comment: You can have a kink and have $\gamma'(t)$ exist there. $\gamma'(t)$ can be $0$ at cusps. This is about a parametrization $\gamma$ of the curve, and its derivative. You are talking about tangent lines, which is a related subject but not what this is directly about.
Comment: Arg, good point, mistake by me.
Comment: No problem. A famous example is $(t^2,t^3)$, which traces a curve with a cusp. And the derivative at $t=0$ is $(0,0)$. If you animate this, you can see the point tracing it out slow to a stop for a brief moment.

Why non-regular curves have cusp(s)


How do I respond to an apology?

Question: In a meeting yesterday, one coworker was unproductive and, for lack of a better word, sulky. The issue did not get resolved. Today, he sent an email to the team apologizing for his unprofessional behavior and listing some more helpful comments along with some suggestions for moving forward. Do I thank him for owning up to his behavior? Or would that just call more attention to it?
Comment: He did nothing worth explicit thanks from you this time. However, next time when he actually excels for the benefit of your organization, please remember to give him credit (preferably in front of others).
Comment: I believe you should acknowledge the apology, but only to the level with which you're comfortable. The person sending the apology might be anxious to know if it's been accepted, and might feel discouraged if he thinks the apology was ignored.
Comment: Are you the team lead or just one of several peers?
Comment: @MonicaCellio A peer
Answer: I think that you respond to the apology by focusing on the positive content, which was the useful suggestions for how to move forward.  You can choose to do this either in an email to the team, or privately.  If you do it privately, you can also add a statement that you appreciated his apology.
Doing this costs you nothing, and it buys you goodwill from him.  People generally like having useful suggestions acknowledged.  Additionally, acknowledging an apology lets him know that you're willing to excuse an instance of poor behavior when he's identified it and tried to make amends.  From all appearances, his email was a highly professional way of handling a situation that he had (likely inadvertently) made awkward and uncomfortable, and responding to his apology recognizes that.
Comment: Right, a sincere apology should be acknowledged. Just a direct mail will do, no need to CC the others.
Answer: Assuming that "coworker" means that this person doesn't report to you and "team" implies a group of equals, I wouldn't reply to the apology.  If you'd like to discuss some of the suggestions for moving forward, by all means reply for that purpose.
The apology is to the team.  Having every member of the team potentially coming forward to discuss the situation isn't likely to be helpful-- the person will end up being reminded of the issue a dozen times.  It doesn't sound like what the person did is worth that level of discussion and analysis-- he was having a bad day and it showed in a meeting.
If you were this person's supervisor, then it may make sense to have a one-on-one meeting to discuss the issue depending on the person's track record.  I'd tend to expect that someone that apologized the next day after merely being sulky and unproductive the day before was just having a bad day and that it's unlikely to be something that really needs a manager's intervention.  If it is a pattern or if the behavior was more egregious than what you seem to be describing, then a conversation would be in order.
Comment: It has started to form a pattern, but it's fairly obvious that this project specifically is wearing on people's nerves, and the project is almost over, so I don't think a conversation is necessary. I just don't want to seem like I don't appreciate the apology if it's expected of me to comment.
Answer: Talk to him face to face when you are alone.
Just tell him that you have seen his effort, and that it is appreciated, but he has to try to be more focused on what he has to do when he is in a meeting.
Don't insist. Just tell him (if you can be alone together).
(That's my point of view, do what you want. I can give you some advice but you master your life :) )

How do I respond to an apology?


Restore Note 4 on factory settings

Question: I have a problem I hope it has solution. I broke a display on my Note4. Phone works in behind but display is not activated at all. I went to shop but the repair cost is not worth it.
I want to sell the phone to repair dealer, but I want to bring the phone to factory settings and delete ally media.
How can I do that when the display broken?
I tried to connect it to PC. Windows 10 recognizes it and I get an icon of the phone. But when I click it no content is shown
Answer: Turn off the phone,. Once fully off hold volume down and power, it will bring you to the recovery menu, using the volume buttons navigate the menu and use power as your enter button, should have reset to factory or wipe user data as a option.  Not sure if it will need a on-screen button press but only other way is from that recovery menu you would be able to flash the partitions via adb or if you unlocked your bootloader it would auto wipe the user partition. Which doesn't need on screen confirmation.  But there are your options.

Restore Note 4 on factory settings


Why is a banjo on a lesson book's tracks tuned to 438hz?

Question: I have a Hal Leonard banjo lesson book that includes a series of tracks for downloading, including 5 tracks with tuning notes. I tuned a banjo using an electronic tuner set to 440hz, and noticed the banjo's notes didn't harmonize with the tuning note tracks. So, I used the electronic tuner to check the tuning note tracks. The notes in the tracks match the tuner when it's set to 438hz. Would they tune the banjo a little flat for the lessons? Why? Should I tune the banjo using 438hz when following the book?
Comment: If the same tracks were used for a companion video, then the recording may have been slowed down slightly or the telecine process, which would reduce the pitch a little bit.
Comment: @ToddWilcox - there's no video that I'm aware of, but there could be,
Comment: Perhaps the tracks were originally distributed on tape or disk, and the pitch shift was an artefact of the transfer. Anyway, I wouldn't read too much into it. Yes, it would obviously be a good idea to tune to the pitch of the recordings while working with them! Or you could put the tracks into an audio editor on your computer and shift them up to 440.
Answer: A=440Hz is not a world standard tuning. Granted, a lot of the world uses it,but it's not sacrosanct. Various orchestras around the world use other datum points, for various (good) reasons, so it may be as simple as that.
Or, they may have been copied from some old recordings, which were made when 440 wasn't so important. Back in the '60s, groups would tune to whoever's instrument was already best in tune - 440 didn't really matter - and if an old piano was there to be played, that was the datum point - whatever it actually was became academic. And bands weren't so bothered about academia!
That said, it causes no harm to de-tune very slightly to A=438Hz for the lessons. It'll get you used to re-tuning and the better/quicker you can do that...
Comment: "Various orchestras around the world use other datum points, for various (good\[citation needed\]) reasons"... but I agree that there's nothing to worry about tuning down a few cents to match an old piano.
Comment: @leftaroundabout - sometimes it used to be a good semitone or more on pianos I used to play in the '60s. Things have improved! Orchestras are of the opinion that they sound better at different 'A' pitches. And those playing Baroque etc. will tune to what they perceive as the tuning at that time.  It's a known fact, I believe
Comment: @leftaroundabout - you may not. However, the Berlin Phil prefers 443 Hz., New York Phil prefers 442Hz. We're not talking guitars here, with heavier strings, but whole orchestras.
Comment: I've just never seen compelling evidence that tuning to something like 443 Hz has any real advantage that couldn't also be achieved by e.g. selecting heavier strings, tuned to 440 Hz. If a Baroque ensemble tunes to 415 Hz then that's a different matter of course, but in that case the very instruments are built quite differently and with that tuning in mind.
Comment: To clarify: 440 *is* the international standard tuning note which also defines the pitch A4. Just because people don't tune to 440 doesn't mean they don't *know* "A" is *supposed* to be 440. Baroque orchestras tune lower due to instruments and accepted pitch at the time (using historical reference). Major orchestras tune higher because it creates a slightly more brilliant sound (akin to audio engineers bringing out high frequencies in recordings to make voices stand out above instruments.) There isn't historical precedent for tuning higher, but there is aesthetic precedent.
Comment: @jjmusicnotes - as a matter of interest, who actually decided A would be 440, when, and why?


prevent user from putting 0000 in date field

Question: How can I force date validation upon input of a content type so that a user cannot type in 0000 as the year which causes an error in  Drupal 7.
Comment: need more info. what type of form is this? also, my two cents:  don't bother.  if your user wants to be an idiot and type "0000" in the year field, they'll understand when they see an error and it doesn't work.
Comment: just on the normal content edit page.
Comment: yes I know but the tester insists on making this a high defect if he puts in 0000
Answer: You can use Field Validation to check against the date, it has a sub module or feature that has date validation.
You could also do this with a hook, probably hook node validate would be your best option for this.
Answer: You can use this module to define fields as date fields:
https://www.drupal.org/node/1455576
Alternatively, you could add JS or PHP validation of expected formats to your form.


If my electronics are outdoors in a ventillated NEMA 4 enclosure, should I conformal coat my circuit boards?

Question: I'm considering putting a circuit board in a ventilated NEMA 4 enclosure outdoors. I'm a little concerned about humidity and condensation inside the enclosure. Do I need to conformal coat my circuit boards, or take any other precautions?
Comment: Depending on the environment, you may also want to consider the next level, which is potting.  That makes the electronics even more immune to humidity, liquid, dirt, bugs, etc, but also costs more and has other tradeoffs like decreased heat dissipation capability.
Answer: Requirements depend on environment,but, yes, conformal coating is, at a minimum, a really really good idea. Apart from condensation and misc stuff that manages to get in, ants can wreak havoc, depending on ventillation holes other denizens may also do their bit.
If you want a 'quick and easy' coating material that is a lot better than nothing at all then clear polyurethane "varnish:" spray is useful.
There are many commercial products offered for this purpose. Dow Corning make some good ones but there are many others as well. (My only association with Dow Corning is as a satisfied customer).
Here is a useful tutorial page from Dow Corning. While it obviously steers you towards their products it also provides good general advice.
Comment: I am under the impression that conformal coatings can do a great job of protecting circuits from liquids, but help very little if the PCB, or other components which are not hermetically sealed, are adversely affected by a long term exposure to high humidity. Is this correct?
Comment: @user5108_Dan I'd expect a CC to be better or equal in protective power for high humidity at a given temperature compared with a liquid. NOTHING is totally impervious to water. Very long life encapsulants such as the EVA or similar used in PV (Sol;ar) panels work by creating avoid free surface against the target material and have low dissol;ved water in the coating. So water reached the surface only as vapor so is ~~= 1000 x less concentrated than wityh liquid so corrosion rates are accordingly lower.


New laptop - no install media - Backup Windows - Install linux

Question: So I've got a new laptop, but no installation media. The hard drive has a hidden restore partition, a Windows 7 partition, and a small partition for vendor tools.
My goal is to make a backup of the Windows 7 partition, get rid of them all, install Ubuntu then reinstall Windows 7 from some sort of image.
Does anyone have some help or advice on how to go about doing this, best practices, or a documented walk through?
I've seen people use various live CDs to do this, I'd like to know what the best approach is.
Thanks
Answer: First thing you're gonna want to do is use some hard drive cloning software to clone your Windows 7 partition. Acronis True Image Home can do this for you and you can download a free trial from their website. Once you have it installed and setup (regardless of the type of cloning software at this point), create an image of your Windows 7 partition and have some sort of external media such as a external hard drive ready to offload the image onto, as it may be rather large. Also, make sure you make a Clone disk which you can boot off of to reapply your Windows 7 image. Acronis True Image Home has this option, as do other forms of cloning software
Next, as long as you know you REALLY want to get rid of that Factory Restore partition and the Vendor Tools partition, stick in an Ubuntu live cd and open up the partition manager (GParted) and delete the Restore partition and the Tools partition. At this point you should have some free space at the beginning and/or the end of the hard drive. Confirm that you are 100% sure you want to delete your installation of Windows 7, then nuke it.
After all this, create 2 new partitions in GParted: 1 Ext4 partition for Ubuntu, and 1 Swap partition for your swap file. Don't worry about Windows 7 at this point. Continue with the installation filling in your credentials.
Once you have Ubuntu booted, updates and all, reboot and boot off of the clone disk you made earlier, and reapply your Windows 7 image to the free space left over. Reboot and Voila, Dual boot Windows 7 and Ubuntu without having to reinstall Windows. You may run into the problem of having either of the bootloaders fail. If GRUB fails to load and Windows 7 boots on startup, their are tutorials out there on how to fix this, and vice versa on Windows 7 bootloader failure.
Answer: I think you should make the hard disk image as suggested by brandon927 to be sure you can recover your HD after removing the restore partition.
After that, is there a specific reason Why you want to remove windows 7 and install it again?
I would install Ubuntu from the live CD without removing Windows 7 and let Ubuntu installer reduce Windows 7 partition and install itself in a new one built in the created space. This way, Ubuntu will build the dual-boot and from my experience, it is a lot better to do partition changes, dual boots and all these kind of things with Linux than with Windows.
(for a dual boot system, I always install Windows first and Linux after) and this would be easier as you won't need to reinstall Windows.


Why is cheese considered to be unhealthy even though one slice of processed cheese averages at around 50-60cals?

Question: One reason I can think of is the fact that for the cheese slices that I occasionally buy, 41/50 cals come from fat. But for an overweight person (me) trying to lose weight and eating healthy+working out, can half a slice of processed cheese slow down results?
Comment: First of all, "unhealthy" is largely subjective. Who is telling you it's healthy or unhealthy? Secondly, the number of calories is NOT a measure of how healthy something is. Thirdly, this will probably be closed as off-topic. Not related to exercise.
Comment: Calories (based on your TDEE) are a good starting point for determining a healthy nutrition plan, but they are only a starting point. Going a step further, determining an optimal macronutrient balance is going to help you bring your nutrition even closer to ideal. After that, you'll want to ensure that you are getting an appropriate amount of all your micronutrients. As Alec mentioned, "healthy" is a subjective term, but looking at calories, macronutrients, and micronutrients will help you to determine whether or not something is healthy or beneficial for you.
Answer: No food is unhealthy if it fits into your macros. A slice of cheese contains approximately 113g calories of which 9g are fats and 7g are proteins. Since you're an overweight person, you don't need a lot of fats, but proteins. Considering a slice of cheese provides more fats than proteins, it will hinder your long-term goals.
A far better substitution would be, say, 3 egg whites. It would provide you with 51 calories, has negligible fats, and 11g of proteins. This will provide you with healthy proteins that will keep your fat gains to a minimum while building muscle effectively.
Comment: Why should fats be kept to a minimum? The body needs fats to function properly.
Comment: @JustSnilloc Yes, fats are mandatory for the body to function properly. However, I assume that the OP is still taking necessary fats from other foods and there is no need to further supplement it with a slice of cheese. If, in case, the OP does not have enough fats in his diet then he may eat three whole eggs instead of egg whites which consists of healthy fats and other minerals required to attain the daily recommendation of his individual fat intake.


Replacement power supply specs question

Question: I have an old Philips clock radio/Bluetooth/android phone charger with a missing power supply. The device calls for 7v 2.5a with positive center tap. In my junk drawer I have a 7.5v 2.1a wall wart. I've read the posts about being as close as possible to original specs, but I'm wondering if being a half volt high and a tad under current rating is acceptable? Thanks!
Comment: We don't know anything about the device itself, so we'll fall on the side of "no".
Answer: In general, it's not a good idea to replace one power supply with another that has different specifications, especially in your situation where the voltage of the replacement is higher and the current is lower.  The voltage should be be the same, and the current capacity of the replacement supply should be greater or equal, not lower.
That said, there is usually some tolerance built into circuits.  It's likely the circuit may be designed to handle an input voltage of 7v ±10%.  In your case, the nominal voltage of the replacement supply is 7% high.  I would measure the voltage of the replacement supply, and if it is not over 7.5v, you might be okay.
It's likely there are using some sort of regulator anyway inside the radio to drop the voltage down to 5v or something like that, in which the 1/2 volt probably doesn't matter.  But if the no-load voltage of the replacement supply is over 7.5v, I still wouldn't try to use it.
The current rating is a little dicier, since you are 16% low.  That may be outside the tolerance designed into the circuit.  In this case, about the only thing you can do (after verifying the voltage isn't too high) is to go ahead and plug it in and see if the radio works.
Answer: It is really difficult to know the answer to your question.  In general, when replacing a power supply, you need the exact same voltage and the rated amperage must be the same or greater than the old power supply.
However, most power supplies have a tolerance where they can supply a certain percentage of amperage greater than rated.  This will not be good for the power suppply, but at least it will not catch fire if within the tolerance.  Voltage tolerance has to do more with your appliance's ability to tolerate the increased voltage which is almost always - NO.
Please check out this Choosing power supply, how to get the voltage and current ratings?  it explains things much better than I ever could.  Then you can decide if that power supply is suitable for your clock radio.
Comment: Let us know if you do use the power supply and what happens!

Replacement power supply specs question


Is the method of mean substitution for replacing missing data out of date?

Question: Is the method of mean substitution for replacing missing data out of date? Are there more sophisticated models that should be used? If so, what are they?
Comment: [this site](http://www.multiple-imputation.com/) might give answer to your question. The link `What is MI` gives a list of various resources.
Answer: Barring the fact that it's not necessary to shoot mosquitoes with a cannon (i.e. if you have one missing value in a million data points, just drop it), using the mean could be suboptimal to say the least: the result can be biased, and you should at least correct the result for the uncertainty.
There are some other options, but the one easiest to explain is multiple imputation. The concept is simple: based upon a model for your data itself (e.g. obtained from the complete cases, though other options are available, like MICE), draw values from the associated distribution to 'complete' your dataset. Then in this completed dataset you don't have anymore missing data, and you can run your analysis of interest.
If you did this only once (in fact, replacing the missing values with the mean is a very contorted form of this), it would be called single imputation, and there is no reason why it would perform better than mean replacement.
However: the trick is to do this repeatedly (hence Multiple Imputation), and each time do your analysis on each completed (=imputed) dataset. The result is typically a set of parameter estimates or similar for each completed dataset. Under relatively loose conditions, it is OK to average your parameter estimates over all these imputed datasets.
The advantage is that there also exists a simple formula to adjust the standard error for the uncertainty caused by the missing data.
If you want to know more, you probably want to read Little and Rubin's 'Statistical Analysis with Missing Data'. This also holds other methods (EM,...) and more explanation on how/why/when they work.
Comment: +1 I would assume that single imputation performs slightly better than mean substitution because you incorporate additional information ($0$ predictors vs $p$ predictors). However, I fully agree that MI is the way to go.
Answer: You did not tell us very much about the nature of your missing data. Did you check for MCAR (Missing Completely at Random)? Given that you cannot assume MCAR, mean substitution can lead to biased estimators.
As a non-mathematical starting point, I can recommend the following two references:

Graham, Hohn W. (2009): Missing Data Analysis: Making It Work in the Real World.
Allison, Paul (2002): Missing data. (see section "Imputation", p. 11)
Comment: @ Bernd the Graham reference is extremely good, it helped me a lot with getting the hang of multiple imputation.
Answer: If your missing values are randomly distributed, or your sample size is small, you might be better off just using the mean.  I would first split the data into two parts: 1 with the missing values and the other without and then test for the difference in means of some key variables between the two samples.  If there is no difference, you have some support for substituting the  mean, or just deleting the observations entirely.
-Ralph Winters
Comment: But using the mean implies you're predicting the value at that point.  That's not what's going on, what's going on is an attempt to recover a random value.  It seems that since you have an estimate of the variance as well that you should use both (i.e., a random draw from the distribution).
Comment: In addition, mean substitution will reduce the variance of your estimates which will throw all of your standard errors and confidence intervals for the rest of your analyese.
Comment: Yes.  I was merely suggesting that the populations of the missing vs. non-missing data be examined before blindly diving into MI, which can take up a lot of computational power at the expense of minimum gains.
Answer: Missing data is one big issue everywhere. I wish you'd answer the following question first. 1) what %age of the data is missing ? -- if its more than 10% of the data you'd not risk imputing it with mean. Because imputing such missing with mean is equivalent to telling the LR box that look ..this variable has mean most of the places( so draw some conclusion) and you dont want LR box to draw conclusions upon your suggestions.do you ?? Now, the least you can do if you dont want much is you can try to relate this variables available values with different predictors value or use a business sense where ever possible..example..if I have a missing for marriage_ind , one of the ways could be seeing the median age of the people married, (lets say it comes out to be 29), I can assume that generally people(in India) get married by 30 and 29 suggests so. PROC MI also does thing internally for you but in a far more sofisticated way..so my 2 cents..see atleast 4-5 variables which are linked to your missings and try to form a correlation..This can be better than mean.


how can I access a ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com ? this link won't open in my browser:

Question: how can I access a us-west-2.compute.amazonaws.com ? this link won't open in my browser:
This page isn't working didn't send any data. ERR_EMPTY_RESPONSE
i'm not familiar with it, it starts with EC2
Answer: This answer could have been answered by a Google search.
EC2 is a service provided by AWS that provides remote, virtual compute resources.
When an EC2 instance is provisioned, it is assigned a unique address.
The components of the address are as follows:
unique ec2 instance identifier . aws availability region . resource type .
Usually, EC2 instances are not publicly accessible. AWS recommends and enforces a configuration like:
NAT Gateway (Internet Gateway) -> VPC (Private Cloud) -> ELB (Load Balancer) -> EC2 instance
So given the recommended access controls, and the fact that this is a compute resource which may be expecting some kind of authorisation, payload, or not even be running a web-service, it is normal that you are not able to resolve this address in your browser.
You have tagged "penetration-test" in your question, however it appears you may not have the right knowledge, project scope, or permissions to be conducting a pen-test in this environment.
I suggest speaking with someone who has more experience in this space before going further.
Answer: If the underlying infrastructure is correctly configured as @llorrac mentioned (IGW -> VPC -> Host), then the reason you cannot access the instance is probably because of the Security Group configuration attached to that instance. Either your ip is not whitelisted in the SG or the SG is not open on the ports you are trying to connect to it on (80, 443 etc.).
IGW = Internet Gateway (needed for in/out communications for a public subnet in AWS)
VPC = Virtual Private Cloud (Logical group of network assets in AWS)
SG = Security Group (Akin to a stateful software defined firewall within the VPC)


Freemember update_profile with member photo?

Question: I'm using freemember to update a member's profile, which is working great. However I now need to add member photo into the mix but I cannot figure out how to get this to work in that photos are not being uploaded. Are the any examples of an update form with member photo?
Answer: Member profile pictures and avatars are not supported yet officially by Freemember, but there is an open pull request which adds support for this and needs some beta testers.
You can grab a copy of Freemember with upload support directly here, and add any feedback or comments to the GitHub pull request.
I'll update this answer once this feature is released officially.


What to do if I am a victim of revenge downvotes?

Question: If someone decides to go to many of my posts (answers or questions), and downvote all of them in revenge, what can I do?
Comment: should this be faq or faq-proposed, or is it very rare on this site?
Comment: @ChrisW Any comments on faq, faq-proposed?
Answer: StackExchange has an automated script to scan voting patterns and automatically reverse any abnormal patterns of serial voting (both downvotes and upvotes). However, this runs once every 24 hours according to this Meta SE answer.
So, the recommendation is to wait for up to 48 hours for the automatic voting correction to take place. If it does not take place, then please report to a moderator using a flag. You may flag any one of your own answers or questions that was suspected to have been revenge downvoted. One is enough.
If the abnormal pattern of voting was automatically corrected, the Reputation tab on your profile will show "Voting corrected (learn more)".
Answer: I get the impression that there are abnormal votes and just assume that someone is probably multiaccounting and that sometimes people will downvote because they don't like something trivial or do it to annoy the poster.
I don't really care about it because moderators can't see the voterid and it's difficult to show malice in voting.
Many of my answers get downvoted but as a rule someone will correct the downvote and i almost never get -2 lest i post something weird.
Seems like the votes are in general not readily dispersed and one can often guess who is doing the downvoting...
If people downvote an obviously good answer, then i will flag it and maybe make a commotion about it.
Comment: Yes I tend to ignore a -1 vote as just somebody's being cranky -- maybe one of "the usual suspects"! :-) -- but "you can't please everyone"; whereas -2 would be much rarer and a message to take more seriously.
Answer: It is probably not wise to focus too much on how others give you upvotes or downvotes. Instead, it is probably better to focus on your own intention and motivation for providing questions and answers on the site. Is it a good intention? Is it a good motivation? Was that intention/motivation executed skillfully and with wisdom? If so, then it matters little what the upvotes or downvotes are.
Best to let the upvotes/downvotes simply act as a tool reminding us to continually check our own intention/motivation/skill with discriminating wisdom and act accordingly. At least that is what I sincerely try and do even if in a fumbling and unskillful way. Practice makes perfect, right? :P


Permeable paving in cold climate

Question: Does anyone have recommendations for permeable driveway/paving for cold climates? Not a fan of the plastic grids with grass. Here in Eastern Ontario (Canada), there is lots of snow and ice so it must be shovel-able and stand up well to freeze-thaw cycles.
We have -20 degree(C) or colder winters, as well as humid 30+ degree summers.
Answer: There are concrete grid and grass systems, if it's the plastic you don't like.
This page claims that porous asphalt systems stand up to freezing better than normal asphalt, and stand up to salt better than concrete systems.
This is a rather more in-depth review of various systems and maintenance issues, with one reult being a suggestion that regular maintenance is required to maintain permeability.
Answer: Throughout Northern Europe, Scandinavia and Great Britain the go-to paving solution for drastic weather variations is a combination of porphyry and a mortar called GftK. Porphyry (ancient greco-roman for "purple") is a tough and beautiful, naturally occurring cousin of granite. If you have been to Europe or South America and have seen the cobbled streets, you know porphyry. I believe the Road to Carthage (the actual road, not the movie) was built with porphyry in about 50 AD. GtfK is an epoxy-based mortar that can be applied at temperatures down to 3.33 degrees (C) and even in the rain. If done correctly this application--which, by the way is permeable--will last for decades with NO MAINTENANCE REQUIRED. It can bound unlike materials with differing expansion rates, it doesn't shrink so there won't be any mortar valleys, and it can withstand daily power-washings. It doesn't stain and water can actually be captured underneath and recycled. The only place in the US and Canada that sells this combination is Milestone Imports Inc. out of Santa Fe, New Mexico. Their site has a ton more information, including testimonials, specs and CAD drawings: www.milestoneimports.com.
Comment: interesting product, a permeable tough mortar.  Sadly not stable in Eastern Ontario temperature ranges Manufacturers site http://www.gftk-info.de/english/vdw-800-epoxy-paving-joint-mortar  says "ambient and material temperature min. 7°C, max. 30°C"
Comment: Kevinsky, according to Caroline Wanders, International Sales/Marketing for GtfK, vdw 800 can easily handle Ontario's weather… it can even handle weather in Scandinavia…we have lot of customers in Norway, Sweden, Finland and Denmark using our products without any maintenance what so ever. We also export a lot of grout to Switzerland and Austria.

The ambient and material temperatures stated by you are only for the application only once the mortar is hardened, it is extremely durable and long-lasting as well as frost and de-icing salt resistant (see front page of the brochure).
Comment: Nic, it sounds like you work for them.  The custom in this forum is that you must disclose commercial affiliation.  Are you connected to this company?
Comment: I am so sorry, Kevinsky. This is my first time ever posting in a forum like this. I am an independent rep for Milestone Imports Inc. out of Santa Fe. We are the exclusive sales agents of GtfK Mortar in the US and Canada. And while others sell porphyry, we sell the best.
Answer: Ecnerwal has provided a most detailed study from Minnesota which has a similar climate to Eastern Ontario where you are.  From a practical point of view your choices resolve to:

traditional gravel driveway
interlock driveway

These are the only two solutions which I know are available to homeowners and meet these criteria:

must be able to be cleaned by manual or power snow removal tools
must withstand loads from cars, sunlight, rain
can withstand the occasional salt, sand or other ice melting product. Eastern Ontario is notorious for now and again ice storms. Finding your driveway has become a skating rink overnight requires a surface that can be made safe quickly.
should be able to be repaired

Gravel is much cheaper but harder to shovel.  Interlock is expensive but requires less maintenance.  Both solutions require a deep stable base in order to last. A typical suburban driveway may have 12" of compacted gravel and then the top layer. For areas with heavy clay soils a base of 24" will cost more preparation but provide a longer life.
As a side note if the point of asking for a permeable surface was to reduce water runoff going into storm drains then you could accomplish a considerable reduction by redirecting downspouts from gutters into buried four inch drain pipe with sleeve and french drains.
Comment: what about resin bound surfacing, does that withstand the cold sufficiently?
Comment: @Bamboo  I am not aware of any resin bound surface that is commonly used in Ontario.  You go to the landscape and they offer you "Interlock with a strip of asphalt" or you go to the paving companies who offer you "Asphalt with Interlock on the edges".  Sigh...
Comment: It's available here and resin bound gravel is permeable, not sure what temperatures it withstands, but maybe its just not available over there - yet.
Answer: Looks like there is a company called Tar & Chip Ottawa that installs resin bound permeable driveways.
Comment: I am not sure if the question was about  a company.  You may want to clarify with the person asking the question before responding.

Permeable paving in cold climate


What game systems determine skill levels only through use?

Question: Is there a table top game similar to the video game Dungeon Siege where you don't really pick a class but what you become depends on what you do? You cast magic your magic skill increases, you beat someone with a stick your fighting skill increases that sort of thing.
Answer: The original Runequest was a lot like that: the world was quite magical, and most PCs had some magic available to them. Experience worked just like you're thinking about. When you used a skill, you checked it off, and if you could roll higher than that skill during the downtime, it'd improve. It was thus easier to get better at a skill the worse you were at it. Some of the other Chaosium games based on the Runequest system share the same method.
Mongoose has recently released Runequest II, which shares the same advancement mechanic.
Comment: This is probably the purest version of that mechanic.  Call of Cthulhu does it too, it's part of the core BRP system they derive from.
Comment: Swedish games Eon and NeoTech use this advancement scheme as well. Not aware of any English version of those games, though.
Comment: @evilcandybag A lot of Swedish RPGs do this (although for quite a few, there's some "standard packages" for starting skills although there's no strict class separation and allows a character to move in the direction that the player wants).
Answer: Advancement in Burning Wheel and Mouse Guard require checks in skills--requiring a certain number of successes (and sometimes failures) in using a skill in order to advance a skill to the next level.  It would probably match rather well to what you're looking for.
Answer: You could do a variant of GURPS that did the same thing pretty easily, basically by requiring that a person has used skills in order to improve them (or you could track their improvement yourself). EABA would work similarly, and EABA doesn't encourage the glut of skills that GURPS tends do.
Or perhaps a PDQ variant, you could do the skills similar to the way Soul Cultivation works in the Dead Inside variant, or Hero Point gains in Truth and Justice.
A lot of this depends on the general feel of the game. For something pretty light, I'd tend toward PDQ. If you want a bit more crunch, EABA or GURPS could be made to work, I think.
Comment: +1 for PDQ! Also, the PDQ# variant in [S7S](http://rpggeek.com/rpgitem/44819/swashbucklers-of-the-7-skies)
Comment: We did this in GURPS. A character had to use the skill to spend that session's points on it. To learn new skills, you had to find a trainer or do research (or default it for a long time) before you could invest points.
Answer: Ars Magica has a separate XP track for every skill and Art.  You're only permitted to increase these if you've used them during an adventure or if you explicitly spend time (as in, a season or more) working on them during down time.  That seems to fit your criteria.
Answer: The old Universe game worked that way as well -- percentage-based, and if you rolled a 0 on either die, you got a point to increase that skill. The problem with that was you had people trying to use the skill on inconsequenial tasks ("I attack the tree").
Answer: Star Wars d6 and the original Cyberpunk 2020 required the player to use the skill (or be trained in it by someone else) in order to improve them.
Note: Cyberpunk had classes (which only effect meant that they got one class specific special skill) while Star Wars d6 had character templates that didn't have any concept of class at all.
I believe Dandanon also required that as well, but it's been that long since I read the rules...
Answer: We have a house rule for Alternity which does something similar, on an Amazing success a player earns a skill point to help them rank up the skill that was used. As skills require more than one point to rank up then it's not an instant win but a little more gradual.
Answer: Technoir has a variation on this : Any skill(verb) you fail at using during a mission becomes 'primed'. Then, between scenes when the characters are resting and treating their wounds, they get a chance at raising their primed verbs. Succeed and the verb's dice pool augments by 1, the verb losing its primed status. Failure means the verb remains primed and the player can still try raising them next downtime.
Answer: I'd think pretty much any system could do it. The DM just has to enforce it. IE: Why are you adding ranks to Performance: Hibachi cooking? You never used it!
Comment: I didn't give you the downvote, but I was on the verge of it. I thought I'd give you a comment instead explaining why this got downvoted. If you hover over the downvote button, you'll see the text, "This answer is not useful." That's the problem here. The question asks specifically for systems that **only** support advancement through use. You didn't address that. Also, at RPG.SE in general, and system-recommendation specifically, the "You can do that in any game" answer is frowned upon. Love your avatar pic, though, and welcome to the site!
Comment: It is true though. I discourage my players from leveling up anything they hadn't actually used, and I do the same when I'm a player. This outlook works very well in non level based systems such as White Wolfs where your experience is spent directly on your skills and abilities. I will want to look into runequest though.
Comment: Yes, it is true. It's a great answer to a **different question**. I'm just trying to help you out by explaining where I thought the negative feedback came from. Because uncommented downvotes are one of my pet peeves.


Is there any difference between isotonic and isosmotic solution?

Question: Is there any difference between isotonic and isosmotic solution? Can we say isotonic solution do not show osmosis because they have same osmotic pressure?
Comment: I think often you can use those terms interchangeably but they aquire different meanings in some contexts. According to the current entry in the wikipedia, an isotonic solution does not alter the solvent concentration in a second solution, the standard example being the interior of a red blood cell. In contrast an iso-osmotic solution *may* do so.
Answer: Yes, there is a difference. Isotonicity implies a biological compatibility, whereas isoosmoticity implies similarity of chemical and/or physical composition. Solutions that are isoosmotic to biological fluids/blood are not necessarily isotonic as tonicity refers to a given cell membrane [1, p. 230]:

The 0.9% sodium chloride solution is said to be iso-osmotic with physiological fluids. In medicine, the term isotonic, meaning equal tone, is commonly used interchangeably with iso-osmotic. However, terms such as isotonic and tonicity should be used only with reference to a physiological fluid. Iso-osmotic actually is a physical term that compares the osmotic pressure (or another colligative property, such as freezing-point depression) of two liquids, neither of which may be a physiological fluid, or which may be a physiological fluid only under certain circumstances. For example, a solution of boric acid that is iso-osmotic with both blood and lacrimal fluid is isotonic only with the lacrimal fluid. This solution causes hemolysis of red blood cells because molecules of boric acid pass freely through the erythrocyte membrane regardless of concentration. Thus, isotonicity infers a sense of physiological compatibility where iso-osmoticity need not. As another example, a chemically defined elemental diet or enteral nutritional fluid can be iso-osmotic with the contents of the GI tract, but would not be considered a physiological fluid, or suitable for parenteral use.

References

Gennaro, A. R. Remington: The Science And Practice Of Pharmacy, 21st ed.; Lippincott Williams & Wilkins: Philadelphia, 2005. ISBN 978-0-7817-6378-3.


Is an open interval in $\mathbb{R}$ a closed set in $\mathbb{R}^2$ under the standard topology of $\mathbb{R}^n$?

Question: The standard topology of $\mathbb{R}^n$ is defined:
For any $n\in\mathbb{N}$, let
$$
\mathcal{T}=\{U\subset\mathbb{R}^n|\ \text{if}\ x\in U\ \text{then}\ \exists\epsilon>0\ni B_\epsilon(x)\subset U\}.
$$
In $\mathbb{R}^2$, a 1-dimensional open interval on say the $y$-axis is a subset of $\mathbb{R}^2$, however for a point $y$ in this interval there is no epsilon ball around $y$ which is a subset of the interval since the epsilon ball will contain points in the plane that aren't even on the $y$-axis. I've convinced myself that this is the case according to my understanding of the definitions, but it seems wrong that an open interval in $\mathbb{R}$ would not be closed in $\mathbb{R}^2$.
Comment: You are correct that it is not open for the reason you say, but that doesn't imply that it is closed.
Comment: 'not open' is not the same as 'closed' (even though everyone made this very mistake at some point while learning topology) :)
Comment: It is * not* closed as the limit points are still the same and not in the interbal.  So it is neither open nor closed.
Answer: The set is actually neither open nor closed. (Perhaps these words are a bad choice cause they seem to imply mutual exclusiveness when it is not the case. Sets may be open, closed, both, or neither.)
It is not open for the same reasons you said in your question.
A set is closed if and only if its complement is open. The endpoints of the interval are in the complement of the interval and you can't make a ball around them without including points that are not in the complement. Thus the complement is not open so the interval is not a closed set.
Openness and closedness always depend on the total space. For instance any subset $S\subset \mathbb R^n$ is 'open' when you consider the $S$ as the topological space (and give it the subspace topology) as it must be to satisfy the axiom of topology that says the total space is open.
Answer: No, an interval in $\mathbb{R}^2$ is not closed.  Let us consider the "interval" in $\mathbb{R}^2$ $$(a,b)\times\{0\}=\{(x,y)\in\mathbb{R}^2:a<x<b,y=0\}$$
for some $a,b\in\mathbb R$ with $a<b$.  If this were closed in $\mathbb{R}^2$, then its complement would be open.  However, for every $\varepsilon>0$, the ball centered at $(a,0)$ (an element of $\mathbb{R}^2\setminus\left((a,b)\times\{0\}\right)$) intersects $(a,b)\times\{0\}$ nontrivially.  Thus $\mathbb{R}^2\setminus\left((a,b)\times\{0\}\right)$ is not open, and therefore $(a,b)\times\{0\}$ is not closed.

Nevertheless, we can define define a topology on $\mathbb{R}^2$ such that each set of the form $(a,b)\times\{0\}$ is open.  Consider the order on $\mathbb{R}^2$, $\leq$, defined by
$$(\alpha,\gamma)\leq(\beta,\delta)\iff (\alpha<\beta)\ \ \text{or}\ \ (\alpha=\beta\ \ \text{and}\ \gamma\leq \delta)$$
for $(\alpha,\gamma),(\beta,\delta)\in\mathbb{R}^2$.
This defines a total order on $\mathbb{R}^2$, hence we can define the order topology with respect to $\leq$ which makes each interval of the form $(a,b)\times\{0\}$ open.
Answer: If $I=(a,b)$, $B=I\times \{c\}$ is not closed since $x_n=(a+{{b-a}\over n},c), n\geq 2\in B$ but its limit $(a,c)$ is not in $B$.


Reduce the Xcode Simulator (Retina 4 inch)

Question: I'm using macbook Air and using the iphone Simulator. I changed it to Retina 4 inch, and the screen of the simulator become so big! is there a way to reduce the size?
Answer: You can scale it with the following shortcuts:

⌘+1: 100%
⌘+2: 75%
⌘+3: 50%
⌘+4: 33%
⌘+5: 25%

Or in iOS Simulator: Window > Scale > ...
Comment: @JustAnotherCoder Yes, The window is not sizable, but can be scaled by a shortcut. I sometimes does not understand why people can live with MacOS.
Comment: I can see that, but ..i think its just the macbook air...the ipad simulator is still way too big at 50%
Comment: I would consider a secondary screen then ;)
Comment: Thanks! This was a great help, but I can understand your problem, OP. I have a 22" external display and 4" Retina iPhone takes up about 80% of vertical space on it at 50%.
Comment: Actually, iOS8 simulator is going to have resizable devices as indicated in http://www.iphonehacks.com/2014/06/iphone-6-hint-ios-simulator.html in order to let us define custom screen sizes
Answer: The iOS Simulator's Window menu has an option to display the simulator at 50%, 75%, or 100%. Try one of the smaller values to make it fit.
Answer: Now It's more flexible with Xcode 9-Simulator.
You can pick & drag any corner or simulator to resize it and set it according to your requirement.

There are several other ways also, to scale your simulator.
Using Terminal Command
Follow these steps to scale simulator using terminal commands

Close/Quit simulator. (if open)
Open Terminal app (using Spotlight search, Press ⌘ + SPACE to open spotlight search)
Copy following text and paste it next to terminal cursor.

defaults write ~/Library/Preferences/com.apple.iphonesimulator SimulatorWindowLastScale "0.3"

Open 'Simulator' (Run your iOS project using Xcode).

You will find simulator scale update.

Simulator scale options from Xcode Menu:

Menubar  >>  Window  >>  Scale  >>  "Here available options for simulator scaling"

Here is ref snapshot:


How to interpret the opcode manually?

Question: 77f4bcbc 8945fc          mov     dword ptr [ebp-4],eax

And here's the rule:
88  /r   MOV r/m8,r8       2/2           Move byte register to r/m byte
89  /r   MOV r/m16,r16     2/2           Move word register to r/m word
89  /r   MOV r/m32,r32     2/2           Move dword register to r/m dword

How to interpret 8945fc to mov     dword ptr [ebp-4],eax?
Comment: what exactly you want to do? and which machine opcode? intel x86 ?
Comment: @phoxis,yes it's x86,I'm having trouble interpreting opcode to assembly..
Answer: We have here a three-byte instruction: 89 45 fc. The first byte is the opcode byte. Looking it up in the table, we can see that it's a MOV instruction and it takes a Mod R/M byte. The Mod R/M byte has the following layout:
 7  6   5  4  3   2  1  0
+-----+---------+---------+
| Mod |   Reg   |   R/M   |
+-----+---------+---------+

Let's look at the second byte of the instruction. 0x45 is 01.000.101 in binary. Thus, Mod is 01, Reg is 000 and R/M is 101.
Looking up in the reference, e.g. here, we can see that the combination of Mod=01 and R/M=101 corresponds to the [EBP+sbyte] operand. The "sbyte" is an 8-bit signed displacement which is encoded in the third byte: 0xFC. Since the displacement is signed, it has to be interpreted as such number, i.e. -4.
The "/r" note next to the instruction tells us that the register (second) operand is specified by the Reg field of the instruction. Reg=000 is al/ax/eax. Assuming a 32-bit mode by default, this will mean eax.
Assembling all of the above, we get
MOV [EBP-4], EAX

Comment: Just wondering, How did u find out that MOV takes a Mod R/M byte? do I figure it out with this: r/m16/32 or r16/32?
Answer: 89 is the opcode
45 encodes the source and destination
fc is the offset (-4)
Answer: If you want to write your own disassembler, here is what you need.
For a quick summary, look here
Answer: look for mov dword ptr [ebp-4],eax you have 8 bits of code.you can get it easily
here is the procedure
first six bits are given or should be memorized for mov command and then add on LSB the destination bit(D) where d=1 when there is a register in the destination or d=0 when the register is in source.Here the register eax is in source side so should add 0 and then the last bit which is called word bit(W bit) is add in the LSB side after destination bit where
W bit= 1 when there is 16/32 bit register or 0 when there is 8 bit register so now according to the command "mov dword ptr [ebp-4],eax"
the d bit=0 and w bit =1
now you get the 8 bits of opcode
then you have to findout the MOD(R/M) field.
for this you have to find out the 3 things.
1) mod value
2) register value
3) R/M value
here is the format
+-----+---------+---------+
| Mod |   Reg   |   R/M   |
+-----+---------+---------+
as mentioned in above answer
then check in the command mov dword ptr [ebp-4],eax
there is 8 bit displacement according to -4 then mod value =01
MOD VALUES:
00 for no displacement
01 for 8 bit displacement
10 for 16 bit displacment
11 for register to register transfer
so here
mod=01
then
for reg eax the value is 000
and for (R/M) the value is 101
so the R/M field 8 bits are
01000101
hope this description will help

How to interpret the opcode manually?


How can I measure how my multithreaded code scales (speedup)?

Question: What would be the best way to measure the speedup of my program assuming I only have 4 cores? Obviously I could measure it up to 4, however it would be nice to know for 8, 16, and so on.
Ideally I'd like to know the amount of speedup per number of thread, similar to this graph:

Is there any way I can do this? Perhaps a method of simulating multiple cores?
Comment: +1 for visuals. Short answer, you can't aside from making educated guesses.
Comment: @Mysticial but shouldn't you be able to measure with a tool like Intel's VTune?
Comment: @ConradFrix Not when you're trying to guess the performance on 16 cores that you don't have. You can, on the other hand, use VTune to profile the performance on 4 cores, and based on those numbers to attempt to extrapolate to 16 cores. That would be, more or less, an "educated guess".
Answer: I'm sorry, but in my opinion, the only reliable measurement is to actually get an 8, 16 or more cores machine and test on that.
Memory bandwidth saturation, number of CPU functional units and other hardware bottlenecks can have a huge impact on scalability. I know from personal experience that if a program scales on 2 cores and on 4 cores, it might dramatically slow down when run on 8 cores, simply because it's not enough to have 8 cores to be able to scale 8x.
You could try to predict what will happen, but there are a lot of factors that need to be taken into account:

caches - size, number of layers, shared / non-shared
memory bandwidth
number of cores vs. number of processors i.e. is it an 8-core machine or a dual-quad-core machine
interconnection between cores - a lower number of cores (2, 4) can still work reasonably well with a bus, but for 8 or more cores a more sophisticated interconnection is needed.
memory access - again, a lower number of cores work well with the SMP (symmetrical multiprocessing) model, while a higher number of core need a NUMA (non-uniform memory access) model.
Answer: I do neither think that there is a real way to do this, but one thing which comes to my mind is that you could use a virtual machine to simulate more cores. In VirtualBox for example you can select up to 16 cores out of the standard menu, but I am very confident that there are some hacks, which can make more of that and other VirtualMachines like VMware might even support more out of the Box.
Comment: How can virtualbox simulate more cores?
Comment: @CMCDragonkai Well, it's virtualization. It can tell the guest operating system whatever it wants.
Comment: Does it then thread those simulated cores into the real physical core? So if I have 4 cores, I can then create 100 simulated cores using VirtualBox? I didn't about such a capability!
Comment: @CMCDragonkai yeah, it somehow has to schedule them. Whether this idea works actually depends on how this scheduling works. Maybe just try it out and see.
Answer: bamboon and and doron are correct that many variables are at play, but if you have a tunable input size n, you can figure out the strong scaling and weak scaling of your code.
Strong scaling refers to fixing the problem size (e.g. n = 1M) and varying the number of threads available for computation. Weak scaling refers to fixing the problem size per thread (n = 10k/thread) and varying the number of threads available for computation.
It's true there's a lot of variables at work in any program -- however if you have some basic input size n, it's possible to get some semblance of scaling. On a n-body simulator I developed a few years back, I varied the threads for fixed size and the input size per thread and was able to reasonably calculate a rough measure of how well the multithreaded code scaled.
Since you only have 4 cores, you can only feasibly compute the scaling up to 4 threads. This severely limits your ability to see how well it scales to largely threaded loads. But this may not be an issue if your application is only used on machines where there are small core counts.
You really need to ask yourself the question: Is this going to be used on 10, 20, 40+ threads? If it is, the only way to accurately determine scaling to those regimes is to actually benchmark it on a platform where you have that hardware available.

Side note: Depending on your application, it may not matter that you only have 4 cores. Some workloads scale with increasing threads regardless of the real number of cores available, if many of those threads spend time "waiting" for something to happen (e.g. web servers). If you're doing pure computation though, this won't be the case
Comment: I think [Amdahl's law](http://en.wikipedia.org/wiki/Amdahl's_law) only makes sense for tasks consuming CPU-time.
Answer: I take it you are asking about measurement, so I won't address the issue of predicting the effect on higher numbers of cores.
This question can be viewed another way: how busy can you keep each thread, and what do they total up to?  So for six threads, running at say 50% utilization each, means you have 3 equivalent processors running.  Dividing that by say four processors, means that your methods are achieving 75% utilization.  Comparing that utilization, against the clock-time of actual speedup, tells you how much of your utilization is new overhead, and how much is real speed up.  Isn't that what you are really interested in?
The processor utilization can be computed in real-time a couple different ways.  Threads can independently ask the system for their thread times, compute ratios and maintain global totals.  If you have total control over your blocking states, you don't even need the system calls, because you can just keep track of the ratio of blocking to nonblocking machine cycles, for computing  utilization.  A real-time multithreading instrumentation package I developed uses such methods and they work well.  The cpu clock counter in newer cpus reads on the inside of 20 machine cycles.
Answer: I don't believe this is possible since there are too many variables to be able to accurately extrapolate performace. Even assuming you are 100% parallel. There are other factors like bus speed and cache misses that might limit your performance, not to mention periferal performace. How all of these factors affect your code can only be done though measuring on your specific hardware platform.