Ionic radii of cations and anions

Question: My textbook mentions that across a period from left to right, the ionic radius of atoms decreases. I'm a bit puzzled because negative ions in the same period have an extra shell. I get the part about atomic radii decreasing from left to right due to the effective nuclear charge, but how is it that negative ions with an additional shell end up having a lower ionic radius than positive ions with a whole shell less?
Answer: TL;DR
Basically there are two possibilites:

Either the book is incorrect, or
The book is talking about isoelectronic species in a confusing manner.

The concept: The approach to studying atomic and ionic radii differs, as we focus on isoelectronic species rather than group or period trends. Ionic radii decreases as the charge decreases, while in a group, they increase. For example, the 2nd period of elements Li, Be, B, C, N, O, F, and Ne shows trends in ionic radii. The first three elements lose electrons and gain He configuration, while $\ce{C}$ gains electrons and becomes a negative ion, larger than the positive ions. The last few elements show a decrease in radii.

Glossary
Isoelectronic species: Species having the same number of electrons.
(e.g.) $\ce{N^3-, O^2-, F-, Ne, Na+, Mg^2+, Al^3+}$

Background note:
There is a difference in the approach when we generally talk about atomic and ionic radii.
We don't discuss group or period trends for ionic radii - rather, we talk about isoelectronic species and remember the fact that for isoelectronic species - as the charge decreases, the ionic radius decreases.
Obviously in a group the ionic radii will increase (as a shell is added.)

Now coming to your question:
What are the trends in ionic radii across a period?
Let us take the 2nd period.
Its elements are $\ce{Li, Be, B, C, N, O, F}$ and $\ce{Ne}$.
Now the first 3 would want to lose their electrons and gain He configuration. Compared to $\ce{H-}$ they are going to be smaller.
As we go across the period: $\ce{C}$ is like the cat on the wall. It could lose or gain 4 electrons, but both of them are quite unstable and thus it would share its electrons.
But here's the kicker: when it gains electrons and becomes a negative ion, it's larger than the positive ions before it. Why? The added electrons introduce some repulsion that slightly counteracts the nuclear pull.
And if $\ce{C}$ loses its electrons - it will become way smaller than $\ce{Li+}$, $\ce{Be^2+}$ and $\ce{B^3+}$.
As we go further, the last few elements of 2nd period - we can see a decrease in the radii. So the graph of ionic radii will look like:

Now THIS is the reason - this nitty-gritty trend - that we usually restrict ourselves (atleast at my level) to studying isoelectronic species.
The graph will look different if $\ce{C^4−}$ is taken. The peak will occur at $\ce{C}$ itself.

Sources for image: https://chart-studio.plotly.com/~hannahghutson/14.embed

Ionic radii of cations and anions


'player.removespell' console command not working

Question: I'm trying to delete the "highborn" powers from a High Elf character (don't ask why, it's for... reasons). I can delete the active 50 point magicka boost with:player.removespell 00105f16 but when I try to delete the regeneration power with: player.removespell 000e40c8, the console tells me: "Spell 'Highborn' not found in player". Furthermore, I can't delete any spells like flames or healing. I just get "Spell 'whatever' not found in player". What's my problem?
Answer: It's because you can't remove spells or powers that your character starts the game with via the console. However, people have made mods that allow you to remove them:

Power Eraser (for Highborn)
No Starting Spells (for Flames and Healing)
Answer: You should type in "help highborn" and see what results you get. Navigate using Page Up and Down, and look for the spell, shout, or power, depending on what you want to remove. Try it again with the code that's listed there. If that doesn't help, research the spell via Google or so, and see what ID's are listed there.


Owning a Buddha statue

Question: Is owning a Buddha statue, having it displayed in a Jewish home, considered a transgression of idolatry, technically speaking?
Comment: It's used for idol worship isn't it?
Comment: @Moshe "_It's used for idol worship_ ...". Yes (in general), but not not by the one owning it, and having it displayed in his home. It presumably wasn't even made or used for worshiping. Is it's owner or displayer _technically_ transgressing a prohibition of idolatry? (True, if I'm correct, the question could be made clearer in that regard.)
Comment: @TamirEvan Idolatry is an issur deoriasa. It'd be assur to have one in his house even behind closed doors. Since anything which is assur due to Maris Eyn is even assur B'chadrei Chadarim. See Shabbos 7th Perek. K'yaduah.
Answer: Buddhism is fully considered Avodah Zara (Foreign Worship/Idolatry), as the practitioners of the faith frequently bow to their Buddha statues, and even offer it incense. Clearly, this is the literal definition of idolatry and thus it is assur to have a statue of the "Buddha."
It is a clear idol, and even if the statue might not have been worshipped, it contains strong Touma (as it was created for the purpose of meditational-worship) and should not be kept at any house and rather destroyed.
Answer: There are a few different possible problems which much be addressed.
The verse (Shemos 20:20) states "You shall not make [images of what is] with me; gods of silver and gods of gold you shall not make for yourselves". Based on this verse the Gemara (Rosh Hashana 24b) says that it is prohibited to make any image of man or celestial bodies (sun, moon,or stars). This is a Torah prohibition. The Shulchan Aruch (YD 141:4) rules like this Gemara, that is prohibited to create these images.
The next question is when someone else made these images, and now you own it. May you keep such an image or must you get rid of it? The Gemara(ibid) says that even if someone else made these images you may not keep it as it will lead to "chashada" a suspicion. The concern is that others will think you are serving these images. This halacha is a Rabbinic prohibition and is brought as practical halacha in Shulchan Aruch (ibid).
This seems to be precisely our case and as such it would seem be prohibited.
The Chochmas Adam (86:6) says that since this halacha is based on the suspicion that a person is serving these images and since today that is very uncommon, there is no problem to keep an image of a man. (This Chochmas Adam, is one of the reasons that many observant homes have dolls for children to play with).
However the Chochmas Adam says that an image which people do serve even today, there of course would be a prohibition to own. That would certainly be true in this case.
It is very important to note that the Chochmas Adam did not permit something the Torah prohibits. The prohibition to create an image of a man is true even today, even if no one serves such images.The Chochmas Adam only permitted the Rabbinic prohibition of keeping such an image, on the basis that the concern that it will appear that you serve the idol is no longer true.
Many authorities do argue on the Chochmas Adam.
Another issue over is if this statue was used for idol worship, it would be prohibited to benefit from, unless there was nullification by the one who served it.It is possible, but one would have to know the details of how you got it to comment on that.
Comment: Thanks for this thorough answer, and welcome to the community! Could you add sources for those people who argue on the chochmas adam? Thanks!
Comment: see https://judaism.stackexchange.com/questions/110443/what-is-the-exact-position-expressed-by-rabbi-danzigs-chochmat-adam-regarding-t/111409#111409 for a thorough analysis of the Chochmas Adam who allowa possesing statues

Owning a Buddha statue


Varnish 4 on 12.04

Question: I would like to use the latest version of Varnish (4.0.1) on precise. I tried following the instructions posted here: https://www.varnish-cache.org/installation/ubuntu
apt-get install apt-transport-https
curl https://repo.varnish-cache.org/ubuntu/GPG-key.txt | apt-key add -
echo "deb https://repo.varnish-cache.org/ubuntu/ precise varnish-4.0" >> /etc/apt/sources.list.d/varnish-cache.list
apt-get update
apt-get install varnish

However this does not work - I always end up with the older version of varnish installed (3.0.2-1). What else do I need to do to get the latest version installed?
Answer: The varnish repo apparently does not provide prebuilt packages for Varnish-4.0 on precise i386 (32bit).
Ideally this should be indicated in the instructions, but it it not mentioned. After a lot of heartbreak on figuring out how apt works, I was finally able to get it.
This is the root directory of packages for ubuntu - https://repo.varnish-cache.org/ubuntu/
All binary files are typically stored in pool. The dists folder lets apt select the appropriate package for the current distribution.
This file lists the packages available for the precise (Ubuntu 12.04 LTS) i386 (32bit) platform - https://repo.varnish-cache.org/ubuntu/dists/precise/varnish-4.0/binary-i386/Packages.gz
If you unzip the file and check out the packages file inside, it contains information only for varnish-doc. It does not contain the information for the main varnish package.
That is why apt gets only the ubuntu version.
If you check out the Packages file for the 64bit version all packages are present - http s://repo.varnish-cache.org/ubuntu/dists/precise/varnish-4.0/binary-amd64/Packages.gz Hence it should work fine on the 64bit distribution.
This leaves us with two options.
1. If one checks the pool directory - http s://repo.varnish-cache.org/ubuntu/pool/varnish-4.0/v/varnish/ one can find the files http s://repo.varnish-cache.org/ubuntu/pool/varnish-4.0/v/varnish/varnish_4.0.0-1~precise_i386.deb and http s://repo.varnish-cache.org/ubuntu/pool/varnish-4.0/v/varnish/libvarnishapi1_4.0.0-1~precise_i386.deb which are the latest versions of varnish for the 32bit platform.
One can download these files and install them manually with dpkg -i <package-name.deb>
2. One can ask the varnish repo sysadmin to recreate the Package file for i386 with the proper package list at email@example.com or firstname.lastname@example.com.
Or in the worst case one can still get the latest version of varnish-3 by changing the line echo "deb https://repo.varnish-cache.org/ubuntu/ precise varnish-4.0" >> /etc/apt/sources.list.d/varnish-cache.list
to
echo "deb https://repo.varnish-cache.org/ubuntu/ precise varnish-3.0" >> /etc/apt/sources.list.d/varnish-cache.list
Answer: Here is what I did to build and install Varnish 4.1 from source on Ubuntu 12.04 32 bit:
apt-get install make automake autotools-dev libedit-dev libjemalloc-dev libncurses-dev libpcre3-dev libtool pkg-config python-docutils python-sphinx graphviz
wget https://repo.varnish-cache.org/source/varnish-4.1.3.tar.gz
tar xfz varnish-4.1.3.tar.gz
cd varnish-4.1.3
sh autogen.sh
sh configure
make
make install
ldconfig

Note that binaries built this way are located in /usr/local/bin/ and /usr/local/sbin/ directories. I had to adjust the paths in /etc/init.d/varnish* startup scripts.

Varnish 4 on 12.04


What is the Impostor Level?

Question: Has anyone else gotten a level called the Impostor? It's supposedly a food place but they only sell more Impostor products. Is it an error in the game or a temporary thing until a new level comes out? I had a bitizen with an Impostor dream job but I jettisoned him out the airlock weeks ago :(
Answer: The impostor levels always appear as food levels.
What has happened is the developer added new floors to the game, and the servers know about it, however your game client has not updated fully yet to know about the new level.
Usually force closing the game and reopening it will get the game client to complete the update, however in some cases you may need to go to the play store (or app store) to force the game client to update.
After you update everything marked as impostor will change to the real level the server wants you to have; this may change your level from food to something else.
Answer: The impostor dream job is actually a glitch in the game.  People who have gotten this have reported that when they exit the game and re-enter the bitizen's dream job changes back to a real place.
I believe it to be a place holder that the developers use for pushing out the bitizens, and it gets replaced by their real dream job.
There is no Impostor level that anyone has reported.
Answer: I have both Impostor Bitizens and an Impostor level.  Although my Impostor level does show up as food, it's an Imperial level.  All really weird.  And as far as I know my game is up to date, it did an update about two weeks ago and again a week ago.
In my case, yes, shutting down the game and re-starting it did re-tag the level as "Shuttle Bay" and evicted/deleted the Bitizen.

What is the Impostor Level?


Android library - ClassDefNotFoundError - class not in classes.dex

Question: I have an Android library (Java code) that I share among multiple Android application projects using Eclipse.  For application projects I've created in the past I'm able to reference the Android library and use it at runtime no problem.  But now for any new Android application project I create with references to my library, I get ClassDefNotFoundErrors whenever I reference classes in the library at runtime.
This is only a problem for Android libraries; for general Java libraries I'm still able to reference them from new Android application projects no problem.
Using dex2jar I found that in my application's classes.dex file the library's classes are not present.  Whereas for my older application projects where everything works, the library's classes are present in classes.dex.
Note that the working-case apps and the non-working-case apps both reference the same Eclipse project on disk.  So the problem is not in the library eclipse project, but rather in the application Eclipse project.
Can anyone tell me what I might be doing wrong?  Or more generally how to debug the process by which Eclipse creates the Android application's classes.dex?
Here's a screenshot of the application project, referencing my "testlib" Android library project. I've tried moving the reference up and down the list, checking the checkbox, etc.

Thanks,
Dave
Comment: you have any libraries in the project
Answer: If you are using any libraries in your project just look at my answer here ClassDefNotFound error in android it will solve your problem ..


How to detect the block number within solidity contract

Question: Is it possible to detect the block number that the transaction included within solidity? For example somebody transfer me some eth or token, can I know the block number of the transaction?
Answer: You can get the current block number inside a Solidity contract by calling block.number, this also corresponds to the block number of the block which includes the transaction of ETH sent to the contract function.
Answer: Any Solidity method call that changes the state is a transaction. That transaction is composed of possibly multiple atomic operations. To log or return the block info of that transaction, you could use block.number. You also have access to many other handy global properties. This is possible because that method call can only take effect on the state once the block that the transaction belongs to is mined. And upon mining, those properties expose all that info about that block. If you want to figure out the block number of any TX outside the realms of Solidity, you could use EthersJS or Web3JS and get that info as follows:
EthersJS:
const provider = new ethers.providers...;
provider.getTransactionReceipt(txHash).then(tx => console.log(tx.blockNumber))

Web3JS:
web3.eth.getTransactionReceipt(txHash, tx => console.log(tx.blockNumber))


What does this complicated Regex Expression do?

Question: What does this regex replace :
\([^:]*\):\(.*\)

Comment: Usually used to extract usernames in e.g `/etc/passwd` file. See https://regex101.com and put there `([^:]*):(.*)`.
Answer: This regex is usually used to extract usernames from the /etc/passwd file. For example
sed 's/\([^:]*\):\(.*\)/\1/' /etc/passwd

Will return usernames only from the passwd password.
1st Capturing Group ([^:]*)

Match a single character not present in the list below [^:]*
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
: matches the character : literally (case sensitive)
: matches the character : literally (case sensitive)
2nd Capturing Group (.*)
.* matches any character (except for line terminators)
* Quantifier — Matches between zero and unlimited times, as many times

So in simple terms.
First part:
    sed 's/\([^:]*\):
          /\([^:]*\): Match the string till you see a colon `:` and group.

Second part:
   sed \(.*\)/\1/' /etc/passwd
       \(.*\)  Match everything after `:` and group

So now we've 2 groups where we can back-reference using \1 which indicates we want to reference to the first group and print those results.
Answer: This regex do not execute replace operation, this is only regex without of context.
Need to know full command. But i can assume that this pattern accord to:
(any symbol except : repeated zero or more times):(any symbol remeated zero or more times)

So you can get a usernames from /etc/passwd with this pattern.
With sed you can use -r option to omit () and your pattern will simpliest. Insert your pattern in 's//\1/':
sed -r 's/([^:]*):(.*)/\1/' /etc/passwd

Output will be:
root
daemon
bin
sys
sync
games

Answer: That's probably removing only first colon within a string.
sed 's/\([^:]*\):\(.*\)/\1\2/' <<<"Hello:Unix:Users"
HelloUnix:Users

This \([^:]*\) matches anything until which is not a colon (or until a colon not seen).
Then match ...\):\(... that colon. and everything \(.*\) after that.
But when \(..\) is used, this is telling sed to capture these as a group of match and their corresponding index (or in main back-references) for first one will be \1 and for next \2 and etc.
I mentioned probably, because who want to use these in sed replacement part is important, maybe s/he wanted to replace first colon with semi-colon.
sed 's/\([^:]*\):\(.*\)/\1;\2/' <<<"Hello:Unix:Users"

Or maybe s/he wanted to add another string between instead of a colon:
sed 's/\([^:]*\):\(.*\)/\1 Linux and \2/' <<<"Hello:Unix:Users"

Or whatever you can do and replace : )
Comment: If someone wants to remove the first colon, `sed 's/://'` would be the better choice. But maybe the order is to be changed at the same time: `sed 's/\([^:]*\):\(.*\)/\2--\1/'` or something like that. Btw, I think you speak of backreferences only if `\1` and so on are used in the regexp itself, not in the replacement string.
Answer: It is a basic regular expression (as opposed to an extended one) that captures whatever is before the first colon, as well as everything that comes after it.
As an extended regular expression, it matches a parenthesised string before the a colon, and then another one after the colon, while assuming that the parenthesised bits of the input do not themselves contain parentheses.
Assuming it's a basic regular expression, it would capture the two strings first part and second part:third part in the input
first part:second part:third part

These two strings would be available in \1 and \2, or in some other variable or array depending on what tool is being used.


Raspberry PI GPIO protection

Question: I'm designing a PCB to mount and interact with a raspberry pi4. One of the things I need it to do is drive a 24V relay. This circuit has worked great with some controllers I've used where the outputs are hardwired as outputs (they can never be inputs). I want to use this same circuit but am concerned as to what would happen if the driving GPIO (SM_EN) was inadvertently set to input, causing it to read voltage with nearly zero current draw. This would cause no v_drop across the resistors and the PI would see nearly 24V. This toast the PI's GPIO, correct? Can anyone recommend some protective circuit or settings on the PI that would prevent this from happening? Its weird to think of a circuit node as being able to read and set voltages. But, I'd imagine a simple OpAmp buffer circuit would do the trick?
Answer: DO NOT do this. If you connect this to a Pi it will put 24V on the GPIO and destroy the Pi.
Using a PNP transistor just makes everything more difficult.

You could control the device with an external transistor. This is similar to Use a 5V Relay Module with the Pi Addendum, although the voltages are different, the principle and problem are the same.
Comment: Thank you! I was being told by a senior level staff designer that this is fine, to use the circuit, and that I'm over thinking it. I also realized even if this PI GPIO was set as an output the fact that it is a PNP means the BJT will never change states. I either need less than 24V or 24V to change states. The other controller this was used on ran on 24V logic states (which makes sense as to why it worked on a different controller previously, but wont with the PI). I appreciate your confirmation.

Raspberry PI GPIO protection


What is the difference between using a time series model and using i.e the naïve approach for forecasting?

Question: I was reading about forecasting at Wikipedia: Forecasting and I noticed that in the publication they separate the Naïve, Average and Drift approach from the Time series methods (which involve AR, MA, ARMA, ARIMA, exponential smoothing models...). This is a little confusing for me, because I understood that all of these methods were Time series methods. What is the difference between these forecasting approaches and the "Time series methods"?.
Answer: The distinction made in the Wikipedia article isn't particularly meaningful, especially given that some of the methods that appear in their own sections also appear under "Time series methods" (e.g. what they called "average approach" and the page for "moving average" are the same thing).
One useful distinction, and what the article may have been trying to get at, is the one between methods which:

Provide only a forecast function, that is, a mapping from the data to a point forecast. The "naive" method falls under this category.
Define a complete probabilistic model for the dynamics, typically in the form of the transition law $p(Y_t|Y_1, ..., Y_{t-1})$. In that case, a forecast function can be derived from this probabilistic model, usually as the solution to an optimization problem (e.g. the conditional expectation is optimal in a least squares sense). Models in this category allow for a natural quantification of forecast uncertainty in the form of prediction intervals. ARIMA models fall in this category.

So, while there is indeed an ARIMA model which produces the exact same point forecasts as the average, naive or drift method, conceptually they are entirely different approaches.
Comment: Ok! that is the difference between **methods**. Today in class I understood that each method provides a forecast function (_I thought that forecast functions where something apart from the methods_). Your answer serves me to strenghten that idea. Just to clarify, each and every single one of these methods are "Time series methods" right? and also: which are the methods that provide a probabilistic model like you said?
Comment: @fran496 Your instructor may have a different opinion but there's not really any meaningful reason to argue against calling any method of producing forecasts a "time series method". The classical probabilistic models are things like ARIMA, VAR, general state space models, etc. Exponential smoothing methods are in a weird spot where historically they started as simple forecasting functions but more recently were recognized as corresponding to certain types of state space models, so depending on who you talk to they may consider them to have a full predictive distribution or not.


Does Gromov-Hausdorff distance depends on the choice of the "ambient" metric space?

Question: Give two metric space $X,Y$, we denote by $d_{GH}(X,Y)$ the Gromov- Haudorff distance.  It seems that it only relies on $X,Y$ not on the ambient metric space $Z$ where we embed $X,Y$ (because in the notation, there is no $Z$). How can we prove this is well-defined?
Answer: $d_{GH}(X, Y)$ is computed by looking at all possible "ambient spaces" $Z$. The phrasings one often sees, like

The infimum over all embeddings of $X, Y$ into a common space $Z$,

can make it sound like there is a "special" $Z$. But rather, we're looking at all pairs of embeddings into all (possible) spaces.
EDIT: Specifically, here's a clearer way to define $d_{GH}(X, Y)$.

$d_{GH}(X, Y)$ is the infimum of the set of $\delta$ such that, for some metric space $Z$ and some embeddings $f, g: X, Y\rightarrow Z$, we have $d_{H}^Z(f(X), g(Y))=\delta$ (where "$d_H^Z$" denotes the usual Hausdorff distance in $Z$).

In particular, we look at all possible embeddings of $X$ and $Y$ into all possible spaces. There is no single $Z$ we're looking at!

Incidentally, it's not hard to prove - and fairly useful - that we can restrict attention to those $Z$s whose underlying set is $X\sqcup Y$ and whose metric restricted to $X$ (resp. $Y$) is just the original $X$-metric (resp. $Y$-metric).
Again, that is:

Theorem. $d_{GH}(X, Y)$ is equal to the infimum of the set of $\epsilon$ such that, for some metric space $Z$ with underlying set $X\sqcup Y$ whose metric on the $X$ part (resp., $Y$ part) is the same as the $X$ metric (resp., $Y$ metric), we have $d_H^Z(X, Y)=\epsilon$.

Note that this is made much clearer if we distinguish between the set $A$ and the metric space $\mathcal{A}=(A,d_A)$. Namely, we have:

Theorem, rephrased. $d_{GH}((X, d_X),(Y, d_Y))$ is equal to the infimum of the set of $\epsilon$ such that, for some metric $d$ on $X\sqcup Y$ with $d\upharpoonright X=d_X$ and $d\upharpoonright Y=d_Y$, we have $\epsilon=d_H^{(X\sqcup Y, d)}(X, Y)$.

Again, though, we're looking at all possible metrics on $X\sqcup Y$ which restrict to $d_X$ and $d_Y$ on $X$ and $Y$, respectively.
Comment: How to define a metric on $X\sqcup Y$?
Comment: @XavierYang There's not a single one. We look at *all possible* metrics on that set which extend the $X$-metric on the $X$-part and the $Y$-metric on the $Y$-part.
Comment: @XavierYang I've edited, hopefully this makes things clearer. The point is that we are always, no matter how we define the Gromov-Hausdorff definition, taking an infimum over lots of different metric spaces; there's no "one metric space $Z$," or "one metric on $X\sqcup Y$," which plays a special role here.
Comment: Thanks, now it is clear, theoretically. But pratically, how can I calculate the GH distance between e.g. $S^1$ and $S^2$ or $S^1$ and $\mathbb{R}$ (of course, all are equipped with usual metric)?
Comment: @XavierYang With reasonable spaces, you can often guess the correct answer; the verification, however, is generally not that simple. The power of $d_{GH}$ lies in its applications, not in its ease of calculation.


It is possible to play online on a Ps2 Slim?

Question: It is possible to play online on a PlayStation 2 Slim, and if that's the case, how?
Answer: I would personally try a LAN connection with an Ethernet cable. Let me know if that does not work.
Do that by following these steps:
1. Turn the PS2 and broadband modem off.
 2. Connect the network cable to the modem's Ethernet port and the Ethernet port on your PS2 network adapter.
 3. Turn the broadband modem on. Now turn on the PS2.
 4. Load the Network Access Disc in the PS2.
 5. Follow the on-screen setup instructions. Refer to the Network Access Disc manual for further support.
Comment: I wouldn't suggest this.  If you have a home router setup (a device that splits one internet connection to multiple connections and wifi) it might have a network configuration on it that's different from the home broadband modem.  Setting up your PS2 using the modem, then switching over to a home router may cause the PS2 to not see the network since it's expecting to see the modem as the first stop, but instead gets to the router and gives up from there.  As such, connect the PS2 to which ever device is at the end of the network (which is most likely the home router) first.
Answer: last I had heard the servers for the ps2 games are all shut down (much like wii) and online play for games is substantially impossible unless you are doing this on a moded console and have access to a third party server but this may need some challenging home networking if these servers still exist.
there is also the possibility to pair consoles for a system link with ethernet I believe but game support for this would have to be enabled.
homebrew also offers some custom bbnetwork if I recall correctly but I doubt it still running.
homebrew does enable ftp streaming of games so if you are technically inclined you could establish a network with your pc and host files to it so the ps2 is essentially streaming your game to your console over your private network.


Body tag in header AND template/footer?

Question: So I'm pretty new at Wordpress development, and I'm a little confused by one thing. After going through and finishing my navigation in my header.php file, I went over to my template for the home page I'm working on. My question is: since the "body" tag is the only place you can write that actually shows up in the browser ("header" tags are for meta data etc), can I have more than one body tag? I read a little into html 5, and it seems there are more tags than just "body" now, but what's the best way to do that? I already have my menus wrapped in  and what do I do with the footer, etc? Thanks for any help.
Answer: Structure your theme so you start the  in the header and you close the  in the footer (same thing for the  tag):
header.php

...header content

index.php, page.php, single.php, home.php - etc
...content

footer.php
...footer content

Comment: Thank you so much! That was so confusing to me. Lol. I knew you couldn't have more than one body tag, so I just didn't get how WordPress could split it up. Makes sense though. :)
Comment: sure thing...accepting the answer would be helpful - thanks!
Answer: This may help you regarding having two body tags. is_front_page() will help you to echo body tag conditionally... either in header/footer.

Body tag in header AND template/footer?


Vampire and Werewolf at the same time, cannot remove

Question: I'm an argonian and and a werewolf so I should have 150% resistance to disease, but somehow, suddenly, my screen keeps turning red every five seconds telling me that my vampiric powers recede as I feed. I check my effects menu and I maintain the traits or a level 1 vampire. I may have gotten caught in Serana's vampire spell, but now I'm a vampire and cannot seem to get rid of it. I looked up console command and used it, but to no effect. I still possess the beast form power. I've attempted to activate beast form, but that did nothing, my character's eyes have not changed color, and nobody says anything about it. I tried talking to inn keepers and the dawnguard, but nothing is activating the quest for a cure, nor does talking to Falion. I really do not want to be a vampire.
Comment: I'm pretty sure you can't be both at the same time, can you? Did you use any console commands or were you able to become both without the use of the console or mods?
Comment: Nope. I've read it's a glitch or something.
Answer: You can try the following console command:
<code>player.removespell 000b8780
</code>
Source: this youtube video. If the command itself does not work, try to look at the links in the video description.
Comment: It says I don't have it. I also tried adding it then removing it, but that also didn't work.
Comment: You can try removing the werewolf-status first, then adding/removing vampirism, then adding werewolf status agagin.
Comment: I will do that.
Answer: I fixed it. I tried changing race, sex change, but then I got Serana to make a vampire lord, then I did the quest to get cured.


PIL error: The _imaging C module is not installed

Question: I have PIL (Python imaging library) installed.
When I run Python:
import PIL
import Image
import _imaging

I don't get errors. However, when running my app, it raises
The _imaging C module not installed

Comment: I had the same problem.  Clean install of **PIL 1.1.7** (currently latest) on top of clean install on **python 2.7.8** (currently latest) fixed the problem.  Make sure your python 2.7 is **32-bit**.
Answer: I posted this response on the link that you sent (thank you for that), but figured I'd post on source as well.  Sorry for the dupe post.
I was hoping that there was a way to do this without recompiling stuff. I happen to be using virtualenv. I did find that if I blew away my virtual env install and then reinstall with pip, the Imaging started to work again. These steps seemed to work (note, I'm using OSX)
Not sure if this mattered, but checking to see if jpeg is installed
winesap:~ $ port installed | grep -i jpeg
  jpeg @7_0
  jpeg @8a_0 (active)

Make sure I have PIP installed
sudo port -v install py26-pip

Remove the old virtual environment I had and recreate it
rm -rf ve
virtualenv –no-site-packages –distribute ve
. ./ve/bin/activate

Install pil and django into the virtualenv
echo "pil" > requirements.pip
echo "django" >> requirements.pip
pip-2.6 install -E ./ve/ -r requirements.pip

Test to see if the import works now.  Note lack of obnoxious C module error
python
>>import import ImageFont
>>

Hope this is useful.
Comment: Yeah no problem, mine was solely based on just pure apache mod_wsgi django and python
Answer: On Windows, remove _imaging.pyd and _imagingft.pyd inside C:\Python27.
Leave all _imaging modules inside the C:\Python27\Lib\site-packages\PIL folder.
It works for me.
Answer: Here's some things that might help you if from PIL import Image works but import _imaging fails. If Image fails too, see the Note at the end.
On Ubuntu 13.04 (raring), I had this problem.  It turns out that Ubuntu installs _imaging.so in a place that App Engine does not expect: /usr/lib/python2.7/dist-packages instead of /usr/lib/python2.7/dist-packages/PIL.  So _imaging.so was not anywhere in sys.path.
Here are a couple ways around this:
Put the PIL C modules somewhere already on the path:
I noticed that /path/to/google_appengine/lib/PIL-1.1.7 was in sys.path, but the directory did not exist in my installation.  So I created the directory and copied the .so files into it, and everything worked.  You would have to do this again, every time you updated the App Engine SDK, but at least it doesn't mess with the code you're developing.
Manipulate sys.path in main.py:
This code will check whether we're running the dev appserver, and if so, add the correct dir to the path.  Untested but it should work ;)
# Find _imaging.so and put its directory here.
# `locate _imaging.so` or `dpkg -L python-imaging`
PIL_PATH = '/usr/lib/pyshared/python2.7/'

PRODUCTION_MODE = not os.environ.get(
    'SERVER_SOFTWARE', 'Development').startswith('Development')

if not PRODUCTION_MODE:
    sys.path.insert(PIL_PATH)

I suppose that this might make more than just the PIL modules available to you, so that would introduce (yet more) differences between development and production.  Also, this technique involves modifying the source code of your app, which seems like a bad call if there's more than one person developing it.

Note:  If import Image fails, you might have forgotten to add the PIL library to your app.yaml.
libraries:
- name: PIL
  version: "latest"

You might need to restart your dev_appserver.py after adding this library for the changes to be reflected in e.g. the interactive console.
Answer: why the problem exists, is with PIL 1.1.6?  (only 1.1.7),
Is that the version 1.1.6 does not use these libraries?
PIL 1.1.6 also uses its internal C library to speed things up.
For Windows you should use the precompiled packages.
http://www.pythonware.com/products/pil/ offers X86 Windows binaries for
1.1.7. You might run into a problem with 1.1.7 Windows binaries. The
freetype C library references a debug CRT that is not available on all
machines. You can easily patch the _imagingft.pyd file with a hex editor.
Comment: Could you help in detail how to fix the CRT reference in _imagingft.pyd file with hex editor ? Thanks
Comment: Check out the solutions here and see if it helps https://bitbucket.org/effbot/pil-117/issues/1/windows-build-of-_imagingft-module-fails. Please go through them carefully, and make backups before trying out the solutions
Answer: I was completely missing the _imaging.* files in the lib/site-packages/PIL folder.
I downloaded the egg from here (the correct file depends on the platform):
https://pypi.python.org/pypi/Pillow/2.7.0
renamed it from .egg to .zipand copied all the files in the folderPILthat start with_imagingto the folderlib/site-packages/PIL`.
.. Problem solved
Answer: On Ubuntu, the following command helped me (thanks to this answer on askubuntu):
sudo apt-get install libjpeg62:i386


Is it normal for my pan to start smoking?

Question: There was only oil in it and there is no smoke when I cook in other pans. Also the heat was medium and I'm afraid if I turn the heat any lower that my meal will be under-cooked
Comment: The heat was not medium. The stages of heat are not about how far you turn the knob, they are about how much energy is your pan putting into your food per unit of time. If your oil started smoking, that's high heat.
Comment: What kind of pan?  Why kind of cooking surface?
Comment: This pan may be lighter than others and heats up faster than others.
Answer: Different oils have different smoke points. If your oil is smoking it's simply too hot.
I'm assuming you're using fresh oil. Oil that has broken down because it's been reused (after frying, e.g.) or because it's older and has not been stored properly may have a lower smoke point and will most likely be rancid. Always store your oil away from heat, light, and air.
The smoke point of an oil won't change based on the pan, but some pans conduct differently from others, so it's possible that a cast iron pan, for example, may cause oil to smoke faster than a carbon steel pan does, simply because the cast iron pan is getting hotter where your flame or burner is (cast iron does not conduct heat evenly).
Depending on what you're cooking you generally want to heat your pan first then put in the oil when the pan is at the right temperature and then put the food in. If you're cooking with cast iron it's best to heat up your pan on low or medium for a while (several minutes) to let it heat evenly and then put in the oil then the food. If you're searing steak you want the pan ripping hot. One good trick with cast iron is to heat it in the oven then transfer it to the stove top for your searing.
If you provide more information about what oil you're using, what kind of pan, what kind of heat source, and what you're cooking, people here I'm sure will provide additional helpful answers for you.


Prayer in Soto Zen. Is it practiced? If so, how do I start, or where do i go for resources

Question: So, I know prayer is a subject in Buddhism, but recently i started trying to learn about prayer in the Soto Zen tradition. I cant seem to find any posts that really help, or some that take me one way and another that takes me the complete other direction. I really just need some good solid place to start.
Comment: there a large contemporary work of EL scholarship on Soto and funerary rights. HTH
Answer: Like most things in Buddhism, it depends on who you ask and where you practice.  Prayer isn't a Zen thing.  It's just not.  Who, exactly, would you be praying to?  What would you even ask for?  Zen puts a premium on individual effort.  Atta dipa.  Be a light unto yourself.
Of course, practically speaking, this isn't true in the least.  Zen specifically has a whole lot of East Asian culture rolled into it.  We might pray to Guanyin for mercy and compassionate support in our practice.  We might pray to Manjurshri for wisdom.  In Japan, there's a whole host of kami who can help you with everything from your taxes to your SAT to your...ahem...marital problems.
I think the best question you can ask yourself is why you feel the need to pray.  Examine that.  Based on what you discover, you should be able to find a way forward.
Comment: Kami us a Shinto concept.  It had nothing to do with Buddhism.
Comment: i.e. (from above) "Zen specifically has a whole lot of East Asian culture rolled into it."


Do links to the home page need to be consistent about the trailing slash?

Question: If some pages on my website link to example.com and others link to example.com/, should I make sure that all internal links point to one version, or it doesn't matter?
Answer: The main question is what does your server do in that instance?
If the answer is when you visit:
/page

and
/page/

Does one redirect to the other? or do both resolve in the browser? If the latter, then you should investigate making them uniform, and resolving on one canonical url.
The reason is that /page and /page/ whilst the same from a content perspective, are not then the same from a URL perspective when requested. This could lead to people linking external to either one around the web, potentially diluting the page in the search results.
Update:
If you are talking about the homepage specifically, trailing slashes after the domain name don't matter, and as such linking internally differently will have no impact on your site health.
https://www.seroundtable.com/google-trailing-slashes-url-24943.html
https://ahrefs.com/blog/trailing-slash/
Comment: This is true if the question is about pages on the domain, i.e. example.com/page, but the way it is worded makes me think the OP could be talking about just links to the homepage, i.e. example.com. In that case, it doesn't matter if there is a trailing slash or not.
Comment: I stand corrected. my understanding was the same logic applies. apparently not: https://www.seroundtable.com/google-trailing-slashes-url-24943.html
Comment: As Jake1986 said, my question was about the homepage. Thank you to both of you for your kind help.
Answer: There is no need to be consistent.  Links to your home page are 100% equivalent with and without the slash.
There is no way to make a valid HTTP request without a leading slash in the path.  A (slightly simplified) request for your home page looks like:
GET / HTTP/1.1
Host: www.example.com

If your browser tried to make the request without the slash
GET  HTTP/1.1
Host: www.example.com

web servers would respond with a HTTP/1.1 400 Bad Request.   As a result, browsers HAVE to send the slash when requesting the home page.  If a home page URL, doesn't have the slash, browsers always add it implicitly to the request.  There are no redirects, extra requests, or performance problems involved.
I prefer to use the trailing slash for home page URLs.   Because the slash is required to be sent, the more correct URL for the home page includes the slash.  It also makes the home page URL more consistent with every other URL on your site.  Every URL path starts with a slash.
Other people prefer to leave the slash off their home page URLs. There is merit to the argument that every unneeded piece of punctuation is uglier, hurts user experience, and consumes bandwidth.   Browser URL bars often hide both the https:// and the trailing slash on the home page, showing only domain name to users.
There are no serious repercussions from choosing to use the trailing slash in links to your home page or to omit it.  There are no problems with choosing the trailing slash in some links and choosing to omit it in others.

Trailing slashes matter on subdirectory URLs. There is a difference between example.com/foo and example.com/foo/.   Those URLs are fetched distinctly, could have different content, and would require redirects to canonicalize.   The home pages of your domain and subdomains are the only URLs on your site for which there is no technical difference between the versions with and without the trailing slash.


How to answer Canadian Visa Eligibility question regarding employment?

Question: I'm a non-US student studying in the US (an "international student" on an F1 visa), and would like to apply for a Canadian Visitor Visa (I believe it's a.k.a. a Temporary Visit Visa). I'm going through the eligibility check on their site, and one of the question is whether I have a job. If I'm employed on-campus by my university only, should I respond 'Yes' (this is a yes/no question)? I suspect that I should.
Here's a screenshot of the question:

EDIT: I do get paid for this on-campus employment.
Comment: I don't think on-campus or off-campus matters to that question. You do have a job and you do get paid, I would answer Yes
Answer: You do have a job and you do get paid. End of story. Select 'Yes' and proceed.


What should be minimum deployment target set for iphone application while releasing it to App strore?

Question: Hi I am new to the iPhone App development. Currently I released a small application to App store having deployment version 4.3. But some users are not able to download and install the app due to version compatibility. I searched on internet but I didn't get much solution. Now what version should I set while deployment so that every user can use the application?
Answer: You should set your minimum deployment version according to API methods you use in your app, i.e. if you use methods from iOS 5 SDK and don't make your app backwards compatible (with support for older versions of iOS), you should set min deployment version to iOS 5. How would you care about users who don't have newer iOS installed is another question.
Answer: Deployment target is the minimum version of iOS that is going to be supported by the application. It means iTunes store will allow the users downloading this application having same or higher iOS version on their devices.
To achieve it developer should take care while using the APIs. The API version should not be higher than deployment target iOS version. If you need to use higher API, you should use
[UIDevice currentDevice].systemVersion to check the target device version.
Answer: You should set the Deployment target to that of the lowest OS device upon which you have actually tested that version of your app.  Many developers keep or borrow an old non-upgraded iOS device just for that purpose. Otherwise your customers become your alpha testers.
Answer: go for 3.0 if your code supports that,
maybe that code changes are needed.


How to compare two directories (including sub directories) for differences?

Question: How can I compare two directories with sub dirs to see where is the difference?
Comment: Operating System please.
Comment: Are you wanting to know if there are different files between the two directories or if the contents of the files are different?
Answer: Under Linux:
$ diff -r /first/directory /second/directory

Under Windows: you'd probably better download and install WinMerge, then
> WinMerge /r c:\first\folder c:\second\folder

M
Comment: I use diff -qrl now...
Comment: Is there an option in the GUI to specify the /r switch without using the command prompt?
Comment: @Omtara, after you have started WinMerge, choose File - Open. In the open dialog, check //Include Subfolders//. If you open WinMerge by selecting two folders in the Windows Explorer, configure Shell integration. Open Edit - Options; navigate to Category //Shell Integration and check //Include subfolders by default//.
Answer: Diff is normally used to compare two files, but can do much more than that. In diff he options "r" and "q" make it work recursively and quietly, that is, only mentioning differences, which is just what we are looking for:
diff -rq todo_orig/ todo_backup/

If you also want to see differences for files that may not exist in either directory:
diff -Nrq dir1/ dir2/

You can also use Rsync and find. For find:
find $FOLDER -type f | cut -d/ -f2- | sort > /tmp/file_list_$FOLDER

But files with the same names and in the same subfolders, but with different content, will not be shown in the lists.
If you are a fan of GUI, you may check Meld. It works fine in both windows and linux.
Comment: Very educational and complete answer
Answer: I used meld on Ubuntu - it has a good directory comparison option.
Comment: +1 for meld, normally I like command line options like diff but being able to visually see the actual different folders of two different directories at a glance in such a visual manner is very useful. Both meld and diff still work just fine on Ubuntu 16.04 and Ubuntu 18.04 for anyone else finding this in 2018.

Of course on Windows, WinMerge is a great option. I have heard Meld works on Windows but I have not personally tried it yet.
Answer: Beyond Compare is a good commercial tool, $30 or so. Runs under windows, has an eval version. http://www.scootersoftware.com/
Answer: On Windows, I believe windiff does it, however Winmerge is my tool of choice for this job. It's open source and does a very neat job of comparing two sets of directory trees.
edit: oops, was beaten to it by Marius
Answer: DiffMerge for Windows shows differences including subfolders in a window. There is also a portable version somewhere but a quick search revealed this download: http://www.softpedia.com/get/System/File-Management/SourceGear-DiffMerge.shtml
Answer: I wrote this using the Compare-Objects cmdlet in Powershell:
#set the directories
$firstdirectory = Read-Host "What is the first directory you wish to compare?" $seconddirectory = Read-Host "What is the second directory you wish to compare?"

#Check if the user wants to compare subdirectories
$recursivesearch = Read-Host "Do you wish to compare subdirectories? Please enter yes or no." If ($recursivesearch -eq "yes")

#get the contents
{ $firstdirectorycontents = @(Get-ChildItem $firstdirectory -Recurse) $seconddirectorycontents = @(Get-ChildItem $seconddirectory -Recurse ) }

    else { $firstdirectorycontents = @(Get-ChildItem $firstdirectory) $seconddirectorycontents = @(Get-ChildItem $seconddirectory) }
    #compare the objects and handle errors
if ($firstdirectorycontents.Count -eq 0 )
        {
        Write-Host "No files were found in the first directory, the directories cannot be compared."
        }
        elseif ($seconddirectorycontents.Count -eq 0)
        {
        Write-Host "No files were found in the second directory, the directories cannot be compared."
        }
        else
        {
        try
            {
            Compare-Object -ReferenceObject $firstdirectorycontents -DifferenceObject $seconddirectorycontents
            }

        catch {"Another error occured."} }


For FDA certification hipaa is mandatory?

Question: I am working on a medical device. I want to FDA certification for it.
The device is having ePHI (protected health information).
So is it mandatory to have HIPAA compliance for FDA approval?
Comment: I don't think you will get an answer here. I would contact FDA if they can't give you an answer try contacting U.S. Department of Health & Human Services.
Comment: This link was at the top of my google search for your question: http://www.fdalawblog.com/2013/08/articles/legislation/hipaahitech-compliance-strategies-for-medical-device-manufacturers/
Comment: What research have you done on your question?
Answer: I think the FDA will require HIPAA compliance for any device that uses PHI -- but, as has been noted in the comments to your question, the FDA will be the sole authority on its own requirements. This question-and-answer site is designed to provide helpful guidance -- but what you need is a legal opinion.
That said, even if you find that HIPAA compliance is not mandatory for the device you are working on, your only wise choice is to build on a foundation of HIPAA compliance anyway. This is especially important since you're already working with PHI. (And it would still be important even if you weren't, to allow for growth of your product.)
Comment: You will find the FDA's answer in the link posted by schroeder as a comment to the question.
Comment: The medical device in dealing with PHI but still it is starting phase of this device. I just need to do FDA certification. So is it mandatory to have HIPAA for FDA approval?


Universal character ring for classical groups

Question: The universal character ring for the general linear group is well understood but I want to ask about the universal character ring for the symplectic and orthogonal groups. For the general linear group, it is the projective limit of the system of the graded algebra consisting of symmetric polynomials in n variables.  Please suggests any source where I can read this for the other group in every detail.
I discovered the term 'universal character ring' when I was reading the following paper by
Koike, Kazuhiko; Terada, Itaru, Young-diagrammatic methods for the representation theory of the classical groups of type (B_ n), (C_ n), (D_ n), J. Algebra 107, 466-511 (1987). ZBL0622.20033.
Answer: I suggest the following:
M. J. Newell, Modification Rules for the Orthogonal and Symplectic Groups. Proc. Roy. Irish Acad. 54, 153 (1951),
R. C. King, Modification Rules and Products of Irreducible Representations of the Unitary, Orthogonal, and Symplectic Groups. J. Math. Phys. 12, 1588  (1971).
G. R. E. Black, R. C. King and B. G. Wybourne, Kronecker products for compact semisimple Lie groups. J. Phys. A: Math. Gen. 16, 1555 (1983).


Dart / flutter: download or read the contents of a Google Drive file

Question: I have a public (anyone with the link can view) file on my Google Drive and I want to use the content of it in my Android app.
From what I could gather so far, I need the fileID, the OAuth token and the client ID - these I already got. But I can't figure out what is the exact methodology of authorising the app or fetching the file.
EDIT:
Simply reading it using file.readAsLines didn't work:
final file = new File(dogListTxt);
  Future<List<String>> dogLinks = file.readAsLines();

  return dogLinks;

The dogLinks variable isn't filled with any data, but I get no error messages.
The other method I tried was following this example but this is a web based application with explicit authorization request (and for some reason I was never able to import the dart:html library).
The best solution would be if it could be done seamlessly, as I would store the content in a List at the application launch, and re-read on manual refresh button press.
I found several old solutions here, but the methods described in those doesn't seem to work anymore (from 4-5 years ago).
Is there a good step-by-step tutorial about integrating the Drive API in a flutter application written in dart?
Comment: Please provide concrete information about what you tried and what didn't work with these attempts (code, and error messages)
Comment: You can't use `dart:html` in Flutter. `dart:html` can only be used in browser apps. https://stackoverflow.com/questions/48477625/how-to-use-google-api-in-flutter/48485898#48485898 might help with https://pub.dartlang.org/packages/googleapis
Comment: Please see the EDIT part above: this is already a new approach, which at least builds, but doesn't give any error messages or result either.
Comment: It seems I did get some error after all, and this method can't be used to open remote files: FileSystemException: Cannot open file, path = 'https://drive.google.com/file/d/1UZWDwA2SXnizz__ZodlLp82MQCi1WnvM' (OS Error: No such file or directory, errno = 2)
Answer: I had quite a bit of trouble with this, it seems much harder than it should be. Also this is for TXT files only. You need to use files.export() for other files.
First you need to get a list fo files.
ga.FileList textFileList = await drive.files.list(q: "'root' in parents");

Then you need to get those files based on ID (This is for TXT Files)
ga.Media response = await drive.files.get(filedId, downloadOptions: ga.DownloadOptions.FullMedia);

Next is the messy part, you need to convert your Media object stream into a File and then read the text from it. ( @Google, please make this easier.)
List<int> dataStore = [];
    response.stream.listen((data) {
     print("DataReceived: ${data.length}");
     dataStore.insertAll(dataStore.length, data);
   }, onDone: () async {
     Directory tempDir = await getTemporaryDirectory(); //Get temp folder using Path Provider
     String tempPath = tempDir.path;   //Get path to that location
      File file = File('$tempPath/test'); //Create a dummy file
      await file.writeAsBytes(dataStore); //Write to that file from the datastore you created from the Media stream
      String content = file.readAsStringSync(); // Read String from the file
      print(content); //Finally you have your text
      print("Task Done");
   }, onError: (error) {
     print("Some Error");
   });

Comment: Do you have any other way to get the response because I'm using driveApi v3 version and this line does not work "ga.Media response = await drive.files.get(filedId, downloadOptions: ga.DownloadOptions.FullMedia);" because drive.files.get() returns an Future which could not be receive in a ga.Media type. Is there any other way around this. Anyhelp would be appreciated, thanks
Comment: @Yonkee your code won't work with driveApi v3, will you please update your code, I can't figure out how to solve it please.
Comment: @AbdullahBahattab it works perfectly fine, have you tried replacing `ga.Media` response by `Media media` and `response` by `media`.
Comment: Thank you I have found a solution 5 days ago.
Answer: There currently is no good step-by-step tutorial, but using https://developers.google.com/drive/api/v3/manage-downloads as a reference guide for what methods to use in Dart/Flutter via https://pub.dev/packages/googleapis: to download or read the contents of a Google Drive file, you should be using googleapis/Drive v3, or specifically, the methods from the FilesResourceApi class.

drive.files.export(), if this is a Google document

/// Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.

drive.files.get(), if this something else, a non-Gdoc file

/// Gets a file's metadata or content by ID.

Simplified example:
var drive = new DriveApi(http_client);

drive.files.get(fileId).then((file) {
  // returns file
});

However, what I discovered was that this Dart-GoogleAPIs library seemed to be missing a method equivalent to executeMediaAndDownloadTo(outputStream). In the original Google Drive API v3, this method adds the alt=media URL parameter to the underlying HTTP request. Otherwise, you'll get the error, which is what I saw:

403, message: Export requires alt=media to download the exported
  content.

And I wasn't able to find another way to insert that URL parameter into the current request (maybe someone else knows?). So as an alternative, you'll have to resort to implementing your own Dart API to do the same thing, as hinted by what this OP did over here https://github.com/dart-lang/googleapis/issues/78: CustomDriveApi
So you'll either:

do it through Dart with your own HttpClient implementation and try to closely follow the REST flow from Dart-GoogleAPIs, but remembering to include the alt=media
or implement and integrate your own native-Android/iOS code and use  the original SDK's convenient executeMediaAndDownloadTo(outputStream)

(note, I didn't test googleapis/Drive v2, but a quick examination of the same methods looks like they are missing the same thing)
Comment: How could we use CustomDriveApi. Could you explain it more ?Thanks
Answer: I wrote this function to get file content of a file using its file id. This is the simplest method I found to do it.
   Future<String> _getFileContent(String fileId) async {
    var response = await driveApi.files.get(fileId, downloadOptions: DownloadOptions.fullMedia);
    if (response is! Media) throw Exception("invalid response");
    return await utf8.decodeStream(response.stream);
  }

Example usage:
    // save file to app data folder with 150 "hello world"s
    var content = utf8.encode("hello world" * 150);
    driveApi.files
        .create(File(name: fileName, parents: [appDataFolder]),
            uploadMedia: Media(Stream.value(content), content.length))
        .then((value) {
      Log().i("finished uploading file ${value.id}");
      var id = value.id;
      if (id != null) {
        // after successful upload, read the recently uploaded file content
        _getFileContent(id).then((value) => Log().i("got content is $value"));
      }
    });


Does an iOS app with Sign In with Apple ID work on iOS 12?

Question: I want to know whether an iOS app with Sign In with Apple ID runs on iOS 12 or not.
Answer: Whether an app supporting Sign In with Apple ID will run on iOS 12 or not will depend on how the developers configured it. When building an iOS app, you have to indicate a minimum supported iOS version. Since not everybody will run the latest iOS version, they'll probably specify a lower target, e.g. iOS 10 or 11.
That's not the only thing they need to do; before they call the "Sign In with Apple ID" API, they have to check the current iOS version. If it's older than iOS 13, the API call should be skipped since it's likely to crash the app (the App Store reviewers might even reject it for that reason).
So all in all, it will likely run on iOS 12 as well, but without the feature.


How to run just linux kernel in vmware?

Question: I am VERY new to Linux and am wondering if you can just boot the Linux kernel by itself or does it absolutely HAVE to be apart of an operating system. My reasoning behind wanting to do this is so that I can learn Linux from the beginning, when it first started. I have a copy of the source code for the kernel version 0.01. I want a VERY minimal version of Linux just so I can learn a little at a time. I have messed around with a few distros, but I have not messed with command line.
Comment: Just the kernel will do absolutely nothing for you. If you want to learn Linux from the beginning, have a look at Linux From Scratch
Comment: You have to at least have some program as its `init`, or otherwise the kernel will panic.
Answer: If you actually want to run linux-0.01 (the one circa 1991), VMware may not be the best option (but see below). The VMware, being a high performance "same platform" VM, exposes much less details on the underlying execution context and less opportunities to tweaking it, compared to a full fledged platform simulator, such as QEMU or Bosch.
However, to answer your question directly, here's a ready made VMware image you can boot to make you going.
Also check out Linux 0.00 & 0.11 on Qemu! (there's a link to QEMU image referred).
QEMU, being a true platform simulator, will allow you to easily investigate the working of the internal hardware machinery necessary to make OS run, such as memory paging, protection and interrupts.
Answer: If you are really interested in old Linux versions, and you are using Windows be sure to check out Ancient Linux on Windows.  I've taken the older tool chain of GAS/Binutils/GCC and made them to run under Windows so you can cross compile Linux 0.10/0.11/0.12/0.95/0.96/0.97/0.98 directly on your Windows machine, and included Qemu & a simple filesystem to boot up your kernel.  You can use any Windows based editor to edit files, and recompile from your desktop.  Changes were minimal to the tools, and the Linux build process, and the only changes to Linux I had to do was renaming some files, as .s & .S extensions appear the same on Windows.

How to run just linux kernel in vmware?


How far extra low frequency electromagnetic waves can go away from Sun?

Question: Since ELF EM (3 Hz to 30 Hz) has a large wavelength (100000 km to 10000 km), i was wondering that how far from Sun these waves can go? And if radio waves that are used in mobile communications can pass through walls and buildings, how deep ELF EM can go inside the Earth?
Answer: There are two points to consider. One is whether the waves are reflected from the surface (or at any interface between layers with different electrical properties) and second, how far waves can propagate once inside a partially conductive medium.
The transmission of a certain frequency into a medium is approximately proportional to its impedance. In turn, the impedance is proportional to $\sqrt{f/\sigma}$, where $\sigma$ is the conductivity of the medium. Thus low frequencies do not necessarily help if the conductivity is high. The penetration depth of the wave in a good conductor is approximately proportional to $\sqrt{1/\sigma f}$, so low frequencies and low conductivity lead to larger penetration.
The conductivity of "earth" (typical soil), might be of order 0.01 S/m. Sea water is more conductive - about 5 S/m.
Whether they act as good conductors is determined by the ratio $\sigma/2\pi \epsilon_0 f$. Taking $f=3-30$ Hz, we see that both soil and seawater are excellent conductors at these frequencies.
In those circumstances, the amplitude transmission fraction is aporoximately
$$ t \simeq \frac{2\eta}{377},$$
where 377 Ohms is the vacuum impedance and $\eta \simeq \sqrt{2\pi f \mu_0/\sigma}$ is the impedance of the medium. So the transmission fraction is much less than 1 percent for both these materials.
Once in the medium,  the signal fades exponentially, with a penetration depth (where that amplitude falls by $1/e$)  given approximately by
$$ d = \sqrt {\frac{2}{2\pi f \mu_0 \sigma}}$$,
which is 1-3 km for soil and is 40-130 m for seawater.
Thus my answer would be, most of the waves are reflected, but for those that penetrate, the depth reached is a few km if not in the ocean and a few hundred metres in the ocean (and indeed ELF is used for communicating with submerged submarines).
A second part to your question concerns propagation of waves through space.
Here, the relevant point is whether the wave frequency is above or below the plasma frequency
$$\nu_p = \left( \frac{e^2 n_e}{4\pi^2 \epsilon_0 m_e}\right)^{1/2} = 9000 \left(\frac{n_e}{{\rm cm}^{-3}}\right)^{1/2}\ {\rm Hz},$$
where $n_e$ is the electron number density and $m_e$ is the electron mass. If waves have a frequency below the plasma frequency then they will be reflected.
The value of $n_e$ varies considerably from place to place. In the solar corona, typical values are $n_e \sim 10^{5}$ to $10^{6}$ cm$^{-3}$. This means that ELF waves generate by the Sun will not propagate through the coronal plasma. In addition, the electron density in the ionosphere of the Earth is typically of the same order of magnitude. So ELF waves from outer space will not penetrate the Earth's ionosphere.
Even should the ELF waves be produced near the top of the corona, they will not propagate through the solar wind. The electron density falls with distance from the Sun, but is still $n_e \sim 100$ cm$^{-3}$ at the orbit of the Earth, giving a plasma frequency of 90 kHz.
Comment: Quick note:  The typical total electron density near Earth is between ~5-13 $cm^{-3}$, not 100.  Thus, the typical plasma frequency near Earth is ~17-43 kHz, not 90 kHz.
Answer: I just want to comment on one point and this probably will not answer your question completely. LF frequencies correspond to very large wavelengths such that LF waves have wavelengths that match the geometrical extent of vertical refractive distribution of the atmosphere. This provides the travelling LF wave to couple to the surface (does not travel straight out to open space) and travel far distances with almost no loss. They are observed to travel round and round around the world. So, LF wave propagation is known to have small propagation loss for this reason.
However, you are talking about LF waves originating from the Sun at open space. I believe it is different and you should not assume the waveguide coupling advantage of the atmosphere to be valid in space. I hope this helps.


Setting up two 2.1 speakers sets as a 5.1 system

Question: I have two sets of Logitech Z313 (as well as another pair of speakers from before). Each Z313 has a sub-woofer and two speakers. Is there a way I can set these up to make a 5.1 system or something similar?
Comment: Do you have an audio card? Laptop or Desktop?
Comment: The one integrated on the motherboard and It's a desktop
Answer: From what I can tell, the z313 just connects to the main audio out port on a PC, and the subwoofer signal is derived from what it gets there.
If you are using this with a desktop that has 5.1 ports or more, ie one port for front speakers (green), one port for rear speakers (black), and one port for centre/subwoofer (orange), then yes.
You can connect the second set of speakers to the rear speaker port, usually coloured black.
Then you just need to go to the sound settings in Windows and let it know you have rear speakers.
Comment: Ok that worked one more question could I possibly get the same sound to come out in all speakers because apparently this will only work if it's 5.1 encoded.
Comment: @Supremekhaoz This answer might help: http://superuser.com/questions/96796/use-all-5-1-speakers-with-a-2-1-audio-source


Default gateway of host connected to two routers via switch

Question:
I wanted to make this network fully connected, so I need to assign IP addresses to all interfaces of routers and to all hosts. However, I should assign a default gateway address to every host, but, how am I supposed to do that for PC0 host, as it is connected to switch, and the switch is connected to two routers, is this maybe a situation where default gateway is not required? Or is there something else that I should do here? Any help appreciated!
Comment: Have you tried VRRP? It is a first hop redundancy protocol.
Comment: Hello 22 and welcome.  VRRP won't help here, as there are no redundant paths.  The question is about what happens with a single default route on PC0, which sends some packets non-optimally.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
Answer: Because you have not a star-shaped network, you have to define a route to reach each network.
Your routes can be :
192.168.2.0/24 via 192.168.1.254
Default via 192.168.1.253

or
192.168.2.0/24 via 192.168.1.254
10.0.1.0/30 via 192.168.1.253
192.168.3.0/24 via 192.168.1.253

or
Default via 192.168.1.254
10.0.1.0/30 via 192.168.1.253
192.168.3.0/24 via 192.168.1.253

Depending on what part of your network you consider as "outside" from PC0.
The other solution is to connect PC0 to 192.168.1.0/24 via a router and set default route to it and theses routing tables will be on this router.
Comment: @redheness no, this is what ICMP Redirect is for.
Comment: @cdummie, there is a section in [this two-part answer](https://networkengineering.stackexchange.com/a/53994/8499) titled _**Selecting an IPv4 Network Gateway (Router) Address**_.
Comment: Ok, i created routes, but i asked about default gateway of host PC0, i think i figured it out, i set Router2 to be default gateway for PC0, so even when i am trying to reach network on the right side, Router2 will recognize that it needs to send packet to the Router0 if i create correct static route, ofcourse i could do vice-versa. I hope that this makes sense.
Comment: Yes, assign to PC0 a default route to one router will work and you will be able to reach the whole network. But this is clearly not a good way to reach a network because sometimes your packet will pass trough 192.168.1.0/24 network two times. Is this an exercise from studies or personal to learn about routing possibilities?
Comment: I do study computer networks, but this particular network i created by myself to practice a little bit, to see what kinds of things can happen with various configurations. Ok, so my idea will work, but it is not good in practice, so what am i supposed to choose for default gateway of my PC0 host?
Answer: You say you "should assign a default gateway address to every host", but there is no requirement to do this.
Instead, a host only needs to have routes for every host it needs to connect to.  In your particular network, there are 10 IP addresses (assuming a management address for the switch).  Which means that the host PC0 could have nine host routes and no other routes at all.  Or alternatively any method of aggregating them, as suggested in the other answer.
A host only needs a default route if it needs the potential to send packets to every host in its network.  Of course, most hosts are in the internet, and so the number of potential hosts is enormous, so we make use of default routes.
In your particular network, you could put a default route on PC0 to one of its two connected routers, and have that router forward if it has a full-enough routing table.  This is often considered bad routing as it's certainly non-optimal for the packet.  But it's sometimes seen in networks where simplicity of management is more important that packet efficiency.
It's worth noting that the "core" of the internet is widely considered to be the "default-free zone": a subset of the internet where no router has a default route.  Instead, they have routes to every known public network.  (And, it can be assumed, the private networks of their operators.)  Wikipedia article.
[EDIT]
There are a couple of questions overlapping here.

Default routes are not in themselves important: what's important is whether the routing tables of the devices have routes for everything, and whether they are good routes.
It's uncommon for end-user computers to have more sophisticated routes than simply a single default route, typically acquired by DHCP.  It's very common for routers to have complex, often dynamic, routing tables.

If your constraint is that PC0, 1 and 2 have only a single default route, and the routers have the minimal number of routes, then the usual way is to ensure that all routers have full connectivity for all addresses of interest.  Then point all hosts at any locally attached router.
There are a lots of ways of solving the routing for the three routers in a row, but here's one of the simplest.
R0: 192.168.2.0/24 -> R2,  192.168.3.0/24 -> R1, no default route
R1: default -> R0
R2: default -> R0

(In the actual routes, you need to use the near-side IP address of the router.  I'm using the names just because it's easier to read.)
Additionally, all three routers will automatically have two interface routes, one for each of their enabled interfaces.  (Ie, they know their local routes.)
Two end-hosts are have only a single choice:
PC1: default -> R2 # your PC and router names are funny way round
PC2: default -> R1

The last one is where the question is.
Unless we put suitable multiple routes on PC0, some of its outgoing packets will go the "wrong" way.  Eg, with default -> R0, a packet from PC0 to PC1 will go PC0->R0->R2->PC1.  This is perfectly fine from the point of view of the packet: it gets to where it's going, albeit a little slower than if it went directly.  When a router notices it has a sent a packet out of the same interface as it arrived on, it will normally issue an ICMP Redirect message, to tell the sender that a better route is a available.  In this case it's R) telling PC0. PC0 can ignore this ICMP if it chooses, or use it to learn a new route.  Be aware that many PC operating systems won't learn new routes by ICMP as this is a vector of attack; also, many routers have the ICMP redirect messages disabled.
If you put the default route on PC0 to the other router, the behaviour is symmetric.
Comment: Can you explain what exactly do you mean by "you could put a default route on PC0 to one of its two connected routers, and have that router forward if it has a full-enough routing table"? Are you trying to say that i should create default route to the network with PC0 so that whenever Router0 cannot determine where to send packet, it just sends it to the PC0's network? I don't understand how that can make this network completely connected? How will PC0 know where to send out packets when i want to send something from him to somewhere else in the network?


How might Thales have predicted a solar eclipse?

Question: Thales of Miletus purportedly predicted a solar eclipse (most likely the solar eclipse of May 28, 585 BCE). The historicity of Thales' prediction can't be verified with any certainty given the sparsity of written records documenting the pre-Socratic era that have survived to present day. So, putting the historical question of whether or not he did aside, what plausible answers are there to the question of how he could/would have made such a prediction?
Answer: I recently read the relevant parts of the Cambridge Concise History of Astronomy and I'd suggest it was partly good observation, partly luck.
Good observation in that Thales would have noted that the movements of the Sun and Moon were such that eclipses were possible on certain dates, and luck in that the shadow of the eclipse he suggested was possible passed over him or those to whom he had suggested the eclipse took place.
I very much doubt he had the observational data (about the size of the Earth for instance) to have been precise about the shadow path - but would have had the data to show when the Sun and Moon were in alignment.
Answer: Lunar cycles were known at the time, but not eclipse cycles. Those were only discovered a few centuries later—it's not obvious if it's by the Greeks or by the Babylonians. One way or another, it is reasonable to say that Thales could not have guessed that there would be an eclipse at a given time—except maybe in a year and not to a precise day.
The situation has been detailed by Panchenko 1994. While his conclusion that Thales predicted an eclipse in 582 BCE instead of 585 or 584 BCE is doubtful, he does raise a few issues that make it unlikely that Thales really did predict an eclipse, and that the tale may have been "embellished" by historians, even back then.
Comment: Thank you for your response. I look forward to reading Panchenko.


Magento2 : Committing vendor folder in Git Repository

Question: Is it good practice to push vendor folder into git repository?
Is there any pros and cons of it?
Comment: bad prcatice, you can commit composer.lock only instead of all vendor
Answer: That depends on your deployment strategy
For instance, we never run composer in staging or production servers, so any composer update or install of new packages are always done in developers local environments
Under a scenario like ours, vendor folder is included in git repository. We included app/etc/config.php file also. I posted a similar question some time ago. You can read there Magento2 - local / staging / production deployment & gitignore about other approaches, involving some interesting tools
Answer: One of the ideas presented that works is to commit the entire vendor directory and make the changes to the file and commit to the repo. Lets analyze this for a moment. It works and on deployment the vendor directory will be pushed with changes, Yet the git repo has all the files from vendor in it.
Ideally this should be excluded and composed as part of a build. Also if we run a composer update then there is a chance that unless we ping our composer versions the changes just get nuked every time. There feels like a potential for merge conflicts on changing packages and its just another area of the project that ideally we use composer to manage.
More detail refer link


OAuth2 - What is the advantage of using certificate over client secret credentials? (Azure)

Question: When using OAuth2 in Azure, why Certificates are more secure than using Secrets?
The Secrets have expiration and are strong, and generated automatically.
The application needs to send a JWT containing a x5t header with the thumbprint of the Certificate.
The Certificate is stored in Azure.
After OAuth2 is concluded, Azure returns a Token to the application.
If an eavesdropper steals the JWT (with the fingerprint of Certificate) isn't the same stealing the Secret?
Answer: This is a slightly generic answer as I'm not super familiar with Azure in particular.
Shared secrets are worse than public key authentication in a few ways.

They're static / persistent. If an attacker sees one once, they have it forever (until rotated). By comparison, public key auth relies on signing random and/or limited-use values (a JWT is limited-use; once it expires, there's no way to generate another without knowing the key used to sign it) so you're fine as long as the private key isn't lost. Even if the private key is lost, certificates have expiration dates and a standard revocation mechanism.
They may be exposed to the wire, if sent directly e.g. as a Bearer token. Somebody who successfully attacks the system anywhere from your client app, through your client host, the network, the server, or the server app, can steal secrets found in the message. By comparison, private keys never leave the hardware they're generated on (which might not even be a computer, per se, but rather a hardware security module). The public key is sent over the wire, but this is not a security threat; it is, as the name says, public.
They're known to the server. That is, the server either needs to know and store in plain text (or under reversible encryption) the actual secret if used for HMAC or similar, or can store the secret hashed but receives it in plain text (once unwrapped from TLS) with every request. Either way, an attacker who compromises the server (or in some cases just its database) gets all the secrets in active use. By comparison, with public key auth, the server (and therefore the attacker) only ever knows the public keys (not sensitive) and the values being signed (ephemeral, often single-use), not the private keys that constitute the actual persistent secret.

Note that there's a bunch of ways to use both static secrets (API keys, passwords, HMAC signing keys for JWTs or AWS SigV4, etc.) and public keys (TLS client certificates, SSH public key authentication, asymmetric digital signatures on JWTs or payloads or full messages, etc.).
Now, API keys / secrets aren't always worse in all ways. They're faster to use than digital signatures, so the latter pose a small denial-of-service risk. They are usually shorter, which saves some bandwidth. They are far more secure against some theoretical attacks like quantum computers. There are fewer "gotchas" for an implementation to get wrong.
However, when it comes to the simple question of which is a more secure method of authentication today, I'd go with public keys (whether in a certificate or not) all the way.
Comment: thanks CBHacking, I was very brief in the question, I edited the question.
Answer: I Finally understand the process.
Certificates are generated by an Authority (official CAs).
Certificates can also be generated by an entity (self-signed).
The entity has data in Azure and sends the Certificates to Azure AD.
There are hardware devices that store private keys and can generate JWTs.
Daemon or Webapp must have JWTs probably generated by the entity or device.
Whoever generates JWTs needs to have the private key, so it can't be the Daemon/WebApp (the Server where it resides).
Obviously Daemon/WebApp doesn't have access to Private Key, Certificates, Data in Azure, it will request access to it.
These JWTs are short-lived.
If someone steals the JWT will have a little time to gain an Access Token.
When using Secrets the expiration time is generally much longer, and it's possible to gain access to Secrets viewing the Azure Dashboard, with Certificates it isn't possible.


I can't connect to an instance of SSMS from other servers SSMS

Question: I can log in to the server and connect to the instance of SSMS in the server but I can't connect to the same instance from other servers using ssms. how can I fix this?
Comment: What error are you getting? What user are you using to connect to the SQL Server instance from SSMS on the host server and what user are you using to connect from SSMS on the other servers? How is security set up for this (these) user (users)?
Answer: Start by making sure that your Firewall isn't blocking incoming connections to port 1433 (if this is a default instance installation). Check both the Windows Firewall and also the settings on your network firewall ( if you have one configured ).
Also make sure that remote connections are enabled to the SQL server (in SSMS, right click the instance -> Properties -> Connections -> Allow Remote Connections to this server)


Which photo type I should select in a photo booth for a Schengen Visa?

Question: I live in the UK. Photo booths propose different types of photos and it's often unclear which one is the most suitable for passport or - in my present case - Schengen Visas. Which photo booth option should I pick?
Comment: What are the choices?
Comment: Common they mention that in the photo booth. If doubts still persist take the 5 for 5 option.
Comment: If you're not sure, it's normally much safer to go to a professional photographer. They don't charge that much more than photo booths, and will know the rules / know how to interpret the rules to get you the photo you need
Answer: If in doubt on visa photos, by far and away your best bet is to find a real photographer
In my experience, they really weren't very much more - last time I had some unusual visa photo requirements I paid about 1.5 times the cost of a photo machine
You either need to go to a camera / photography shop, or a dedicated photography studio
In this case, you won't be dealing with an unhelpful machine, you'll be dealing with a person. You can talk with them about the requirements, and if needed they can look them up. They will understand the rules, and will take photographs to suit those rules. If needed, they'll retake them. After that, they'll print them at the right size.
Yes, it takes a bit longer than going to a passport photo machine. Yes, it costs a little more (1.5x in my experience) than a machine. However, you're dealing with a real human who does this a lot, who understands the rules. They'll help you get it right, and right first time.
The time and money you spend will be dwarfed by what you'd have to spend if the passport photo machine got it wrong! So, for simple normal stuff, machines are fine. For anything unusual/complicated, pay a tiny bit more, and have a friendly photographer sort it all for you in person!
Answer: If I am to spell it out in numbers, the Schengen visa photo is supposed to be 35 mm in width, 45 mm in height, and the length of the face should lie in between 32 mm and 36 mm. This is my reference: http://www.immihelp.com/visas/schengenvisa/sample_photos_germany.pdf
I went to a local pharmacy near me, with a print-out of the above document and the photographer there returned with photos in which the length of my face was less than 32 mm. Thankfully he was courteous enough that he redid the whole batch, this time complying with all the rules.
Coming back to your specific case, how much control do you have over the booth? I don't know much about photo-booths in the UK but if you are able to control it to get the results which satisfy the given specifications, then I guess the booth can work just as well as any other option. You can even cut the photo to the right size given that you get the size of your face correct (say in a larger-than-necessary photo). That's what my photographer did anyways.


Polarity and solubility

Question: I have a doubt about solubility: a molecule is polar when it has a dipole moment that is ≠ 0. Very often it is said that like dissolves like, that is, that polar substances dissolve in polar solvents, and apolar substances dissolve in apolar solvents. But this is not always true: for example, 1 - hexanol is polar (its dipole moment is ≠ 0), but it is not soluble in water.
This means that polarity does not imply water solubility.
That said, what do you rely on to roughly predict solubility?
Comment: Also organic substances are better dissolved in organic solvents and water definitely isn't  a organic solvent.
Answer: Being polar in context of whole molecules or chemical bonds means rather significant than nonzero dipole moment, while nonpolar means rather small than zero dipole moment.
Comparing dipole moments makes sense for molecules of similar sizes. Consider there are polar=hydrophilic atomic groups and nonpolar=lipophilic atomic groups. Dominating group characters determines overall hydro/lipophility of molecules.For n-alkanecarboxylic acids, hydrophilic group is the same, but there are growing lipophilic n-alkyl chains, progressively turning character from hydrophilic (formic acid) to lipophilic (stearic acid).

A dipole moment does have the strong chemical meaning, but it cannot be taken mechanically as the only decisive parameter. One has to consider the molecular context. You may think about nonpolar parts of molecules to be effectively attracted to nonpolar solvents while polar parts to polar solvents. With the polar part attraction significantly stronger, so nonpolar lipophilic parts must be bigger/longer to get to fuzzy boundary between lipophilic and hydrofilic overall behaviour. CO2 has zero dipole moment, but has symmetrical polar bonds, so it has quite good water solubility.
Comment: so, generally, it is correct to evaluate the ratio between polar and non-polar fractions in a molecule. With this, It Is possible to evaluate if a molecule is effectively polar or non polar and where It Will be soluble. This is regardless of the presence or absence of a dipole moment, which is probably more important for estimating the polarity/solubility of small molecules, such as chloroform, water, carbon dioxide or CCl4, etc..
Comment: @Luckenberg It can have a polar end and a nonpolar end, like classical soap, or most of surfactants.
Comment: What are you referring to? (In relation to my comment).
Comment: @Luckenberg "...It Is possible to evaluate if a molecule is effectively polar or non polar..."
Comment: oh sure, we have to evaluate the balance between polar and non-polar Groups in a molecule. So, does what i wrote in the comment above make sense (more or less)?
Answer: The longer the chain of carbon atoms, the less influence on polarity the alcohol moiety has. Methanol, ethanol, and 1-propanol are all miscible. 1-butanol is soluble ~70g/L, 1-hexanol: ~6g/L and 1-heptanol: ~0.1 g/L.
Each additional carbon link in the chain reduces solubility by a factor of more than 10.
However, add some more alcohol groups, and solubility increases. For example, 1,3-butanediol is miscible with water, and 1,6-hexanediol is soluble at 500g/L.
Comment: The diols with alcohol groups at both ends have negligible polarity, but are more soluble than those with single alcohol group... Your conclusion seems reasonable.
Comment: So polarity does not depend (exclusively) on the dipole moment of a molecule, but more on the number of polar groups that appear in it and, therefore, more on the ability of the same to form hydrogen bonds?
So, a molecule can have a dipole moment = 0, but still be water soluble (and polar). Probably the dipole moment has a more "physical" than "chemical" meaning (?)

Polarity and solubility


Develop Singing and playing skills

Question: I've reached a point where I need to sing so I can enjoy my guitar journey. My problem is I feel my voice isn't good enough and to coordinate both singing and playing is still an issue unless I'm singing along with chords and lyrics of a song, mostly covers by some other guys. How do I develop independence so I can sing on my own?
Comment: By "singing along with chords and lyrics of a song, mostly covers by some other guys", do you mean karaoke or that you're playing the chords?
Comment: Practice practice practice.  Write your own songs tailored to your range and how you want to sing.  Transcribe the covers you are playing.  Try putting a capo at the third fret.  When you get stuck in a rut, sit down and play a few chords at the piano.
Comment: I go to YouTube and search a song which has transcribed lyrics and annotated chords in specific lyrical lines
Comment: I still don't understand "unless I'm singing along with chords and lyrics of a song..." Are you trying to distinguish simple chord strumming with other guitar technique like fingerpicking while singing? Like CCR Have You Ever Seen The Rain versus The Beatles Blackbird.
Comment: @MichaelCurtis, it's a little easier to sing along when I'm watching cover on YouTube which has lyrics and chords.
Answer: The process you have to go through is very hard, like automatisation of driving a car, like the independencity of the hands and fingers when playing piano.

Try to hum along the melody when playing guitar (the guitar playing must be on a high level.
Sing the song with lyrics only clapping with your hands (this will already be  a pretty effort!)
Sing along with the Guitar accompaniment only strumming the strings.
Sing also off-beat and in  free rhythm (groovy) when strumming on the Guitar.
Try to sing with finger picking and arpeggio accompaniment (humming and then with lyrics).
Answer: I know it might not be what you want to hear, but all it takes is practice. Every musician goes through a phase of being bad at something until they break through it with practice. Just never give up, and you'll be where you want to be.
Comment: I would add that if you get frustrated, stop. Do something else with guitar and/or singing that you have already succeeded with. Then return later in the day, or the next day, to the frustrating exercise. Your progress this way will be faster and more enjoyable than grinding away without success.
Comment: Yeah. Getting frustrated makes you play worse. Taking a break doing something else, even on your instrument, is very important.
Answer: You say you can sing and play at the same time when doing covers. Maybe this means that you're simply more familiar with the covers than with your own songs, and just need to keep playing them more?
Also, "my voice isn't good enough" is somewhat a different issue. If you mean "I can sing with a projection and tone that I like when I'm not also playing," then that makes sense, and will benefit from all the exercises Albrecht suggests. If you just mean that you don't like your voice in general, then feel free to seek improvement and growth, but you might also need to simply learn to love your own voice. I would argue there's no such thing as "not good enough"; it sure never stopped Bob Dylan! Every voice is distinctive, and finds its own audience. No harm in cultivating and training your abilities, but at some point, your own sound is the product of the vocal cords, lungs, and sinuses you were born with, and your commodity is yourself.
Answer: If you don't manage to play guitar and sing at the same time with the songs you're currently trying, try it with simpler songs. If it still doesn't help, try it again with even simpler songs.
If it's a song with only 1 or 2 chords, and simple strumming on each beat, so be it!
You'll have plenty of time to try more complex songs once you master the easiest ones.
The first song I played and sung at the same time was from Juno soundtrack : "Anyone else but you", with G and Cmaj7 chords.
You might find that some complex songs are somehow easier for you than for other people, so keep on looking for songs that seem natural to you! There are many songs which have distinct rhythms for guitar and lyrics, and it's a real struggle to play them (e.g. Alabama Song - The Doors, Forever - Ben Harper, or Do I wanna know - Arctic Monkeys).
Answer: Singing loudly in a large space where you want to make yourself heard is much, much easier than singing quietly in a confined space where you don't want to disturb the neighbours. Even in performance conditions, singing quietly is much harder than singing loudly. That's because to sing well, you need to breathe deeply, and it's much easier to control the flow of air when you're projecting your voice well. The problem if you "think your voice isn't good enough" is that it probably means you are trying to make sure you aren't overheard, which is the opposite of what you should be aiming for.
Another problem might be that you're recording yourself and listening to the recording. If you have a sensitive ear, you're almost certainly going to hear that your voice wasn't very accurately pitched. But that can lead to a spiral of decreasing confidence. A singing teacher would work on your pitch by working on your posture, your relaxation, and your confidence, not by telling you you're getting it wrong. They would also work on exercises explicitly designed to improve your pitch, for example by modifying the vowel sounds. It's hard to replicate that if you're working on your own.
My advice would be, don't do this on your own. Sing with others, ideally with a teacher, in an environment where you can make a noise and not be embarrassed by it.
Answer: I wasn't making much progress on singing until I started working with a teacher.  But it must be the right teacher.  If you want to sing pop music and your teacher wants to teach opera, that's not going to work.
Also, my teacher had to struggle to learn how to sing.  It didn't come easily to him at all.  Someone like that will be much more understanding of your difficulties with the basics.  That was just what I needed.
You may have to try several teachers before you find one you like, and where you feel you are making progress.

Develop Singing and playing skills