How to enter a directory with the 'cd' command if it has 700 permission and is not owned by me?

Question: I tried to use sudo cd name_of_dir but am getting the error message:
sudo: cd: command not found

Is there any other way to enter a directory owned by another user which has 700 permission?
Comment: And please explain why you keep leaving negative comments against the valid answers here. If you think there is (or should be) a better way, please let us know what it might be.
Comment: The answers given here are correct, but you are voting them down and saying they are wrong. Don't just dismiss what is being said because of something else you have seen.
Comment: That is funny... he wants `sudo cd` to work, but he votes down solutions using sudo or su. He says he doesnt want to work as root, but he still wants to access a directly he doesnt own. Sounds like a troll to me...
Comment: please add an `ls -l` of the directory itself.
Comment: `sudo chmod 0755 name_of_dir; do you business; cd ../; sudo chmod 0700 name_of_dir` Seems to be the only answer you'll be happy with.
Comment: please add an ls -l of the directory itself...
Comment: @Oli. I was just giving my PERSONAL opinion. If I knew other way of doing that I wouldn't ask it here. I am looking for it. As I see it is almost impossible, BUT there is nothing impossible at all.
Answer: sudo cd won't work because the cd command is built into the shell. So you are saying become root and then run this command. You become root and then the command after sudo is searched for but there is no cd command to find.
The method to use is to switch to the user that owns the directory. Permission 700 is meant as "owner can read, write and execute".
So if root owns the directory sudo -i, password and then cd {dir} is the only correct method. If someone else owns the directory you can still use the 1st method but can also change to that user with su {username} and then use cd as that user.
Comment: yes MestreLion,700 will not stop root from enterting. Permissions '000' will stop the user from entering himself (yes, a user can create a dir he himself can not enter...) but still root can enter that one.
Comment: echo is a shell build-in command, why I can run "sudo echo" but not "sudo cd"?
Comment: Why isn't `cd` built into the commands available to `sudo`, though?
Comment: Side question: will root be able to enter a 700 dir even if he is not the owner?
Comment: Sorry, same rules apply to `sudo echo`: you need something like `echo 'deb {text}' | sudo tee --append {file}` to use echo with sudo and to change a  file.
Comment: @shoujs [`sudo echo` runs `/bin/echo` instead of the `echo` shell builtin.](https://askubuntu.com/questions/960822/why-is-there-a-bin-echo-and-why-would-i-want-to-use-it) ([Rinzwind's comment](https://askubuntu.com/questions/57789/how-to-enter-a-directory-with-the-cd-command-if-it-has-700-permission-and-is-n/57796#comment1241400_57796) is correct, though, as applied to the common situation of `echo` with *output redirection*. `sudo echo text... >> file` isn't what you want since the shell, which is running as you, does the redirection. `echo text... | sudo tee -a file` is a common workaround.)
Comment: Note that `sudo -i` is equivalent to `sudo su -` in that it runs a login shell as the superuser.
Comment: Also, the equivalent of `sudo -i` when the "target user" is not `root` is `sudo -iu username`.
Comment: So this is a limitation (if you can call it that) of the sudo command right? Because it simply looks for executables in the /bin et al. directories? I wonder why there isn't something like suba for running bash internals.
Answer: sudo -i
to open "root console" and then
cd /path/to/directory
(cd is a shell builtin command, so it can't be the sudo target)
Answer: To open a root directory we may run a root shell, e.g.:
sudo su
# cd /root

Comment: There is nothing wrong going into root mode. Experts will always recommend going into root when it is -needed-.
Comment: Well that's exactly why you don't want permissions to open root's directories, isn't it?
Comment: I wouldn't like to work as a root. NEVER!!! And also experts recommend never login as a root. -1
Comment: @Bakhtiyor: *working* the whole time as root is indeed not recommended. But issuing it for a single (or a few) commands is acceptable. *Specially* if you're trying to enter a directory that you *your user has no permission to*. So you *need* to be either the owner or the root.
Comment: If you're working with things owned by root, sometimes `sudo su`ing (or another method) is the only practical or even possible method. "Experts" only tell you to not use root as a habit - it's fine when you actually need it. And @Vojtech, nothing's impossible...
Comment: Experts? Never seen expert recommending such stupid thing... Only thing that is not recommended is login to graphical interface as root (and this is also impossible in Ubuntu).
Comment: Never do a GUI login as root, or allow root to remotely login (as its the easiest login name to guess for brute-force attacks), but its perfectly fine to use `sudo su -` to root when you need to do plenty of things as root.  Its no more dangerous than typing sudo before each and every command.  You probably should remember to be careful just like with normal `sudo`, and maybe particularly careful to remember to log out; but really there's no extra danger.
Comment: sudo will also log what commands are run through it and who uses them. If you use "sudo su", you don't get this feature. (this isn't saying that "sudo su" is bad. If you need it, use it. And I sometimes use it when I keep pre-pending every command with sudo).
Answer: As others pointed out -- it's shell built-in:
~ % which cd
cd: shell built-in command

So, why don't you sudo the shell itself?
~ % sudo $SHELL -c "cd name_of_dir"

Comment: +1 for the sudo bash -c idea... and a suggestion: avoid using `which`. Its merely a script, and it wont handle all possibilities (binary, builtin, aliases, etc). Use `type` instead. Much safer, powerful and portable. And `type -p` for the path of an executable.
Comment: Well, depends ;-) `type [ -wfpams ] name ... Equivalent to whence -v.`, `which [ -wpams ] name ... Equivalent to whence -c.` (man zshbuiltins)
Comment: It does *not* depend. `whence`is `zsh`-only... it does **not** work in bash, it is not even installed by default in ubuntu. While `type` is **POSIX**, meaning it will work in *any* modern shell... bash, csh, ksh.. and even zsh.
Comment: Sure, it is and that's why I upvoted your comment just when it appeared, but what I ment was that in zsh actually it's not a script and gives similar results as `type` as both are aliases to the same command.
Comment: Oh, I understand now. Well, but thats in `zsh`. In bash, which is the default (and usually only) terminal shell in Ubuntu, `which` is not a builtin... so `type`(or `type -p`) is preferred.
Comment: This do not work, because the `cd` remain in effect only until the end of the script (consisting only of the cd command).
Comment: enzotib: The question was how to enter a directory and my response answers it. Nothing prevents you to use `sudo $SHELL -c 'cd name_of_dir && ls *.txt ; for x in *.txt ; do rm "$x" && echo "just erased $x" ; done'`
Answer: You can also elevate yourself to root user by:
sudo -s

Then you can cd to any directory which doesn't allow normal user in like:
cd /root

Or
cd /var/lib/

Then after you're done in there type:
exit

To logout of the root user privileges.
For elevating yourself as root, you can also combine the two commands by && operator as below, this operator also maintains their execution sequence, if current command executes successfully and only then the next command is allowed to execute:
sudo -s && cd /var/lib

Or
sudo -s && cd /root

Answer: If you really want to make sudo cd directory work, you can define a bash shell function called sudo that runs a new root shell when run that way, and just runs the regular sudo command otherwise.
As presented in other answers, most users will not want to bother doing that, but will instead want to:

Run sudo -s, or sudo -i if you want a login shell (remember that one effect of sudo -i is to start you out in root's home directory), or sudo bash if you want to force bash or be able to pass options to the shell.
Run cd directory in the new shell.
Perform whatever (other) actions need to be taken as root in the new shell.
Once done, run exit to leave the new shell. It's important not to forget this, because you don't want to perform more actions as root than you intend!

So, if you want to, then you can write a shell function (or a script) that performs the first two of those actions when sudo is followed by cd, and just runs sudo normally otherwise. Please do not use this as an alternative to learning why sudo cd does not otherwise succeed, because if you don't understand what is going on, then you will likely be very confused by being in a new shell (and you may not understand any error messages that occur).
Here's one way to write such a shell function, which also reminds you that you're in a new shell and that you should exit out of it when you are finished. (That reminder is likely to be useful for users of any skill level, because one is not generally accustomed to being in a new shell when one runs sudo without -s, -i, or the name of an actual shell as an argument.)
# Make sudo treat "sudo cd [DIRECTORY]" as a special case and start a shell.
sudo() {
    if [ "$#" -eq 2 ] && [ "$1" = 'cd' ]; then
        sudo bash -c '
                if cd -- "$2"; then # When cd fails, its own message is enough.
                    printf "%s: Running %s shell in %s\n" "$0" "$USER" "$2" >&2
                    printf "%s: Type \"exit\" once you are done!\n" "$0" >&2
                    exec bash # Replace this bash shell with an interactive one.
                fi
            ' bash _ "$2" # Use $2 as the dir in the intermediate shell, too.
    else
        command sudo "$@"
    fi
}

You could put this in your ~/.bashrc, though this is a weird enough way to use sudo that you may only want to enable it occasionally. In that case,  it's better to put it in its own file. If you create a file called sudo.bash in your home directory with those contents, then you can make the sudo function available--so that it will run instead of the regular sudo command--by running . ~/sudo.bash. That takes effect in the current shell and its child shells, but not others. For the same reason that files like .bashrc are not executable, don't mark sudo.bash executable with chmod. This is really a library, rather than a standalone shell script. If you did run it as a shell script, it would define the function... but only in the shell that ran the script, not for you as the caller. (Of course, you can write a script for this, that just doesn't happen to be the approach I've taken here.)
To check and see if sudo is currently defined as a shell function, and to see its current definition if it is one, run type sudo. To disable (i.e., undefine) the function once it's defined, run unset -f sudo. To manually run the regular sudo command directly even if the shell function is defined,  run command sudo. Note, however, that you don't have to do that, because this sudo function actually does that itself whenever there are more or fewer than two arguments passed to it or the first argument passed to it is anything but cd. That's why you can still use it in the normal ways people use sudo.
Note also that the shell function shown above does still let you pass other arguments to sudo, but that will prevent it from treating cd specially.  Running sudo -u user cd directory in particular is not supported, though you could extend the shell function to support that case. Nor is sudo -i cd directory. The shell that it creates is similar to what you get with sudo -s. The code does not actually run sudo -s, but uses sudo bash, so the -c option works properly. It actually runs bash twice when you pass cd and a directory argument to it (and zero times otherwise). When you run sudo cd directory, first it forks off a separate bash shell from the one you're running  the sudo function in and changes directory. If that succeeds, it replaces that bash shell with a new, interactive one that you can use.
Here's an example of how that shell function automatically "does the right thing." Notice that sudo ls -A /root behaves normally. Only when I then attempt to cd to a directory with sudo is a new shell created, and I am reminded explicitly of what is going on.
ek@Io:~$ sudo ls -A /root
[sudo] password for ek:
.aptitude      .bashrc  .config  .emacs.d  .nano     .rpmdb
.bash_history  .cache   .dbus    .local    .profile
ek@Io:~$ sudo -k  # invalidates my current timestamp... like I left for a while
ek@Io:~$ sudo cd /root/.local
[sudo] password for ek:
bash: Running root shell in /root/.local
bash: Type "exit" once you are done!
root@Io:/root/.local#
root@Io:/root/.local#
root@Io:/root/.local# exit
exit
ek@Io:~$

If you try to sudo cd to a directory that you can't change to even as root, then you will just get an error message:
ek@Io:~$ sudo cd /nonexistent
[sudo] password for ek:
bash: line 1: cd: /nonexistent: No such file or directory
ek@Io:~$ sudo -k
ek@Io:~$ sudo cd /etc/crontab
[sudo] password for ek:
bash: line 1: cd: /etc/crontab: Not a directory
ek@Io:~$

I have used sudo -k in between invocations in the above examples to show that it authenticates you as root before attempting to change directory. But you don't actually have to run sudo -k yourself. Because the shell function is just a thin wrapper for the real sudo command, caching of your credentials and other common sudo behaviors still work normally.
Though it works well and is kind of neat, I admit that shadowing the real sudo command with a function of the same name is super weird. Most users will probably just want to perform the steps sudo -s, cd directory themselves. But in case anybody wants this--and also to demonstrate that it's possible--there it is.
Answer: As far as the to su or not to su debate,  I think it's silly. su is against the religion of Ubuntu and it's not something to do carelessly.  It's amazing what an rm -rf * can do if you're root.  But, if you're comfortable with the command line interface (CLI) and have system level tasks to do, there's no reason not to use su.  I've used several distros where no one even mentioned using sudo. It's just a matter of what kind of work you're doing and which method you're most comfortable with. I use both.
Comment: *"In the versions of bash and `sudo` I have with kubuntu lucid, `sudo cd` now works – without any workarounds."* Short of [something like that](https://askubuntu.com/a/985080/22949), which I'm pretty sure has never been in Ubuntu by default, I don't see how. (Also, I've used 10.04; it didn't do that.) It's been years since you posted this, but do you remember the details? Does `sudo cd` still work for you? What's the output of `type -a sudo` in a shell where it works? I understand you may not know--and the second part of your answer remains relevant--but if you do, you can **[edit]** about it.
Comment: @EliahKagan It definitely does not work for me now in 16.10 and I don't remember what I did then. It's against my religion to modify existing base commands, so it's unlikely I did that. In any case, even if it did work, everybody would just call it a bad habit because it wouldn't work generally.
Answer: @Daniel Bauke's solution works when what you're trying to sudo is a compound command, such as cd /some/path && ./executableScript.sh which may be what you need if executableScript.sh needs to be executed from within its directory, and it requires sudo both to enter the directory and to run the script (and you want to do this in a non-interactive/session kind of way.
To reiterate, Daniel Bauke's solution is:
sudo $SHELL -c "cd /some/path && ./executableScript.sh"


Tracing source of a file

Question: If I give someone a thumb drive I've used to copy a file from my PC to the thumb drive, can that file be traced back to my computer?
Answer: The BTK killer was caught by a similar method, although that was a floppy disk.  The exact means are available in this article.  Additionally, I know of computer forensics that have been used in catching theft of intellectual property when people have switched companies.  In those cases, files from the source company where copied to a USB drive and then taken home.
I don't think it's an easy thing to do, but it certainly is possible.  To be certain, the person doing the forensics would need access to your computer.  I'd wager you wouldn't do that willingly, so that would involve a search warrant.

Tracing source of a file


How to properly read dimensions for a 3D printer?

Question: I'm trying to find the correct way to read and understand the dimensions of a 3D printer.  For example, if I read the following dimensions for the Robo 3D R1 Plus as 10x9x8 Inch - I want to know what 10 stands for (does it mean print height?), 9 (depth?), and 8 (width?); etc.  I'm not sure if I'm assuming correctly.
I know this should be simple, but I'm not sure where to reference the proper ordering, respective to each aforementioned dimension.

UPDATE

While looking at Makerbot's Replicator technical specifications, I see them listing their dimensions as follows:
Build Volume
<code>29.5 L X 19.5 W X 16.5 H CM
[11.6 X 7.6 X 6.5 IN]
</code>
So, if I'm reading this correctly, can I infer that 11.6 IN is referring to the length/depth, 7.6 IN is referring to the width, and 6.5 IN is referring to the height.  Would this be the universal/standard way of referring to build specifications for all 3D printers?
Comment: LWH is a very common order for measurements, but it's not specific to 3D printing at all.
Comment: Typically LWH is transferable to XYZ dimensions in machine tools (3D Printers, Mills, Lathes, Lasers, etc). ie Length=X Distance, Width=Y Distance, Z=Height.
Comment: The 11.6 value, as L, would be the x direction typically, and therefore the left to right as you are facing the machine.  W would be the front to back "depth" or y dimension.  Your notation of "length/depth" is problematic, I think.
Comment: Just a thought, that it mostly matters to distinguish the Height particularly. Length and Width are somewhat symmetrical - you can re-orientate the print by 90 degrees with little consequence; you usually cannot do that vertically, and it makes a huge difference to the structure of a print if you do. If your printer has a moving bed, the non-symmetry of X and Y might make more of a difference (I don't own a moving-bed printer: does that actually make a difference to your X/Y positioning choices?).
Answer: Having the dimensions of your 3D printer ordered in Length x Width x Height is a common way, but nobody actually decided it.
I think it has something to do with the 3rd dimension being the "new" dimension for printing things, that's why it's appended at the end.
Additionally, the first axis on a 2D-coordinate system usually is the horizontal one, so writing Length x Width makes sense for me.
If you are unsure you can always test your printer (if you have one) by writing your own G-Code that moves the printhead on a defined axis.


Merge multiple video with ffmpeg single command line in specific time without cut it one by one and merge it

Question: I have 15 video files which I want to merge with ffmpeg. I want to save time by merge all of the video files in a single command line, not cut it one by one and merge it.
Thanks.
Answer: Use the concat demuxer.
First, create a text file with the filenames.
file '1.mp4'
file '2.mp4'
file '3.mp4'
...
file '13.mp4'
file '14.mp4'
file '15.mp4'

Then, run the concat command.
ffmpeg -f concat -i textfile -c copy -fflags +genpts merged.mp4

For this to work, all videos should have same properties such as codec, resolution, framerate, sample rate, etc.
If they are not, you can encode the concat.
ffmpeg -f concat -i textfile -fflags +genpts merged.mp4

Also see FFmpeg Wiki: Concatenate.
Comment: @Arete Post a new Q with log of your ffmpeg command execution as well as properties of the input files  + the list as well.
Comment: Please explain how to "encode the concat". The command line you have provided for this does not work for me. Could you perhaps provide an example?
Comment: Second command is working well but audio is missing!
Answer: Gyan's suggestion did not work for me. The output video from the suggested commands had the same duration as the first input, and so video 2 and 3 content was missing, and my media player crashed trying to play the output.
I did however find my answer in the reference he provided: http://trac.ffmpeg.org/wiki/Concatenate#filter
ffmpeg -i v1.mp4 -i v2.mp4 -i v3.mp4 -filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0][2:v:0][2:a:0]concat=n=3:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" v_out.mp4

This command worked for videos all having both video and audio streams. For one video not having audio, I modify the command slightly like so:
ffmpeg -i v1_NoAudio.mp4 -i v2.mp4 -i v3.mp4 -filter_complex "[0:v:0][1:v:0][2:v:0]concat=n=3:v=1[outv]" -map "[outv]" v_out_NoAudio.mp4

Effectively, I just removed any portions of the command about audio. This discards the audio from the second and third videos, as a rule of using this filter is that the channels remain the same in all videos.
Comment: This worked for me, because input files differed in metadata (although I could not tell what was wrong, since they had apparently the same resolution, codec, etc...).


Why is my metallic material not rendering?

Question: I created a metallic material by increasing its metallic property and slightly decreasing its roughness property. The material shows up nicely in the preview. I cannot tell if the render is normal. Should I add more objects to see if they reflect? The cube doesn't look shiny at all.
Here is what my render looks like:
Comment: Hello Mary, welcome to Blender.SE. You are using eevee, right? That render engine need require the user to set up some things to achieve photorealistic result. Did you tried to enable screen space reflections, set up a texture for the environment or use baked reflection probes?
Comment: https://blender.stackexchange.com/questions/48659/why-does-an-object-with-a-glossy-shader-render-in-black
Answer: You can use a light source to test the metallic levels. However if your render has no texture, it'll come out white when exporting. Seems like you've used the node to create the metallic effect but you need to add some sort of texture even if it's just a color. For example, if you use black for the texture, then add the metallic effect, your result will be a metallic black object. Without texture it's just white with no effects.
*Still new myself, somebody else may have better input.
Comment: No, you don't need to add some sort of texture. And obviously the sphere and one cube are not white, but some kind of yellow. Anyway, a texture is not necessary for a metallic effect.
Answer: Your screenshot looks like you're using Eevee. Contrary to Cycles, this is no raytracing engine so many things like reflections, refractions etc. do not work naturally. I'll just say it simply like that, I'm not going to explain technical details here (since I'm not competent enough).
I tried to recreate your scene and your material and this is how it looks like in Eevee to the left (more or less like your screenshot) and Cycles to the right:

In Cycles the reflections are calculated automatically (unless you disable visibility in reflections but we're going to dive into that), in Eevee by default they are disabled. You can turn them on by checking Screen Space Reflections in the Render Properties.
After enabling them the result looks immediately better without even optimizing the settings for the reflections as you can see in this comparison:

Of course reflections look better and more exciting if there is more environment to reflect. So more objects in the scene or an HDRI as background might help to make it look better. Of course there is always room for improvement on the material itself as well, since in real life no surface is perfectly plain smooth and clean, but I'm not going to write a tutorial on advanced shaders here ;)
Just one last tip: when trying to recreate your material I found that presumably you have set the Metallic to something between 0 and 1. You can do that for artistic reasons, but if you're trying to make realistic materials, something is either a metal or it is not - so usually you would use 1 or 0, nothing inbetween.


One room colder than the rest

Question: My sons room on the second floor is colder than the rest. It is on the southwest corner and is the furthest from the furnace. I have hot water baseboard heat which is warm to the touch. His windows actually have some ice build up on the inside. House is 14 years old.
Comment: If the windows are single pane, put in double pane.  If double pane, are there indications of leakage (moisture between panes)?
Comment: Normally a house-heating appliance that supplies hot water (or steam) is called a "boiler" (even if it's the far more common these days hot-water variant) and one that makes hot air is called a "furnace."
Comment: Is this room above a garage or other non-climate controlled area of the house?  If so, is there insulation between the floors?
Answer: Corners are more difficult to heat since they have two outside walls. They should have more baseboard length to compensate.
In the short term, plastic window film kits would be highly advised as a quick fix for windows icing up on the inside. Run the tape on the side (and top, and bottom) of the window frame next to the wall and wrap the film all the way over the frame, then heat shrink and trim. Window replacement might well be on the menu, but that's next summer, not today. Film you can do today.
If, as is common, there is only one loop (circulator and thermostat control) for the heat, or one loop per floor, you need to work to balance the heat delivery. The circulator pumps warm water around until the place where the thermostat is gets to temperature. For rooms that are not where the thermostat is, adjustments may need to be made to the "flaps" on the baseboard that control air-flow (and thus heat delivery) to adjust relative heat delivery. Thus, you may need to close (partially or fully) flaps in some "warm enough" rooms to get enough heat into the "too cold" room with its flaps fully open, so that heat delivery near the thermostat is less, and the system runs longer to deliver heat to the colder room(s) before heating the thermostat to the point of shutting off.
You might also want to check for air bleed valves and make sure that there are not trapped air bubbles, which can reduce water flow rate significantly.
While a 14 year old house should be adequately insulated, that's worth checking and considering retrofit for as well. It should have adequate windows, too.
Answer: Well whoever has designed the system should have taken into acount the extra exposed outside wall and compensated for it with extra baseboard heating. The most obvious answer however is if you feel the temperature of his baseboard heating and you find that it's cooler than the rest in the house, chances are that there is air trapped in his baseboard heating. If you search around, since I'm unsure if it's cast iron or fin type convection heat. There will be a small air bleeder valve on the furthest end away from the inlet. It's just a small air vent with a little wheel and small outlet just over 1/16" turn it counter clockwise until there is only water coming out without any air mixed with it. This should take care of your son's cool room! Use a thick cloth or small jar to catch the water/air mixture and do it more than once leaving an hour or so in between each time you try. Good Luck.

One room colder than the rest


When Mounted On A Ship, Do Siege Weapons Take The Ship's Dexterity Into Account?

Question: Been running a campaign using the ship rules as provided by Ghosts of Saltmarsh, but some confusion recently came up about the ship mounted weapons. While a siege weapon is an object and thus does not take in a creature's dexterity, assuming I am correct about that, is that the same case with a ship's dexterity when the siege weapon is mounted to it?
Comment: Related: [Are there any ways to improve a siege weapon's attack bonus?](https://rpg.stackexchange.com/q/200802/23547), [Can a siege weapon "see" its target?](https://rpg.stackexchange.com/q/200815/23547)
Answer: Siege Weapons have a fixed to-hit number
Siege Weapons work differently than normal ranged weapons. With normal ranged weapons, you get to add your Dexterity bonus to the attack roll. With siege weapons, the to hit is a fixed number that depends on the weapon (p. 255 DMG).
For example, a ballista has the following attack, which requires three actions by operators, one to load, aim and fire each:

Bolt. Ranged Weapon Attack: +6 to hit, range 120/480
ft., one target. Hit: 16 (3d10) piercing damage.

With Vehicle combat for ships in Ghosts of Saltmarsh, what changes is how the weapons get fired -- this now is an action of the ship, for example on page 187 for the Galley:

Fire Ballistas. The galley can fire its ballistas (DMG, ch. 8).

And the Galley's 4 ballistas are referencing the standard ballista from the DMG here. Those ballistas are also listed in the ships stat block again, and have the nearly the same attack action as the normal ballista:

Ranged Weapon Attack: +6 to hit, range 120/480 ft., one target.
Hit: 16 (3d10) piercing damage.

The Galley as a ship has Dexterity 4, for a three-point negative modifier. If the Dexterity of the ship would apply to the Ballistas, then the to-hit would need to be three lower than from a normal ballista, for a total of +3 instead of +6. However, the ships ballistas have +6 to hit, like any other ballista. So the ship's dexterity does not factor in the to-hit calculation.
(PS. The ships officer's Take Aim ability grants Advantage to the attack rolls of the ships weapons, but does not change the to-hit roll bonus, either. Thanks to @Kirt)


How can I receive foreign funds in my account in an Indian bank which lacks a SWIFT code?

Question: I'm to receive some money in USD from a company directly to my account.
I'm a resident of India and the branch where I have my account doesn't have a SWIFT code. The company will not give the money by cash/cheque.
Is there any way I can receive such international transfers in my account if the bank branch itself is not SWIFT enabled?
My account is with Indian Bank, if that's relevant. And it's a savings account.
Comment: Open an account at a bank which offers this service?
Comment: Go and talk to the bank on how to do it. They will tell you the options you can use.
Comment: Note that in many countries, you cannot transfer directly to/from a savings account from/to external sources (only from/to your other accounts), so you may need to have a regular "checking" or "current" account to be able to receive the funds. Check with your bank for details. Also note that in some instances, there may be large fees for receiving foreign payments, receiving payments in foreign currencies, and currency exchange.
Answer:
My account is with Indian Bank, if that's relevant.

Indian Bank already has SWIFT BIC.

Is there any way I can receive such international transfers in my account if the bank branch itself is not SWIFT enabled?

The Branch need not be SWIFT enabled. However the Bank needs to be SWIFT enabled. Indian Bank is SWIFT enabled and has several Correspondent Banks in US. See this link on Indian Bank Website
Select USD as filter in bottom page. It will list quite a few Banks that are correspondent to the Indian Bank. Click on the Link and it will give you more details. For example with Citi Bank as Correspondent. In the Beneficiary account details fill in your account details etc and send this to the company and they should be able to send you a payment based on this.


Ubuntu boots to black screen with cursor after upgrade (from 18.04 to 20.04)

Question: it says firmware load failed then boots to a black screen, if you do Ctrl alt F4 it opens a non gui terminal.
Comment: Good you added the little detail that you can indeed access a terminal. It helped a lot.
Answer: Ok, so I would try to re-install the GUI / Desktop:
sudo apt update
sudo apt upgrade
sudo apt autoremove

sudo apt remove ubuntu-desktop
sudo apt autoremove
sudo apt install ubuntu-desktop

or
sudo apt-get install ubuntu-gnome-desktop

or. one could try
sudo apt-get install --reinstall ubuntu-gnome-desktop
or whatever desktop you have
(can be xfce4, kde,  or something else although I have not tried all of the options, but xfce4 seems to work flawless.)
Edit: related Reinstall Gnome
Just in case this wouldn't work for someone in the future:

You can always try to install another (different) GUI/Desktop: Like LXDE, and from there (when you have a working GUI/Desktop) Maybe try different things?

Extremely glad it worked and that I could help!
Note: I have noticed that

*This seems to be a very, very common problem (Because I have often, and some of my friends - had this problem, some other problem that (in my case) was after this worked; was the Ubuntu was laggy, but in my case it resolved itself to just, install drivers & update the OS and reboot.
(In case this would be the issue after, this could be a good thing to try)*

Edit: If some has problems with installing drivers
(e.g Nvidia) I would highly suggest checking out Smaili's Great answer here -  (Since it's the same version, too - and driver problems can often come after a solution like this above)
Thanks!
regards.
Comment: This is just the best answer ever. I was going to reinstall whole fresh copy since it happened to me twice and this solution is genius. Thank you so much
Comment: thanks; it means a lot! @wbadry


What does kill -3 mean?

Question: I know what kill -9 means, but anyone can explain what does kill -3 mean? Is there any special signal it sends out?
Comment: Have you tried `man kill`?
Comment: @TomWijsman, man kill doesn't list the signals and man signals doesn't show anything at all. This is actually the first useful thin that comes up with you search google for "kill -3". :)

It is really easy to over look the 'kill -l' option, especially if you didn't know much about signals ahead of time.
Comment: @Ape-inago: It is short enough to not skip over an option, but granted clarifying what to look for helps, thanks; `kill -l` indeed lists a summary, if you were wondering `man 7 signal` does list them in detail. It is where the table in the currently accepted answer likely comes from.
Answer: The signals described in the original POSIX.1-1990 standard:
   Signal     Value     Action   Comment
   -------------------------------------------------------------------------
   SIGHUP        1       Term    Hangup detected on controlling terminal
                                 or death of controlling process
   SIGINT        2       Term    Interrupt from keyboard
   SIGQUIT       3       Core    Quit from keyboard
   SIGILL        4       Core    Illegal Instruction
   SIGABRT       6       Core    Abort signal from abort(3)
   SIGFPE        8       Core    Floating point exception
   SIGKILL       9       Term    Kill signal
   SIGSEGV      11       Core    Invalid memory reference
   SIGPIPE      13       Term    Broken pipe: write to pipe with no readers
   SIGALRM      14       Term    Timer signal from alarm(2)
   SIGTERM      15       Term    Termination signal
   SIGUSR1   30,10,16    Term    User-defined signal 1
   SIGUSR2   31,12,17    Term    User-defined signal 2
   SIGCHLD   20,17,18    Ign     Child stopped or terminated
   SIGCONT   19,18,25    Cont    Continue if stopped
   SIGSTOP   17,19,23    Stop    Stop process
   SIGTSTP   18,20,24    Stop    Stop typed at tty
   SIGTTIN   21,21,26    Stop    tty input for background process
   SIGTTOU   22,22,27    Stop    tty output for background process

Comment: Unfortunately, the numeric values of these signals vary between operating systems and even between architectures.
Answer: kill -3 is a thread dump that will list all the Java threads that are currently active in Java Virtual Machine (JVM).
Comment: See https://docs.oracle.com/javase/10/troubleshoot/handle-signals-and-exceptions.htm#JSTGD345
Comment: What's the equivalent of this on windows? On windows it says `kill is not a recognized command`
Answer: kill -l shows us all signals. Following this hint 3 means SIGQUIT

What does kill -3 mean?


What do I do about a caravan that is being attacked?

Question: So, in order to get money in Assassin's Creed 3 you've got to send out caravans (or naval caravans) to ship your goods across the lands and all that Jazz. Well when the game was first explaining this they had me send out a single caravan to an area just as demonstration. However, now this Caravan is apparently under attack and has been for quite some time. The menu has no options or anything of the sort to give me ways to deal with this, and the caravan just sits there in the menu being completely useless. What do I need to do with this caravan in order to get it out of its "attacked" state and usable again?
Comment: Sounds like you should go to the mission waypoint to start a mission. This is similar to the tower defense game, where you had to defend it, if your notarity was escalted beyond "Level 2" ( i.e. Wide Red Circle ) in Brotherhood ( ACII x 3 ).
Comment: Revelations, not Brotherhood.
Answer: Caravans under attack are always located in the Frontier.  Head there and you'll see a shield icon on the map - that's your caravan:

Get there, help fend off the Redcoats, and you're good.
Comment: Strange. I have my caravan attacked for a very long time. I see no mission on the frontier to defend it, and it still hasn't disappeared. What to do in this case? Is this a bug?
Comment: Sounds like a bug to me.
Answer: When your convoy is attacked you have about six or so minutes to get to it after that it will disappear as it has been destroyed.
I think you only defend your convey in the frontier but I can't be sure (edit: I looked up and I guess I was right.) Anyway, I think you have run into a glitch that disables your convoy.  It says that it is being attacked however it is nowhere to be found in the frontier.
As of 12/29/12 there is no known fix for this glitch and we will have to wait for a patch from Ubisoft.  I have run into this glitch and it is pain as it can potentially cut a 1/3 out of your income.
Answer: So once your caravan has been attacked, you need to defend it in the frontier. It will be marked by a sheild icon, and you must kill the redcoats there. When it happened to me, I didn't know this unfortunately. And the same thing happened to me; it remained unusable. But, I also found a way to fix it.
At the accounting book (within the manor at homestead), you can craft another caravan. Cheaply. First, go to your stock pile. You should see a list with categories on the right, and one of them will be labeled "forest." Buy 1 oak lumber and 1 oak bark, and then go to the crafting menu.
You will see something that says recipies. Press it, and it will lead you to another list. Go to the category that says "special items." From there, if you scroll right, you will eventually find an item that says land convoy. Craft it, and the problem is fixed!
(Edit: Oh, lol! This is from 4 years ago? Sorry! But I hope you find this useful anyways!)
Comment: Hey, welcome to Arqade! Don't worry about the fact that you answered a 4 year old question, this answer looks great.
Answer: EDIT: Nah, sorry! Solution did NOT work! Just completed sequence 12 as well as all Assassin Recruit Missions. Attacked convoy is still stuck!

I have read about a solution for this Convoy status stuck at "Attacked" glitch somewhere.
What you need to do is [Spoiler]:

Complete all the Assassin Recruit Missions - this should unlock an extra convoy, as well as remove the "Attacked" status of the stuck convoy.

I have not yet tested the solution, but it seems legit. I'm nearly there now and will post my findings when complete.


Mongodb problem_could not connect to server

Question: I use ubuntu 14.04LTS and with mongodb version 2.4.9.When I type "mongo" in terminal, it always show "connecting to: test
Tue Jun  3 10:03:57.911 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
exception: connect failed".
But if i run mongod in one terminal, and run mongo in another, all is ok.
If I close the window of mongod, the connection fail again.
I need to use mongodb without open a terminal of mongod, how can I do with it ?
Thank you!
Comment: Possible duplicate of [Is mongodb running?](https://stackoverflow.com/questions/5091624/is-mongodb-running)
Answer: You need to start mongodb as a service or daemon(depending on the OS,in your case daemon), check the documentation
Documentation
Answer: sudo service mongod start

Or
To run a mongod process as a daemon (i.e. fork), and write its output to a log file, use the --fork and --logpath options. You must create the log directory; however, mongod will create the log file if it does not exist.
The following command starts mongod as a daemon and records log output to /var/log/mongodb.log.
mongod --fork --logpath /var/log/mongodb.log


How can I create a secure random key for AES?

Question: I need to generate a lot of shared keys for an AES method which uses in various condition, my concern is how can I generate unpredictable keys? I've had some research on Cryptographically secure pseudorandom number generator but I don't know how I should use them?
Answer: /dev/urandom in unix based systems and CryptGenRandom on Windows. Most programming languages should provide APIs to generate random bytes such as os.urandom in Python.
Answer: There are many ways. The answer to this will be based on your expertise in the process.
For example, if you are a developer, as Terry said, you can use APIs.
If you are a Linux person, you can use Linux command line tools.
If you are a windows guy, and not too expert on the command line, there are GUI tools like puttyGen (which i personally has tried and suggested for windows GUI lovers).


Keyboard shortcut for flagging in Outlook

Question: Is there a keyboard shortcut in outlook 2007 to flag an email instead of having to mouse click the little flag?
Answer: You can just press Ctr-Shift-G and then hit Enter.
Edit:  You can also just press Insert if you just want to mark it with the default flag.  Additionally, pressing Insert on an already flagged item marks it as completed.
Answer: Autohotkey could do it!
Use the Click function.
What you want to do is install AHK, then use the bundled Window Spy to find out the position of the button. Then you'd use something like this:
#IfWinActive, ahk_class [whatever outlook's class is, the window spy will reveal this]
[your hotkey here]::Click, X of flag, Y of flag
#IfWinActive

edit: djhowell says you can use Control+Shift+G, then return. In this case your hotkey would be:
[hotkey]::Send !+G{Return}

Keep it simple!


How to produce Ancient Fruits?

Question: I heard there was a way to produce Ancient Fruits, which are a kind of fruits that can be sold for a high price. How can you obtain the seeds which enable you to produce those fruits, and is there some particular conditions to make these grow ?
Answer: There are a few ways to get ancient seeds:

Donate the Ancient Seed artifact to Gunther at the museum and he will give you a plantable packet as a reward. He'll also give you a crafting recipe to turn any other Ancient Seeds into the plantable version.
The travelling cart occasionally sells them for 400-700g
Putting Ancient Fruits into the seed maker will give you seeds (though you need an ancient fruit seed to start your ancient fruit plantation)
Other plants have a very low chance to give an ancient seed when put in the seed maker

The Ancient Fruit plant is unique in that in grows in all three growing seasons- spring, summer, and fall. It takes a whole month to grow and produces fruit every 7 days, so it is best to plant it at the start of spring or in a greenhouse.
Answer: Ancient fruits grow from ancient seeds, which can be crafted from ancient seeds. Confused yet?
One of the artifacts that can be found in the mine is the ancient seed, which looks like a small bead. Donating one to the museum unlocks a crafting recipe to turn the artifact ancient seed into a plantable packet of ancient seeds.
Ancient plants take 28 days to mature, and regrow every 8 days. They grow in spring, summer and winter.
Comment: It is indeed confusing at first sight. Thank you for the answer !
Answer: As said previously the wandering merchant and Gunter, through the donation of the ancient seed, are both ways to do it. In my experience however the difficulty in getting ancient seeds through the seed maker is far over stated. I have put in 9 potatoes and 8 out of those 9 have given me ancient fruit seeds.
Comment: The chance of that happening is less than one in two quintillion, so I'm afraid I don't believe you unless you have mods that change it.
Comment: I'm afraid your experience doesn't make it any easier for everyone else to get Ancient Fruit Seeds.
Comment: And given that all your really saying is "that other users answer worked for me", this should really be an upvote and a comment.

How to produce Ancient Fruits?


Distance sensor

Question: I am adding a distance sensor to existing project that uses Arduino due, do I connect the trigger pin and the echo pin of the HC-SR04 ultrasonic sensor directly to  Arduino due which uses 3.3V   while HC-SR04 ultrasonic sensor uses 5V or do I need to use a voltage divider?
Comment: Reading the datasheet for the sensor will get you the output voltage range of the sensor.
Comment: Could you tell us a bit more about the thickness sensor?
Comment: @user17339 Thank you for adding information about what sensor you were writing about.
Comment: @Avamander I was just advising OP to read the sensor datasheet.
Comment: @ChetanBhargava I mixed up the @.
Answer: As suggested in previous answers, you can directly use a Due output to drive the HC-SR04's Trig pin; according to the HC-SR04 spec sheet, that pin operates at TTL levels.  It will see 0 V as a 0-input and will see 3.3 V as a 1-input since it exceeds 2.4 V.  Also see  3.3v input to Arduino digital pin in electronics.stackexchange.
However, the Due's inputs are not 5 V tolerant, so you will need to use a voltage divider between the Echo pin and a Due input.  See second paragraph of arduino.cc's ArduinoBoardDue article:

Warning: Unlike most Arduino boards, the Arduino Due board runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V. Applying voltages higher than 3.3V to any I/O pin could damage the board.
Answer: Well, it depends on the sensor itself. Some sensors run on both 5V and 3.3V. There's a similar question here on StackExchange: How to connect 5V sensors to 3.3V digital input (Due)?
But, in short, if the sensor can't operate in 3.3V, you'll need a level converter /shifter.
Answer: The trigger pin is an input, so you can connect that directly to the Due.
The echo pin will however output 5v. You could use a voltage divider to bring that down to 3.3v or a bit lower.

Distance sensor


Cherenkov radiation

Question: Cherenkov radiation is electromagnetic radiation emitted when a charged particle passes through a dielectric medium at a speed greater than the phase velocity of light in that medium.
Neutrons are composite neutral particles, but their internal valence quarks are electrically charged. So why don't neutrons emit Cherenkov radiation? Is it because the distance between the quarks is too small to create such an effect?
Answer: In this definition (in blue) the phrase 'Cherenkov radiation is electromagnetic radiation emitted when a charged particle...' indicates that by this definition the neutron, an neutral particle, does not emit Cherenkov radiation.
Physical description
The emission of Cherenkov radiation is itself due to an asymmetric polarisation of the medium in front and at the rear of the particle. This gives rise to a varying electric dipole momentum.
Saying this another way, when a charged particle moves through the medium at a speed higher than the speed of light in that medium $c_{medium}$, this excites the medium. The medium returns to the ground state by emitting photons of light. This is what gives Cherenkov radiation its characteristic blue glow.
This light propagates in a cone shape, with  a formal description similar to that of a sonic boom:
$$ \cos(\theta) = c_{medium}/v $$
where $\theta$ is the cone's half angle, and v is the speed of the particle.

As this is on the whole particle scale, it is the net neutrality of the neutron that is important. In the definition (in blue) it is important to read 'particle' as meaning the particle that you have. In this case you have whole neutrons. They may be made up of elementary particles, but you still have neutrons as your particles (the quarks are not free to be on their own outside of the neutron).
In summary, as neutrons are as a whole neutral, they do not cause the polarisation required for Cherenkov radiation to take effect. This is the particle you have given in question of whether it emits Cherenkov radiation, so you have to work at that (composite particle) scale.
Neutrinos
Additionally, it is sometimes stated that neutrinos 'emit' Cherenkov radiation, however this is not strictly true. It is actually resultant muons and electrons that result in the Cherenkov radiation.
Specifically, when a muon neutrino interacts with a nucleus, it can produce an energetic muon. This emits a sharply outlined cone of Cherenkov radiation which can be detected by photomultiplier tubes.
An electron neutrino interaction can produce an energetic electron, but the Cherenkov cone from this interaction differs significantly from that of the muon. The electron generates a shower of electrons and positrons, each with its own Cherenkov cone. The resultant diffuse circle at the photomultipliers is the signature of the electron neutrino. Tau neutrinos are not detected by these detectors because the neutrino energies are not sufficient to produce tau particles Neutrinos themselves do not fit the definition.
Comment: "It is actually resultant electrons and muons that emit the Cherenkov radiation. " What resultant electrons and muons? Where do they come from?
Comment: @Arthur High energy neutrinos can interact with matter to produce electrons, muons, or tau leptons, depending on the flavor and energy of the neutrinos.
Comment: @Arthur I have added some more information into the question itself. Japan's Super-Kamiokande neutrino detector is of interest in this regard.
Comment: @L.Maynard, Thank you! I appreciate. What type of interaction exist between neutrino and the nucleus? Why does neutrino need a nucleus in order to interact that way?
Comment: @Arthur you're welcome. I am not sure what your level is but take a look at http://lss.fnal.gov/archive/2011/pub/fermilab-pub-11-688-ppd.pdf. I do not know too much more about this myself though I will know a lot more after next year.
Answer: Actually, a neutron interacts with electromagnetic fields through its magnetic moment. A Cherenkof effect is therefore possible and I remember I had to calculate it as part of a home work when I was a student in physics. I lost the calculations and I do not remember the numerical results, except that the effect is much smaller than for a charged particle.

Cherenkov radiation


What does solid-state solubility mean?

Question: I was trying to understand n-type doping in diamonds. It mentions the low solid-state solubility for higher atomic radius potential dopants like P, As in diamonds. What does it mean?
Comment: That means you can't put many in without them wanting to precipitate into a secondary phase. Just like adding sugar to water, you can only put so much in. If the dopant isn't sitting nicely on a lattice site, it won't be a dopant.
Answer: To answer the question posed in the title:
Solid state solubility means this: it is possible for atoms of one kind to thermally diffuse into a lattice structure consisting of a different type of atom. In effect, those atoms that are diffusing in are dissolved within the structure of the lattice. They will experience a solubility limit in that lattice, beyond which the dissolved atoms will segregate out as a new structural phase dispersed in zones within that lattice.
Since all these processes are enabled by diffusion, they will obey a rate law that scales exponentially with temperature. Generally, this means greater solubility at higher temperatures and less at lower temperatures. If brought down quickly enough in temperature (a process called quenching), the structures formed at the elevated temperature will become frozen into the bulk structure and persist there in a metastable state at the lower temperature.

What does solid-state solubility mean?


Ubuntu 20.04 on W10 PC via Oracle VirtualBox 6.1 cant use USB's of host

Question: Retired firefighter here dipping his toe into the Ubuntu pool. Trying to get Ubuntu 20 to cooperate with my PC
My PC is a Windows 10 1909 / i7_8700k 6 core / ROG Strix Z370-E GAMING MB / Ubuntu 20.04 running on VirtualBox 6.1
When setting up Ubuntu in VirtualBox, working through the menu I came to USB. There was only one option to choose from at 'Enable USB Controller' and it was USB 1.1 which wasn't very helpful.
I have installed a few different OS's in VirtualBox and always that field gave me a choice of 1.1, 2.1 and 3 but this installation for whatever reason only 1.1 was offered. It didn't give me a workable USB
While running Ubuntu 20 on VB I attempted to access one of the USB 3 ports on the front of my PC and a message popped up at the top of the screen and before I could read it the PC BSOD'd.
After a reboot, I went to the VB settings wanting to maybe adjust the configuration and lo and behold there was an additional option of 3.1, so I ticked the box but couldn't restart because it indicated that I needed to install an Oracle VM VirtualBox extension pack. A what?
I'm getting confused. So there are three separate pieces to make this thing work on a Windows machine? The VirtualBox itself, Guest Additions and now an "extension pack", is that right?
I'm so close to making this thing work. Please help a newb who is floundering.
Answer: I see that yes indeed Extension Packs are something different than Guest Additions.
I found this tutorial helpful:
https://linuxconfig.org/virtualbox-extension-pack-installation-on-ubuntu-20-04-focal-fossa-linux
Now Ive got USB 3 working while Im in Ubuntu... fingers crossed it stays that way


x86 vs x64 exploitation

Question: A lot of the texts I've looked at seems to be based on 32 bit processors.
How different is reversing 32 bit and 64 bit?
Is it easy to pick up the 64 bit stuff if I learn the 32 bit stuff?
Answer: I'm going to assume by x86 and x64 you mean i386 and amd64, respectively.
Exploitation
This is a very complex question. For x86 at least, the general behavior of 32 bit and 64 bit processors are quite similar. The basics are the same (i.e. ROP is not a significantly different beast on one or the other). The primary difference is that 64 bit processors usually have some newer instructions, and of course have registers which are twice as large. You can still use 32 bit registers on a 64 bit processor (for example mov eax,32 works on both processors, whereas mov rax,32 only works on 64 bit). Many times you'll see 64 bit programs which use all kinds of instructions and registers, and even something like mov al,32 is perfectly valid. A useful explaination of that is given here.
There are a few subtle differences when it comes to low-level behavior. A 64 bit processor runs in long mode, whereas a 32 bit processor is limited to protected mode. This results in things such as memory segmentation being unavailable on the former. This doesn't usually matter when it comes to basic application exploitation though.
Operating system behavior may also be different. There are a few different syscalls, with different behaviors, on 32 bit Linux compared to 64 bit Linux. A vulnerability in 32 bit-specific code may not be present on 64 bit Linux (for example, a vulnerability in the vm86() syscall). Likewise, system libraries may behave slightly differently between the two. There are also different ways of invoking syscalls. On 32 bit systems, you use an interrupt, called as int 0x80. On 64 bit systems, there is the faster syscall instruction, which raises an exception rather than an interrupt.
Reverse engineering
You also ask if RE is much different (RE is separate from exploitation). Yes, it is a bit different, but only in that there are new instructions and registers. A disassembler will be able to show you what is what. There will be a lot of familiar sights, even familiar if all you've ever used is an old 8086 (since ax and al are still perfectly valid registers). There is some not-so-obvious differences however, like an action on a 32 bit register clearing the upper half of the equivalent 64 bit register.
Additionally, there are a few more general purpose registers. This means you may see instructions like xchg rax,r12. They do have 32 bit versions though despite only being added on 64 bit systems, where they are named things like r12d.
Disassembly of a 64 bit hello world:
hello64:     file format elf64-x86-64

Disassembly of section .text:
0000000000400080 <_start>:
  400080:   b8 01 00 00 00          mov    eax,0x1
  400085:   bf 01 00 00 00          mov    edi,0x1
  40008a:   48 8d 34 25 a4 00 40    lea    rsi,ds:0x4000a4
  400091:   00
  400092:   ba 0e 00 00 00          mov    edx,0xe
  400097:   0f 05                   syscall
  400099:   b8 3c 00 00 00          mov    eax,0x3c
  40009e:   31 ff                   xor    edi,edi
  4000a0:   0f 05                   syscall

Contents of section .rodata:
 4000a4 48656c6c 6f2c2077 6f726c64 210a      Hello, world!.

Disassembly of a 32 bit hello world:
hello32:     file format elf32-i386

Disassembly of section .text:
08048060 <_start>:
 8048060:   b8 04 00 00 00          mov    eax,0x4
 8048065:   bf 01 00 00 00          mov    edi,0x1
 804806a:   8d 35 80 80 04 08       lea    esi,ds:0x8048080
 8048070:   ba 0e 00 00 00          mov    edx,0xe
 8048075:   cd 80                   int    0x80
 8048077:   b8 01 00 00 00          mov    eax,0x1
 804807c:   31 ff                   xor    edi,edi
 804807e:   cd 80                   int    0x80

Contents of section .rodata:
 8048080 48656c6c 6f2c2077 6f726c64 210a      Hello, world!.

Takeaway
If you already know exploitation or reverse engineering, migrating to a 64 bit system will easy.

x86 vs x64 exploitation


Extra space created around object when using the shaper tool

Question: When I try to use shaper tool to merge two paths, it creates all that extra space up top.
https://vimeo.com/305816637
Answer: That is the Shaper tool (not the Shape Builder)

Just select the Shape Builder Tool (Shift+M) and simply drag to join them.

If you want to use the Shaper Tool (as it is less destructive and more forgiving on mistakes later on) you can draw a little squiggly line across the areas you don't want (using the Shaper Tool) and they will "get erased".

Read more about these tools at Adobe


Example of a set of real numbers that is Dedekind-finite but not finite

Question: Without assuming $AC$, can we find an explicit example of a subset of $\mathbb{R}$ such that it is not finite but it is Dedekind-finite?
Comment: @AndrésE.Caicedo So, $ZF+(X\ \text{is infinite and Dedekind-finite})$ is consistent.
Comment: I dk why you got a down-vote. I countered it.
Comment: No, the negation of choice does not imply the existence of infinite  Dedekind-finite sets.
Comment: https://math.stackexchange.com/questions/1017361/what-is-the-opposite-of-the-axiom-of-choice https://math.stackexchange.com/questions/343923/failure-of-choice-only-for-sets-above-a-certain-rank https://math.stackexchange.com/questions/1395029/does-the-special-continuum-hypothesis-imply-the-axiom-of-choice and probably the most relevant, https://math.stackexchange.com/questions/2473059/elucidating-the-nature-of-infinite-dedekind-finite-subsets-in-the-reals and https://math.stackexchange.com/questions/199087/which-set-is-unwell-orderable
Answer: Obviously it depends what you mean by "explicit," but here are a couple weak positive comments:

In the usual Cohen construction of a model of ZF+$\neg$AC, we take a (countable transitie) "ground model" $M\models$ ZFC and add a generic sequence of Cohen reals $\mathcal{G}=(g_i)_{i\in\omega}$. The resulting generic extension $M[\mathcal{G}]$ is still a model of ZFC; to kill choice, we (in a precise sense) throw out the ordering on the elements of $\mathcal{G}$, adding only the set $G=ran(\mathcal{G})$. In the resulting inner model $N$, that set $G$ is a Dedekind-finite infinite set of reals. So that's explicit relative to the original construction of the model.
A more satisfying answer might be given by this construction of Arnie Miller, who builds a model of ZF in which there is an infinite Dedekind-finite set of reals of low Borel rank.
Comment: Thanks for your answer, It's so useful to me!
Answer: Your question makes it sound like we could do so if we assumed AC. But AC implies we can't find any Dedekind-finite infinite set. And choice is consistent with ZF, so, as Andrés said in the comments, it is consistent with ZF that every infinite subset of the reals is Dedekind-infinite.
But, as you say, it is also consistent with ZF that there is a Dedekind finite, infinite set of reals. But, the fact that the negation is also consistent means you cannot exhibit such a set directly, constructively or non-constructively, without more assumptions than ZF, and these additional assumptions must negate AC.
What you can do in ZF(C) alone is show that if there is a model of ZF, then there is a model of ZF in which such a set exists (and the demonstration that this set exists in this model may be more-or-less explicit). Noah ascertains that this is what you must really want, and he's no doubt right, but I think there's some value in being pedantic here.


Can $ \sin(\pi - \alpha) $ be written as $\sin(180^{\circ}-\alpha)$?

Question: This is a simple question concerning $ \sin(\pi - \alpha) $ when $ \alpha $ is known. Is it correct to write it as
$$
\sin(180^{\circ} - \alpha),
$$
as $ \pi $ is $ 180^{\circ} $ in radians? For example, $ \sin(\pi - 25^{\circ}) = \sin(155^{\circ}) \approx 0.423 $, and the result is the ratio of the length of the opposite side to the length of the hypotenuse.
Comment: I would say: $\quad \sin(\pi-\alpha_{[rad]})=\sin(180°-\alpha_{[°]})=\sin \alpha$
Comment: Simply note that $ ^{\circ} \stackrel{\text{df}}{=} \dfrac{\pi}{180} $. As it is typographically awkward to write $ ^{\circ} $ by itself, we usually write it as $ 1^{\circ} $.
Answer: This is fine. The trig ratios give unitless numbers as results; just be sure the argument(s) agree in units.
Answer: Yes it can be so written. If you say $\sin 2.5 $ it is not clear whether the argument is in radians or in degrees. So better to say $\sin 2.5^0 $ or $\sin 2.5^r $ The latter is not followed usually, it can be seen from the context.
But when referring to $ \cos \pi/3 $ it is obvious that it is in radians, no need to say $ \cos 60^0. $
Answer: Both are the same thing being represented in different units.
Answer: This doesn't have anything to do with sine itself but with conversion from degrees to radians and vice versa. Note that both degrees and radians are supposed to measure rotation and thus we must be able to add and subtract angles and this should correspond to addition and subtraction of real numbers (what I mean is that if we rotate by $\alpha$ and $\beta$ consecutively, this should be the same as rotating by $\alpha + \beta$). This is taken care of by addition formulas in trigonometry and isn't a concern to us at the moment. What is the concern is that this structure should be independent of whether we measure angles in radians or degrees, i.e. our conversion formula $x^\circ = x\frac{\pi }{180}\,\mathrm{rad}$ should preserve addition and this is immediately verified: $$(x+y)^\circ = (x+y)\frac{\pi }{180}\,\mathrm{rad} = x\frac{\pi }{180}\,\mathrm{rad}+y\frac{\pi }{180}\,\mathrm{rad} = x^\circ + y^\circ$$
This tells you that you can freely switch from radians to degrees, add and subtract them to your satisfaction, and then convert it back to radians. This is what I advise my students in high school to do when calculating, for example, $\sin\frac{7\pi}{12}$. It is not as easy to notice that $\frac{7\pi}{12} = \frac\pi 3 + \frac\pi 4$ as it is that $105^\circ = 60^\circ + 45^\circ$. One then applies addition formula for sine to conjure the result.
To contrast this, let me give you an example when things are not as simple as here. When converting degrees of celsius to degrees of fahrenheit you cannot just add temperatures expressed in one unit, and convert to the other. Trivial example would be $0^\circ C= 32^\circ F$. You could say that $0^\circ C + 0^\circ C= 0^\circ C$, but $ 32^\circ F +  32^\circ F = 64^\circ F$, a different result. There is a deeper mathematical reason why it is wrong to add temperatures in the first place, but it is beside the point here. All I wanted to demonstrate is that it is not always trivial to apply operations to measured quantities and expect the result is independent of the measuring system. This always requires verification.


Advice with CTC (Fresher)

Question: What would be the in-hand salary for the CTC 8.4 lakhs (breakup attached in link)? Are they just ballooning up the figure? What would be some reasonable points to discuss with them before I accept this offer?
Answer: Gross is 6,46,404 less of your pf contribution and professional tax. Income would be around Rs 6,25,000 and taxes would be Rs 26,000.
Monthly tax home around Rs 49,100.
Most companies show up items to make a feel good factor.
Is it good offer is opinion based

Advice with CTC (Fresher)


.mkv to .m4v converter for Windows

Question: I am looking for a free program to fast convert from .mkv (Matroska Multimedia Container) to .m4v (video container format by Apple) on Windows. (I use Subler on Mac OS X)
Comment: As most people don't know Subler, could you please describe what features of Subler you want? Thanks!
Comment: Like I said, fast convert from mkv to m4v
Comment: Factory Format will do it.
Answer: According to Wikipedia, m4v is a video container format for x264, AAC and Dolby Digital. Knowing this, you can import your video in Avidemux and configure codecs like:

To add even more compatibility with Apple's products, you can configure the MP4v2 Muxer to add iPod metadata. When saving video, don't forget the m4v extension.
Avidemux is:

free and open-source
cross-platfrom
supports many input formats
Answer: VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming protocols.  Including both of the formats that you mention, (note that .m4v is actually MPEG-4).  It includes the ability to convert between file formats both from the GUI and the command line.
Command line example:
vlc file.mkv --sout="#transcode{vcodec=mp4v,acodec=mp4a}:std{access=file,mux=mp4,dst=file.m4v}"

Answer: Handbrake is an open source video transcoder for Windows, Mac OS X, and Linux that supports the .mkv and .m4v formats.
Answer: You can use FFmpeg:

Free and open-source
Runs on Windows
Allows to  fast convert from .mkv (Matroska Multimedia Container) to .m4v (video container format by Apple).
Is CLI so you can batch.

To convert from an mkv to an m4v:

ffmpeg -i INPUT.MKV -acodec aac -vcodec libx264 -crf
  VIDEO-QUALITY -preset SPEED -pix_fmt yuv420p OUTPUT.M4V

...where:

INPUT.MKV is, of course, the mkv you want to convert.
VIDEO-QUALITY is a number between 17 and 25. 17 will have the best quality and the largest file size, whereas 25 will have the worst quality and the smallest file size.*
SPEED is how quickly you want the video to be encoded. Possible values are ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, and veryslow.† Note that the faster your encoding speed, the greater the file size of your converted video at any given quality level.
OUTPUT.M4V is what you want to call your converted video.

* You can technically use higher and lower numbers as well, but 17-25 is generally a good range.
† An additional value, placebo, should never be used.
Comment: If you want a Windows GUI for FFMPEG, you can use WinFF. It has several preset options for Ipod etc. http://winff.org/
Comment: Subler is just a GUI wrapper around ffmpeg. I don't convert to Apple formats but if anyone has the right command please edit my answer.
Comment: How would I use this to convert from .mkv to .m4v as fast as subler?
Comment: I've now tried WinFF and the problem with it, just like the other applications suggested here, it's not near as fast as subler.
Comment: Since they all use ffmpeg I would guess they use different parameters.
Answer: MkvToMp4

MkvToMp4 can change the mkv to Mp4 without reconverting/transcoding video(If the original video in H264 format). Support for multiple internal and external audio tracks. Support subtitle formats: srt, ass, ssa, ttxt. Changing colors for subtitles. Add and edit tags for Mp4 files (m4v, m4a, m4b). Artworks and chapters for Mp4 files. Encode video for non-h264. Correction of the atoms in Mp4 files to be able to change the audio and subtitle on Apple devices. English and Russian interface.

.mkv to .m4v converter for Windows


How can I open port 443 in Mac OS X 10.6?

Question: I have a local apache running on my macbook pro and I need to run a SSL website on the local host. I have everything configured in Apache, but can't open port 443 on mac. I tried to add ipfw rule to allow 443 but it doesn't work.
Comment: Have you simply disabled the firewall entirely and made sure the server is really listening on that port? I've been shocked how many times that's been my problem.
Answer: make sure 443 accessible from local and configured.
<code>$ netstat -an|grep 443
</code>
allow 443 in ipfw
<code>$ sudo ipfw add allow tcp from any to any 443
</code>
Comment: @Stewie: Does it show up in the netstat output?  If not, the firewall doesn't matter, because nothing is listening for connections on port 443.
Comment: I did this, doesn't work. it shows me when I do ipfw list, but on nmap it doesn't show 443
Comment: @Stewie nmap won't necessarily find all open ports, depending on how secure your system is.
Answer: Open file /etc/apache2/httpd.conf
Look for line with listen 80
Add line           listen 443
Save and restart apache using          apachectl graceful
Check for any error in http.conf using apachectl configtest
Thank Bob at https://bobcares.com/blog/apache-not-listening-on-port-443/
Comment: This doesn't answer the OP's question. It's not about getting Apache to listen on 443, but *opening the port* on the built in firewall.
Comment: However given Gordon's comment it might be the correct one but t he op did not respond and his now totally left. We will never know


Why does the $\phi$-cubed theory have no ground state?

Question: In the book of Sredinicki's, he claimed that the $\phi^3$ theory has no ground state, hence this is not a physical theory.
My question is that I can't see why this system has no ground state. And I don't understand either the explaination he gave. For example, what does "roll down the hill" really mean? What's the case for a harmonic oscillator pertuibed by a $q^3$ term? Maybe it's better if someone can explain it using the quantum harmonic case.
Comment: Have you tried sketching $y=x^2+\epsilon x^3$?
Answer: Work on a spatial lattice of finite extent so that the field operators and the Hamiltonian are well-defined as (unbounded) operators on a Hilbert space. Consider any Hamiltonian of the form
$$
H = \epsilon^D \sum_x \Big(\Pi^2(x)+V\big(\phi(x)\big)\Big)
\tag{1}
$$
where $\epsilon$ is the lattice spacing, the sum is over all lattice sites, $D$ is the number of spatial dimensions, and $V(\phi)$ is an arbitrary polynomial. The commutation relation is
$$
\big[\phi(x),\Pi(y)\big]=i\frac{\delta_{x,y}}{\epsilon^D}.
\tag{2}
$$
Suppose that a ground state $|0\rangle$ exists. By definition, this is a state that satisfies
$$
 \psi_\text{diff}\equiv
 \frac{\langle \psi|H|\psi\rangle}{
 \langle \psi|\psi\rangle}
 -
 \frac{\langle 0|H|0\rangle}{
 \langle 0|0\rangle}
 \geq 0
\tag{3}
$$
for all states $|\psi\rangle$. For any real number $a$, the unitary operator
$$
U(a)\equiv\exp\left(-ia\epsilon^D\sum_x\Pi(x)\right)
\tag{4}
$$
satisfies
$$
U^\dagger(a)\phi(x) U(a)=\phi(x)+a,
\tag{5}
$$
so $U^\dagger(a)H U(a)$ is the same as $H$ but with $\phi$ replaced by $\phi+a$ inside $V(\phi)$. Now consider the state
$$
|\psi\rangle\equiv U(a)|0\rangle
\tag{6}
$$
where $|0\rangle$ is the alleged ground state. Then the quantity (3) is
$$
 \psi_\text{diff} =
 \frac{\langle 0|V_a-V|0\rangle}{
 \langle 0|0\rangle}
\tag{7}
$$
with $V_a(\phi)\equiv V(\phi+a)$. Now suppose that $V(\phi)$ is a cubic polynomial with non-zero cubic term. Then the quantity (7) is a cubic polynomial in the real variable $a$ with non-zero cubic term. Since $a$ is an arbitrary real number, this polynomial attains negative values for values of $a$ of the appropriate sign and with sufficiently large magnitude. This contradicts the assumption that $|0\rangle$ was a ground state, so this completes the proof.
Answer: In quantum theory we usually require that the Hamiltonian $H$ is bounded from below and that the system has a ground state. This is intimately related to unitarity. The $\phi^3$ theory violates this.
Comment: Can you suggest me some source where I can read up about the link between the existence of the ground state and unitarity? Thanks!
Comment: [A Hamiltonian with a linear potential is selfadjoint.](https://books.google.ca/books?id=jlNtCQAAQBAJ&pg=PA418&lpg=PA418&dq=%22unbounded+below%22+hamiltonian&source=bl&ots=CKQhOrEcv5&sig=ACfU3U2zh4JCNRT93g9dvBukCJjkRPiY4Q&hl=en&sa=X&ved=2ahUKEwicwK750NLgAhURuJ4KHUfPCBEQ6AEwBXoECAQQAQ)
Comment: @DvijMankad Also see https://en.wikipedia.org/wiki/Ghost_(physics). Ghosts typically appear in higher derivative field theories. They lead to unbounded Hamiltonians, and violate unitarity. Srednicki's example is not that of a ghost, but having a $\phi^3$ potential has the same result of an unbounded Hamiltonian. Also check the second half of pg 124, Peskin.


Biggest/Longest records in varchar table

Question: We recently noticed that in one of our biggest tables some of the rows are a few times bigger than others. By "bigger" I mean longer and taking more storage space.
How to display top 1000 biggest rows in the table?
Almost all columns are varchar so it would be great if the query could sum up the size of the data in each row and show the biggest rows.
I tried to modify this:
select MyVarcharColumnName
from MyTableName
where len(MyVarcharColumnName) =
(select max(len(MyVarcharColumnName)) from MyTableName)

and this:
select max(len(Desc)) from table_name

but
I get an error

Msg 156, Level 15, State 1, Line 1
  Incorrect syntax near the keyword 'Desc'.
Comment: `DESC` is a reserved word
Answer: How about this?
select top 1000 t.*
from MyTableName t
order by len(MyVarcharColumnName) desc;

If you have multiple columns, you can add them to the order by:
order by (len(col1) + len(col2) + . . . ) desc

I have used len() for this calculation, because that is what you are using in your question.  You might also be interested in [DATALENGTH()][1].
Answer: It thinks that Desc is a keyword rather than an identifier. Try to enclose it in angle brackets ([]), like this:
select max(len([Desc])) from table_name

Comment: Unfortunately, still doesn't work, but thank you for trying to help.


Intermittent disconnection on cisco based Network

Question: I need to find out why I have intermittent disconnection on my network whenever another device like the common home router is plugged on to the network. I have litle power to discourage this because I do work with Hotel/ Hospitality industry. What can I do to detect and block this devices when connected or make my network stable even when these devices are on the network?
Answer: Without more information such as the layout or a description of your network topology we can't really answer your question. I would suspect that you have a single broadcast domain, and therefore when I a rogue device that is running DHCP is plugged in that clients attach to it instead of your existing layer 3 design.
Comment: Normally I'm with you on your answers but I disagree with this one. A DHCP client in the bound state won't (or shouldn't) be affected by a rogue DHCP server coming on line. In addition, a DHCP client who's renewal timer expires will try to renew it's lease with the server that originally granted the lease. Only if it's unsuccessful in renewing it's lease will it attempt to communicate with any other DHCP server. This scenario is possible but highly improbable, in my opinion.
Comment: You raise some good points. Based on the statement about home routers I surmised that rogue DHCP action is the most likely culprit here. Without any kind of topology we're shooting blanks.
Comment: I was thinking it may be related to flooding due to an STP topology change caused by connecting the router to one of the switch ports if the ports aren't configured for portfast. In addition, if the router supports and has STP enabled it may be inadvertently altering the STP topology.
Answer: Have you enabled spanning tree protocol on your switches?
Comment: More to the point, has the OP enabled portfast on all ports not participating in the STP topology?


What's keeping us from simply redefining Avogadro's Number / the Mole as a definite integer?

Question: This might be a question to ask in a Chemistry site, but because there is a lot of talk about redefining many units of measurements in terms of Avogadro's Number / the Mole, I was wondering why we don't just redefine the Mole to infinite precision, since it is basically inherently an integer.
This might be the only unit/physical constant that can be defined to infinite precision.  The only unit that is an "integer".
I guess it's not really a physical constant, per se, in that it is not a property of nature.  But then we can easily create a definition of the Kilogram that doesn't change over time as exactly something-something moles worth of Carbon-12.
Comment: @KennyTM: No this proposal has been seriously envisaged by metrologists. Your argument would also have applied to previous redefinitions of the second and metre.
Comment: Firstly, you need an experiment to count the number atoms precise to 23 significant figures to know that definite integer...
Comment: I'm asking why we can't just go the other way around...specify an exact integer to infinite precision and make the definition of 12 grams equal to the mass of that amount of Carbon-12 atoms.
Comment: @Justin: Then the values in the past would all become wrong, if that exact number turns out doesn't fall within the error bound of the previous definition.
Comment: The fluctuation of the [international kilogram prototype](http://en.wikipedia.org/wiki/Kilogram#Stability_of_the_International_Prototype_Kilogram) is of the order $10^{-7}$ to $10^{-8}$ but the significant figure for Avogadro constant is of order $10^{-8}$. I don't know how it work though.
Comment: @Justin: The simple reason is that measuring number of molecule is difficult than measuring mass in the past.
Comment: @KennyTM: The definition of mass actually change over the past century, so it void the old measured value frequently.
Answer: There was a proposal in 2006 trying to define NA as an exact number[1,2]:
$$ N_A^* = 84\;446\;888^3 = 6.022\;141\;410\;704\;090\;840\;990\;72 \times 10^{23} $$
the problem? This value is incorrect, as the currently most accurate result is[3]
$$ N_A = 6.022\;140\;84(18) \times 10^{23} $$
i.e. $N_A^*$ is now 3 s.d. away from $N_A$. As I have commented, if we randomly pick a number within the current error bound and call it $N_A$, we risk the problem that a better experiment for the old definition will invalidate the proposed value. To be safe about the validity of that number, you need to produce an equally accurate experiment to show that it is actually valid (like the 299792458 m/s in the definition of meter, and 9192631770 Hz in the definition of second.)
Also, the rationale for redefinition of SI base unit always involve that the current one isn't accurate enough or hard to realize:

second (1967):

the definition ... is inadequate for the present needs of metrology

meter (1960):

the international Prototype does not define the metre with an accuracy adequate for the present needs of metrology,
it is moreover desirable to adopt a natural and indestructible standard,

meter (1983):

the present definition does not allow a sufficiently precise realization of the metre for all requirements

candela (1979):

the time has come to give the candela a definition that will allow an improvement in both the ease of realization and the precision of photometric standards, ...

Do the current experiments which reduces to NA = 12 gram of carbon-12 atoms not accurate enough or hard to realize? I don't think so; 9 significant figures are already very accurate. However, the redefinition of mole would be put on board on 2011 (24th CGPM). One proposal is to define[4]
$$ N_A \overset{\underset{\mathrm{def}}{}}{=} 6.022\;141\;5 \times 10^{23} \mathrm{mol}^{-1}, $$ to decouple kilogram from the definition of mole. So if this path is taken, the only thing that keep us from defining it as a definite number to 10 significant figures is because "the conference haven't started yet".
But infinite precision? That would be a long way before we can reach and need that.
Ref:

Ronald Fox and Theodore Hill, A Proposed Exact Integer Value for Avogadro's Number. http://arxiv.org/abs/physics/0612087
Ronald Fox and Theodore Hill, An Exact Value for Avogadro's Number. http://www.americanscientist.org/issues/pub/2007/2/an-exact-value-for-avogadros-number/3
B. Andreas, Y. Azuma, G. Bartl, et. al., An accurate determination of the Avogadro constant by counting the atoms in a 28Si crystal http://arxiv.org/abs/1010.2317
Ian M Mills, Peter J Mohr, Terry J Quinn, et. al., Redefinition of the kilogram, ampere, kelvin and mole: a proposed approach to implementing CIPM recommendation 1 (CI-2005). http://iopscience.iop.org/0026-1394/43/3/006
Comment: -1: This is ridiculous--- the definition is a definition. If you redefine the kilogram, it becomes correct.
Comment: Late +1, to offset the silly downvotes. The definitions are not just definitions. They represent lots and lots and lots of money. Metrologists are extremely sensitive to the need to keep new and old definitions of units consistent.
Comment: @RonMaimon If you adopt a "wrong" value as the definition you introduce a new error in every measurement that went before. Certainly few of those earlier measurements had enough precision for this to matter, but there were *some*. For continuities sake you should (indeed, must) insure that your new definition agrees with the old one to the highest available precision.
Comment: @dmckee: No, what Ron Maimon says is correct, since that's not what the answer is saying. The answer states that     the  definition became *wrong*, not about the measurements done before.
Answer: The problem is that you want your unit definitions to be realizable - so specifying "1 mol is long number molecules, 1 gram is 1/12 of the mass of one mol of $C_{12}$" is nice for your thought process, but as long as there is no practical way to count molecules at such scales to a precision of better than $10^{-9}$ (which I think is the precision of the kilogram standard), there is no operational advantage to it.
Comment: There is the advantage that you don't have to rely on Paris for your system of units.
Answer: Basically, you are proposing to redefine the kilogram, and your approach has been proposed and recently (in october 2010) abandoned ( http://en.wikipedia.org/wiki/Kilogram#Carbon-12 ).
I think the reason why the Watt-balance approach has been preferred for the future definition of the kilogramme was mainly technological : it is more precise and would allow more practical realization of the kilogramme.
Answer: Basically, there's no reason why we couldn't redefine the mole as as simple integer number of atoms or molecules. In fact, as other users have mentioned, there's a lot of people who'd like to do that.
On the other hand, that's not how chemists actually use the mole in practice. You simply can't count 6×10^23 atoms or molecules, nor do you need to. What is important for chemists is to know (for example) that there are the same number of atoms in 58 grams of iron as in 12 grams of carbon, and so on for all the other elements. It's not important to know exactly what that number is, just that it's the same number, and, for much of the history of chemistry, we had absolutely no idea what the number was.
I should point out as well that the mole is not the only unit which is an "integer". If you take the coulomb as a unit of electric charge, that should be equal to an integer number of elementary charges, shouldn't it? Actually, it's not, for historical reasons, and there doesn't seem to be much enthusiasm for making it an integer number of elementary charges either.
You can find my paper discussing this in more technical terms at http://precedings.nature.com/documents/5138/version/1


How can I abdicate my throne to my heir?

Question: I am getting a bit bored by my current character, and my heir is a much better one. So I would like to end my characters reign rather sooner than later and continue playing as my heir instead. Do I have to find some way to kill myself? Perhaps even via the "Commit Suicide" decision despite its hefty penalty for my dynasty? Or is there a better way?
Answer: The best way I found to abdicate and pass on the throne to my heir is by intentionally getting deposed.

Make sure your Crown authority / Tribal authority is high enough that you can revoke titles.
Try to revoke titles from your strongest and most rebellious De-Jure vassals until one says no and starts a "War against the Tyranny"
Surrender immediately

The punishment for losing a "War against your Tyranny" against a vassal who is DeJure part of your primary title is getting deposed. Getting deposed is functionally identical to dying: All your titles get transferred to your current heirs depending on their respective succession laws, and your primary heir becomes your new player-character.
The only difference is that your previous character is still alive and will usually hang around as a courtier in your court.
Comment: Bonus - if your heir gets deposed, your old king might be reinstated!
Answer: To add to this answer, there is an "attempt suicide" that will present itself under certain circumstances:
<code>One of the following:
Cancer trait
Depressed trait
Great Pox trait
Incapable trait
Leper trait
Lunatic trait
Stress Level 3
Best Friend, Soulmate or Child with high Opinion died
</code>
Going on hunts also presents a small chance of dying.
Overall this aspect of the game is designed towards roleplaying and generally characters don't want to die.
Comment: I wouldn't be opposed to a future mechanic allowing a ruler to "co-rule" with their heir, which is something that has taken place somewhat often throughout history. It would be fun to play as the heir while the predecessor takes the place of your spouse as the assistant. Perhaps my character wouldn't earn prestige for the titles held, but could instead spend his predecessor's prestige.


Same app paid for twice due to some error on Google Play Store, no receipt of failed transaction, but money deducted

Question: I purchased a game yesterday, however due to some issue the purchase failed, yet the amount was deducted. I contacted the bank and they registered my complaint and informed me that either I'll receive the money back or the merchant will. Being impatient I purchased the same game later, but my previous transaction was also sent to the merchant, which I found out when I enquired the status of my complaint with the bank. Now I have no idea how to resolve this, I have not received any receipt for the previous transaction as well.
Answer:
As updated by OP the first payment has been cancelled after verifying in the payments Center
Since the payment had been honoured by the bank prior to the cancellation (likely), you can contact Google and talk to them and request for a refund (or from the Google Play Settings → Help and feedback)
Typical refund requests time line here
Answer: Follow the steps provided by Google support on how to request a refund.
Here's what you got to do:

Open play.google.com/store/account in a browser
Find the app in your purchased list,
Press on the three dots found to the right of the app name.
Press on, report a problem
In the drop down list, pick I purchased this but did not receive it
It will give you an option to describe the issue in full detail.
After filling in as many details, press submit

If however the app doesn't appear in the purchased list, use Google's page for reporting unrecognized charges, as they don't seem to havea double charge page.
Go to this page and fill out the necessary info.


Accessing server file system through URL

Question: I have an ec2 instance. Since it was started I was able to access the instance through the public DNS (in the browser) just fine. I initially set the instance up as I needed to host a php script that one of my applications connected with.
Recently, I hosted another app on the box but wanted the app (node app listening on port 8080) to be accessible through a domain I purchased and so I associated my instance with an elastic IP and then connected it to my domain. I then used nginx to forward requests to port 8080 which my app was listening on. Everything works great.
Now, the issue is that I can no longer access my php script through the original URL (publicdns/somefolder/file.php). My initial thought was that this was to be expected and so I tried elasticip/somefolder/file.php. Still no luck. How can I access this script in the browser?
Answer: You should have differet vhosts/server blocks for each hostname. You should serve example.com on port 80 as normal and only reverse proxy to port 8080 for otherdomain.example.com.