Sufficient condition for lines in triangle to be altitudes

Question: It is known that if point $D$ is the orthocenter [the uniquely determined point of intersection of all altitudes] of triangle $ABC$ then the following holds:
$$BD\cdot DE = FD\cdot DA = GD\cdot DC \tag{1}$$
Now, let $GC$, $AF$ and $EB$ be some lines that intersect at common point $D$ and let $(1)$ also be satisfied. Is it sufficient for $D$ to be the orthocenter? Equivalently, are the lines through $A, B, C$ perpendicular to their respective opposite sides?
Answer: It helps order things in the mind if the naming is consistent -- starting ordering with the triangle vertex we are given
$AD \cdot DF = BD \cdot DE = CD \cdot DG$ in triangle $ABC$.
Doing some dividing, we see  $AD/DE = BD/DF; AD/DG = CD/DF ; BD/DG = CD/DE$.
Then we have a bunch of vertically opposite angles.
$ \angle ADE = \angle BDF,\ \  \angle ADG = \angle CDF,\ \  \angle BDG = \angle CDE$.
So we have a lot of similar triangles.
$ \triangle ADE \sim \triangle BDF,\ \  \triangle ADG \sim \triangle CDF,\ \  \triangle BDG \sim \triangle CDE$.
Then we have a lot of equal corresponding angles
$\angle AGD = \angle CFD,\ \  \angle AED = \angle BFD,\ \  \angle BGD = \angle CED$
PLEASE NOTE:
Correction: I made an unjustified assumption and hurried to the conclusion here. Please OMIT the part below between the ********* lines, and instead as in comments below work with supplementary angles and an easy chain of equalities:
After proving $ \angle AGD= \angle CFD, \angle AED=\angle BFD, \angle BGD=\angle CED $
Then as supplementary angles  $ \angle AED +\angle CED=180; \angle BGD+\angle AGD=180; \angle CFD+\angle BFD=180. $
$\angle BFD =  \angle AED =180 -\angle CED = 180 - \angle BGD = \angle AGD = \angle CFD $ and BFC is a straight line so $\angle BFD = \angle CFD = 90$  And similarly for the other two sides of the triangle.

OMIT below
Pairs of these are opposite angles in quadrilaterals so must sum to 180 degrees.
$ \angle AED + \angle AGD = 180; \ \  \angle BGD + \angle BFD = 180; \ \ \angle CED + \angle CFD = 180.$
Suppose $\angle ADE = \angle BFD < 90$ Then by the above sums $\angle AGD = \angle BGD > 90$ which is impossible since AGB is a straight line. Similarly these angles cannot be $>90$. We can work similarly around all three sides of the triangle.
OMIT above

$\angle AGD = \angle CFD = \angle AED = \angle BFD = \angle BGD = \angle CED = 90$
and $AF, BE, CG$ are all altitudes as required.
Comment: @AlvinLepik There is one important detail in this proof that is not quite right. In general,  pairs of opposite angles in quadrilaterals do not sum up to 180. It happens if and only if the quadrilaterals are inscribed in circles. one has to prove that.
Comment: Thank you for your answer. We can also arrive at desired result directly
$\alpha :=\angle AGD = \angle CFD,\ \  \beta :=\angle AED = \angle BFD,\ \  \gamma :=\angle BGD = \angle CED$. We know $\gamma + \beta = \gamma+\alpha =\alpha+\beta =\pi$. It follows that $\alpha = \beta = \gamma =\pi /2$
Comment: Well yes, but first *how* do you know $\alpha = \angle AGD = \angle CFD$ etc.?
Comment: I was thinking of an alternative conclusion also. After proving
Comment: Sorry, timed out. After proving
∠AGD=∠CFD,  ∠AED=∠BFD,  ∠BGD=∠CED

and
∠AED+∠AGD=180;  ∠BGD+∠BFD=180;  ∠CED+∠CFD=180.

Then $\angle BFD + \angle CFD = 180$

So with a little add and subtract and substitution we get  $\angle BFD = \angle CFD  = 90.$
Comment: True, should have proved that. Next time.
Answer:
The identity $BD \cdot DE = FD \cdot DA$ holds if and only if the four points $A, B, F$ and $E$ lie on a common circle, call it $g$. Analogously, $FD \cdot DA = CD \cdot DC$ holds if and only if the four points $A, C, F$ and $G$ lie on a common circle, call it $e$. By the same argument the points $B, C, E$ and $G$ lie on a common circle $f$.
Observe that in circle $e$ the following angle equality holds
$$\angle \, FCG = \angle \, FAG = \angle \, FAB$$
In circle $g$ the following angle equality holds
$$\angle \, FEB = \angle \, FAB$$ Therefore $$\angle \, FCD = \angle \, FCG = \angle \, FEB = \angle \, FED$$
Therefore the quad $CEDF$ is inscribed in a circle so $$\angle \, DEC = 180^{\circ} - \angle \, DFC = \angle \, BFD = \angle \, BFA$$ Hence $$\angle \, BEC = \angle \, DEC = \angle \, BFA$$ However in circle $g$
$$\angle \, BEA = \angle \, BFA$$
so $\angle \, BEA = \angle \, BFA = \angle \, BEC$ and since $E$ lies on the line $AC$, the identity $\angle \, BEA =  \angle \, BEC$ implies that $BE$ is orthogonal to $AC$.
Analogously, one shows that $AF$ is orthogonal to $BC$ and $CG$ is orthogonal to $AB$.


How do I add jQuery Mobile.js?

Question: I'm attempting to add jQuery Mobile.js to handle the vclick event.
What would be the easiest way to add this functionality for an administrator that is new to jQuery?
Answer: There are jQuery Mobile module and Mobile jQuery Theme available. Looks like exactly what you wanted.

The Mobile jQuery Theme is a powerful theme built on the jQuery Mobile platform. The theme adapts some of Drupal's base output to work with the highly themable designs built into the framework.

This is an enhancement module for the Mobile jQuery Theme. You can also hook into the module with you own theme if desired.

So you have the module to provide functionality you need, and theme you can use by creating subtheme, or as a reference.

How do I add jQuery Mobile.js?


Possible to charge one phone off another?

Question: What's stopping the ability of charging a cell phone from another cell phone? If I were to create a crossover/patch USB cable and connect it between two phones or tablets, would there by any way to have one of their USB ports provide a charge to the other?
Comment: Diodes. Or MOSFETs.
Comment: Anything is possible
Answer: Most phones are USB Peripherals (Slaves). They do not provide power on the USB VCC pin. So it won't work at all that way.
Some phones have USB OTG capability. They can provide power over the usb pins, like a host. Some need to be hacked/modded/rooted to do this. Even then, some phones need power injector cables because they can only do OTG data, not provide power.
Mostly, it's very impractical to rely on. Just get a usb portable battery pack.
Answer: Most phones are not designed to output power on the USB power pin.  Even if the USB power pin on the donor cell phone has *some connection*** to the battery, most phones use single cell Lithium battery, which works around +3.7V.  USB power is +5V.  The recipient cell phone expects +5V.
** through body diodes of the MOSFETs in the charger, for example
To provide +5V to USB OTG (see the post by @Passerby in this thread), the cell phone would need a step-up converter to boost from +3.7V to +5V.  It's possible to have a +3.7V to +5V boost converter in the "transfusion cable", though.
In any event, the success of the "transfusion" would depend heavily on the design of the battery charge controller in each particular cell phone.  Such charge controllers are not obligated to follow a standard (such as USB).  There is no guarantee that the USB power pin on the donor cell phone will be "back-powered" from the battery.
Answer: It depends on the connection cable.
I coupled following two OTG enabled devices to test charging one phone with other.

Xiomi RedMi 4 (Android v6.0.1 Smartphone, 4100mAh Li-Polymer battery)
Lenovo A3300-HV (Android v4.2 Tablet, 3500mAh Li-ion battery).

OTG of both devices works fine with SanDisk 16GB pendrive.
I used one micro USB male to OTG female converter (Which we use to connect pen-drive with phone, I'll say it OTG cable) and one USB male to micro USB male converter (Ordinary data cable, I'll say it Data Cable). Any one of the android device was connected to OTG cable and the other was connected to Data cable. The female socket of OTG cable was connected to male socket of Data cable.
I found the device connected to Data Cable is always sucking power from the device connected to OTG.
When The Lenovo tablet is connected to OTG Cable and Redmi 4 is connected to Data cable, I found the Redmi 4 is sucking charge. While the same Redmi 4 is connected to OTG and Lenovo one is with Data Cable, the Lenovo is sucking charge from Redmi 4.
So, my conclusion is the microUSB to USB connection is not one-to-one. It do some voltage and signal conversion to make one device charge source and other chargeable. I'm not really very clear about this point.
I can't say what happen in case both the device are directly connected using a microUSB male to microUSB male cable. But I expect such cable must have some functionality to mark devices connected to one side as source and other side as peer.
Comment: Wow, awesome experiment! Very interesting! I wouldn't have thought. I wonder if it has to do with the arrangement of wires/pins, sort of like an ethernet cable (although most NICs are able to auto-detect and "switch" wires/pins electronically within the card itself). Anyway, very cool, thanks for sharing.


When should I buy airplane tickets to St. Lucia (from US)?

Question: I checked both Bing and Google travel, and the only flights I can find from the Washington DC area to St. Lucia in November of this year go through Spain and take 24+ hours. I'm not sure how often flights change to SLU, so should I wait for something more direct to crop up or just go ahead and book it?
Comment: @MarkMayo I do not think this is a duplicate since it's not about the price but about more direct flights being available.
Comment: possible duplicate of [Flight tickets: buy two weeks before even during holiday seasons?](http://travel.stackexchange.com/questions/2952/flight-tickets-buy-two-weeks-before-even-during-holiday-seasons)
Comment: @uncovery - really? I can sort of see how you get that from the content, but the title seems pretty clear that it's asking when to buy?  Price is a reflection of availability, as well, no? Arnold - perhaps you can clarify?
Comment: @MarkMayo This is definitely not a duplicate of the question you mention. The problem is a bit different. Read the question and read Nate Eldredge's answer and you will understand. If not, come back and I will try to explain.
Answer: I am not sure why you could not find any flights. There are obviously regular flights from US destinations arriving in St.Lucia.
Checking on one of the arriving airlines, AA, I went to their site directly and tried to book a flight in November, and got tons of results. Maybe you want to try that way instead of going through Bing or Google.
In general, when booking in holiday seasons, you might find more packages that are offered together with the hotel, since a lot of agents might book bulk-seats with bulk-hotel beds and sell them together. The longer you wait, the less non-package airline seats will be available.
Comment: your second link is cookies based, so just comes up as an expired error page for us :/
Answer: I think in your case two elements are playing and the crux is not really when to book.
First of all, as already pointed out by Nate Eldrege, you probably searched with the "wrong airports". Saint Lucia has more than one airport and so has Washington DC. If you pick an unfortunate combination you will probably end up with ... unfortunate routings.  Saint Lucia is quite small and the airports are only 60 kilometers apart from each other (a 1h00 to 1h30 drive).
I usually use the Matrix Airfare Search to explore the possible routings. Anyway, this engine does not allow you to to a booking. You will have to go to a travel agency or to a specialized website. With Matrix Airfare Search, you can for Washington DC and Saint Lucia use the "All Airports" option as shown below. The search engine will then have a wider scope. In addition you can use the "Nearby" feature. This will extend the search to other airports you sepcify. In the case of Washington DC, Baltimore would be an obvious candidate.

Second, November is probably not the "best" period to go to Saint Lucia. It is not the most busy period and there may still be some cyclones. In the high tourist season from December to April there will probably be more options, including charter flights.
Answer: Were you searching for SLU as your destination airport?  According to Wikipedia, that is a small secondary airport, and it's not surprising that getting there would require a convoluted itinerary.  But getting from the US to St. Lucia via Europe is ridiculous.
The main international airport on St. Lucia is Hewanorra, whose code is UVF, and it has lots of nonstop flights to the US.  Searching for flights from WAS (or DCA or IAD) to UVF turns up lots of reasonable looking results.


Would XDES be more secure than 3DES, where X is a number > 3?

Question: Would XDES be more secure than 3DES, where X is a number  > 3?
Like 10DES... If so why aren't we using it?
Comment: related: https://crypto.stackexchange.com/questions/32778/is-a-4des-or-5des-system-possible
Answer:
Would XDES be more secure than 3DES, where $X > 3$ ?

Yes. This answer about if 4DES / 5DES is possible illustrates it quite well.
It would however make more sense, if you really want to make it more secure, to have $n$-DES, where $n = 2k-1 \space | \space k \in \mathbb{N}$, or in simple terms: $n$-DES, where $n$ is an odd number.
This comes from the Meet-in-the-middle attack (MITM attack).
Example:
DES has a keylength of $2^{56}$. Double DES only has a keylength of $2^{57} (= 2 \times 2^{56})$. Only by using 3DES you start to really improve the security from single-DES: $2^{56} \times 2^{56} + 2^{56} \approx 2^{112}$.

Why aren't we using XDES with large X?

Because of AES. It's not feasible to have MITM-attack on AES.
Using XDES instead of AES would have more drawbacks than benefits, especially from a computational view.
Comment: You can also add the small block-size; [sweet32](https://sweet32.info/)
Comment: Meet-in-the-middle attack requires the attacker to know the plaintext, how can the attacker already know the plaintext without decrypting the ciphertext?


What is algorithm behind the recommendation sites like last.fm, grooveshark, pandora?

Question: I am thinking of starting a project which is based on recommandation system. I need to improve myself at this area which looks like a hot topic on the web side. Also wondering what is the algorithm lastfm, grooveshark, pandora using for their recommendation system. If you know any book, site or any resource for this kind of algorithms please inform.
Answer: Have a look at Collaborative filtering or Recommender systems.
One simple algorithm is Slope One.
Answer: A fashionably late response:
Pandora and Grooveshark are very different in the algorithm they use.
Basically there are two major approaches to recommendation systems -
1. collaborative filtering,
and 2. content based.
(and hybrid systems)
Most systems are based on collaborative filtering. This basically means matching lists of preferences): If I liked items A,B,C,D,E and F, and several other users liked  A,B,C,D,E,F and J - the system will recommend J to me based on the fact that I share the same taste with these users (it's not that simple but that's the idea). The main features that are analyzed here are the items id and the users vote about these items.
Content based method analyze the content of the items at hand and build my profile based on the content of the items I like and not based on what other users like.
Having that said -  Grooveshark is based on collaborative filtering Pandora is content based (maybe with some collaborative filtering layer on top).
The interesting thing about Pandora is that the content is analyzed by humans (musicians) and not automatically. They call it the music genome project (http://www.pandora.com/mgp.shtml), where annotators tag each song with a number of labels on a few axes such as structure, rhythm, tonality, recording technique and more (full list: http://en.wikipedia.org/wiki/List_of_Music_Genome_Project_attributes)
That's what gives them the option to explain and justify the recommended song.
Answer: Programming Collective Intelligence is a nice, approachable introduction to this field.
Answer: There's a good demo video with explanation (and a link to the author's thesis) at Mapping and visualizing music collections.  This approach deals with analyzing the characteristics of the music itself.  Other methods, like NetFlix and Amazon, rely on recommendations from other users with similar tastes as well as basic category filtering.
Answer: Great paper by Yehuda Koren (on the team that won the Netflix prize): The BellKor Solution to the Netflix Grand Prize (google "GrandPrize2009_BPC_BellKor.pdf").
Couple websites:

Trustlet.org
Collaborative Filtering tutorials by Dr. Jun Wang
Google: item-based top-n recommendation algorithms
Answer: Manning also has two good books on this subject. Algorithms of the Intelligent Web and Collective Intelligence in Action
Answer:
Last.fm "neighbours" is probably collaborative filtering.
Pandora hired hundreds of musicologists to classify songs along ~500 dimensions.
http://en.wikipedia.org/wiki/Music_Genome_Project

These are two very different approaches. Google Scholar is your friend as far as the literature goes.
Answer: Pandoras algorithim started with just matching specific music genres to the certain song you inputed.  Then it has been slowly growing by people voting if they like the song or dislike the song, enabling it to eliminate bad songs, and push good songs to the front.  It also will sneek new songs that have few votes either up or down into your song playlist so that song can get some votes.
Not sure about the other sites listed.


Why could the Tendo control the weather?

Question: Does anyone know why the Tendo Path of Pain apparently had control over the weather at some point? After he detects Jiraiya the power isn't ever mentioned again. The two shinobi Jiraiya captures talk about the weather as if "Lord Pain" prevents it, but in the translation I read, Pain says "Someone has circumvented my rain," as if he causes it. Regardless of whether Pain controls the rain, is there a plausible explanation for how this could be?
Comment: Remember the thing is made from nature chakra
Answer: This is caused by one of the techniques pain Nagato uses the Rain tiger at will technique. This technique infused with chakra causes the user to sense outsiders chakra

when guarding Amegakure Nagato was able to use the Rain Tiger at Will Technique to make it rain. This rain was infused with his chakra and as such, served as a large-scale sensory technique for him in his village.

The description of this technique would be

A perception ninjutsu, allowing one to freely manipulate rain infused with the user's own chakra. The rain falls from rain clouds, formed with Pain's own chakra. During this technique, the falling raindrops are closely linked to Pain's senses. When the rain is obstructed by a chakra belonging to someone not of the village, the existence of the intruder can be detected. The rain will keep on falling until Pain uses the seal to cancel it. Pain made it rain every Sunday in Amegakure, or whenever he had to leave the village.
Comment: @RamseyYunis Might just be your mis conception. There are 6 paths of pain. And we have Nagato, the user himself. so it is not one of pains paths that is causing this rain. but rather Nagato himself ( the one that also had the rebirth technique)
Comment: While this clears up what the jutsu was, I was more looking for how that path could use more than just his telekinetic abilities. A major plot point was that they could only use one jutsu. Is this just a plot hole?


Humans have pious nonsense and a quarantine is about to be established

Question: Humans have polluted the galaxy with their religious nonsense and a quarantine is about to be established.  People must decide whether to stay on Earth or in space, forever.  The story was mentioned in Free Inquiry in the early 2000s.  It's somewhat reminiscent of Lem.  Actually, it's fairly humorous, as when one alien enthuses to another that the lights on the ship's console are "miraculously" the right wavelength for them to see.  Could it be by George Zebrowski?
Comment: The first part almost reminds me of Christopher Anvil's novel "Pandora's Planet" - the populated alien worlds the story are very weak to human ideas and persuasive tactics (of all kinds, not just religion), and tend to get caught up in their fanaticism and other nonsense until disaster strikes.  There's no quarantine, though, the nonsense is not inherently religious, and also no making people choose earth or space - so not a great match, in the end.
Answer: You may be thinking of Tom Flynn's Galactic Rapture. It was released in 2000, during which time Tom Flynn was editor for "Free Inquiry".

If Thomas Pynchon wrote science fiction, "Galactic Rapture" might be the result. Earth in the year 2344 is a small player in a galaxy of some highly advanced planets – and some incredibly backward ones. A breathtakingly wealthy and sophisticated people, the Galactics keep 40,000 of their 42,000 planets in permanent quarantine, or 'Enclave', so their primitive inhabitants can serve as sources of entertainment. Now, called 'Terra', Earth has two lucrative exports: a perversely engaging mass entertainment medium known as 'senso' and Earth religions, of which the jaded Galactics can't get enough. Terra's greatest success story, the Universal (Roman) Catholic Church, has left its birth planet to thrive on one of its own, fittingly called Vatican, where priestly sex abuse and imperial corruption take on astonishing new forms. A theology called 'serial incarnation' teaches that God incarnates his son over and over, sending him to planet after planet. The Church has grown rich from this doctrine by charging huge fees to reveal to individual planets who their Messiah is and whether or not their historic religious leaders are genuine. All is well until celebrated mathematician and recent convert Fram Galbior is overheard telling the pope that his new formula can predict where God will send his son next – an Enclave planet where most Galactics, even those in power, are forbidden. Attention centres on the rumoured new Christ, named Arn Parek, a con-man who becomes hotly sought by the Galactics.
This novel is an iconoclastic, darkly hilarious epic, packed with hypocritical cardinals, scheming Mormons, religious bunco artists, and cynical media manipulators. Called a landmark in the new alternative science fiction, "Galactic Rapture" is an engaging satire on the power of religion, worship, and 'infotainment' in the future.

It had a sequel, Nothing Sacred. According to Wikipedia:

Nothing Sacred (Prometheus Books, 2004) is a sequel to Galactic Rapture set ten years after the conclusion of that novel. It features the Mormon comic villain from the first novel; Gram Enoda, a young Earthman on the make who has accidentally acquired a hugely powerful, self-aware digital assistant, and a darkly charismatic televangelist whose theology is drawn from 19th century German and Russian nihilism who wind up interfering in a top-secret government plan to quite literally save the Galaxy. It was reviewed by Towing Jehovah author James Morrow in "Free Inquiry".


Can you get stalled in Firetop Mountain?

Question: During a recent game I almost got in a repeated position FP vs FP with my opponent, with a resulting Paralysis+Protection situation on both sides, but one of us broke away from that position just a turn before it became fully settled.
Can the game get stalled in that position (or in another position)? what happens then? is it a draw or a potentially neverending match?
Answer: A never-ending double paralyze can lead to a deadlock situation. Especially if the is an Elemental that both mages have to be protected from. So, Yes, it can turn into this :
<code>FFF...
PPP...
</code>
for both mages.
Hopefully, 2 paralyze spells cast on the same target cancel each other, so by casting your own paralyze spell on yourself, you will cancel the other one.
And moreover (and this has been a rule modification to put less power into paralyze spell), there is the fact that : if another enchantment spell (i.e. Amnesia, Confusion, Charm Person, Charm Monster or Fear) is cast on the same person as a paralyze spell, the other spell is "stronger" in the sense that the paralyze spell is cancelled on that turn. This could be used to break the FFF. (Amnesia is not a good choice ;-)
Comment: Actually I play to have fun. If someone seems to stay forever into this FFFPPP situation. I cast paralyze on myself and surrender the very next turn. I'm there for the fun, not to win.
Comment: I can see your points about breaking away from paralysis, but, if you need to keep the protection up (for example, as you mentioned, if you have an Elemental in play and not enough damage points to survive unprotected) you can't cast another enchantment, while doesn't metter if you cast the paralysis on yourself or on the opponent: both will keep playing FP vs. FP, regardless of the target. The real point is that you CAN actually find yourself in a neverending deadlock, where both players are foorced to play FP. I guess in that case the players should contact the Janitor or agree for a draw...


BMW 320i / e36 / M50 overheating

Question: I have changed my thermostat, waterpump and radiator cap. radiator was bleed. No oil in the water and no oil in the water but car still overheat
Comment: Can you explain a little more. What happens? Is this when highway driving or round town? How fast does it overheat etc.
Comment: Welcome to the site. So you changed all of this because it was overheating? Is the cooling fan(s) working? Does it overheat only when the AC is on, all the time, only when sitting? What was the condition of the old coolant? Condition of the passages and inside of the water pump? Did you have the radiator flow checked? If it was very dirty, there may be a blockage.
Answer: It sounds to me that the overheating issue relates to the themostatic coupling which your radiator fan is attached to.  This is effectively a thermal clutch which allows the fan to turn freely when cold but when it gets warm it is supposed to lock the fan firmly to the pulley wheel to which it is attached.
When these couplings fail, the fan clutch effectively "slips" so the fan fails to generate sufficient airflow across the radiator.  Thankfully replacement is a fairly simple operation and the fan clutch is not an expensive part.
You may find that this video provides more information.
With regards to the starting issue, I suspect it probably relates to corroded wiring terminals or a corroded / poor earthing strap.
Answer: Low battery/a bad fan motor could be the issue, so long as the coolant system is bled and you know the radiator is not clogged, other things such as a bad temp sensor or a bad thermostat could be the issues as well
Comment: The BMW E36 does not use a fan motor, the engine is mounted longitudinally with the fan driven directly by the engine (via a thermostatic fan clutch).

BMW 320i / e36 / M50 overheating


Posting IPython Notebook in Wordpress

Question: I am trying to convert my IPython notebook to an html file so that I can put it on my wordpress blog. I have used the following command to generate an html file for the notebook
ipython nbconvert notebook.ipynb

then I copied the html code and pasted it into the 'text' tab.  The resulting blog post sort of looks like the ipython notebook, however the problem is that the markdown equations do not show up and the headings look strange. Has anyone managed to display an IPython notebook in a wordpress blog post successfully? If so, how?
Answer: In this November 2013 blog article http://www.josephhardinee.com/blog/?p=46, the author goes quickly through the conversion process.
He mentions the need to install the Simple Mathjax plugin to make equation display work.
Now, what I have tested to work on my self-hosted Wordpress blog:

Copy paste the html output of nbconvert (only what is inside the  tag) in the "Text" tab.
disable the Worpress html code parsing because otherwise images do not display (as explained in the blog post). See below for two possible methods.
Activate Mathjax: either with a plugin or manually in the post code

Mathjax With plugin
I have not tested the Simple Mathjax plugin, but I have LaTeX for WordPress which works for me.
Manual Mathjax activation
Copy paste from nbconvert output the two

2) Launch it:

Disabling code HTML parsing
The blog post suggests to activating the PS Disable Auto Formatting plugin to make the notebook images work. I have tested it successfully but it has one drawback: it messes up with the rendering of all the other posts... that's quite an issue!
I have tested instead the Raw HTML plugin which enable a per-post tuning. I've made images work by selecting the Disable automatic paragraphs option (the plugin creates a new box in the post editor).
Remaining issues:
while the notebooks should display fine with this method, there is still work to get the syntax highlighting of code cells to display properly. However the Python source code is already parsed by CodeMirror, so it should just be about loading the appropriate CSS code.
Answer: One approach is to embed the notebook using an iframe. This original idea came from the blog post http://onsnetwork.org/eimd/2014/08/08/how-to-enter-ipython-notebooks-to-wordpress/, but I've made several improvements. The straightforward way to do this is to:

Install the Raw HTML plugin to Wordpress. This only needs to be done once.
Convert the notebook to HTML ipython nbconvert YOUR_NOTEBOOK.ipynb
Upload the resulting HTML to Wordpress as a media file. Take note of the URL where it is uploaded to.
Insert the iframe between raw tags in your post. For example:
[raw]

[/raw]

Unfortunately, this straightforward approach doesn't work very well since the height is never right and one tends to get annoying horizontal scroll bars. However, since the uploaded html is hosted on the same domain as the blog post, this can be fixed using some javascript.  The following recipe seems to work reasonably well for getting the width and height right, resulting in a clean blog post:
    [raw]

    [/raw]

For a little more detail on this, as well as an example you can take a look at this post: http://www.bitsofbits.com/2015/01/19/ipython-notebooks-in-wordpress

Posting IPython Notebook in Wordpress


Can't install C&C Red Alert

Question: I can't install C&C Red Alert, I downloaded it from Chip.de (which is the website of a respected german computer magazine), but when I try to start it (after mounting the CD ISOs with Daemon Tools) it says that the application is not supported cause it's a 16-Bit-Version or so, so what should I do? My operating system is Windows 7 64 Bit.
Comment: When you're asking for technical support, it's good to include as much information as you can. Operating system, system architecture, and the exact error message would be a good start.
Comment: I love that game, first game I was ever addicted to for the playstation.
Comment: CnCnet.org has full hard disk installers for all games, with extra languages support for C&C1 and RA1, so starting from isos isn't really necessary.
Answer: Seeing as it says "16 bit" it most likely needs an operating system that supports a 16 bit core. Todays processing cores are at least 32 bit.
To get this thing to run you will need a native Disk Operating System (DOS) environment. Something that was kicked out with Windows 98. So you will either need to run this under Windows 95 or DOS.
Alternatively you could use software like DOSBox or ScummVM to get it to work, which I think will be the preferred method.Be advised that ScummVM is designed for point-and-click-adventures, so you will most likely only get this to run under DOSBox.
Comment: Actually this is something I know a lot about - All x86 processors (including x86-64) are fully backwards compatible by changing the mode they are running in. A 32-bit OS runs with the processor in [legacy protected mode](http://en.wikipedia.org/wiki/X86-64#Operating_modes), which supports both 16-bit and 32-bit code depending on the "default operation size flag" in the current segment descriptor - this means that a 32-bit OS can still run 16-bit code by using a segment with this flag set to 0. (A 64-bit OS runs in long mode which doesn't support 16-bit code and so can't do this)
Comment: Actually you just need a 32-bit OS - e.g. a 32-bit version of Windows 7
Comment: DOSBox will defiantly work if it is the original C&C red alert as the game was made for dos/windows 95.
Comment: @Justin That is NOT true, 32 bit version or 64 bit version of windows refers to the amount of RAM it can hold, meaning a 32bit version can use up to 2^32 bytes of RAM which equals to 4 GB of RAM, 64bit versions of windows can use up to 2^64 bytes of RAM. I refer to the actual processor. the processors of today have 32 bit long instructions. instructions that are 16bit long cannot be processed, as it is an entirely different instruction set on hardware level. Please research things like that before commenting.
Comment: @Justin The chart you linked suggests that there is a "compatibility sub-mode" in long mode which would allow to run 16-Bit software while using a 64-Bit OS... Can you clarify this?
Comment: I think it would be way easier to just use DOSBox than trying to get that to work, seeing as there are a lot of tutorials about DOSBox to be found.
@Justin Sorry for being rash, but no program made for Windows 95/98 worked for me on a Windows 7 32bit machine.
Comment: @Strike That is a whole different issue. That is not down to the processor architecture but due to how Microsoft reworked the compatibility layers in Windows Vista (which is why pretty much *anything* pre-Vista has you flipping a coin whether it works or not).
Comment: It's only the installer that's 16 bit. Red Alert 1 (the windows version, anyway) is 32-bit game.
Answer: I believe that Red Alert itself is 32-bit (and so should work fine if you can get it installed), however it sounds like the installer you have is 16-bit - 16-bit code simply won't run on 64 bit operating systems.
According to this thread the game content is just dumped in a directory on the CD and so you should be able to bypass the installer by copying these to your destination directory

Create a folder on your hard disk where you want to install the game.
Copy the complete contents of the INSTALL folder of the game's CD (Allied or Soviet, doesn't matter which one) to that folder you made
  on your hard disk.

Alternatively there is an article here which describes common methods of converting 16-bit installers into 32-bit installers - depending on what sort of installer Red Alert used this method may work.
Finally you could try installing it in a virtual machine running some 32-bit OS (or possibly even DOSBox) and then copying the installation directory off your VM onto your 64-bit machine (or just run it on the VM).  If there are components installed outside of the installation directory then this might not work, but its probably still worth a try.
Comment: DOSBox won't work (for installing the Win95 version anyway) unless you actually install a Windows 95 on it. DOSBox itself can't run 16 bit Windows programs.
Answer: Recently I had difficulty to get it to work, even after following different advice on the web, and after different methods and patches, I figured out something that works for me.
It expands on Justin's reply, with a few crucial details that made the difference.
I'm using Windows XP Service Pack 3, 32bit, but it might work for you (since many people with different versions of Windows seem to be reporting similar problems and error messages).
DOWNLOADS NEEDED:

EA's official torrent with red alert (includes patch 1.08 in folder "Patches")
User created "ddraw.dll" - http://hifi.iki.fi/cnc-ddraw/
Software for opening ("mounting") files of type .iso (I use "daemon tools")

HOW TO INSTALL

NOTES:

DO NOT USE THE NORMAL GAME INSTALLER (setup.exe, install.exe, whatever)
DO NOT UPDATE TO PATCH 3.03 (as suggested in some web guides)
(No need to put the Ra95.exe in any compatibility mode with older windows versions DO Need to put Ra95.exe in compatibility with windows 95)

create a new directory to place the game in your drive, eg: g:\games\red alert
mount one of the iso files in daemon tools (either CD1_ALLIED_DISK.ISO or CD2_SOVIET_DISK.ISO)
explore the mounted iso's drive, and copy the contents of the INSTALL folder to the folder where you want the game to be (g:\games\red alert)
copy the patch file, RA108USP.EXE, to the game folder (g:\games\red alert)
run RA108USP.EXE in the game folder, which will extract several files, one of them Patch.exe
run PATCH.exe
copy ddraw.dll to the game folder
Right click on Ra95.exe, go to "properties", "Compatibility", and set "Run this program in compatibility mode with Windows 95"
run Ra95.exe once, should work, exit (ddraw.ini gets created, where you can set several properties, such as window size)
change the window size in ddraw.ini, where it says "width=0" and "height=0", put the window size you want
activate music if it can't be heard (increase music volume in options, after starting a game map)

You will probably need to mount the respective game's iso's when you want to play Allies or Soviet campaigns.
Hope this is helpful to you (or anyone else who is having trouble).
EDIT: added instruction for placing the executable in compatibility mode with Windows 95, which is apparently necessary (although ddraw says that it shouldn't be used)
Answer: redalert1.com has a download and multiplayer service that works for me on Windows 7.

Can't install C&C Red Alert


Show wms feature infos after map is rendered (OpenLayers)

Question: I display wms features on a map and i want to see the attributes of all features after the map is loaded.
I know the GetFeatureInfo request and i made examples when i clicked on a feature and than a popup was appeared with the infos. But i need a solution when all the popups appear after the map and the features are loaded.
Any idea?
Comment: do you need that all the popups will be open by default?
Comment: yes.
don't know whether OpenLayers supports this. i searched but haven't found any solution yet.
Answer: i found a solution. With a servercall i get the features of the selected layer in xml format. I can process that xml and gain the necessary coordinates. Than i put popups on the map with those coordinates.
the request:
OpenLayers.Request.GET({url: "http://localhost:8080/geoserver/opengeo/wfs?service=wfs&version=1.1.0&request=GetFeature&typeName=" + p_strLayerName,
                                            async: false
                                         });

Answer: I think you can achieve this with this example:
http://openlayers.org/dev/examples/light-basic.html
I haven't tested yet but it can work if you change this:
hover:true,

to:
hover:false,

this may allow you to have all the popups open by default. In any case, you should play with the autoActivate option to see if something else is needed.
This may also help you: http://openlayers.org/dev/examples/osm-marker-popup.html
Hope this helps,
Comment: Unfortunately, hover:false didn't work. If i set that to false, than popups appeared only on click event.


Why did Diane and King increase their power levels?

Question: So in one of the last episodes, Gowther reads the power levels of Diane and King and they increased. Why did they increase? I think the former fairy king and giant king wanted to make them stronger sending them to the past, but the "challenge" they passed there was one not to kill her sister's lover (King) and the other not to betray her race (Diane), but I dont see how this had to do with increasing their power levels, does it?
Answer: They gained knowledge and maturity from their trip to the past, which is counted when numbering power levels.
Around chapter 106, we learn from Hawk's use of Balor's Eye that power levels are made up of three numerical components : Magic, which determines the magical proficiency and raw firepower, Strength, which accounts for physical power, and Will which is more abstract, but basically accounts for the individual's fighting spirit and / or maturity as a fighter.
Since King and Diane faced life-changing events in their trip to the past, they can reasonably be considered to have gained a lot of willpower, thus increasing their Will. They also have peered into Gloxinia and Dolor's memories, who use the same magics as them ; they have learned how to use their magic more efficiently.
It must also be noted that King's wings begin growing at this point. In Chapter 218, pages 6-8, this is noted to improve his link with the Sacred Tree and allows him to use the full power of his sacred treasure, Chastiefol. Fairies gain a noticeably huge amount of power when growing their wings ; for example, Elaine went from 2 830 to 21 050.


Where can I go to find importers?

Question: I am from Ethiopia. I have a Coffee Export License from Ethiopia for the World market. How can I go about getting buyers? Where is the best place to find potential importers of my coffee?
Comment: Do you have a local chamber of commerce or something like that? You could ask if they have any contacts.
Answer: The first recommendation would be to go to a Chamber of Commerce or a Board of Trade locally and to make a request to help with the contacts of potential importers.
Quick googling directed me to website of the Chamber of Commerce in Ethiopia: http://www.ethiopianchamber.com/
The Government of Ethiopia also hosted World Coffee Conference, so you may find additional information on event, and may be some useful contacts to start with.
The second option would be to get in touch with biggest Coffee Associations or to participate in coffee conferences/shows:

The International Coffee Organization (ICO)
Specialty Coffee Association of America (SCAA)
Specialty Coffee Association of Europe (SCAE)
Different coffee shows, conferences and festivals (here's the calendar and links with additional information can be found)
Answer: Go to any coffee trade show in the US or Europe.  I would recommend the Specialty Coffee Association of America or the Specialty Coffee Association of Europe. Other options are: CoffeeFest, CoffeeCon, etc. An Internet search for coffee conferences really would be your best bet.
Answer: I would suggest reaching out to distribution companies directly. Search as if you were a coffee roaster trying to buy beans and you'll find the companies that are selling in bulk.
I work at a coffee company where we work directly (and almost exclusively) with growers, but most companies are happy to deal with resellers.

Where can I go to find importers?


What happens when you cast Speak With Dead on a person who used Clone?

Question: The Clone spell immediately moves someones soul to a new body upon death. What happens if you try to use the Speak With Dead spell on the body of the person with a Clone? Presuming the body still has a mouth and the person is not undead. How to prevent the use of Speak With Dead question did not consider what happens with a Clone spell. This question said yes for Speak With Dead on a Reincarnated body but did not consider Clone either. I'm thinking about villans like Mansoon who use Clone to make themselves unkillable. I doubt Mansoon wants anyone interrogating his old body as he plots revenge from a discretely hidden lair.
Comment: Regarding your last point, I would like to point out that SwD does not force the corpse to speak the truth.
Answer: As written, speak with dead functions normally.
Speak with dead states:

This spell doesn't return the creature's soul to its body, only its animating spirit

So there is no interaction between speak with dead and the creature's soul, so we shouldn't expect clone to create a problem for us there. Unfortunately, the phrase "animating spirit" appears once in the entire D&D 5e corpus - in the spell description of speak with dead, so there isn't much to go on concerning what that really means or the lore behind how the spell works. As written, speak with dead works just fine, as it explicitly does not interact with the creature's soul.
Further, speak with dead requires only a corpse, not that the creature that the corpse was formerly be dead. So suppose we have the corpse of a creature that has used clone to inhabit a new, properly functioning body. What does speak with dead say?

You grant the semblance of life and intelligence to a corpse of your choice within range, allowing it to answer the questions you pose.

Do we have a corpse? Yes. Next, speak with dead states:

The corpse must still have a mouth and can't be undead.

Is it undead? No. Does it still have a mouth? We can assume yes, since this isn't really pertinent to the question. Here are all the requirements for using speak with dead, summarized:

a corpse within range
has a mouth
not undead
hasn't been targeted by speak with dead in the last ten days

A creature's use of clone does not complicate any of these requirements, so speak with dead works as usual.
Comment: @MichaelShopsin Given that the spell description seems concerned only with the corpse, I believe "dead" in the name of the spell is referring to the state of the corpse.
Comment: The cloned person is not dead, which seems to cut against the direct meaning of _Speak With Dead_. Also _Speak With Dead_ doesn't work on the undead, which implies some limits on how you get your information.
Comment: I'm not sure it's as clear-cut as that. The spell also says "The corpse knows only what it knew in life" and "doesn't comprehend anything that has happened since it died" which seems to presuppose the creature is dead.
Answer: After using Clone, the corpse becomes "inert".
The clone spell ends its description stating:

The original creature's physical remains, if they still exist, become inert and can't thereafter be restored to life, since the creature's soul is elsewhere.

Strictly speaking, the fact that the soul is not employed by speak with dead would make the now-inert corpse an eligible target for it. But when I read that the corpse becomes inert, I thought of it as "unresponsive to magic that targets the dead", since it makes sense to me to avoid some cheese over unspecified edge-cases and terminology (what does "inert" even mean, mechanically?).
Comment: I'm pretty confident that *inert* does not have any special game meaning, and in my experience, *inert* is a pretty apt description of *any* corpse.
Comment: @ThomasMarkov Then why even go out of their way to _explicitly state_ that the corpse becomes inert if that's the only possible outcome? My interpretation of it is to make it uneligible for corpse-targeting spells, but I'm aware it's just one of the many grey areas that require some DM intervention to avoid "crashing the game" (so to speak).


Add on domain does not have access to "../privatefiles" at public_html level

Question: I have a Drupal site that accepts private file uploads from some authenticated users.
The directory where those files are stored is privatefiles and it is located above the www directory, at the same level than the public_html directory. In the file system, the private file system path is defined as "../privatefiles"
That seems to work well.
I But I am transferring the site to another hosting company and putting it there as an add on domain to an existing one. The uploaded private files are no longer visible.
To make the add on site, I had to create another directory. The new directory is example1.com/example2.com If I move the private file directory one level down (i.e. under the public_html directory, then the private files become visible again.)
The only problem is that those files are now accessible from the web.
Does anyone know why this is so? How can I keep the private files at the same level? Should the "../privatefiles" be written differently? Or is this issue a limitation imposed by the new hosting company?
Any pointer for this would be greatly appreciated. :)
Answer: OK, I figured out what was going on and how to fix it.
The problem was indeed with the "../privatefiles" declaration for the private files directory. Just like for the old DOS files, the "../" means "one level up" and that is okay when the core file are in the www directory.
But when they are below or way below, the "../privatefiles" has to be replaced with the full path: "/home/whatever/privatefiles"
Now it works well.


What does mean following sentence?

Question: Do you have anything to declare?

No nothing. Just the normal allowance.

I don't understand question and its answer.
Please tell me meaning and where this sentence used.
Thanks.
Answer: This sounds like a conversation between a customs officer and a traveller arriving in a country. People arriving in the UK (for example) may bring certain items that are taxed but which are cheaper outside the country, up to a limit (the allowance). For example 42 litres of beer, 18 litres of wine, 9 litres of strong liquor, 200 cigarettes. Also other goods worth up to £390. If you have these items up to these amounts, you have the "normal allowance" and have "nothing to declare" to the customs officer. If you have more than the allowance of any of the items, you must declare them. You must also declare any forbidden or restricted items (weapons, drugs, endangered animals, obscene materials, goods that you plan to sell, etc). You may have to give up or pay tax on anything you declare. Lying to a customs officer is a crime in many countries.
The conversation is equivalent to this:

Customs officer: Do you have any items in excess of the allowances, or
any forbidden or restricted items?
Traveller: No, only permitted items within the allowances.
Answer: The context seems to be a Customs official questioning a traveler at a point of entry. Travelers are required to declare (that is, to officially acknowledge that they possess) certain items like plant specimens, large amounts of cash, and so on.
The traveler responds that they have nothing to declare--they aren't bringing into the country anything they're required by law to let Customs know about. Many countries allow you to bring in, for example, a single bottle of wine for personal consumption without having to officially declare it. A single bottle is within the permitted amount--the "normal allowance." So the traveler is acknowledging that they may have a small quantity of something (it's not clear what) but that it is within the permitted amount.

What does mean following sentence?


Is there a link between Percolation Theory and phase transitions?

Question: Is there a direct link between phase transitions in physics and Percolation Theory (and the critical points in both cases) in the sense that the mechanism in one of them could be a special or generalized case of the other?
Comment: Percolation is a phenomenon characterised by the fact that a "typical" length blowsup. Note that  the length can be thought as a correlation between local observables, but this is not necessary. Under a rescaling of the system - in this case the rescaling is given  by zooming out but in other case it could be zooming in or integrating away small or fast energies - this length has to scale. However if it is infinity, the rescaling leave it unaffected, hence the system looks the same at every ditance. This happens anytime you have a 2nd order phase transition.
Answer: Yes. Percolation has a critical point where a continuous phase transition takes place: the percolation transition is therefore a particular case of phase transition.
You can read more about it in the Wikipedia pages on percolation and its critical exponents.
Answer: One should also mention that there are several statistical mechanical models in which the phase transition can be understood as the percolation transition of a suitable (dependent) percolation model. The best known case is that of the Ising and Potts models, in which the transition occurs at the percolation transition of the associated FK percolation (random cluster) model (see, for example, here). Other examples are the (continuum) Widom-Rowlinson model (for example, here), the Ashkin-Teller model (for example here or here), etc. There are also examples for continuous spin systems, for example the XY model (see for example here).
Note that the relation between various graphical representations of this type and the phase transition in the original model provides powerful tools for their analysis; see these lecture notes for several remarkable recent examples).


What is the range of electric field of an photon?

Question: Obviously every electric field has an specific range upto which it can have effect on.What is the range from the median line for an electric field of a photon.As most physics textbooks and physicist visualize the electric field of an photon as straight line and also the electric field has only one electric field strength at an instant.How this visulaization affect the range.Does it have effect on particles on the left and right side of the straight line that we visualized.This may be a bizzare question,but we got to understand everything about it to manipulate it.So please give your best opinions,Thank you.
Answer: Photons carry no electrical charge. For objects like electrons which are charged, their field lines extend to infinity.
Comment: But their field strength drops,photons doesn't carry no electrical charge but they contain electric field and as electric  field drops by a factor of 1/r(squared),it has a a specific range where it can have effect on.Same is for an electron,field lines are imaginary.I am asking upto what distance the electric field can have effect on  a charged particle.
Comment: any force field that goes as 1/r^2 has infinite range. the effects get small, but they never go to zero.
Answer: The photon is a zero mass elementary point particle in the standard model of particle physics. It has no extent, and the only measurable quantities it has are a spin , + or - to its direction of motion, and its momentum/energy, since its mass is zero.

What is the range from the median line for an electric field of a photon.

The photon does not have a volume or a real electric field attached to it, so

As most physics textbooks and physicist visualize the electric field of an photon as straight line

this is wrong.

and also the electric field has only one electric field strength at an instant.

and this is also wrong.
The photon as a point particle travels in straight lines and when it interacts it interacts at a point, as can be seen in this double slit single photon at a time experiment,

Single-photon camera recording of photons from a double slit illuminated by very weak laser light. Left to right: single frame, superposition of 200, 1'000, and 500'000 frames.

But also the photon is a quantum mechanical entity, and it has a wavefunction
which gives the probability distribution in (x,y,z,t) to see a photon interacting.

The interference pattern seen is the  complex congjugate square of the probability distribution for the single photons to interact with the double slits, and that does have in its complex definition the E and B fields that zillion such photons wavefunctions, superposed, will generated the classical light beam, with its E and B fields.
So in the sense of probabilities, a photon will have a range given by the superposition with other photons.
How classical fields originate from the quantum mechanical understructure can be studied here given quantum field theory knowledge.
I cannot answer the emergent question: "how close must two photons be in spacetime in order to produce a classical beam by superposition", as this is the only question that can have some  answer as far as photons and fields go.
Comment: It depends on the quantum mechanical interaction crossection. these are usually calculated in energy momentum space. for space one can use the estimate of the Heisenberg uncertainty principle ΔxΔp>h/2π to give a probable distance estimate for a given momentum, where quantum mechanical probabilities reign and one can talk of photons. when energies and distances fulfill the HUP then one is in the classical light regime, not photons.
Comment: All i am trying to ask is upto how much distance will the particles feel the photon.if r is the distance of particle from a photon then what is the maximum value of r.
Answer: Physics theories give conflicting visualizations of light and particles, which is often frustrating to students.
In geometrical optics, lights are rays.
In classical electromagnetics, light is a wave. Like Niels Nielsen wrote, there is no charge of a propagating wave electromagnetic wave.
In quantum mechanics, light is a particle, a photon. I think Anns may be asking about the shape of that particle, and its ability to interact based on proximity to other particles, yes? Well, in quantum mechanics there really is no physical model of the photon.
In quantum field theory, the relativistic extension of quantum mechanics, photons are discrete excitations in a quantum field. Particle collisions have a "cross section" (you can read up on this, if this is what you are getting at) determining the probability of interaction. This cross section is sometimes thought of as a physical width, but it depends on the combination of particles.


Cisco Packet Tracer 6.2 not working Properly when Desktop icon is used

Question: I installed Cisco packet tracer Student 6.2 version on Ubuntu 14.04. When I run "PacketTracer6" in /usr/local/bin/PacketTracer6Student/bin/ application works properly. When I run .desktop file on desktop it opens as normal. But when I create a small network using generic PCs and switch bulbs do change its color to green.
What is the problem here? and how to correct it.
Answer: If i understood, when you connect the computer to the switch through straight cable the indicator light does not turn to green on the switch.
Simply because your account doesn't have full access to the PT shortcut on your desktop unlike if opened from terminal with sudo which has (admin privilige) it will work straight away.
So Please do the following,
chmod -R 777 /Your/File/Path


Adjusting speed of a kitchen range hood motor

Question: I have a range hood in my kitchen that moves air from a 6 in pipe reduced down to a 4 in pipe. This causes air flow turbulence which makes the operation noisy and inefficient. I'm thinking that if i can reduce the speed of the blower motor the hood would work more efficiently and quietly. The blower motor is 190 watts, has 3 preset speeds and is 120v/60hz. Is there a way to lower the preset speeds?
Answer: Simply put replace the 4" pipe with 6" pipe. 4" pipe is just too small for a range hood. This is going to be the only realistic way to make your range hood more efficient.
To put this into perspective....

The air movement volume is based upon cross sectional area.
The 4" pipe cross sectional area is 12.56 square inches.
The 6" pipe cross sectional area is 28.27 square inches.
The 6" pipe can thus handle more than twice as much air flow
Bends, corners and outside vent covers for 4" pipe are going to be much restrictive than corresponding 6" components.

So do the job right rather than making a science project out of modifying your range hood motor speeds!!
Answer: I think your only safe bet is to find another switch with 5-speeds. This should start at a lower wattage to slow the fan further. You'll need to match the existing switches specifications, this should be embossed on the switch.
Otherwise, replace the 4" duct with a 6" or install a cone shaped reducer if it's not already. You're quite correct going to a smaller diameter can cause a rumble, but really the low setting shouldn't be causing anything noticeable.


Blonde girl in a pink dress with a chubby red guy, traveling in a spaceship

Question: I am looking for an anime in the 80s about a blonde girl who wore a pink dress and she was with a chubby red guy. There was a spaceship that they would travel on. The guy wore a crown. She seemed to control him. And she would cross her arms.
Answer: A possible match is "Starzinger" ("Sci-Fi West Saga Starzinger"), also known as "Spaceketeers" and "Sci-Bots", a series originally aired in 1978 in Japan and then dubbed and broadcast all over the world in the eighties.
The story transposes the "Journey to the West" Chinese novel (which was the source for other animes too, for example the early "Dragonball" and "Saiyuki Reload") in a sci-fi setting.
The blonde girl who wore a pink dress would be Princess Aurora, leader of an expedition across the galaxy to reach the Great King planet and save the universe.

The chubby red guy is Jan Kugo (his name is sometimes different in the variuos translated versions), a member of the trio of cyborgs protecting and assisting Princess Aurora in her mission. Just as in your description, he wears a crown (or rather, a gold circlet) which, just like in the original Chinese legend, is used to control him and it activates when Aurora crosses her arms.


Real gas expansion

Question: Will a real gas occupy all the space available for it? An ideal gas will expand to fill its container but will a real gas? And what are the changes in a real gas when it expands freely against a vacuum?
Comment: Welcome to chemistry.se! If you have questions about how to beautify your posts, have a look at the [help]. Do you want to know more about this site, please take the [tour].
Answer: That's my answer to the question, which may not be correct.
Real gas molecules are bound by (attractive) Van der Waal's forces (VdW forces). When molecules move apart, part of their kinetic energy is converted to the potential energy (because Van der Waal's force is attractive), if no external source of energy (i.e. heat reservoir, external pressure sources/work done) is present. (i.e. there is no exchange of energy across the boundaries of the container).
That said, when a real gas expands into a vacuum, though there's no work done on the gas, the temperature of the gas should drop because part of the kinetic energy (which is proportional to the temperature) is converted to the potential energy.
Will the gas fill the whole container? Now first ignore surface effects (i.e. boundary walls of the container). We have to understand that although the molecules are "bound" by VdW forces, which tend to draw the molecules together, the latter tendency is balanced by the thermal motion of the gas molecules, which tends to pull the molecules apart. When the temperature is so low such that the thermal motion "dies out", the molecules may settle into a lower energy state (e.g. lattice/solid)
In most cases, real gases should fill the whole container.
Comment: If it doesn't fill the whole container, it's not a gas.

Real gas expansion


Can I control two lamps from one pullchain?

Question: I have two bedside swag lamps, one on each side of the bed. Each one has a plug that goes into the wall.  They each have a pull chain for use in turning them on.   I would like it if, when I pull the chain on one lamp, they both would turn on.  Is this even possible and if so how would I accomplish it?  I am hoping there is some special plug I can buy, plug both lamps into it and be done...
Comment: Do you want both pull chains to be effective, or will one suffice?
Comment: Are you OK with something that's built into the house wiring, or do you need this to be temporary/removable?
Comment: @ Harper, ummm I suppose one pull chain would suffice...
Comment: @ThreePhaseEel, I actually converted  the fixtures I am using from built in to swag lights that plug into the wall.  They were given to me by a contractor who removed them from a home he was renovating.  Having said that, I'm not adverse to either idea, but keep in mind,  I am no electrician so something built in might be above my level of expertise.
Comment: @JamieKnoy -- how do you want turning these lamps *off* to work?
Comment: A 3 way switch in each fixture could do this but the existing wiring probably won't support this. But it could be done with more $ than you want to spend because smart switches would be the least expensive way to go and you shot that down in the comments,
Answer: A simple solution would be to use a surge protector outlet with master control. This would be a power strip that has one outlet labelled master, some others labeled master controlled, and some that are always on. The master outlet is monitored for when that device is consuming power, and the master controlled ones will only be on when the master device is on. These are typically used with computers, where the tower is plugged in as master, and peripherals as controlled, so that for example, speakers and monitors are only on when the computer is on as well.
So in your case, you would plug one lamp into the master outlet, and the other into one of the master controlled ones. Since your lamps are next to the bed, the power strip can be in the middle behind / underneath the bed.
Here is an example of what one of these looks like (not endorsing a particular brand, there are many different ones available). In this case, plug one lamp into the solid green, and one into the green outlines outlet. When the lamp plugged into solid green is on, the other one will turn on as well.
Answer: I've never seen a wired set up where when one light turned it, it also turns on another device. You can, however, go with wireless devices. They range from basic RF (radio frequency) devices to z-wave and WiFi devices.
If you go with a smart device, you can add other lights, locks, speakers, etc., over time. Google Home, Samsung Smart Things and Amazon Alexa are examples of smart device hubs. You need a hub if you go this route and make sure the devices you buy work with the hub.
Here is a simple RF device just as a example (not a smart device). You'll need to research it and other like items to see what would work best.
https://www.amazon.com/dp/B01HWB0TPU/ref=cm_sw_r_cp_apa_C.MYBbT3DPGYV
Comment: Thank you Hazardous Glitch for your answer, Unfortunately, going the wireless route is not in the cards for now.  But I will keep your comments in mind if/when I decide to go in that direction!  Again, thank you!


Thunderbird Links do not open the page in chrome

Question: With chrome as the default browser, when I click on a link in Thuderbird, it opens chrome, but always starts a new browser and just goes to the startup page and not to the page on the link.  I am using Ubuntu 16.04.  Chrome is 55.0.2883.87.  Thunderbird is 45.7.0.
Comment: Check this question : http://askubuntu.com/questions/130158/how-do-i-make-thunderbird-open-links-in-chromium
Comment: Go it to work using one of the suggestions from a related post - but not quite the way they said.  I went into:
Comment: Go it to work  I went into:  Go to Preferences (Menu Edit → Preferences) and clicked on the Attachments tab.  For http and https, they were set up for Google Chrome (since that was set as the default browser, but as I said - it opened the browser but not the page I was looking for.  I set this to always ask.  When it asked, I tried keeping Google Chrome, but that produced the same result.  Instead, I chose a different application, selected /opt/google/chrome/chrome.  That change made it start to open the link from thunderbird.  When it worked, I told it to always do this.  problem solved.
Comment: That worked for me too.  In previous versions, changing values to "true" in "network.protocol-handler.warn-external.http" and "network.protocol-handler.warn-external.https" in "Config editor" worked, but, at least in version 52.5.0, this is the only way I found it really worked. Thanks! (using Ubuntu 16.04 too).
Answer: Go into the "Attachments" tab in "Peferences" menu and search for "http" and "https", and then change values to the browser you want or to "Allways ask". Problem solved.
If that doesn't work, you can try going to "Tools", "Options", "Advanced", "General", "Config editor". Search for "network.protocol-handler.warn-external.http" and "network.protocol-handler.warn-external.https", change both values from "false" to "true" en then try to open a link in a message. It should ask to select what browser you want to use with an option to "Remember the choice".
Answer: After all the changes I made, e.g. set Chrome as the default application in the Config Editor, Chrome would not open when I would click on a link. When I changed to Explorer it would work, but not for Chrome.
If it works in one web browser, why doesn't it work in another? I thought that, maybe during an update, the symbolic link for Chrome was changed and Thunderbird tried to open it, but with a wrong link.
So, I created a new Chrome shortcut on my Desktop and made sure that when I clicked on the icon, Chrome would open and work as expected. Then, I replaced the default application in Thunderbird with the Chrome link on my Desktop. I tried it and the link in my e-mail in Thunderbird opened in Chrome, as it always did before.
In short, create a Chrome shortcut on your Desktop,
go to the Attachments tab → Preferences and change the link to the Chrome shortcut on your Desktop and click Always use this setting.


Brute force a hard drive when most of the password is known

Question: I need to access a hard drive that is encrypted with LUKS. The password provided is incorrect, however it is only incorrect by a character or so.
The password itself is very strong and above 30 characters in length. How would one go about brute forcing their way into the hard drive with this information in mind to access the data or should the data loss simply be accepted?
Comment: @KingJohnno - What you say is close to correct if there is only one character, but the OP says "a character or so". So if the password is only lowercase letters, is just 30 characters, and has 2 characters that are wrong, there are (25*30)*(25*29) possible replacements (25, not 26, because you wouldn't replace a letter with itself). But the OP says "above 30 characters in length" which makes me think that the OP only has an approximation of the correct password and that the situation is much more complex than it seems.
Comment: This is quite a simple question: if only one character is wrong (assuming that it is only one charater) then the possible combinations are 26x30, which for password crackers is easy.  I am not familiar with LUKS, but it might be a case that if after X number of attempts the data is cleared.

You can generate the password list very easily, using a simple Python script. I will knock something up and post it here if you like?
Answer: John the Ripper Jumbo has LUKS format available.  Use luks2john first, and then use JtR normally, walking through the characters one at a time to see which is wrong.


Is swap gate equivalent to just exchanging the wire of the two qubits?

Question: Is swap gate equivalent to just exchanging the wire of the two qubits?
if yes why not just switching the wire whenever we want to apply a swap gate?
Answer: Yes, it is equivalent. That's a perfectly valid way to represent it in a quantum circuit diagram.
In practice, it depends what physical implementation you're talking about. If you have 'flying' qubits, then it is possible to just reorder them, or even simply relabel them without actively doing anything. However, many physical implementations of quantum computation use static qubits. That means one particular physical qubit is in a particular place. If you want to make it interact (e.g. perform controlled-not) with another qubit, they usually have to be next to each other. That means performing swap operations along some path, exchanging the states of the qubits so that the state that was on one physical qubit is now on a different one, where you need it to be.
Answer:
why not just switching the wire whenever we want to apply a swap gate?

If this is the crux of the question I think the main rationale here is to treat the swap gate as an actual gate.
I only rarely see raw swap gates on their own in diagrams, typically I see them as part of a Fredkin Gate. Basically, by treating it as a gate rather than a crossing of wires, it makes it easier to understand how it can be "controlled" like any other gate.
But yes, an un-controlled swap gate could be implemented on classical bits in electrical wires by swapping the wires' positions.
Answer: I find it somewhat interesting to analogize to classical computers for all of these kinds of questions - and yes, classical computer engineers would be confused about the need for a SWAP gate for precisely the reasons identified in the question and in the other answers, but it's a very natural gate in quantum computing.
Indeed even back to 1985 in Quantum Mechanical Computers Feynman referred to swapping qubits with an "EXCHANGE" operation.  As shown below he also wrote the SWAP gates as a series of three CNOT gates - but, a classical computer engineer would not likely worry about the CNOT decomposition and would instead just swap the wires with vias and metal jumpers/metal runners.

 Feynman's decomposition of a SWAP gate into three CNOT gates.  Nowadays we would use a filled-in bubble $\bullet$ for the control qubit (where Feynman uses an open bubble $\circ$), and we'd use a circled "+" sign $\oplus$ for the target qubit (where Feynman uses an X).

The above paper was mostly about using quantum mechanics to perform classical computational tasks - but, one thing that is uniquely quantum is taking the square-root of the SWAP (EXCHANGE) gate.  I'm not sure who first took the square-roots of these gates.
Also tangentially, Feynman considered creation and annihilation operators as the really basic primitives of his quantum computers, much as for classical computers, NMOS and PMOS transistors are at a lower level of abstraction than logic gates themselves.


How to smooth area with sharp edges?

Question: I´m quite new to Blender and this is what I have achieved so far:

Now I want to print a little model of this helmet. Unfortunately there are a lot of sharp edge areas like this one here:

Is there any way I can get rid of them without editing every single edge by hand?
Comment: When adding screenshots consider to crop them to the actual area of it (white areas). As to object, those likely caused by how the mesh was constructed (topology). There isn't one-solution, try checking [non-manifold](http://blender.stackexchange.com/questions/7910/what-is-non-manifold-geometry) geometry, removing doubles, and may be [uploading](http://blend-exchange.giantcowfilms.com/) your file.
Answer: The Subdivision surface object modifier
There are two things that I've identified in your screenshots that need to be improved. One is a fix, and one is the modifier.
Mesh Topology
Tab into Edit Mode and key A once or twice until everything is selected. Key Alt + J to convert Tris to Quads (triangular faces to quad faces). You can also key Ctrl + F to open the Faces menu and manually select Tris to Quads. Lastly, you can go 3D Viewport > bottom menu > Mesh > Faces > Tris to Quads.
Ctrl + F menu:

Mesh > Faces menu:

Subdivision surface
The Math
This will use the Catmull-Clark algorithm to create new faces between two imaginary points in the center of each current face.
From Wikipedia:

Catmull–Clark surfaces are defined recursively, using the following refinement scheme:
Start with a mesh of an arbitrary polyhedron. All the vertices in this mesh shall be called original points.

For each face, add a face point.

Set each face point to be the average of all original points for the respective face.

For each edge, add an edge point.

Set each edge point to be the average of the two neighbouring face points and its two original endpoints.
For each face point, add an edge for every edge of the face, connecting the face point to each edge point for the face.

For each original point P, take the average F of all n (recently created) face points for faces touching P, and take the average R of all n edge midpoints for (original) edges touching P, where each edge midpoint is the average of its two endpoint vertices (not to be confused with new "edge points" above). Move each original point to the point:

       This is the barycenter of P, R and F with respective weights (n − 3), 2 and 1.

Connect each new vertex point to the new edge points of all original edges incident on the original vertex.
Define new faces as enclosed by edges.

The Modifier
Go to the Properties panel > Object modifiers tab and add a Subdivision surface modifier. The two values you should care about are the View: and the Render: values. The View: value determines the number of subsurf levels, or iterations, displayed in the 3D Viewport. The Render: value determines the number of subsurf levels in a rendered image or animation. The Render: value should generally be higher.
The Subdivision surface modifier:

Subsurf levels 0, 1, 2, and 3 on a Suzanne:

How to smooth area with sharp edges?


restore a PostgreSQL backup

Question: I am new in postgresql, and I have a big dataset which is a postgresql backup. I have problem to import this dataset to my PostgreSQL.
Actually, this is a "pgdata" format, consists of some files and folders. One of these folders (base folder) has all the main files, (2000 files, each of which is 1 GB). But all of these files are in the "file" format, with no extension!!
I would be so grateful if you could give me some advice on this issue and help me to restore this backup.
Best,
Comment: try `createdb   -D  PGDATA_LOCAL  dbname`,  PGDATA_LOCAL is the path of your `pgdata`.
Comment: usually, basebackup is supposed to replace all the content of "data" folder of PG(where it is installed), after stopping the service. After that you are supposed to create a recovery file config for that and start service
Answer: From your description I guess that you have a physical backup, a copy of the data files like pg_basebackup creates.
If there is a backup_label file in the backup, and all the required WAL files are in the pg_xlog (or pg_wal) directory, then all you have to do is start the server on the data directory (pg_ctl start -D <directory here>) and wait until recovery has completed.
Then you can use pg_dump and pg_restore to extract the data from this new PostgreSQL cluster and import it into the destination.

restore a PostgreSQL backup


How come my views suddenly take full width?

Question: I don't know what I've changed but now 2 of my views are full width.
Here's 2 screenshots from a view how it was and how it is now.
How can I change this back to normal?
Answer: Though it is cut off in the screenshot you have above, the spitfire.jpg image is forcing that cell to 968px wide (968x478) which is larger than your main cell.
This is more a CSS question than a Drupal one so to bring it back to Drupal, I would recommend that you create an image style for this imagefield so that all images are resized according to the width of your main cell. Check out the image module documentation for guidance on how to create styles, you would then just need to tell views to use your new style for your view. Alternatively, you can use one of the existing styles (ex. thumbnail, small, medium, large) to have views display an image that would fit on your page:
Answer: Schnippy's answer is completely correct.
Your Spitefire image is displaying at it's full dimensions, 968x478.
The simplest and fastest solution would be to upload a new spitefire image which has a maximum width of 620px, then ensuring that no other images wider than 620px are uploaded in the future.


Difference between "collaborative environment" and "collaboration environment"

Question: I've seen these phrases in some technical articles. Is there any difference between these phrases?
Answer: A collaborative environment is one in which individuals in the organization work with one another in ways that emphasize (this is a list of largely overlapping synonyms) sharing, mutual assistance, team spirit, etc.
A collaboration environment is one in which individuals do not work in isolation, each one tending to his or her own turf, but instead tasks will often be assigned to two or more people to work on jointly. Come to think of it, practically all organizations can be said to be collaboration environments.
The first expression implies a value judgment: we consider a collaborative environment a good thing and hold it out as an ideal. The second is a value-neutral description.
Comment: Do you have a source for this?
Comment: @Pitarou Sorry, no reference. Since I'm new here, could you please tell me if a disclaimer (e.g., "just my personal opinion as a native speaker") is expected every time that an Answer contains no references?
Comment: I'm not aware of any particular convention on the matter.  However, I don't think this particular distinction is recognised in "general" English.  It is the jargon of a particular speech community (management theorists?).  So if you can't find a source, could you at least specify who is making this distinction?
Comment: @Pitarou The source is me and my data is the reams of corporate literature that have come across my desk. Take it for what it's worth, which may not be much :)
Answer: A collaborative environment is one in which collaboration is being achieved whereas a collaboration environment is one in which collaboration is intended.
The latter describes the expectation or purpose of the place whereas the former describes how the place is operating.
Comment: I agree. For example, you couldn't say: "Why is nobody cooperating when the company has provided us a perfect collaborative environment." If nobody's collaborating, it's not collaborative at all. And the following is very perplexing: "Though the company doesn't want us to collaborate, they've provided us a collaboration environment." If you swap the words, they both make sense.


How to find a list of related functions as mentioned in the documentation center?

Question: How can I list functions related to a specific function in a notebook without opening the documentation center? Sometimes I think I have the right function and have trouble remembering similar functions that will do the job. For example, when I think of Tuples but need Subsets instead, it would be helpful to print out all the functions under See Also.
This would also help with the process of learning about new functions.
Answer: You can use the Entity framework:
Entity["WolframLanguageSymbol","Tuples"]["RelatedSymbols"] //CommonName

{"Outer", "Array", "IntegerDigits", "Permutations", "Subsets", "Groupings", "Distribute"}
Comment: +1 Or as a pure function, `help := CommonName[Entity["WolframLanguageSymbol", ToString[#]]["RelatedSymbols"]] &;`
Answer: In addition to Carl's solution, you can explore the relationships by plotting the connections between symbols by crawling the documentation:
docCrawler[startSymbol_, depth_] :=
  Flatten[Rest[
    NestList[
     Union[Flatten[
        Thread[# ->
            CommonName[
             Entity["WolframLanguageSymbol", #][
              "RelatedSymbols"]]] & /@ Last /@ #]] &, {"" ->
       startSymbol}, depth]]];

Display this as a Graph (of given depth)
edges = docCrawler["Tuples", 3];

which yields
Graph[edges, VertexLabels -> "Name"]


How to generate Genbank format out of paired end fastq data?

Question: I've unmapped cleaned paired end sequence data in fastq format of a bacterial genome. I want to get a sequence data in Genbank format in the end. What are the exact steps that I have to follow in galaxy webserver and if in some point necessary, also using linux based apps? I would appreciate a lot of details.
Answer: The steps needed to assemble a genome in Galaxy are layed out in the Assembly training material from the Galaxy Training network. The software for this should be available on the main galaxy servers (e.g., usegalaxy.eu). Since you have a prokaryote, I suggest you follow the "Unicycler Assembly" workflow, which is also available on usegalaxy.eu.
Answer: I think the reason for your confusion is vocabulary.
The keywords you search for are genome assembly (see @Devon Ryan's answer) a process that is trying to stick together reads to recreate the sequenced genomic sequence. The assembled sequence needs to be annotated if you are interested where are the genes or what they could possibly do. If you will search for tutorials using these keywords you will find plenty.
I am not sure why you need it, but Genbank format contains the genome (the product of genome assembly), metadata (who is the submitter, what species it is, etc) and genome annotation (what is in the region of genome).


Database System for Manual Entry

Question: I'm in charge of setting up a patient register (100K+ patients) for a non-profit project with little money. This register should provide the basis for later datascience.
I'm not sure how a good database solution can work the long run.
It must be possible for various clinics to enter the data manually into the system. Since I have experience with Django I have developed a webapp prototype with Django and an SQLite DB (it is not expected that many users access the database at the same time).
But I'm not sure what kind of database would be a good a good choice in the long run. The biggest problem is that a self-made solution may be beautiful for the moment but it binds the project to me and thus puts it in danger in the long run (the typical doctor doesn't know much about programming).
My question is basically about experiences of you experienced datascientists like you for suitable databases and solutions.
Comment: Other than the requirement that the data is usable for later data science, this is more of a general development question. If you split this up into questions about making a system suitable for later data science, and find another site for asking about how to best develop and hand over a solo project, that may help.
Comment: I don't think the technology choice is a big deal for data science use - any standard db server technology will allow queries and integrated tools. However,  which data is collected, what the known goals are (any specific predictive models you want to target?), and possibly other details of the project could be relevant. I think you will need to get specific about your project goals and the technical details your solution so far (e.g. relevant parts of the schema), if you want an answer that can help you spot possible flaws in the design or avoid common pitfalls.
Comment: OK thank you for your feedback. It is not easy to find the right place for the question or to break it down into meaningful questions. Thanks for your time, though.
Answer: One option is to use Google Sheets with a lot of cell value validation.
Since Google Sheets is something most people are already familiar with, it is relatively easy for most people to understand, use, and maintain.

Database System for Manual Entry


Is there a word for the desire to care for an injured or vulnerable person or animal?

Question: Specifically, I'm looking for a word or phrase that captures the feeling of wanting someone to need you to care for them, and feeling guilty that the desire implies that you want the other person to be hurt or vulnerable.
Answer: I think there's a more specific answer (something like Reverse Nightingale Effect), but co-dependency sounds about right. The following symptom can be found under Control Patterns on Wikipedia:

I have to be "needed" in order to have a relationship with others.
Answer: In the event that the person takes up on their desire to hurt the other person in order to care for the other person, the term you are looking for is Münchausen syndrome by proxy (International), or factitious disorder by proxy (US English), or induced illness disorder (UK English):

Münchausen syndrome by proxy (MSbP or MBP) is a controversial term that is used to describe a behavior pattern in which a caregiver deliberately exaggerates, fabricates, and/or induces physical, psychological, behavioral, and/or mental health problems in those who are in their care.
The name "Münchausen syndrome by proxy" is derived from Münchausen syndrome, but it is important to distinguish one from the other, as they describe very different (but related) conditions. People with Münchausen syndrome have a profound need to assume the sick role, and will exaggerate complaints, falsify tests, and/or self-inflict illnesses.
MSbP perpetrators, by contrast, are willing to fulfill their need for positive attention by hurting their own child, thereby assuming the sick role by proxy. At times, they are also able to assume the hero role and garner still more positive attention, by appearing to care for and 'save' their child.


Is it Haram to work in Banks?

Question: I was wondering would it be haram to work in a bank as the banks profits are a result of interest which is haram in Islam, if it is haram would that mean it would be haram even if a person acquired a job in a bank which does not relate to the financial departments, because the banks profit is haram and by a person working their it would mean that the non halal money is passed on to him as a salary?
Comment: Where will you work that doesn't work with interest? Banks work with interest. Engineers work with interest. Doctors and hospitals work with interest. Tradespeople work with interest. You'd have to have an isolated industry that has no connection to the modern economic principles for your job not to deal with interest. And I don't think such an industry exists.
Answer: The only problem with present day banks are the interest/usury (riba) that is involved.
If you have no direct involvement in any riba transaction, then it's fine to work there.

'Abdullah bin Masud and Jabir bin Abdullah both reported Rasolullah
  cursed the accepter of interest and its payer, and one who records it,
  and the two witnesses, and he said:
  They are all equal.

(Sahih Muslim)
And by two witnesses it means the ones who are partaking in the contract.
So if you can avoid these situations, you're good to go.
Comment: "f you have no direct involvement in any riba transaction, then it's fine to work there." brother @Sayyid, if some one working in a bank it hard to refuse to your manager to handle only other type of transactions. Bank will kick out such employee who will not follow bank policy.
Answer: I used to work in them myself but the truth is, whether you deal with interest directly or not, you are aiding and facilitating it- It is haram

'Abdullah bin Masud and Jabir bin Abdullah both reported Rasolullah cursed the accepter of interest and its payer, and one who records it, and the two witnesses, and he said: They are all equal.

Would it be ok to work as a get-away driver for bank robbers because your job in the operation, i.e driving, is halal itself? Clearly not
I know its easy to say and hard to live it, but trust in Allah and he will provide for you from places you couldn't even imagine InshAllah
Comment: there is no clarity in question and answer is not based on verses from Quran and hadith
Answer: there are Syari'a banks in my country but, i have once use service of that syari'a's bank and the system is still riba, i was disappointed that time , and refused to use a bank system, except only transfer,
the bank profit must use syari'as law of islam, but until now i havent see the real  syaria's bank yet. i dont know if it exists in your country. if it exists work there the system syaria is recommended in islam.
Answer: Basically, You can work in a bank if there are no jobs available what so ever and if you are required to work (so maybe to get money for your family or something such).
However, while you are working there you have to be looking for another job.

Is it Haram to work in Banks?