Where in Paris can I rent a Segway without a guide?

Question: I would like to find some place to rent a segway by a whole day. I don't need a guide. Is that possible?
Answer: Searching for self-guided segway rental on Google, I came across Gyropode

Upon arrival, you will be provided with training and safety
  instruction before starting your independent tour. After that, you
  will be free to explore the city of Paris independently and at your
  own pace for either one or two hours depending on the option you have
  selected.
Comment: "by a whole day"
Answer: It's impossible to rent a Segway for all day, for a simple reason: they have a maximum autonomy of a couple of hours/12 kilometers (when not perfectly new). That's one of the main reason in most cities they are not rented (usually, at least) outside an organized tour: you'll end up with hundreds of customers everywhere accross the city to go to pick up 'cause they have no more autonomy left.
And, in a huge city like Paris, just from Arc de Triomphe to Notre-Dame de Paris it's 6 kilometers; by casually going around you would end up without charge left even before having seen a tenth of the city.
Comment: It is, obviously, an entirely different thing. A car rental company charge you tons of money so that when the customer is an idiot it's christmas time, they rent "few" cars, and they are not coming to pick you up, so when the hypotetical idiot drive for 200 kilometers and the car stop it is his problem to call a tow car, pay for it, and then they will make you pay more for each additional day you keep the car. Totally different from having a tens of segways accross the city that you are forced to go recover personally.
Comment: They already do, partially: that's the reason the one and only segway free rental you found in Paris cost for 2 hours on average more than the rental of a segway and a specialized guide for 3 hours. I'm not saying that you can't rent a segway without a guide, I'm just pointing out that you can't rent it for a whole day, as the OP asked.
Comment: (side note: obviously you can "charge the customer x00 euro if they don't return the segway too", but then you need at least a couple of van or three to go recover the segways, and then you need a bigger place for your activity because you need to park the vans, and you have vans that produce no income but just costs, and you must have spare peoples to drive them...all of this, to offer a worse service at an higher price? Really the fact that you found only ONE free rental in Paris vs tens of rental companies with tour included do not make you ring the bell that maybe there is a reason?)
Comment: I guess this company that does weeky segway rentals must have a full time job recovering them from all over the city when the customer abandoms them after two hours: http://segwayofrichmond.biz/tours-rentals/rental-rates/


custom Layer Switcher style in openlayers

Question: I use this example to customized my layer switcher in openlayers.But I want to change the  position,width and height of layer switcher.I know it relates to CSS.I change some numbers to get some idea.But I can't figure out how to do it.
Pls give me some tips.Thanks
Answer: check out openlayers dark theme here.
it has customization about layer switcher too..
UPDATE:
oh sorry due to not reading your que. completely i give only thematic solution...I noticed that newly.
new solution is that change the following style (top):
<code>.olControlLayerSwitcher {
    background-color: transparent;
    color: white;
    font-family: sans-serif;
    font-size: smaller;
    font-weight: bold;
    margin-bottom: 3px;
    margin-left: 3px;
    margin-top: 3px;
    position: absolute;
    right: 0;
    top: 42px;
    width: 20em;
}
</code>

i hope it helps you...
Answer: You have to match the right element and the right class with CSS. Here 2 samples :
<code>#layerswitcher.olControlLayerSwitcher {
font-size:14px !important;
}

.olControlLayerSwitcher .layersDiv {
    background-color:red !important;
    margin: 1em !important;
}
</code>
I'm not sure the !important instruction is required, but keep it at least for the test.
If you're note familiar with CSS, have a look on some tutorials :

http://www.cssbasics.com/
http://sixrevisions.com/css/20_websites_learn_master_css/
http://www.w3schools.com/css/

Regarding !important instructions :

http://webdesign.about.com/od/css/f/blcssfaqimportn.htm

Hope it helps!
Answer: Just use Firebug or any other developer-tool to get the CSS-classname and existing rules that perhaps have to be overridden.
Some parts of the Layerswitcher are styled with static images but they can also be set to user defined images by defining the image path or changing the rule that sets the image.
see http://jsfiddle.net/expedio/9m3wv0qx/


Dictionaries in Python

Question: I have a dictionary that has a place name as a key and as the value it has several lists of words, eg, 1 entry looks like:
{'myPlaceName': [u'silly', u'i', u'wish!', u'lol', [u'the', u'lotto'], [, u'me', u'a', u'baby?'], [u'new', u'have', u'new', u'silly', u'new', u'today,', u'cant', u'tell', u'yet,', u'but', u'all', u'guesses', u'silly']]}

How can I join them all so I can get the common words associated with each place?
I would like my output to get silly and new as the common words for the dictionary.
Comment: Your list contains other list and is not enclosed properly .
Comment: give an example of the expected output. It's slightly unclear what you want.
Comment: The value you show for the dictionary entry is a list of standalone words and sublist of other words, the delimiters for doing this are syntactically incorrect, it does not match your written description. Aside from the bracket issue, which is wrong, your description or the value?
Answer: This function takes a list of a list of words, and returns all words that are found in all the lists.
eg get_common_words([['hi', 'hello'], ['bye', 'hi']]) returns ['hi']
def get_common_words(places):
    common_words = []
    for word in places[0]:
        is_common = all(word in place for place in places[1:]) #check to see that this word is in all places
        if is_common:
            common_words.append(word)
    return common_words

or the giant one-liner:
get_common_words = lambda places: [word for word in places[0] if all(word in place for place in places[1:])]

or just go with one of the methods suggested in the comments of this answer.
Comment: `reduce(set.intersection, map(set, places))`
Comment: `set.intersection(*map(set, places))` on Python 2.6 or newer.
Comment: @J.F. I should have known there was a more concise way than what I posted. It is Python, after all...
Answer: print ', '.join(dictname['myPlaceName'])
This will create a comma-separated list of all the entries in the list. Replace dictname with the name of your dict.
Answer: If it s a list containing only words, use join.
>>> k = [u'silly', u'i', u'wish!', u'lol']
>>> " ".join(k)
u'silly i wish! lol'
>>>

Dictionaries in Python


finding a corrupted part from the parts of a split archive

Question: I have 7 files with extensions like xyz.rar.001 - xyz.rar.007 clearly they are parts of a single file. I have all the 7 parts. I join them using a file joiner into a single file xyz.rar and try to unrar them with WINRAR , it says that archive is corrupted It is clear that 1 or 2 parts are corrupted. IS THERE ANY WAY TO FIND THEM ? Please help I don't want to re download all of them NOTE- winrar can detect a corrupt part if the parts were splitted using winrar (with extensions like part1.rar , part2.rar etc. ) but not if they are named as rar.001
Answer: WinRAR can extract those .001, .002, ... files just as well as part1.rar, part2.rar, ...
Simply open up the .001 with WinRAR. What I've done on my PC is set the .001 extension to automatically open up with WinRAR - that way I can right-click on it in the explorer and see all the regular WinRAR options.
Check this link if you need some more info http://www.binaries4all.com/001/winrar.php.
Comment: I mentioned earlier that all splitted files joined successfully into one archive but the archive is corrupted. since I download all the parts at different times so 1 or 2 may be corrupted I just want to figure out WHICH ONE IS CORRUPT Note-on using winrar on .001 file it says "Unexpected end of archive" (does it mean last part is corrupt ?)
Answer: use 7-zip to extract them directly (don't use a file joiner) Unlike Winrar , 7-zip can handle those .001 type files.If one of the archive is corrupt it will surely mention the part ( " crc failed in part x " ) but this will occur only if the data is damaged during downloading . If this is not the case you can only solve this with the help of a recovery record. Simplest way is ask the person who uploaded the files to give you each file's checksumthen compare each of your own file's checksum with it the file with a different checksum is corrupted.


how can i check / verify past events of my smartcontract?

Question: I want to check my past event emitted by smart contract during function call so that I can verify that the function is actually called.
``program.addEventListner()``` is used only for real-time I need to verify my past events.
Answer: You can fetch the transaction history of your program (address) and then parse the transactions using Anchor event parser.
fetching the transactions
connection.getSignaturesForAddress is limited to 1000 transactions only. You can find here how to bypass the limit and fetch > 1000 transactions
parsing transactions
You can use Anchor EventParser to parse your transactions. This has been already asked here.
Answer: To verify past events emitted by a smart contract, you can use a blockchain explorer or a client library that provides access to the blockchain data. A blockchain explorer is a website that allows you to search for and view details about blocks, transactions, and contract events. You can use the contract's address, the block number or range, and the event signature to search for past events.
Client libraries, such as web3.js for Ethereum, also provide a way to programmatically access the blockchain data and retrieve past events. You can use the "getPastEvents" method of the contract instance to retrieve the events that have been emitted by the contract, and then filter the events based on the event signature and other criteria.


Besides the Agents what else was there actively looking for people in the Matrix?

Question: While giving my answer to another question I realized that Tank and Dozer are on watch reading the Matrix from the Nebuchadnezzar or someone else in the crew is always watching. Other than the Agents though what are they watching out for? Especially when plugged into the Matrix.
Comment: Pure speculation: (a) potential people to rescue (b) red dresses :)
Comment: They can be watching out for messages/contact from other people in the matrix.  I.e. the Oracle, other ships crews etc.
Comment: Technically you only have to watch out for a red dress because an Agent is behind you. Simple solution every time you see an attractive woman in a red dress shot behind you and keep watching.
Comment: It seems like there is a constant threat of detection though. I'm curious as to if there is anything other than the Agents which for the most part don't pop up all the time unless you're Neo or with him.
Answer: There are a number of other things that operators would be watching for:

Programs: sentient machines that appear as human in the matrix and are responsible for performing various maintenance roles. Agents are merely a subset of these programs. Other examples are Rama Kandra (a power plant systems manager for recycling operations) and his wife Kamala (an interactive software programmer). Operators would want to look out for these programs because they could still pose a direct or indirect threat to redpills if they discover who they are or what they're doing.
Exiles: programs that are obsolete, have no purpose, or no longer function properly, but who refuse to return to the Source. These rogue programs are no longer working with the machines, but can be a danger in and of themselves and must be watched out for. Many appear as human, such as the Merovingian, his wife Persephone, the Trainman, the Keymaker, and Sati. Others have the appearance or characteristics of paranormal creatures, such as the Twins (ghosts), Seraph (a wingless angel), and two of the Merovingian's thugs Cain (a vampire) and Abel (a werewolf).
Déjà vus (or generally any glitches): A déjà vu is an indicator that the code of the Matrix has been altered. In the scene in the Lafayette Hotel where Neo sees a black cat walk by twice, the Matrix is changed to seal off the hotel's exits. It appears that this change is simultaneously discovered both by Mouse (in the Matrix) and Tank (outside the Matrix), suggesting that glitches like a déjà vu can still be noticed by operators.
Comment: They also watch humans, their own and others (possible recruits or just [interesting](https://www.youtube.com/watch?v=3vAnuBtyEYE)).
Comment: Since this is a highly supported answer and no one else has bothered to answer it I'm going to award you the bounty and accept the answer. I was hoping for a few more answers. I like yours and it contains a lot of information but I really feel there must be something more that the Operators must be watching for.


Understanding the difference between local time and local sidereal time

Question: I am currently attempting to understand different systems of telling the time: particularly, distinguishing local time (LT) from local sidereal time (LST). I understand that they often differ; despite this, is it possible to tell on what day of the year the two will be the same? How would I go about doing so?
Comment: A twelve hour clock whose hands have completely frozen will be exactly correct twice a day.
Comment: Although the question is phrased differently, this question is a near duplicate of https://astronomy.stackexchange.com/questions/34654/does-mean-solar-time-and-sidereal-time-sometimes-indicate-the-same-time.
Answer: Local siderean time is the time it takes for the stars to return to the same position in the sky. This is a different time as for the sun to return to her position. The sun takes 24 hours the stars a bit less. This is always the case. The Earth has moved a bit (on a circular orbit) so the stars will retain their position already a bit sooner. If the Earth didn't rotate around its own axis the sun would revolve around it (in one year) while the stars wouldn't. This is the reason that both times will always be different (the motion of the fixed stars will always be different from the motion of the sun as the sun seems to move relative to the stars).  There is no way to make the sun and stars rotate at different speeds. You can express the times (or the angles the sun and the stars make) in one another but they will always differ. Of course will both speeds of time be the same. If you base your local time system on the stars (24 hours being the time it takes for the stars to be in the same position again) you have a somewhat different clock as the one which is based on the motion of the sun. The two clocks will never show the same time (if the days are not included). The speeds of time will be the same though (if one hour has passes on the sun-based clock less time will be seen to have elapsed on the sidereal clock but the amount of time passed will be the same, i.e. the time covered by a sun-based clock equals the amount covered by the siderean clock).
Will the two clocks ever show the same time? If both clocks show 24 hours the it it is the same as looking at two clocks with hands going at different speeds. If both start at twelve o'clock, when will both clocks show the same time again? I'll leave that up to you.


Saving an instance derived from a base class

Question: I have a base class, Fruit, and an instance of a child class, Apple. How should I go about saving the Apple instance to a database? Would an insertFruit method with an instanceof check to detect an Apple be considered as good design or not?
Answer: I don't think it's a good design to have a method in the superclass that checks if the object is an instance of a subclass. What if you want to add Banana later? Will you add another check in insertFruit()?
I think it would be better to go with polymorphism, and override the insertFruit() method in the Apple class.
Comment: You're right. What could be done is to have an override as you say that would save fields specific to a subclass and then call the save method for Fruit for fields in the base class. In the DB this would reflect as a new record for an Apple, it's id then being used in a Fruit entry.


How does a Dirac delta function operate on a Fourier-Stieltjes integral?

Question: Consider a stationary complex random function $\zeta(t)$ represented as a Fourier-Stieltjes integral
$$\zeta(t) = \int_{-\infty}^{+\infty} e^{i\omega t}dA(\omega)$$
where $dA(\omega)$ is the random amplitude.  Find the mean value of $\zeta(t)$ using a temporal average. A temporal average is taken over a finite interval $T$, and then the limit is found as $T$ goes to infinity
$$\overline {\zeta(t)} = \lim_{T\to \infty} \frac 1T \int_{-T/2}^{+T/2}\zeta(t) dt$$
Substitute the Fourier-Stieltjes integral into the equation and perform the $t$ integration to get
$$\overline {\zeta(t)} = \lim_{T\to \infty} \frac 1T \int_{-\infty}^{+\infty} dA(\omega) \int_{-T/2}^{+T/2} e^{i\omega t}dt = \lim_{T\to \infty} \frac 1T \int_{-\infty}^{+\infty} dA(\omega) \frac {2sin(\omega T/2)} {\omega} $$
Take the limit using the following expressions
$$ \lim_{T\to \infty} \frac {2\sin(\omega T/2)}{\omega} \rightarrow 2\pi\delta(\omega) \quad \mathrm{and} \quad \lim_{T\to \infty} \frac 1T = \lim_{T\to \infty} \frac {\Delta\omega} {2\pi}\rightarrow \frac {d\omega}{2\pi} $$
which seems to give for the temporal average
$$\overline {\zeta(t)} = \int_{-\infty}^{+\infty} dA(\omega) \ \delta(\omega) \ d\omega = (???) dA(0) $$
Two questions arise: 1) Is the limiting process used above valid in the context of a Fourier-Stieltjes integral? 2) If the limit is valid, does the Dirac delta function operate on a Fourier-Stieltjes integral the same as it operates on a Reimann integral?
Comment: (1) As written, I don't think the reasoning is valid. (2) Yes, if you consider the fact that the Dirac delta function is not a function and $\delta(x) f(x)$ is not Riemann integrable. On the other hand, to actually conclude that the mean converges to "$dA(0)$" you don't need to reason "via" the delta function. You can do it rigorously and directly (at least when $dA(\omega)$ is replaced by $f d\omega$ where $d\omega$ is the Lebesgue measure and $f$ is some continuous function.)
Comment: @Willie Wong As to your comment (1): Can you explain you basis for why you think the reasoning is invalid? It is valid for a Riemann integral. You can tell by the question I suspect the logic, but I want to understand what is wrong.  Comment (2): Since $dA(\omega)$ is part of a Fourier-Stieltjes integral it cannot "just" be replaced by $fd\omega$.
Answer: Let me expand a bit more on why what you wrote is wrong.

Since you are asking whether your reasoning is valid, you cannot just pretend that you can "Riemann integrate" the expression
$$ \int f(x) \delta(x) \mathrm{d}x $$
The "limit" you wrote, where
$$ \tag{1} \lim_{T\to \infty} \sin(\pi \omega T) / \pi \omega "\to" \delta(\omega) $$
holds only in the weak sense. And that the correct, and rigorous statement, which does not involve anything that is not Riemann integrable, is that for a continuous function of compact support $f$ on $\mathbb{R}$ you have that
$$ \lim_{T\to \infty} \int f(\omega) \frac{\sin (\pi \omega T)}{\pi\omega} \mathrm{d}\omega = f(0) \tag{2}$$
In particular, for arbitrary Riemann integrable (but not necessarily continuous) functions, the above limit need not converge, and when it does converge, it does not have to converge to $f(0)$. (Consider the family of functions $f_a(x)$ such that $f_a(x) = +1$ if $x \in (0,1)$ and $-1$ if $x\in(-1,0)$, and $f_a(0) = a$ and $f_a(x) = 0$ otherwise. For every fixed $T$ the integral $\int f_a(\omega) \frac{\sin(\pi \omega T)}{\pi\omega} \mathrm{d}\omega$ exists and is independent of $a$. On the other hand if you integrate $f_a$ against the singular Dirac measure concentrated at $0$, you will get an integral $= f_a(0) = a$.
This goes to illustrate that you cannot say that the "Dirac delta function operator on the Riemann integral" in the sense you want, since for arbitrary Riemann integrable function $f$ you actually cannot make use of the weak limit (1) to conclude that the limits of the integral exist and that the integral converges to the integral of $f$ with respect to the Dirac measure.
Interestingly, you can note here that (2) is without the $\frac1T$ normalization that you introduced in your question. In particular, if your measure $\mathrm{d}A(\omega)$ is absolutely continuous with respect to the Lebesgue measure, and that the Radon-Nikodym derivative (the probability distribution function if you will) $\lambda$ is continuous with compact support, you actually have that the quantity $\bar{\zeta}$ as you defined it must vanish identically.
Whereas the first limit that you wrote can be interpreted to be more-or-less true in the weak sense, the second limit as far as I can tell is just pure nonsense. It appears that you are trying to use something like Heisenberg's uncertainty principle, but not that that is an inequality, not an equality.

But let us look at how we can actually compute your $\bar{\zeta}$. Since you are working with a Fourier-Stieltjes integral, I assume your measure $A$ is finite Borel. So you have reached the point of trying to compute
$$ \lim_{T\to\infty} \int \mathrm{d}A(\omega) \frac{\sin( \omega T/2)}{\omega T / 2} $$
We note here that writing
$$ g(\omega) = \sin(\omega / 2) / (\omega/2) $$
and
$$ g_T(\omega) = g(\omega T) $$
we have that
$$ |g_T(\omega)| \leq 1 $$
and that for every $\omega_0 >  0$, the functions $g_T |_{\mathbb{R}\setminus(-\omega_0,\omega_0)}$ converge uniformly to $0$.
while
$$ g_T(0) = 1.$$
Inspired by the above properties, we do the following:
Since $A$ is a finite measure, we can decompose $\mathbb{R}$ in the following way.

First isolate the set $\{0\}$; if $A(\mathbb{R}\setminus \{0\}) = 0$ then we are done. Else denote $E_0 = \mathbb{R}\setminus \{0\}$, and
by countable additivity you have that there exists a strictly decreasing sequence $a_i$, with $a_0 = +\infty$, such that
$$ A(E_0 \cap (-a_i,a_i) ) \leq \frac12 A(E_0 \cap (-a_{i-1}, a_{i-1})) $$
and define
$$ E_i = E_0 \cap (-a_i, a_i), F_i = E_i \setminus E_{i+1}.$$
Note that we have $\mathbb{R}$ is the disjoint union of all $F_i$ together with $\{0\}$.

Observe that
$$ |g_T |_{F_i} | \leq \min(1, 2(a_{i+1} T)^{-1} )$$
So by construction
$$ \begin{align*}
\left|\int \mathrm{d}A(\omega) g_T(\omega) - A(\{0\}) \right| &\leq \sum_{i = 0}^\infty \int_{F_i} \mathrm{d}A(\omega) |g_T(\omega) | \\
& \leq \sum A(F_i) \min(1, 2(a_{i+1} T)^{-1}) \\
& \leq A(\mathbb{R}) \sum 2^{-i} \min(1, 2(a_{i+1} T)^{-1}) \end{align*} $$
Now, let $T$ be fixed, and suppose $i(T)$ is the largest (which we allow to be $+\infty$) value for which $a_{i(T) + 1} \sqrt{T} \geq 2$. Then we have the sum
$$ \sum 2^{-i} \min(1,2(a_{i+1} T)^{-1}) = \sum_{i = 0}^{i(T)} + \sum_{i = i(T) + 1}^\infty $$
The first sum we the summands are bounded by $2^{-i} \frac{1}{\sqrt{T}}$ so that the sum is bounded by $\frac{2}{\sqrt{T}}$. The second sum we can bound the summands by $2^{-i}$ so that the sum is bounded by $2^{-i(T)}$.
Now note that $i(T)$ grows unboundedly as $T$ increases. So we have that
$$ \lim_{T\to \infty} \left| A(\{0\}) - \int \mathrm{d}A(\omega) g_T(\omega) \right| = 0 $$
or
$$ \lim_{T \to\infty} \int\mathrm{d}A(\omega) g_T(\omega) = A(\{0\}) $$

Note that the explicit computations involve $g_T$ in the proof above can be replaced by the following properties:

$g_T(x) \leq 1$
$g_T(0) = 1$
For every $\epsilon > 0$ there exists $i(\epsilon)$ and $T(\epsilon)$ such that

$A(E_{i(\epsilon)}) < \epsilon /2$
$|g_T(x)| < \epsilon / 2$ for all $T > T(\epsilon)$ and $x\in E_0 \setminus E_{i(\epsilon)}$
Comment: @ Willie Wong.   Thanks for your answer.  The question is related to an issue with the Wiener-Khinchine theorem.  Need some time to assess and understand your answer. See    .http://math.stackexchange.com/questions/1233649/does-the-power-spectral-density-vanish-when-the-frequency-is-zero-for-a-zero-mea?s=1|2.8425
Comment: The tagged note here seems to bear on the problem.  http://math.stackexchange.com/questions/1259009/why-did-mathematicians-introduce-the-concept-of-uniform-continuity.  see http://math.stackexchange.com/users/30953/ittay-weiss comment on uniform continuity.


Replacing existing electric water heaters with heat pump water heater, how many do I need?

Question: I currently have 2x 50 gallon electric water heaters installed side by side in our garage to support 3.5 bathrooms 2 dishwashers and laundry. I'm considering switching to Rheems 120v heat pump water heater, my question is do I need to replace with 2x 50 gallon heat pump water heaters or 1x80 gallon?
Comment: Is there some reason you don't want to go with 240V for a hpwh?  Don't you already have 240V for the existing water heaters?
Comment: Given what you're trying to replace, are you hard-copy dead-set on the Rheem units? I ask this because the first-hour recovery of unitary heat pump water heaters absolutely *sucks* relative to their tank size, and going to a split-system HPWH (such as a Sanden unit) would give you *far* better overall performance while not overtaxing your generator (the Sanden units top out at ~3kW but can deliver first-hour recovery stats comparable to *gas* heaters of a similar tank size)
Comment: What region are you in? My understanding is that that 120V (standard outlet) hpwh takes a looong time to heat water, in part because the heat pump part is inherently slow in heating and in part because the small 120V heating element does not provide much boost. I was told this model was created so southern California would have a plug n play standard outlet hpwh option even if it doesn't work very well.
Comment: 2x50 = 100 gallons ready and waiting. 1x80 = 80 **which is less than** 100. More importantly, I suspect the heat pump water heaters in heat pump mode probably do a lot more work two of the 50 gallon running (recovering) than 1 x 80 gallon, and even more so if they (as I think many do) have an automatic resistance heat backup mode (for when you use too much at the same time). But the key is to look for specs in terms of gallons of hot water per hour.
Comment: Thank you. We are in austin tx area. The only reason I was looking at the 120v is it was rated at 2250 watts and my back up generator could run them if we have an outage. I can do 2x 50 gallon heat pumps if needed I was just curious if what I have now is over kill and 1x 80 gallon would be sufficient
Comment: the 120v rheem proterra are good.  i keep them in heat pump only mode.  4 set schedules, adjust them off your phone.  they do have backup resistive heat which goes on if you have them in energy saver mode.  depends a bit on how warm the room is your keep them in as they steal heat from the air...
Answer: I seriously doubt you'll get enough performance out of a unitary HPWH
Given that you have a very high-draw house to the point where you have 2 fairly large electric water heaters in series, I seriously doubt you'll get anywhere near enough performance out of any single unitary HPWH.  To drive home the point, the 50 gallon Rheem Professional Prestige is specified at a 63-gallon FHR, something that requires an 80 gallon 120V ProTerra to beat at 72 gallons of first hour recovery.  Given that you have the two tanks plumbed likely in parallel, you'd be pushing it to get enough performance out of anything short of 2 80 gallon 120V ProTerras, or 2 50+ gallon 240V ProTerras at 67 gallons of first hour recovery apiece for that matter.
Enter the split-system HPWH, stage right
However, this doesn't mean you have to give up on having hot water available when on generator power, provided you're willing to spend some on a better hot water heater.  As it turns out, unitary HPWH designs are severely limited in performance by the fact their heat pump unit has to be small enough to fit atop the water heater.  Removing that limitation by moving the heat pump part outside gives you a split system HPWH architecture, which gives you several benefits:

Split systems don't put a parasite load on the house heating system in winter (this can be avoided with a unitary HPWH by way of a duct kit, but that runs into limitations on intake air temperature)
Split systems can be made large enough to provide ample capacity even for high demands (the base model Sanden SanCO2 has a 69 gallon First Hour Recovery on a 43 gallon tank, and can push a 115 gallon First Hour Recovery on the 83 gallon tank model, all without drawing more than ~3kW of power, guaranteed)
Split systems can be built for low-ambient operation much more easily due to the extra capacity possible in the form factor (the SanCO2 units are happy down to -25°F, and deliver a COP of 2.6 at 17°F, temperatures that'd completely freeze out a typical unitary HPWH were it to try to ingest air that cold).

The primary downsides, of course, are cost and avaiability: the SanCO2, while well-proven in its home market of Japan, is relatively new to the US market (and thus not carried by very many distributors), and the 83 gallon version (which'd be what it'd take to give you sufficient capacity) costs about the same as 2 of the 80 gallon Rheem heat pump hybrids.  It also requires a bit of additional plumbing and wiring compared to a unitary design; all the refrigeration bits are in the outdoor unit, though, so it's still within the realm of what a qualified plumber can tackle.
Comment: All that fancy formatting, I thought this was a Harper answer! :D It's a standard TPE quality answer with a formatting upgrade. Very nice.
Answer: Since what you have is more than what you are contemplating  I would stick to these.
Look for a model of heat pump that is not integrated with the cylinder. There are many such brands and models.
Unless you buy a grunty one, it may well heat more slowly  so you will want more storage.
We have two 300l cylinders, which is 80 gallons each. This is for 4 of us. And we have a 3kw heat pump on each. Part of the reason is that when all kids have left, we can turn one off.  It works well for us in tetms of availability of water. We also have solar power  so I  use home automation to only heat when we are generating solar power.
Comment: You probably have a lot more options in New Zealand. The US Marketing approach to heat pumps in general and heat pump water heating in specific is generally awful. Also overpriced *.vs.* the rest of the planet.
Comment: what brand do you have?
Answer: This is perhaps not the answer you were looking for, but that number of bathrooms and dishwashers doesn't seem like it should require that amount of hot water. Are you sure that one 50-gallon heater would not suffice? If not, why not? If you have high-flow devices, like shower heads, consider replacing them with WaterSense models.
Answer: If those are in series you may consider replacing the first unit (the one that gets the coldest feed) with an 80GAL heatpump and keeping the second as-is.
HP are much more energy efficient bringing from cold (5°C) to lukewarm (40°C) than to bring from lukewarm (40°) to hot (60°) so doing as suggested you maximize the efficiency of the HP and in case of extra load the traditional heater will give the extra boost needed.
Also remember HP are slower compared to traditional boilers so allow for some extra capacity.


Font rendering in Azure Bastion

Question: I'm setting up an Azure infrastructure and the plan is to use Bastion to connect to the virtual machines therein. One problem I have found is that the font rendering in Bastion is far less legible than in standard RDP. Here's an example screenshot of a PowerShell script in Notepad. Are there any settings or tricks to improve the font rendering in Azure Bastion?
Answer: The font rendering is entirely controlled by the RDP client settings, which you don't have access to, so there's not much you can do to change that at present.

Font rendering in Azure Bastion


Root password same as admin?

Question: I have a mac with single user on it (who is Admin). I see tutorials which ask for the root password, is this the same as my user password or something else?
Answer: The root user password has to be set by you and they could be the same if you choose so, but it is not advisable to do that.

From the Apple menu choose System Preferences.
From the View menu choose Users & Groups.
Click the lock and authenticate as an administrator account.
Click Login Options.
Click the "Edit" or "Join" button at the bottom right.
Click the "Open Directory Utility" button.
Click the lock in the Directory Utility window.
Enter an administrator account name and password, then click OK.
Choose Enable Root User from the Edit menu.
Enter the root password you wish to use in both the Password and Verify fields, then click OK.
Comment: I know this is now the case, because I had to do it when I recently set up my new Mac mini. But I swear this has not always been the case - my Mac Pro which has been upgraded continually from 10.6, which it shipped with, has always allowed me root access and I have no memory of going through those steps on this machine. It's possible, I suppose.
Comment: @tubedogg it's certainly been similar to this since 10.4.  I remember having to enable root access when I wanted to use it.
Comment: Thanks for the help. If I change my root password, does it also change my default user (admin) password?
Comment: @Louis W, No, the **root** password and the **Admin** password can be two different passwords.  If you change one it doesn't change the other.

Root password same as admin?


When should I use lockout feature on my fork?

Question: I have a trekking bike with a 63mm fork which has a lockout feature enabling the control of the suspension.
Can you explain when should I lock the fork, in what position and why?
One obvious example would be when climbing hills, one should lock the fork in minimum suspension (almost no suspension, the fork is stiff/hard as if there is no suspension at all). The reason is to prevent that the part of the energy is lost on the amortization...
But, what are other examples? What should one do when going down the hill? Or going really fast?
Comment: Thanks for the answers, I know about bumpy surfaces and uphill rides, but I'd like to know should I lock it when going down the road, or going really fast, ...?
Answer: Anytime the fork bob is robbing you of power. That can include flats, sprints, climbing... Best advice is probably to try it out on all the terrains you ride and decide where it works and where it doesn't.
Answer: Any time you're climbing and can handle the obstacles without suspension.  The force of your foot gnashing down the pedal is going to compress the suspension, thus sapping some of your precious force (and thus, speed).  Also good for any time you don't need suspension due to good surface quality.  For example, the well maintained fire-road leading to where you want to ride.
Answer: On my hybrid, I keep the front suspension locked at maximum height when I'm on the road/flat cycle route. If I go off a flat route onto a more lumpy one, or get to a particularly bad section of road for pot holes (like the A6 as you come into Little Hulton from Horwich) then I unlock the suspension.
when I have the suspension locked at maximum height I feel as though I'm getting more power for my energy expenditure (although this is totally subjective and could be completely the opposite to what is actually the case), and it feels like it takes more enbergy to do the same stretch of road when I have the suspension unlocked.
Comment: Your subjective perception is correct. You're putting out the same power but, with suspension, part of the work you do on the downstroke of the pedals is compressing the suspension instead of driving the bike forwards. With the suspension locked, you remove that source of power loss.
Answer: Elite athlete road bikes do not have suspension but top competition trail bikes do--that should tell you something. Suspension is for giving the best possible contact with the road and therefore safety and rider comfort but it comes at the price of weight and energy waste as you pump away on the pedals.
A rocky downhill route--use a bike with suspension; a hilly but smooth road course--grab that bike without the suspension. My regular route is a combination of both: I bushbash for short sections through sand, mud and tree roots but most of the way is smooth tar with scream descents and hard climbs, thus I have a hybrid with a suspension lock on the front forks.  While the road bikers get away from me on the smooth, I quickly overtake them on the rough sections.
Answer: As others have said, you should lock it out when you want to put more power to the wheel. i.e. a flat road, moderately smooth trail. Being robbed of energy isn't as bad on a hard tail, but on a full sussy it is noticeable in various situations. I always lock out when climbing, especially if you stand while climbing. For descending I always have the fork unlocked. Tire pressure will also play a role. If you can run lower psi then you may not need the fork as often. Personally, When I'm trail riding, I always have the fork unlocked. If I come to steep climb, I lock it. If I happen to hit a fast flat section, I will lock it out. If I'm on the road I lock it out. Of course it all depends on personal preference. Try different things until you find what feels right.
Answer: I have several bikes but I ride my fatbike through the winter months, and in summer when my usual route is to wet/muddy,   leave my fork unlocked most of summer but lock it all winter because most suspension seals are not intended for temps lower than 20 degrees F. I dont want to have to replace seals every spring.


How do I transfer my plugin data?

Question: Suppose I have a question and answer plugin. And I have my user data (questions and answers) within it. Now suppose I want to transfer those data to a new wp plugin or a theme. How do I do that ?
Comment: that's an interesting question, but if you are thinking of making tables by editing wordpress database for uploading those tables with your plugin data, you'll probably break site. so make sure you backup everything before proceeding anything
Comment: This question is too broad to give any answer. You need to provide more details including the plugins you were using, are going to use, how these plugins store data etc to get any answer.
Answer: Data should be stored on the DB, so your plugin should be saving all those QA on a table, so should be able to export that table and then you will have to know how the new plugin storages its data (which table and how) and you import there.

How do I transfer my plugin data?


Automatically create contact record in marketing cloud

Question: We have migrated contact records in marketing cloud data extension and it is constantly updated. We need to have those customer details in all contacts  with memberId as contact key.
Can we automate to create these contacts as it is added in the data extension?
Comment: Hi there, you can do this a number of ways. To better answer your question, can you give some more information: is this a once off and an ongoing activity? How is the Customer Data Extension being updated (FTP upload, API, etc)? Is it just customer additions, or also customer Updates (like email changes) also?
Comment: Additional: have you migrated from other salesforce products to Marketing cloud or any other System ?
Comment: Hi, DE is updated via FTP and there is a possibility that emails are updated. One time import is done using csv file
Answer: If you are using the FTP, then you can use the same file in FTP to import Subscribers [Email - Contacts] via Import File activity, to the "All Subscribers" as below.
Make sure your file has the Mandatory values such as Subscriber Key [memberId], Emiladdress and Status [as 'Active']
Example CSV:

Once they are added to all Subscribers, they automatically gets added to Contacts, specifically for Email channel.
As Best practice and to double confirm on mapping, use map manually option as below,

Finally as per your requirement you can put this Import definition in a Automation either as File drop or as a Scheduled as per your requirement!
Hope this help!


Germany Vs EU Parliament, Case C-233/94: summary of the case

Question: I am studying this case but I am only able to find the judgment of the court and the opinion of the general advocate. Where I can find a summary of the facts of the case?
Comment: By googling for C 233/94
Comment: Already tried but I found only judgment of the court and the opinion of the general advocate. I am asking since I am not a lawyer, so I am in trouble.
Comment: You find the facts in the judgment under "The principal claim", paragraph 8 et seq.
Answer: The complaints made by Germany can be found beginning on page 8 of the full judgement.
In essence Germany is challenging an EU directive
The German Government considers that the first and third sentences of
Article 57(2) of the Treaty, which provide that the Council and the Parliament are
to issue directives for the coordination of the provisions laid down by law, regulation
or administrative action in Member States concerning the taking-up and pursuit
of activities as self-employed persons, cannot constitute the sole legal basis for
the Directive. It claims that it follows from the first, second, fourth, sixteenth and
seventeenth recitals in the preamble to the Directive that the Directive does not
merely regulate banking operations but aims primarily to increase protection for
depositors. Consequently, the Directive should also have been based on Article 235
of the Treaty. Since Article 57 is a special provision in relation to Article 100a, the latter provision is not applicable in the present case. Article 129a of the Treaty,
which specifically concerns the protection of consumers, which include depositors,
does not empower the Council to adopt, besides measures adopted pursuant to
Article 100a, measures falling within the scope of the legal acts provided for in
Article 189 of the Treaty.
Comment: Thanks a lot. And why Germany was against that directive for deposit guarantee harmonization?


External sharing what permissions are needed?

Question: I have a site collection where external sharing is activated. My admin user can share files and folders externally with no problem. However the normal users (Within my organisation) don't seem to have the option to share with external users - they do however have the option to share with other users within the organisation. What am I missing here?
Answer: Ah digging a bit more around I figured it out. It seems the option to allow non-owners can be set on multiple levels not just the Site collection level. For reference see this anwser: SharePoint Online : Turn on "Allowing non-owners to invite new users"


MMS messages go into a group conversation with sender and my own number instead of the regular SMS conversation

Question: Let's say I have a conversation with Alice. If Alice sends me an MMS, it appears outside of that conversation, as a group conversation with Alice and my own phone number as participants. Could this be caused by having Unknown for My phone number in SIM status?
Answer: The solution is to set Your phone number to the actual phone number within advanced settings in Messaging.
Comment: Answering your own question is great, but it's important to use the same account. To get your two accounts merged, use the "Contact" link at the bottom of the page to ask SE staff directly.


How to set page alerts for everyone with permissions to a sharepoint online subsite?

Question: Is there a way when configuring alerts for a subsite's pages in that you can select everyone who has permissions to the subsite? This way if someone joins or leaves the subsite the owner wouldn't have to manually add or remove them from the page alerts. Thanks so much.
Answer: Not easily: since it's a subsite, there is no OOB distribution list like there would be for site members of a root team site. If the users are in a SharePoint group, it is possible to use flow to get the email addresses of the users that are in the group.
Unfortunately, there is no OOB action to do this, and it relies on calling the SharePoint REST API. A blog write-up with the specific instructions is here. Note, the specific action used is "send an http request to sharepoint". This is important, because the older "http" action has become a premium action.
Answer: Alerts are designed to work with users, not groups or distribution lists.
Assigning alerts to a group just isn't part of the design.
You can use flow as a workaround.
In addition, it's a by-design behavior. If you need more information, you can go to user voice and post about it.


"Invalid neighbor parameter" error. Trying to create static arp using netsh

Question: I am trying to make a static arp entry for my gateway 192.168.2.1. I am using Windows 7 Ultimate 64 bit and at first I tried:
arp -s 192.168.2.1 00-11-22-33-44-55

But I was getting a permission denied error so I started to look around and found out that on Windows 7 64 bit I need to use netsh.
I found some commands on some other posts to try but the add neighrbors command responds with
Invalid neighbor parameter (00:11:22:33:44:55).
every time that I try.
I first used this command which seems to work:
netsh interface ipv4 delete neighbors

And then this is the command that gets an error
netsh interface ipv4 add neighbors "Local Area Connection" "192.168.2.1" "00:11:22:33:44:55"

I also tried without the quotes and got the same response with this.
netsh interface ipv4 add neighbors "Local Area Connection" 192.168.2.1 00:11:22:33:44:55

It doesn't make sense to me because if I run:
netsh interface ipv4 delete neighbors "Local Area Connection" "192.168.2.1" "00:11:22:33:44:55"

It works just fine and gives me the Ok response so I am not sure what is going on. Does anyone have any suggestions? I am also running cmd as admin and I do know my correct gateway mac address.
Answer: I got it figured out. Turns out that I was using the wrong mac.


Strange memory leak in Window:addSubView

Question: first of all sorry for my English :-) not so good.
I have a strange memory leak with the following code (code after the explanation).
I have a class, FLWaitingView. It is a simple view with a waiting indicator (plus a view with background), used to say to the user "wait for the data to be loaded".
It has two simple methods: show and dismiss.
In the show method, I find the main Application Window and add the subviews (the waiting view and a background view, with different animations). In the dismiss method, I remove it from superview.
In every show, I verify that the view isn't already visible using a static bool var (is_visible).
The strange thing is this: In the dismiss method, I use:
<code>[self.view removeFromSuperview];
[self.waitingView removeFromSuperview];
</code>
to remove the two views from the Window, to avoid them to be retained. They are correctly removed, I can verify this with NSLog (for cicle on each window subview). But, in INSTRUMENTS, using the "mark heap" function, I see that in every single reload (new instance of FLWaitingView, then show, then dismiss) the old instance remains in memory and continues to increase memory usage. Obviously is not a problem of the calling code, because I correctly release the object:
<code>//CALLING CODE
//customWaitingView is a property retained
self.customWaitingView = [[[FLWaitingView alloc]init]autorelease];
[self.customWaitingView show];
</code>
Moreover, and I think that this is the most important information, if I move the view dismission in another method, called by a selector, the leak disappear!!!
Now I show the "wrong" code and, after, the "correction". I would like to understand why it happens.
<code>- (void)show
{

    if (!is_visible){

        id appDelegate = [[UIApplication sharedApplication] delegate];
        UIWindow *window = [appDelegate window];
        self.waitingLabel.text = @"Attendere";

        self.view.alpha = 1.0;
        self.waitingView.alpha = 1.0;

        [window addSubview:self.view];
        [window addSubview:self.waitingView];
        [self.waitingIndicator startAnimating];
        self.view.frame = window.frame;
        self.waitingView.center = window.center;
        // "Pop in" animation for alert
        [self doPopInAnimationWithDelegate:self];
        // "Fade in" animation for background
        [self doFadeInAnimation];
        is_visible = YES;
    } else {
        NSLog(@"FLWaitingView %@ already visible, do nothing", self);
    }

}

- (void)dismiss
{
    [UIView beginAnimations:nil context:nil];
    self.view.alpha = 0.0;
    self.waitingView.alpha = 0.0;
    [UIView commitAnimations];
    [self.waitingIndicator stopAnimating];

    //here is the problem
    [self.view removeFromSuperview];
    [self.waitingView removeFromSuperview];
    is_visible = NO;
}
</code>
the code above is the "wrong" one, but if I add
<code>[self performSelector:@selector(alertDidFadeOut) withObject:nil afterDelay:0.5];
</code>
in the dismiss method and a new method (obviously removing the redundant code from dismiss method):
<code>- (void)alertDidFadeOut
{
    //here the memory is correctly released
    [self.view removeFromSuperview];
    [self.waitingView removeFromSuperview];
    is_visible = NO;
}
</code>
the memory is correctly released.
Why??????
Thank you in advance
Fabio
Answer: Your view isn't getting released as you would be expecting because at the moment you're releasing it there are still animations linked to it. You can only properly release it after the animations are finished.
Your second method works because the animation lasts less than 0.5 seconds - the releasing code is called after view is freed of all the animations.
Proper way to animate the view would be to either create an animation and assign its delegate or maybe a bit more elegant soulution is to use block-based animation like this:
<code>- (void)dismiss
{

    [[UIApplication sharedApplication] beginIgnoringInteractionEvents];

    [UIView animateWithDuration: 0.15
        animations: ^{
            self.view.alpha = 0.0;
            self.waitingView.alpha = 0.0;
                     }
        completion: ^(BOOL finished){
            [self.waitingIndicator stopAnimating];
            [self.view removeFromSuperview];
            [self.waitingView removeFromSuperview];
            is_visible = NO;
            [[UIApplication sharedApplication] endIgnoringInteractionEvents];
        }];
}
</code>
Comment: this works too (no memory leak), like my other "workaroud", but I don't understand why :-). What is wrong in the first code? the views seems to be correctly removed from main window...but not released...
Comment: Thanks a lot! Now I understand :-) moving to the block based animation!!
Comment: @LombaX: no problem! :) but if this is a new project that you're working on you might want to consider using ARC - it'll make your coding life much easier. You'd still need to remove the `view` from its `superview` but you can (you actually have to) forget about using `retain`, `release` and `autorelease`.
Comment: I know about ARC, but I'm pretty new both with iOS/Objective-C and OO Programming (before this, only VB6 and PHP O_o), in this moment my priority is to improve my theoretical skills and memory management is one of my "requirements" :-) thanks again!
Comment: @LombaX: You're welcome :-) But if you're new to iOS then that's even one more reason to consider ARC. Memory management issues should be left to those old school iOS developers who feel bad about the time they spend to learn iPhone memory management and now all their hard-earned knowledge is almost useless ;-)


In Apple Music (Big Sur), how can I 'go to current song playing' in the context of the main library?

Question: You used to be able to click Cmd+L to highlight the current song in the context of its playlist. However, this doesn't work anymore for songs being played in the library - only when playing from a custom playlist. It will show the song playing in the library but not in the context of the rest of the library. This feature was helpful because it allowed me to look at other songs in proximity to what was playing.
Answer: Click Cmd + L. This will show you the album that is currently playing. Then click on 'songs' in the sidebar. This will take you to the current song in library view. (What used to be a one-step process is now two steps).
Answer: Click on the musical note to the left of Songs in the sidebar. It brings you back to the song list.
Comment: Yes it takes you to the songs view, But does not show the current song in this view.


Dream-based Missions

Question: So, in my world there are these hit-men/assassins, who get all their missions/targets through their dreams. This takes place on Earth in the future. They have a dream the day before the kill, which is sent to them by the leaders. Would this be a good way to transmit this information to the hit-men? Are there any problems with this method? How would this be possible (just the concept) using their "future" technology? (no magic)
Comment: If you want to this without magic you need brain-to-computer interfaces, so your information will have to passed through computers - thereby it will be suspect to all security measures available for those.
Comment: Psychics and mutants get into dreams.  Also Freddy Krueger.  Those worlds do not otherwise necessarily have Hogwarts style magic.
Comment: @Will At no point did he say he didn't want any Hogwarts style magic, only that he wants it to be technology based. Psychics and Freddy Krueger both use a form of magic. Mutants have developed abilities which are not fully understood within their respective universes. It is possible mutant powers are also based on magic.
Comment: A lot of sci-fi media does transmit something through dreams regularly. Check out "star trek" for starters. They always give some half-baked bs explanation, but that's what sci-fi is. I'm sure you'll find a lot of people explaining how it worked in some episode of some show if you google it for a second
Answer: Compared to calling the hitman and telling him what to do, or meeting him and telling him in person, or writing a letter, a dream is a terrible way to convey information.  Dreams are crazy and sloppy!  People morph into other people.  Your high school buddies show up.  Monsters.  Porn stars.  All sorts of strange things happen.
Which would make for a fine story.  You need some reason it has to be dreams - maybe that is the only secure method to make the communication because all other methods can be intercepted.  Then the story will deal with the difficulty of relying on a dream for something as important as killing a person.  How to make dream communications robust?  How to identify the target in the dream to a person who has never seen the target?  How to weed out dream elements forcing their way in?  Good stuff!
The twist (short sci fi must have a twist!) should be some sort of information, or message, or modification (not necessarily the hit) which actually is conveyed better by dreams than by any other method.
Comment: You can train yourself to dream different. Check out lucid dreaming. Just a random conventional dream would be terrible indeed
Comment: Thanks, that just gave me an awesome idea. Instead of a hit-man it's a government agent, and the bad guys are twisting the dream messages to control him into killing good guys.
Answer: Let's answer them one by one.
Would this be a good way to transmit this information to the hit-men?
No, in most cases, and yes in certain interesting cases.
One interesting case could be: The leader is aware that enemies are eavesdropping on him, and want a secure channel to communicate with the hit-men. Enemies are kick-ass smart with all conventional modes of communication, and they can decipher any encryption.
Are there any problems with this method?
A lot. Reality is generated and consumed by the same brain of the hit-man all the time. The only difference during dream is that reality is generated with lesser number of inputs from the environment through senses, such as vision and sound in real time.
Problem one: Hit-men might very well do the kill in their dreams, and believe that they have achieved their target. If then the leader tries to convey reality, they might get freaked out and turn against the leader
problem two:
When they wake up, they can only remember half of their dream, and this worsens over time. You can't remember a dream you saw 3 days ago, while you can very well remember a place you "saw" 3 days ago. Eventually, hit-men are more likely to hit wrong targets, or get caught by enemy, or even worse, turn against the leader.
How would this be possible (just the concept) using their "future" technology? (no magic)
Understanding the fundamental element of perception is the key. Look what we have achieved with chemistry after the advent of periodic tables. Look what we achieved after understanding the fundamentals of electromagnetic radiation. Same with genes and genetic. Now imagine what we can achieve by figuring out the basic fundamental unit of thought, perception, idea, question and the very fabric of consciousness ! You are right, it is nothing short of magic.
Remember, a simple Skype call will be a goddamn magic to a guy from 19th century! The term magic is meaningless without a mention to the audience and their time of existence
Answer: Why is it better to send information by dreams rather than through normal communications technology?
The obvious answer is: An Orwellian government controls all communications technology. All phones, etc. are severely locked down so you can't possibly try sending data using unapproved encryption. (e.g. you can't just install apps) And that's if you can get hold of a phone in the first place - maybe only the inner party have them.
Now your problem is, if the government controls communications technology, then how do the leaders of the assassins get their hands on the dream machine?
So there's no magic, but nearly all Sci-Fi introduces its own science to explain the technologies they have - whether that be time-travel, warp-fields, telepathy, hyperspace, etc. You'll just have to introduce your own science to do with psychology and R.E.M. sleep, etc. to invent for a dream-transmitter that the government can't detect.
Comment: Great thinking. They might be rebels planning to overthrow the government through dreams.
Answer: You are leading people's answers by suggesting this happens in the future, although this opens up a broad new possibilities.
You can achieve this by hypnotism.
Have you watched "Now You See Me" series? Although it does not really reflect what hypnotism can do, it is a good start what people think it can do.

This assassin met seemingly random people in the street. He saw a grafitti in a wall. He heard a random song played in the radio.

These all lead him to dream when he fell asleep in the train for a while, giving him dream of who, where, how the assassination should be carried out.
As in the Eye, all of these events are influenced by the leaders.
Comment: Great idea! I love that series by the way. The dreamer might not even be aware that he is being controlled, if they plant dreams into his brain!
Answer: Ok, lets assume that your future tech gives you the following possibilities:

We can chart an individual brain and read it's thoughts and memories.
That, however, takes a bit of time and requires physical access.
We can also implant/alter memories and control thoughts with physical
access.
We can also send controlled wireless neurotic stimuli. However, we can't really predict how a random recipient will interpret those stimuli. (Usually they are just filtered out) But given a well known, previously charted brain in a resting state we can get somewhat predictable results.

Now, the leaders have the assassins brains carefully charted. If they want Senator Bob assassinated, they know how each individual assassin think and feel about Senator Bob. They know what each assassin associates with Senator Bob. (Naturally they also know each assassins inner thoughts about their dirty work)
This means that they can broadcast a carefully created neuromessage.
Most people will not even notice this message. Those who do will interpret it in their own subconcious way.
But to one individual assassin the message will trigger a crystal-clear dream about him killing Senator Bob. Given his training he will know what that means...
The benefit of this is that the kill-order can be broadcasted. The leaders do not need to know the location of the individual assassins (and vice versa) which helps maintain security. It is very hard to intercept, since it is intrincially matched to a recipient. The decryption is literally buried in the mind of the recipient.
Comment: They could also subconsciously control people to do their dirty work.
Comment: Yeah, but that would be a bit harder. I was figuring an incomplete tech, where detailed mind control is too risky/uncertain. Therby making dream interaction a logical choice.
Comment: I was thinking dream control, more because you could visualize the target, and the place

Dream-based Missions


shuddder in 2.5 subaru engine

Question: Shudder in, Subaru forester 2017, since it was purchased. Car has 2.5 non turbo engine with only 1000 km on it.  Shudder appears to occur most of the time between 40-60 km, WHEN off the throttle then back on. Shudder on times also occurs at high speeds again a shudder or "miss", disappears when heavy throttled.
Comment: If it is a 2017 it is under warranty. IMO, you should take it back to the dealer.
Comment: My money is on the transmission if it's a CVT
Answer: Go back to the dealer and tell them to fix it or give you a different one that works.
This could be many things but if it's that new and already having problems then I would get it swapped for a different one.
The problem itself could be many things and to find out we would need a computer readout with all the engine management sensors and what they are doing during the shudder.
The only easy thing I can think of is its a loose spark plug wire but it would shudder everywhere if this was the case.

shuddder in 2.5 subaru engine


jQuery Lightbox Image Size : Limit the max size of Image

Question: I have images which are larger than the screen's viewport, when using them with jQuery Lightbox, the images are showing up in the original size, and hence to see the complete image one needs to scroll horizontally and vertically. I have tried using the CSS tweaks available online but they do not seem to be working. I tried the following code.
#lightbox-container-image-box {
  max-width:900px ! important; // Or your max-width
}

#lightbox-container-image img {
 max-width:675px ! important; // (your max width - 20)
}

So, what I want to do is set a maxWidth and maxHeight to the lightbox view, ideally do not want to change the lightbox.js file as it is being used at multiple other places.
Comment: The images are showing up in all cases only if the original size of image is larger than the user's screen size, then image rendered by lightbox needs to be resized so that it fits into the user's screen. We need compatibility only for web brosers, we have a different mobi site
Answer: If it is the plugin by Lokesh Dhakar for me the css script below has solved the problem.
At end of file lightbox.css you write this
#lightbox-container-image-box {
    max-width: 80%;
    height:100% !important;
}
#lightbox-container-image img {
    max-width: 100%;
}
#lightbox-container-image-data-box{
    max-width:80%; margin-bottom:50px;
}

Warning: #lightbox-container-image-box and  #lightbox-container-image-data-box must have the same max-width
if you want you can set max-width in px.
GitHub project link
Website project link
Answer: try adding width %
#lightbox-container-image-box {
  max-width:900px ! important; // Or your max-width
  width: 100%; //use 100% of even 90% , see what works for you
}

#lightbox-container-image img {
 max-width:675px ! important; // (your max width - 20)
 width: 100%;
}

Answer: if you have all them images with small size and want to show in large size then test it
find these lines in jquery.colorbox.js
photo.style.width = photo.width + 'px';
photo.style.height = photo.height + 'px';
comment the hight line for image ratio
like
//photo.style.height = photo.height + 'px';
and increase image width with ratio hight
photo.style.width = photo.width+200 + 'px';
Answer: I know the question was asked a year ago, but since @Sompuperoo answer helped me, it might be usefull to others.
Here is what I used (In my case the image was larger than screen size) :
#lightbox-container-image-box {
    max-width: 100%;
    height:100% !important;
}
#lightbox-container-image img {
    max-width: 100%;
}

Answer: After spending a lot of time in trying to make lightbox responsive, I had to give up, script is too old and unadequate.
Now I'm using Featherlight: https://noelboss.github.io/featherlight/, almost identical to lightbox but fully responsive (and also very easy to use).
JSFiddle demo: https://jsfiddle.net/2pznx9vL/
<link href="//cdn.rawgit.com/noelboss/featherlight/1.7.13/release/featherlight.min.css" type="text/css" rel="stylesheet" />

click on image


What is the proper way to enable sudo for myself on a new installation?

Question: Is booting into recovery console to gain root access to "sudoers" file the proper way to enable "sudo" for myself on a clean Ubuntu 14.04 LTS installation? If yes, how do I do it? If no, what is the best way?
Comment: possible duplicate of [How can I add a new user as sudoer using the command line?](http://askubuntu.com/questions/7477/how-can-i-add-a-new-user-as-sudoer-using-the-command-line)
Comment: Possible duplicate of [How do I add myself back as a sudo user?](http://askubuntu.com/questions/70442/how-do-i-add-myself-back-as-a-sudo-user)
Answer: Most people who install Ubuntu will already have an account, with sudo privileges, set up automatically.  This will be the case if you install from the official desktop installer.  If you install from a text-mode installer such as a server installer, then it's achieved by setting up a user account for yourself, and leaving the root password field blank.  This will make it set your account up with sudo privileges.
If you gave a root password during installation and you want to instead use sudo, then there are a few steps:
Give your account sudo access

Log into the root account (eg with su)
Make sure sudo is installed with apt-get install sudo
Add your user to sudo with adduser username sudo where "username" is the account name to add to sudo.
Log out fully from your account then log in fresh.

Remove root password

First, make sure you can sudo from your account.
Then disable logging in as root with sudo passwd -l root
Answer: If you're using the default user (the one created at installation) then they're already in the sudoers file, and can edit the file by running the command:
sudo visudo

This will prompt you for the default user's password, then allow you to edit the file.


Death has a Theory?

Question: I saw in movie "Final Destination Series" that if you cheat death once, the next time you would die in a more brutal way? So, according to many websites, it is done by grim reaper. But would this be true from the perspective of Hinduism --- I mean is death there?? Can someone beat death??(Sorry about wrong tags!!)
Comment: Hades is a god in Greek mythology, not Norse mythology, and he doesn't have "followers" as far as I know.  And I'm not sure what "death and rebirth are one" is supposed to mean.  If it means that death is followed by rebirth, Hinduism certainly agrees with that.  But I don't know what Norse or Greek group of people you're referring to who also believe that.
Comment: Hades is the Greek, not the Norse god of death. The god of death in Hinduism is Yama.
Comment: Both the title of your question and the body are confusing. 'Hades followers believe that death and rebirth are one' - can you explain a bit more? I'm voting to close for now. See [How do I ask a good question?](https://hinduism.stackexchange.com/help/how-to-ask)
Answer: From the perspective of Vaishnava branch of what you call "Hinduism", death is intrinsic to the material world we live in. It's not governed by any specific deity like "Grim Reaper" or whatnot.
This is directly written in the Bhagavad-Gita 2.22, 2.27, 2.18. Also, 2.20 is enlightening in this regard, too.
At the moment of death of your body messengers of the Yama-raja demigod will come to you to get you (the real you, not your body you lived inside) to the location of the Yama to decide on the punishment for all the stuff you really f*#ked up in your current life.
After the punishment ends, you'll be given the next body, according to what you thought of at the moment of death. And your next live will begin.
This is written in scrutinizing details in the Garuda Purana. It's relatively short, so I believe no link to specific shloka is necessary.
There's no way you can "cheat" or "beat" the death. It's completely absurd to think this way. The so-so comparison would be as if a single-cell bacteria would "cheat" or "beat" the Heisenberg's uncertainty principle.
Also, as a side note, it's not wise to believe to "many websites", as it's very easy to put information without any authority to the Web.

Death has a Theory?


Is there a name for the generational overthrow of gods/titans/giants?

Question: There is a common pattern in various mythologies - particularly in the Indo-European "big family" set - of gods overthrowing monsters and sometimes being overthrown in turn by a new generation of deities. Does this trope of divine succession have a name?
Comment: It is NOT just IndoEuropean, I seen it closely related to more general great deluge myths
Comment: Yes, and you already said it. "Divine succession."
Comment: From what I could find I thought it must be global, but I know it best from those myth-cycles - the Irish Book Of Invasions, the Olympians and Titans, Marduk and Tiamat and so on, seemingly right across Eurasia.
Answer: Yes and no.
I'm afraid, from what I know, there isn't necessarily a nice, clean term to encapsulate what you're looking for, especially not one that has survived since the age of the Indo-European language. However, I'll do my best to supplement this disillusionment with some information to steer you towards something similar.
Firstly, what you mention is most certainly an Indo-European mythological concept, but since the upheaval and replacement of cultures is ubiquitous across the world, it is not a unique concept. The invasions of Ireland, the war between the Greek Olympians and Titans, and the Aesir-Vanir War are all examples of this Indo-European myth that has spread throughout Eurasia.
The closest term to this "war-between-generational-gods" is "theomachy," simply meaning "god war" in Greek.
In other senses, it can be interpreted as intergenerational conflict, acculturation, colonization, and assimilation, for the basis of these myths is the emergence of new cultures and new gods, which symbolically wage war against and defeat the gods of the former culture. The most general approach to this is the agrarian vs. warlike peoples, as evidenced by the newer, warlike Aesir fighting the older, agrarian Vanir as well as the more agrarian Titans (Rhea and Cronus both had significant agricultural ties) fighting the more warlike Olympians that superseded them as rulers of the realm.
For further information, see the Crecganford channel for scholarly dives into Indo-European mythology. These two videos on giants and the oldest gods explain the prominence of this myth in fascinating depth.
Hope this helps a little, even if it's not the answer you're looking for. Have a fantastic day.
Comment: If the right answer is "no" then that's what I need! This is a very interesting answer.


Response unpacking error in Python 2.7 with python-oauth2 and Imgur's Authenticated API

Question: Salutations!
I've been working on a multiple-service file uploader that filters file extensions to decide which service a file should be uploaded to. My primary target is uploading to an Imgur user account, as its API is the most complicated in contrast to other services (i.e. authentication with OAuth2). I previously had issues with connecting via SSL, as my HTTPLib certificate store would not validate an SSL Handshake, but I fixed that by manually adding Imgur's cert provider's CA to the cert list.
Anyways, I've been able to "log in" to Imgur using cookies, but I'd much rather be using oauth - the cookie method still uses the anonymous API, which has a lower upload limit. I'm attempting this by generating an Oauth authentiction URL, and using wxPython to make a simple text entry dialog asking for the PIN given by said URL when the user provides their credentials. The problem is that calling the authenticator for python-oauth2 results in a gzip unpacking error, which I have no idea how to combat. Here's the error:
Traceback (most recent call last):
  File "C:\Users\Austin\Programming\python\uploaderator\mk2\main.py", line 10, in <module>
    uploader = crumpet.Crumpet()
  File "C:\Users\Austin\Programming\python\uploaderator\mk2\crumpet.py", line 30, in __init__
    s.connect()
  File "C:\Users\Austin\Programming\python\uploaderator\mk2\imgurHandler.py", line 40, in connect
    self.authorize(pin)
  File "C:\Users\Austin\Programming\python\uploaderator\mk2\oauthHandler.py", line 28, in authorize
    resp, content = client.request(self.access_token_url, "POST")
  File "build\bdist.win32\egg\oauth2\__init__.py", line 682, in request
  File "C:\Python27\lib\site-packages\httplib2-0.7.1-py2.7.egg\httplib2\__init__.py", line 1436, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "C:\Python27\lib\site-packages\httplib2-0.7.1-py2.7.egg\httplib2\__init__.py", line 1188, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "C:\Python27\lib\site-packages\httplib2-0.7.1-py2.7.egg\httplib2\__init__.py", line 1174, in _conn_request
    content = _decompressContent(response, content)
  File "C:\Python27\lib\site-packages\httplib2-0.7.1-py2.7.egg\httplib2\__init__.py", line 384, in _decompressContent
    content = gzip.GzipFile(fileobj=StringIO.StringIO(new_content)).read()
  File "C:\Python27\lib\gzip.py", line 245, in read
    self._read(readsize)
  File "C:\Python27\lib\gzip.py", line 316, in _read
    self._read_eof()
  File "C:\Python27\lib\gzip.py", line 334, in _read_eof
    crc32 = read32(self.fileobj)
  File "C:\Python27\lib\gzip.py", line 25, in read32
    return struct.unpack("<I", input.read(4))[0]
struct.error: unpack requires a string argument of length 4

My authorization function, which is called after a pin is acquired, is this:
def authorize(self, pin):
    self.token_u.set_verifier(pin)
    client = oauth.Client(self.consumer, self.token_u)
    resp, content = client.request(self.access_token_url, "POST")
    access_token = dict(urlparse.parse_qsl(content))
    self.oauth_token = access_token['oauth_token']
    self.oauth_token_secret = access_token['oauth_token_secret']
    self.token = oauth.Token(self.oauth_token, self.oauth_token_secret)
    self.client = oauth.Client(self.consumer, self.token)
    if resp['status'] == '200':
            return True
    else:
            return False

self.access_token_url is https://api.imgur.com/oauth/access_token, as given by the Imgur API Authentication resources.
I'm not sure if this is a problem with my code, or with what Imgur is returning with their response, as there are other python-based uploaders that appear to work fine, using very similar methods. Like I mentioned in the title, I'm using Python 2.7 and python-oauth2.
I would greatly appreciate any input. Thank you for your time.
Protractor Ninja
Answer: I'm using a requests-oauth for python, and I think the issue I was having, was my parser was returning the tokens as lists of one item long. So what I did was just get tokenList[0], which solved my issue.
Hope it helps, over a year later.


Restrict Menu Item from anonymous users and redirect to Login page

Question: I created a simple menu link and need it to be visible for both authorized and anonymous users. But when a unauthorized/anonymous user click it should check authorization and if not it should redirect to login page. How can i do this. Thanks
Answer: Create a custom module
In your_custom.module
<code>function custom_init(){
global $user;
$current_path = request_path();
if (!in_array(array('your roles','your roles'),$user->roles) && $current_path=="node/add/yourcontent type" ) {
  // for mutiple row
  drupal_goto('/user');
}
}
</code>
Answer: If you made the link via the drupal admininstration area and Menu or Menu Items ... or you've made the menu item using hook_menu() ... then you just need to define an 'access callback' for the menu item. See hook_menu() documentation for how to do this -- if the user is anonomous then you will return False from this custom callback function.
If you dont have a custom hook_menu() in a function but made the menu item via the Adminstration UI, then implement hook_menu_alter() to change the menu item stored in the database and add the "access argument".
If you're just echoing an html link in some page without having the link come from the database .... good luck.
Answer: Yes you can do this just go to admin/config/system/site-information (if using drupal 7) there you will see a Error Pages title at the bottom of the form there you can see an option as Default 403 (access denied) page. You can mention your login page path within that text box user/login. I hope this works for you
Comment: Well that's a different thing. I've a menu link and it will be visible to both authorized and anon users. When user clicks the menu link, based on the user-type it should either access the page or redirect of login page.


Keypad to set a counter

Question: Is there a way to use a standard Matrix Keypad to set a synchronous counter IC without having to use a micro controller?
Answer: What are you looking at the counter to do, and what relationship do you expect between button position on the grid versus the count value?  If you have a counter that produces a one-hot active low output (all other signals driven high), one could connect each output to a diode which would pull down the keypad row assigned to that count (put pull-ups on all keypad rows), as well as to the emitter of a dedicated NPN transistor whose base was connected, via resistor, to the column assumed to that count.  Tying all the emitters together and attaching a pull-up will yield a signal which goes low whenever a button is pushed which doesn't correspond to the present count.
If one's goal is e.g. to build a timer which can be pre-set for 1-9 minutes by pushing a button, one could use a 74HC17 wired as above, wired to the bit 5 of a counter which is fed by a 555 that normally ticks 64 times per minute, but can be accelerated to run many times faster.  Net circuit requirements would be about ten transistors, nine diodes, about couple dozen resistors, a few caps, the 74HC4017, a counter (a 74HC4040 would be fine), and a 555.
Answer: Here's a generic logic diagram for scanning a matrix keypad; I'll leave it up to you to translate it to your favorite implementation technology, which could be anything from SSI/MSI logic to a CPLD to part of an FPGA.

simulate this circuit – Schematic created using CircuitLab
This circuit scans the keys, one at a time, at a 1 kHz rate. When a key is pressed, the output of the multiplexer goes true and triggers U5. U5 is retriggerable, which means that its output remains true for as long as its input is true, plus another 10 ms or so after it goes false. This serves to debounce the keypresses. The QN output stops the scanning as long as a key is held down, and the Q output (data strobe) indicates to the external logic that the key location is available on the data out lines.
Ideally, you arrange the keys so that their locations are also the values you want them to represent; otherwise, use a lookup table to translate.
Note that U5 could be an analog multivibrator if you're using SSI/MSI logic; or it could be a digital counter driven by the 1 kHz clock if you're using a CPLD or FPGA.
Answer: Sure, if you're willing to put up with obsolete components.
The 74C922 and '923 are 4x4 and 4x5 keypad matrix controllers. They strobe a signal when a valid keypress is detected, and then output the binary equivalent on 4 or 5 pins.
Both have been obsoleted, and there are no direct replacements available. All current replacements either are a MCU or require one due to their use of I2C.
Comment: *shrug* If the asker doesn't want to use a MCU then I don't really see a CPLD or FPGA in their future either.
Comment: We were scanning matrix keypads long before the specialized ICs came out; it isn't difficult. I wouldn't do it with SSI/MSI logic like I used to; I'd probably use a CPLD or part of my FPGA to do it.
Comment: That wasn't the point. You seemed to be suggesting that obsolete chips was the only way to get it done, and I'm saying that it can be done with any sort of SSI/MSI logic (but that I wouldn't personally do it that way myself).
Comment: I just found out about 10-4 line priority encoders. Can't I just use one of those to translate keystrokes to BCD, then load that onto the counter?
Comment: If you can find a line-per-key keypad, sure. But most use matrix arrangements.
Comment: I can AND the appropriate rows and columns of the matrix to form 9 lines.
Comment: Assuming you have a 2-of-n keypad.
Comment: what do you mean by 2-of-n ?
Comment: A keypad that connects two of its pins to a common pin when a key is pressed rather than just connecting the two to each other.

Keypad to set a counter


Senior professional admissions for a PhD

Question: I am an MSc of urban planning with more than 25 years of professional practice. Can someone please tell me if age is in any way negative for being considered by a top university in the USA or UK for a PhD, especially for international applicants?
Answer: No, so far as I can tell, age is not a negative for application to graduate school in the US.  But you will have to explain your reasons for wanting to do a PhD and provide some evidence of your interest and ability to do research and that could be harder for you.  Admissions committees like to see published papers and letters of reference from academics in a position to comment on your research skills.  If you've spent your career in industry, it could be difficult providing that kind of evidence.
Comment: +1. Just reinforcing this. You have spent your career in the _practice_ of your profession, not, likely, its theory. The doctorate will be theory based and you will want to assure any admissions committee that you are current in the basic skills that are expected of entering students _now_, not as they were 25 years ago. In some, rapidly changing, fields that may take some work. In theory, theory is the same as practice. But not in practice.
Comment: +1...just to pile on, in some STEM fields, the first 1-2 years involve problem-solving classes (incldg. homework, tests, etc.) at a very high level of difficulty. Passing these classes is often not strongly correlated with success in research; nonetheless, you'll need to convince the committee that you won't fail the classes (because failing them enough will lead to expulsion)


Is there a difference between the mansion and the hidden mansion?

Question: In Luigi's Mansion, after you defeat the final boss, the "Hidden Mansion" is unlocked. But from the looks of it and the ghosts I am defeating, the hidden mansion is basically the same as the first mansion. Is there any difference between the two?
Answer: Depending on whether you are playing the PAL version of the game or not, different things may change.
Things that change in all versions:

Ghosts do double damage
The Poltergust 3000 is 1.5 times as powerful, making it easier to get more money and therefore better frames

Things that change in PAL versions:

The mansion is mirrored horizontally
There are more normal ghosts around the mansion
Bosses are more difficult, having different attacks
Rooms are much darker (but only as dark as in the NTSC version - normally, the PAL version is brighter)
Boos often have increased HP, though some have decreased
Fewer hearts appear
Speedy Spirits and Gold Mice always give up a Silver Diamond when caught, raising the maximum possible amount of money from 142,390,000G to 186,440,000G
45 rather than 40 Boos are required to fight the final boss
Boos are faster and more difficult to catch
Five ghosts rather than three appear in The Artist's Studio

To read more in-depth and look through sources, see here.
Comment: PAL? What does that mean? And what is NTSC?
Comment: @JerryRox PAL, NTSC and SECAM are three different analog TV standards (ways to represent video) that are used around the world. NTSC is used mostly in the US, and PAL mostly in Europe.

When it comes to games - consoles are made to either work with NTSC TVs or PAL TVs. This makes some consoles and games have regional differences - not tied to the cuntry itself, but the video standard.

Even nowadays, with analogue TV dying, the same regions are often enforced when it comes to release dates, region locks, localization and such.
Comment: @JerryRox The comments section markdown handicapping murdered my linebreaks, but the gist is different regions have different versions of games. The version of your game is most often displayed somewhere on the front of the box.
Comment: I play the North American Version. NTSC it is, then.


Magento 2.2.8 and Paypal error 500

Question: I have some problem since several month, with Google Chrome Browser, when someone want to make a checkout, paypal return us an error 500.  The error given are "POST [lang]/paypal/transparent/response/ HTTP/1.1" 500.
After some tests, i don't get this error with Firefox, Opera or Microsoft Egde, i've found some hint on google, but nothing work. My current Magento version are 2.2.8. I know it's a bit old.
Someone get this problem and found a way to resolve it?
Answer: Hope this can help.Seems a patch is available and fix in 2.3.5
https://github.com/magento/magento2/issues/26840

Magento 2.2.8 and Paypal error 500


Can't login to control panel on EE 1.6.8 site

Question: Very old client we did a pro-bono site for tracked me down and is having problems logging into  the control panel of their EE 1.6.8 site. When the login is filled out and submitted it just takes you back to the login screen. I've seen this before and usually just clearing the cache works, but it's not working in multiple browsers even after clearing the cache. Any ideas?
Answer: Go to your config.php file. If you're using cookies, sessions, or both, switch to a different option. For example, if you were using sessions, switch it to cookies only, then try to login.
I'd also check with the ISP, to see if they updated the servers version of PHP. If the client isn't prepared to upgrade to EE2, then at least they should upgrade to EE 1.7.3. I know between 1.6.8 and 1.7.3 compatibility for MySQL 5.5 was introduced, so it's also possible that some PHP compatibility issues were also addressed.
The thing is, with software like pMachine or EE 1.x, while they are pretty solid pieces of software, that don't need to be upgraded (generally speaking), they also run on servers, that will be continually upgraded (if the ISP is responsible), which means they will eventually stop running. So upgrading to the most current version you can is good.
It doesn't have to be EE 2.6.1, but EE 1.6.8 should probably become EE 1.7.3, with a warning that they'll probably need to migrate to EE2.x sometime within the next year or two.
Comment: Took a look at the config file in the system folder. It's EE 1.6.8 and I'm not used to the file structure, but think I found the only config.php. It didn't have anything about sessions. Unfortunately I think there are bigger problems. Just went to check out the site again and it's displaying a blank page with a few chinese characters. When I viewed  the source it was displaying the config.php file in the source, DB login and all! I quickly removed the login info and re-uploaded the config.php. But I think the site has been compromised. trying to get ahold of the person who is hosting now. :/


How to move .bash_sessions from user home to .cache?

Question: I have seen a ~/.bash_sessions/~ folder being created, and I want to clean up my home directory, but I could not find which bash option can tell it to use a more proper location like ~/.cache/ for these files.
Answer: You could tell bash to not create a history:

As long as you do not need the shell session history information
stored for any reason, then to stop the .history and .historynew files
from being created, you can add SHELL_SESSION_HISTORY=0 to your
~/.bash_profilefile or ~/.bashrc file and restart Terminal and it will
stop creating those files.
If you do not want the .session files, then in your $HOME directory
use touch .bash_sessions_disable. However I would do that and just
clean out the .bash_sessions directory once in a while.

source
Answer: You should be able to change the location of this folder based off of an environment variable. Since you didn't say which shell your are using it's not possible to completely help you with that much detail, sorry
As far as I know Apple has switched from bash to zsh as of MacOS 10.5. You can define the appropriate environment variable in .zprofile.
If you're using bash you can define the HISTFILE variable in your ~/.bashrc. You can also choose to limit the length, the default is 500.
In bash the history session file is given by the environment variable HISTFILE. For more information see the bash docs.
Here is a related question about completely removing the .bash_sessions folder: https://superuser.com/questions/1610587/disable-zsh-session-folder-completely


Calculate days between date and not counting saturdays and sundays

Question:
Possible Duplicate:
Calculate business days

I have a report that shows project schedules and in that report I have a semaphore that changes with the difference between the project planned start date and the real that, ie:
If the planned date is the same as the real start date, the semaphore is green.
If the difference in days between dates is > 0 and < 2, then its yellow.
If the difference is > 3 the semaphore is in red.
My code looks like this:
if( (strtotime($real) - strtotime($planned)) == 0 )
{
    $semaphore = 'green';
}

The problem is when the planned date is for example on friday, and the project started really on next monday. In this case the semaphore should be yellow as the project started one (working) day later than planned. The problem is I'm counting saturday and sunday, and the semaphore shows in red.
How can I make this exception?
EDIT:
I finally end up doing this:
if((date('l',strtotime($planned)) == 'Friday') AND (strtotime('next monday',strtotime($planned)) == strtotime($real)))
{
    $semaphore = 'yellow';
}

Answer: lets say you have $real = '2007/10/31';
  $weekday = date('l', strtotime($real));  // Wednesday

may this help you
i suggest get days between those dates , and then make if
the day which is between them is  Sunday Or Saturday


How to make a mineable ERC20 token?

Question: I have been following tutorials for making ERC20 tokens. All of the tutorials create a pre-mined token with a set supply, and the creator gets of those coins their wallet immediately upon creation (to be sent out to others in an airdrop I suppose). There is never any mention of how to make the coins mineable. Is this possible and how do I go about it?
Answer: Take a look at this article: https://lightrains.com/blogs/how-to-create-mineable-erc20-tokens
Block Rewards
function issueBlockReward() {
    balanceOf[block.coinbase] += 5;
}

Proof of Work (PoW)
uint currentChallenge = 1; // Can you figure out the cubic root of this number?

function rewardMathGeniuses(uint answerToCurrentReward, uint nextChallenge) {
    require(answerToCurrentReward**3 == currentChallenge); // If answer is wrong do not continue
    balanceOf[msg.sender] += 1; // Reward the player
    currentChallenge = nextChallenge; // Set the next challenge
}

How to make a mineable ERC20 token?


E-visa for India cruise

Question: I will be on a Celebrity Constellation cruise in February that stops in three ports in India, for a total of four days (overnight in Mumbai on the ship). Is one e-visa sufficient for all of this? Other ports are Cochin and Goa, all entry points for e-visas. Having trouble getting a straight answer on this as there have been many changes in the past year.
Comment: @LDTerra I have no idea. Has the OP asked the cruse line?
Comment: Thanks for that David. However, I have heard that when you are on a cruise ship, three ports in the same country (India) only counts as one entry in which case one evisa is enough. Having trouble getting confirmation of that. Hoping to hear from cruisers who have done this.
Answer: We are just back from the exact same cruise in india on Celebrity Constellation (Dec 18) - we had a multiple entry visa, but talking to other guests on same cruise majority had e-visa's, with some of them checking with Celebrity that e-visa was enough.  We visited Cochin, New Magalore, Goa & Mumbai.  (UK Passport).  My friend is also going on same cruise in March 19 and spoke to Celebrity and they said e-visa was fine - only if you intended going out of india i.e. Sri Lanka or golden triangle - and not just the ports the cruise was stopping at would you need full visa.
Comment: I would definately check with Celebrity
Answer: The answer of Jan at 2 January 2019 was absolutely right at that time - but since there has been a major change in the Indian visa system in the spring of 2019 it's not right anymore after that. Since then there is an electronic-visa system with e-Tourist-visa valid for only one month (and only a right for single-entry) and another one's valid for one year and a third one's valid for even 5 years (both with the right for multiple-entry). So with this new visa you can use the e-visa (more specific the e-tourist-visa) when you are on a cruise in India and will stop in more ports in India - subject to the condition that you're allowed to enter the country with the e-visa on the specific port you're stopping in. See the website of the Indian government https://indianvisaonline.gov.in/evisa/tvoa.html for this details.
Comment: Please include a link to the government web page to which you refer in your answer.
Comment: At the moment that is anyway an academic question as travelling to India isn't possible for the time being. At the [website of IATA](https://www.iatatravelcentre.com/world.php) you can see that regular (means touristic) travel to India is still not possible. When you click in the map on India you'll read "Flights to India are suspended until 31 March 2021"
Comment: Beside IATA there are many websites providing information on the (im)possibilities for travel to India at this time. The difficulty is that the Indian government only informs at the end of the month if travel with tourist-visa will be possible in the following month. You can i.e. see on gov.uk or on the regularly updated website [visa Indien](https://visumbeantragen.at/indien) what influence covid-19 and countermeasures have on travelling to India and which possibilities still exist for travel (such as an OCI- or a PIO-card) when you click on "coronavirus rules in India" in the yellow section.
Answer: Only one e-visa required. You enter India at the port of Mumbai. The ship STAYS in India (within territorial waters) for the subsequent stops in Cochin and Goa. Again, you ENTER India at Mumbai and you EXIT India at Goa. One entry, one exit, one e-visa.
Answer: On this Government of India webpage, the text says:
The validity of e-Visa (except e-Conference visa) will be 60 days from the date of arrival in India. In case of e-Conference visa, the validity will be 30 days from the date of arrival in India. Double entry is permitted on e-Tourist visa and e-Business visa. Triple entry will be permitted on e-Medical visa and e-Medical Attendant visa. Only single entry is permitted on e-Conference visa. (emphasis added)
Thus, you'll need two eVisas for the three Indian ports.

E-visa for India cruise