Amen on the Telephone

Question: Can you answer amen to a Baracha that was made over the telephone?
Comment: This happened to me today. I was on the phone with someone located a few blocks away, and lightening flashed, so I said a bracha into the phone which I was already talking into.
Answer: See which concludes that Rabbi Shlomo Zalman Aurbach Zatzal held it was not permissible.
Answer: Yes. (Yalkut Yosef Helek 3, 215:4).
Comment: I heard about this from some dude his name is Rabbi Meir Gabriel Elbaz.
Answer: yes and also ieh shemeh rabah, and I think 13 midot and kedusha also, not because you heard it (because you didn't) but because you know someone finished a beracha.
this would also apply in a place that people say amen loud before the hazan finishes the beracha, technically you didn't heard the ending but you can say amen because you know he did.
note that live radio would be the same
Comment: Although live radio may have delays.... Even telephones have delays! (but usually in the magnitude of < 1 second, depending on distance). I would assume the usual "Shalom Alecha Rebi (Umori)" length of time would apply....
Comment: actually even a long delay like a minute and a half, when people are listening to shiurim over satelite
Comment: Any source for this?
Answer: most poskim rule that one cannot fulfill an obligation (such as hearing Havdalah) by listening to the bracha on the phone. This is because a phone is a simulated sound and one does not actually hear the person who is reciting the bracha. That being the case, one would assume amen cannot be said in response to a bracha recited on Zoom or over the phone since the person did not hear the actual blessing.
However, it is clear from the Gemara that there are times when a person should answer "amen" without having heard the bracha. The Gemara (Sukkah 51b) relates that the shul in Alexandria was so large that much of the congregation could not hear the shliach tzibur. To assist the congregation, the gabbai would wave flags at the end of each bracha as a signal to answer amen. Based on this Gemara, the Shulchan Aruch OC 124:8 and later poskim ruled that one should answer amen even without hearing the bracha, provided the person knew which bracha was said and there was no intention to be yotzei with that bracha. For this reason, many contemporary poskim such as Rav Chaim Kanievsky, Rav Hershel Schachter and Rav Asher Weiss, have encouraged answering amen to brachos heard over the phone or through Zoom.
However, Rav Shlomo Zalman Auerbach (Minchas Shlomo 1:9) writes that one should not answer amen to a bracha heard on the phone, and he considers this an amen levatala (a wasted amen). He explains that in the shul in Alexandria everyone was together in one building, but if one is miles away there is no connection to the person who recited the bracha and amen cannot be said.
Also see two teshuvos of Rav Moshe Feinstein (Igros Moshe Orach Chaim 4:91-4; 2:108), and a teshuva of the Tzitz Eliezer (8:11), which rule that in extenuating circumstances one can be yotzei havdalah over the phone
Comment: "provided the person knew which bracha was said and there was no intention to be yotzei with that bracha" If you did intend to be yotzei, then the amen is now no longer allowed?

Amen on the Telephone


Is there a module for user level permissions?

Question: I know that permissions are controlled by admins. I want regular users to control a different set of permissions, for example my users will have pictures, friends list, personal information in there profile. I want them to be able to create groups and limit access so certain groups can see certain content. Is there a module for this or do I need to put on by big boy paints and start coding?
Answer: Yes! Check out the Role Delegation module. Here is a quote from its project page:

... allows site administrators to grant some roles the authority to assign selected roles to users, without them needing the administer permissions permission.
Comment: This is a good module but it's not quite what I'm looking for. To get the results I'm looking for I may need to create a module for each thing that needs to have user permissions on and integrate it with my own user permissions module. Facebook security settings very closely resembles what I'm trying to accomplish where you can limit certain content to friends only or everyone or friends of a certain category.
Comment: Oh. Perhaps you should just check out Organic Groups then. I believe it has that sort of security separation built in.

http://drupal.org/project/og


Retina images or not?

Question: Do you use retina double size images or not in your webprojects. It looks good but the pageloading will be heavy. How do you think about this?
Answer: Like anything, it depends.
If the images are small (in dimensions) and illustrative in nature, they may compress just fine and not be much more of a download than the originals. Using sprites and such can help with all of that as well.
And with mobile, SVG is often a viable option.
For large images or photos, again, it would really depend on the particular project and particular audience. But yes, in general, it's nice to take advantage of the technology if it's there.
Comment: Yes it depends. I will use for example 1900px wide images in my 960 grid where it needs to look extra good.

Retina images or not?


What about the Islamic State?

Question: I recently commented on a question criticising the belief of the so called Islamic State, al Qaeda, Boko Haram, etc. I was told by a member that I could not use such language / disrespect their beliefs. If this forum prevents people from vehemently opposing terrorism, do they realise this is a crime and illegal? If we Muslims can't stand up and speak out against such tyranny, why blame the world for the reputation of Islam?
Answer: Yeah, that's kinda not what we're here for. We are a Q&A site about the topic of Islam and in general, we prefer to avoid people vehemently opposing each other because a bunch of yelling doesn't actually help users get actual answers to their questions.
If you want to vehemently oppose someone, there's countless public forums and chat sites out there already that allow that sorta thing: Knock yourself out. But since they also tend to suck at answering actual questions, we are not one of them.
Comment: @SaadSheikh We focus on questions and answers here. Argument and debate is just noise that gets in the way of that. See also https://islam.meta.stackexchange.com/q/1255/22
Comment: I agree, but the question of ISIS is related to Islam isn't it? I don't think it should be a problem for me to criticise terrorism, is it?
Comment: I see. Then I will clear myself using a question.
Answer: I asked about this here: Are there any groups of Muslims excluded from Islam.SE?  Basically, I worry that Islamic State members (or sympathizers) might join the site and benefit from the free publicity.  A cunning IS user might use the site correctly, but e.g. selectively use radical fatawa to push a certain agenda.
I still don't know the answer, as there's two opposing points of view:

As goldPseudo writes, we're not here to bash each other's beliefs, no matter how unorthodox those beliefs are.
StackExchange is bound by US law; see the content policy page.  And Islamic State is considered a terrorist organization by virtually everyone except possibly the Islamic State (including the US), and surely some of its content is illegal or "I'm not sure if this is legal".

I think what to do here goes beyond the scope of an average user, and possibly beyond the scope of the diamond moderators.  None of us are supposed to "pick sides".
However, that being said, we are able to critically and respectfully question points that are raised, ideally by asking questions and/or giving better-written and better-referenced answers.
Comment: I agree! But if we can't reject terrorism and stand for peace, then we are complacent!

What about the Islamic State?


How to migrate Magento 2.0.x from one server to another?

Question: We have a local environment for development. We need to do a migration from local to a Dev server for integration. Is there any detailed migration guide about how to migrate Magento from one server to another? How to handle the database records and user generated content?
Answer: There is a quick reference:
Basically, we need to change the connection config in app/etc/env.php, the url config in core_config_data and set the permission your source files.
--After importing the backup database, we need to change web/unsecure/base_url and web/secure/base_url paths in core_config_data table. We can check:
SELECT * FROM core_config_data a WHERE a.`path` LIKE '%web/unsecure/base_url%'
UNION
SELECT * FROM core_config_data a WHERE a.`path` LIKE '%web/secure/base_url%'

Change theses values to your own url.
--Should change host, dbname, username, pwd app/etc/env.php:
  array (
    'table_prefix' => '',
    'connection' =>
    array (
      'default' =>
      array (
        'host' => 'localhost',
        'dbname' => 'mage21',
        'username' => 'root',
        'password' => '',
        'active' => '1',
      ),
    ),
  ),

--Change the permission and owner of files:
http://devdocs.magento.com/guides/v2.1/install-gde/prereq/file-sys-perms-over.html
http://devdocs.magento.com/guides/v2.1/config-guide/prod/prod_file-sys-perms.html
--May run static content deploy php bin/magento setup:static-content:deploy
--Remember to clear Magento Cache and delete var/generation, var/composer_home, var/view_preprocessed.
There is a good doc here: http://devdocs.magento.com/guides/v2.0/config-guide/prod/prod_deploy.html
[EDIT]
From the Magento 2.2 version, there are many improvements: http://devdocs.magento.com/guides/v2.2/config-guide/deployment/
Comment: Accept the answer if it helps you @zzpaul so it help other community members . Just noticed that you didn't accept any answer from your profile
Answer: First off all see that the database is exported to the new server.
Then transfer the magento root files to the new server.
In the root folder, change to the new database. You can do this by going to app/etc/env.php and changing the DB array information. change the host, dbname, username and password to the new one.
Then you change you secure and unsecure URLs in the magento DB core_config_data to the new IP, don't forget the "/" after your IP, it's required.
Make the web user owner of the new file ( for apache it's: sudo chown -R www-data /var/www/magentoroot ). Set the correct file and folder permissions.
Finally clear the cache by running bin/magento cache:clean and bin/magento cache:flush.
Comment: Thanks! It works. And I found another good reference: http://devdocs.magento.com/guides/v2.0/config-guide/prod/prod_deploy.html
Answer: Think, too, of setting up on the target platform any cron jobs that you may have created on the source platform and installing any PHP extensions that you might have had to install, such as for memcached.
If you have set up the testing framework, then you shall need to edit:
dev/tests/functional/etc/config.xml
dev/tests/functional/phpunit.xml
Your sitemap/sitemap.xml will also be incorrect. I am not quite sure when/if a cron job may update it. Otherwise, update manually at Marketing -> SEO & Search -> Site Map
If you have enabled 2FA then you will need to make some changes. I didn't do this the right way, so I ended up disabled the 2FA module and then starting from scratch. But I suppose it might suffice to reset the authenticator:
php bin/magento msp:security:tfa:reset <username> <provider>

See https://docs.magento.com/m2/ee/user_guide/stores/security-two-factor-authentication-manage.html


Point particles as the limit of a short string

Question: There's a common saying in the domain of the study of classical relativistic strings, that in the limit of a very short string, the action reduces to that of a point particle (there is for instance a sketch of a proof in Barbashov). I've been trying to show it.
Consider the Nambu-Goto string action in Minkowski space:
\begin{equation}
S = -T \int_{t_a}^{t_b} \int_{0}^{2\pi} d\tau d\sigma \sqrt{(\dot{X}^\mu(\tau,\sigma) X'_\mu(\tau,\sigma))^2 - (\dot{X}(\tau,\sigma))^2 (X'(\tau,\sigma))^2 }
\end{equation}
We want this in the limit that $\sigma_2 \to \sigma_1$, let's say for instance replacing $[0, 2\pi]$ by $[0, \lambda 2\pi]$. Obviously this does nothing but give us $S = 0$, so first we have to change the action very slightly. Take our tension $T$. As it is a tension, we can express it in terms of a linear mass density. We'll choose to express it as
$$T = \frac{mc}{\int_{0}^{2\pi}d\sigma} = \frac{mc}{l}$$
For any fixed $\lambda > 0$, this doesn't change our dynamics. So we can say get it parametrized by $\lambda$:
$$T_\lambda = \frac{mc}{\int_{0}^{\lambda 2\pi}d\sigma} = \frac{mc}{l_\lambda}$$
with $l_\lambda = \lambda 2\pi$.
Let's consider our parametrized action now:
\begin{equation}
S = -\frac{mc}{l_\lambda} \int_{t_a}^{t_b} \int_{0}^{\lambda 2\pi} d\tau d\sigma \sqrt{(\dot{X}^\mu(\tau,\sigma) X'_\mu(\tau,\sigma))^2 - (\dot{X}(\tau,\sigma))^2 (X'(\tau,\sigma))^2 }
\end{equation}
By manipulating it somewhat, we get
\begin{equation}
S = -\frac{mc}{l_\lambda} \int_{t_a}^{t_b} \int_{0}^{\lambda 2\pi} d\tau d\sigma \sqrt{(\dot{X}(\tau,\sigma))^2} \sqrt{\frac{(\dot{X}^\mu(\tau,\sigma) X'_\mu(\tau,\sigma))^2}{(\dot{X}(\tau,\sigma))^2} -  (X'(\tau,\sigma))^2 }
\end{equation}
Using the mean value theorem, there exists a $\sigma^* \in [0, \lambda 2\pi]$ such that
\begin{equation}
S_\lambda = -\frac{mc}{l_\lambda} \int_{t_a}^{t_b}  d\tau \sqrt{(\dot{X}(\tau,\sigma^*))^2} \int_{0}^{\lambda 2\pi} d\sigma \sqrt{\frac{(\dot{X}^\mu(\tau,\sigma) X'_\mu(\tau,\sigma))^2}{(\dot{X}(\tau,\sigma))^2} -  (X'(\tau,\sigma))^2 }
\end{equation}
From the mouth of Goto himself, the second integral is nothing but the length of our string at a time $\tau$. We can then rewrite the action as
\begin{equation}
S_\lambda = -mc \int_{t_a}^{t_b}  d\tau \sqrt{(\dot{X}(\tau,\sigma^*))^2} \frac{L_\lambda(\tau)}{l_\lambda}
\end{equation}
From the fundamental theorem of calculus, this is just
\begin{eqnarray}
\frac{\int_0^{\lambda} f(\sigma) d\sigma}{\lambda} &=& \frac{F(\lambda) - F(0)}{\lambda}
\end{eqnarray}
for which the limit should just be $f(0)$, in other words:
$$\lim_{\lambda \to 0} \frac{L_\lambda(\tau)}{l_\lambda} = \sqrt{\frac{(\dot{X}^\mu(\tau,0) X'_\mu(\tau,0))^2}{(\dot{X}(\tau,0))^2} -  (X'(\tau,0))^2 }$$
If this quantity is a constant $C$, lucky us we get
\begin{equation}
\lim_{\lambda \to 0} S_\lambda = -Cmc \int_{t_a}^{t_b}  d\tau \sqrt{(\dot{X}(\tau,0))^2}
\end{equation}
Which would indeed be the correct action. But unfortunately I'm not sure how to show this. For a start, things get tricky assuming Neumann boundary conditions. Is there a way to show that this quantity indeed converges to a proper finite, non-zero limit?
Answer: Perhaps the simplest derivation that the string stiffens $X^{\prime}\to 0$ in the point particle limit with infinite string tension $T_0\to \infty$ comes from the corresponding Hamiltonian formulations:

On one hand, the Nambu-Goto Hamiltonian Lagrangian is
$$ L_H~:=~\int_0^{\ell}\! d\sigma~{\cal L}_H, \qquad {\cal L}_H ~:=~ P\cdot \dot{X}-{\cal H}, \qquad {\cal H}~=~\lambda^{\alpha}\chi_{\alpha}, \qquad \alpha~\in~\{0,1\},\tag{1}$$
with two first class constraints
$$\chi_0~:=~P\cdot X^{\prime}~\approx~0, \qquad \chi_1~:=~\frac{P^2}{2T_0}+\frac{T_0}{2}(X^{\prime})^2~\approx~0,\tag{2}$$
cf. e.g. this Phys.SE post.
On the other hand, the point particle Hamiltonian Lagrangian is
$$ L_H~:=~p\cdot \dot{x} -H  \qquad H~=~ \frac{e}{2}(p^2+m^2) ,\tag{3}$$
cf. e.g. this Phys.SE post.


No USB digital sound on 17.10, but Win-10 sound is OK

Question: I just upgraded to U17.10 on a desktop that dual boots Windows, and has a pair of smal USB-powered speakers.
My Win-10 Insider Preview build 17025 has great sound, as do all past Windows and Ubuntu versions.
But Ubuntu 17.10 is SILENT.
When I press the vol-ctl buttons on the speaker, the Ubuntu screen shows a small sound window: - increasing/ decreasing, etc, and when off button is pressed, it will show a "DIGITAL OUTPUT S/PDIF" as switching on or off.
Alas, the speakers remain totally silent in U17.10, no matter what the "sound" scroller is set to.
Obviously, the USB speakers are detected by Ubuntu, as with Win-10, but-
Why is there no sound in Ubuntu 17.10?
Comment: Same problem here. Upgraded to 17.10 yesterday. No sound today.
Answer: OK- This is for AMD CPU users- (I'm using an AMD Phenom-II)
finally fixed this by installing MISSING PROPRIETARY DRIVERS!
Go to "software and updates" and click the "Additional drivers: tab.
Wait a few secs to see if it finds any additional drivers.
In my case it found some missing microcode firmware for AMD CPUs.
Use this device, and then update via the "software updater" icon, or do an apt-get update.
 You may have to restart Ubuntu again.
Click on "Sound" in settings, check the sound there to make sure it IS TURNED ON (the changes above turned my sound OFF!) and then choose the appropriate setting .. digital or analog..


How-to change the title of the new window?

Question: I am hacking the Google bookmarks bookmarklet to make it suit for a new purpose. The end-goal is to convert songs from youtube straight to mp3s, with the help of a 3rd party website. It's all ready pretty awesome. xD xD
However, when I want to convert 4 or 5 songs at the same time, the bookmarklet keeps opening up each conversion in the same window. I need to open up multiple windows and let them stay open.
So, my question is:
How can I get this javascript to open a "new" (!) window each time I hit it?
javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("http://audio-conversion.online-convert.com/?external_url="+c(b.location),"name= My Window1","bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();

Answer: You can easily append Random number to the window title :)
I modified your code to do this :
javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("http://audio-conversion.online-convert.com/?external_url="+c(b.location),"name= My Window1"+Math.random(),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();


How to make my mirror tool work again?

Question: I was inking a piece and wanted to use the mirror tool. However,when i turned on the vertical one and did a stroke,the stoke did not appear on the other side. I tried again with the horizontal one but it still did not work. I even went as far as to create a new canvas and still the stroke won't appear.
Answer: I believe you are experiencing a bug, it can be your version it is around 4.1.1 nowadays, if possible talk with developers in https://krita.org/en/irc/. You can use the multibrush tool (Q) if it is working for you. It have a lot of extra features and some disadvantages (traditional mirror work with all the tools as it is not a tool itself). You just need to adjust it from simetry to mirror
The tool icon will look like this:

How to make my mirror tool work again?


Get listed in Google Drive Apps Collection

Question: I have released an app for Google Drive in the Chrome Web Store. I thought it might get added to the Google Drive Collection automatically, but that didn't happen. Is there any form I have to submit?
Answer: For your application to appear in the collection of Drive apps your Chrome Web Store app's manifest file need to specify the Google Drive container and your API console project ID as described in this document.
Then your app's listing should get the "Works with Google Drive" badge and, given a few minutes delay for indexing, your app will appear on the collection of Drive apps.
Beware: you may not see it there as a listing doesn't appear for you in that collection if you have already installed it on your browser. It will appear to all other users who have not installed your app yet. To make sure it's there: try looking at the collection with another browser (FireFox for instance).
Comment: Tom, perhaps you could share the link to your app's Chrome Web Store listing and I can tell you if I see it in the Drive collection. Alternatively try looking at the collection with another browser (FireFox for instance) as it won't appear in the collection if you have installed the app on your Chrome (i.e. if the app appears in the New Tab page)
Comment: Thanks @Nivco! The app I'm talking about is "OpenOffice Document Reader": https://chrome.google.com/webstore/detail/jpcfmmdlhndnfpagbmhbbfehenapoich
Comment: I confirm it's in the list :)
Thanks for integrating with Google Drive!


Movement of compressed air inside a rolling tire?

Question: Does it stay still wrt the axis? Does it rotate along with the tire? Is it drawn away from the center of rotation?
Answer: At a slow rotation speed, I would think air would be (almost) still at the inner surfaces of the tire (with respect to the surfaces), but would slip with respect to the tire elsewhere. The centrifugal force will be greater farther from the axis of the wheel, so air will have higher pressure and density there. Turbulence can be a complicating factor at higher rotation speeds.
Answer: Model the air in a tire as a viscuous fluid, and you should get a pretty good answer.  The viscosity is low, but so is the mass, so inertia effects will be relevant.  Check the Reynolds number, but I suspect you can largely ignore turbulance if you model the inside of the tire as a smooth surface and ignore the deformation where the tire flattens against the road.
When the tire has been at rest for a while, everything will be "motionless".  When the tire first spins, the center of the air will stay where it was.   The boundary layer by the tire wall will move with the tire, which then makes the next layer move, with makes the next layer move, etc.  There is a overall time constant.  Eventually in steady state all the air moves with the tire.
Comment: A agree with this completely, but would add that in the limit as $t\rightarrow\infty$, the air-tire system will be in rigid body rotation, and the curved trajectory of the air particles will demand a radial pressure gradient. Thus, the highest pressures will be near the tire and the lowest pressures will be near the wheel rim.


Using minimum cover to find maximum matching in bipartite

Question: I was shown an algorithm in a test for using minimum vertex coverage in bipartite graph to find maximum edge matching. It made a lot of sense to me and I failed to come up with an example that proves it wrong, so I'd be happy if you could help me understand its correctness:
Comment: By a "coverage" do you mean a [vertex cover](https://en.wikipedia.org/wiki/Vertex_cover)?
Comment: @MishaLavrov yes, sorry if that wasn't clear
Comment: Do you know the "max-flow min-cut" theorem?
Comment: @BrianBorchers yes, and I'm aware of how to use it to find maximum matching.
Comment: I deleted the tag "covering-spaces". See https://en.wikipedia.org/wiki/Covering_space
Answer: Kőnig's theorem tells us that the number of edges in a maximum matching of a bipartite graph is equal to the number of vertices in a minimum vertex cover.
This immediately highlights one suspicious feature of the algorithm: we are not adding edges to $M$ at the same rate as we are removing vertices from $U$. More precisely:

In step 1, we "use up" a single vertex of the vertex cover to add a single edge to the matching.
In step 2, we "use up" two vertices of the vertex cover to add a single edge to the matching.
In step 3, we throw away a vertex in the vertex cover without adding anything to the matching at all.

Therefore if step 2 or step 3 are ever used, then the size of $M$ at the end will be less than the size of $U$ at the beginning, and therefore by Kőnig's theorem the matching $M$ will not be optimal.

For a specific example, consider the following graph:
<code>a  b  c     d  e  f
 \ | / \   / \ | /
  \|/   \ /   \|/
   x     y     z
</code>
The only minimum vertex cover here is $U = \{x,y,z\}$. One way the algorithm could be conducted using $U$ is to:

Begin by selecting $x \in U$, $c \notin U$, and applying step 1 of the algorithm, adding $(x,c)$ to the matching and removing $x,c$ from the graph.
Then, select $z \in U$,  $d\notin U$, and apply step 1 of the algorithm again, adding $(z,d)$ to the matching and removing $z, d$ from the graph.
Then, we are stuck with nothing to do for $y$; we remove it from the graph using step 3 and stop.

This creates a matching of size $2$, but there are size-$3$ matchings such as $\{(a,x), (c,y), (d,z)\}$, so the algorithm's output is not optimal.


Worth contacting HR when reapplying to same company?

Question: Previously, I had posted regarding a job I was heavily considering as it had some career relevance.  Currently I am applying to another institute that is partly affiliated with the institute that had given the previous job offer.  In this case, is it worth contacting the HR person from the previous job offering, even though the two jobs are essentially at different locations and the HR person could be different this time around?
Answer: Get in touch with them
How helpful this will be would vary depending on procedures to picking candidates at the company, but the friend in HR I just asked this question to said that it could be useful.
If they previously made you a job offer, then they already vetted you as a candidate. The other HR person will probably prefer to just search for your name rather than sift through piles of garbage applications to find a few decent ones.
You will probably still be required to fill out an application, but the recommendation from the other HR person could make it easier to get picked out of the pile.
Comment: How should I phrase it when I contact them?  Is it something along the lines of "Hi, I saw your recent posting for such position on your website and am writing to express interest, Sincerely, ..."
Answer: It could help. But the only thing it might do is get you past the first hurdle.
While you might have been the best candidate for position X based on the batch of applications they received, and filtered; there is no way to know if a different person, filtering a different batch of candidates, for a different position, will even invite you for an interview.
Since the cost in time for you to contact them is almost zero, it doesn't hurt to try.


Correlation with small range of data

Question: I have two count variables. I want to calculate a Pearson correlation between them. However, one of the variables only has a range of 1-7. Is it inadvisable to use Pearson correlation to study a relationship between two variables when one of them has such a small range? If so what alternative method should I use?
Answer: In theory, the range does not matter. You can scale your narrow-ranged variable without altering the correlation.
$$
\operatorname{cor}\left(X, Y\right) = \dfrac{
\operatorname{cov}\left(X, Y\right)
}{
\operatorname{sd}\left(X\right) \operatorname{sd}\left(Y\right)
}$$
Now, let $a\ne 0$.
$$
\operatorname{cor}\left(\left(aX\right), Y\right) = \dfrac{
\operatorname{cov}\left(\left(aX\right), Y\right)
}{
\operatorname{sd}\left(\left(aX\right)\right) \operatorname{sd}\left(Y\right)
} = \dfrac{
a\times\operatorname{cov}\left(X, Y\right)
}{
a\times\operatorname{sd}\left(X\right) \operatorname{sd}\left(Y\right)
}= \dfrac{
\operatorname{cov}\left(X, Y\right)
}{
\operatorname{sd}\left(X\right) \operatorname{sd}\left(Y\right)
}
= \operatorname{cor}\left(X, Y\right)
$$
Thus, you could multiply all of your values $1-7$ by a trillion $($so $a = 10^{12}$$)$ to give yourself a range of six-trillion instead of six, and the correlation would not change. This is good, because it means that unit conversions do not affect the correlation. That is, you get the same correlation if you measure in meters as you do if you measure in miles.
What would be concerning for real empirical work is if you only have a narrow range of the total possible range. In such a case, the conclusions you would draw from your range of $1-7$ might not apply for values above $8$ or below $1$, related to extrapolation. If you only care about that $1-7$ range, however, I see no issue.
Answer: Range is not important for correlation. I would suggest first to plot the data and visually inspect the relationship. If it appears to be linear then a Pearson correlation coefficient is probably the best choice, if the relationship is not exactly linear then Spearman may be a better choice.

Correlation with small range of data


How to read the empty cell in a PDF file in ASP.net

Question: I am able to read a pdf file using PDFBOX in my ASP.net application but it is not adding space for an empty cell in a table, So how to read empty fields from a pdf file using PDFBOX in C#. Is there any other method to read the pdf file .
Thanks .
Answer: You might be able to pull off this sort of thing if you know exactly where the text should be in advance and can get the locations of the text as you extract it.
If you don't know in advance where the rows and cells are, you'll have to guess based on the text locations.  This will not be easy.
In general, extracting data from PDF is ill advised.  PDFs don't have a concept of "tables" (unless the PDF creator goes well out of there way to use "Marked Content", which is still rare).  PDFs have lines, glyphs, and images (a pile of pixels).  It is Very Hard to extract formatting from that information... and sometimes it is all but impossible.
I don't know if PDFBox will give you the locations of extracted text, but iTextSharp will.


Which algebras can be presented as filtered colimits of f.g. regular ones with smooth connecting morphisms?

Question: Let $R$ be a regular (commutative associative unitial) algebra over a prime field $F$ (i.e.  $F=F_p$ or $F=\mathbb{Q}$); assume that it is noetherian excellent (and even of Krull dimension $1$). What extra restrictions on $R$ will ensure that it is the colimit of a filtered system of finitely generated regular $F$-algebras such that the connecting morphims are smooth (i.e. flat and unramified)? What conditions can ensure the existence of an etale cover of the spectrum of $R$ by the spectra of rings satisfying this property (I would prefer a cover by a finite family, yet an infinite one could also be sufficient for my purposes)?
Comment: The $S$ should be $R$, I think.
Answer: Imposing the condition that the transition maps are smooth seem like a very strong condition to me. Here are some examples.
If $R$ is a field, then it need not be true, for example it isn't true if $R$ is a perfect field of transcendence degree > 0 over $\mathbf{F}_p$ (look at module of differentials). If a transcendence basis of $R/\mathbf{F}_p$ also gives a basis for $\Omega_{R/\mathbf{F}_p}$, then it is true (because the field is a colimit of finite separable extensions of a purely transcendental field). I think it doesn't hold for the field $\mathbf{F}_p((t))$ (look at what happens with power series of the form $\sum t^{p^{e_i}}$ in the colimit).
If $R$ is general, then it seems to me a necessary condition is that all the residue fields have the property (for example the fraction field if $R$ is a domain). Another necessary condition is that $\Omega_{R/\mathbf{F}_p}$ is a projective $R$-module. But my guess would be these conditions together aren't sufficient.
Comment: Thank you for this answer! Yet could you give some more detail? Is there any substantial difference between $t$ and $\sum t^{p^{e_i}}$ in the field $\mathbb{F}_p((t))$?
Comment: It seems that one should rather consider two distinct elements of this field simultaneously.


How can I make this sentence correct? It sounds wrong to me

Question: The sentence, "Innovation requires more exploration and risk-taking than architects are typically used to." sounds incorrect tome, but I cannot put my finger on what the problem is. Please help me figure it out. Many Thanks!
Comment: *"used to"* sounds wrong here. How about *"accustomed to"* or *"comfortable with"*?
Answer: I suspect you're uncomfortable with ending your sentence with a preposition whose object cannot be readily supplied by the reader. Traditional grammar considered doing so an error in any circumstance, but the modern consensus is that it's a question of register and style:

It's not an error to end a sentence with a preposition, but it is a little less formal. In emails, text messages, and notes to friends, it's perfectly fine. But if you're writing a research paper or submitting a business proposal and you want to sound very formal, avoid ending sentences with prepositions.  — "Ending a Sentence with a Preposition: It's Ok and It's Not,"Grammarly, 3 Sept. 2014.

I would expand the "less formal" category to include most newspaper or magazine articles, a prepared oral presentation with a more conversational tone (think TED talk), and anywhere not doing so yields clumsy or overly stiff results.
On the other hand, sometimes it sounds a bit tortured:

"They're [buses] still coming on time most of the time, or almost all of the time, but not on time more than people are used to, more than we're used to, or more than people are accepting of," Scrimgeour said. — "Barrhaven transit customers struggle with unreliable service, stuffed buses," Ottawa Citizen, 18 Nov. 2018.

Used to, used to, accepting of might be good parallel structure, but more than people can accept is simpler and more direct, that is, if you can figure out at what point more frequently punctual bus service is not acceptable.
The way to avoid ending a sentence with a preposition — or a particle from a phrasal verb — is to supply the object or some other sentence element:

On the other side, Sebastian did some mistakes, much more than he is used to doing in the past. — "Lewis Hamilton, Michael Schumacher, Sebastian Vettel, Fernando Alonso - who's this century's greatest?" BBC Sport, 8 Nov. 2018.

The phrase more than he used to is more direct and economical. Repeating the verb and adding a temporal expression is unnecessary.

For this reason, most people going through cancer treatment have to eat more than they are used to eating. — "Managing Nutrition During Cancer & Treatment," Chemocare.

Completing the ellipsis with eating is acceptable, but also unnecessary.
So where does that leave you?

Innovation requires more exploration and risk-taking than architects are typically used to.

is grammatically correct but not formal. Not stranding the preposition requires a bit of juggling:

Innovation requires exploration and risk-taking at a level to which most architects are not accustomed.

Or supplying an object after the preposition:

Innovation requires more exploration and risk-taking than architects are typically used to bringing to a design project.

The first option is too transparent to its goal of not ending with to. The second is a better choice if the phrase brings actual information rather than just fill an imaginary grammatical hole.
Basically, I'd say stick with what you've got unless your text must be in a formal register. If so, then start over.
Answer: I would say:
''Innovation requires more exploration and risk-taking than those the architects are typically used to."
The thing is that in the second clause there is a shortened form of the predicate (which can be reconstructed as 'are used to exploration and risk-taking').
Instead of these omitted words we need the pronoun ''those''.
Comment: Uh, no. _Those architects_  instead of _these_. Adding a demonstrative does nothing for the sentence.
Comment: I agree with you that my term was not correct.


How is naming done in MI6?

Question: Bond is 007. WE have seen 006 and 008 in Bond movies. My question is how is this naming done to the agents in MI6? Does the number signify the serial no of an agent or the aptitude or the seniority? What is it?
Answer:
Bond's number—007—comes from the English spy and polymath John Dee,
who signed his letters to Elizabeth I with 00 and an elongated 7, to
signify they were for her eyes only.

The number was also assigned by Fleming in reference to one of British
naval intelligence's key achievements of World War I: the breaking of
the German diplomatic code. One of the German documents cracked and
read by the British was the Zimmermann Telegram, which was coded 0075,
and which was one of the factors that led the US entering the war.

Origin of the name 007
Comment: @Mistu4u Well, the answer does pretty clearly state that it's indeed the latter, doesn't it?
Comment: No, no I want to know as "00" signifies "license to kill", like that what does "7" signify? Or it is just a fictitious numbering system done by Ian Fleming?
Comment: A little extra bit not worthy of a separate answer.  The system isn't 1-10, in The World is Not Enough a 0012 was mentioned.
Answer: From Wikipedia:

Although pronounced "Double-O", the O refers to
  zeros. In the British and Commonwealth armed
  forces, soldiers and officers are assigned identity
  numbers; the United States military does likewise.
  During Ian Fleming's work in Vichy France, an agent's anonymity was imperative, and, when the
  agent was military, it was convenient to use the
  last three digits of the agent's number as
  identification.
In World War II, Britain's Special Operations Executive agents did not have identifiers assigned to them such as the 00 or related 'systems' of
  nomenclature. Specific agents would be known to
  high command by their own names, and when deniability was at stake, their service numbers in long form, or else by invented codenames.
For the sake of romance and memorability,
  Fleming used the 00 and mystical number 7 for
  James Bond – himself a shell for the reader to inhabit.
Comment: So significance of "7" is unknown to all?
Comment: Yes, appears to be just to be a personally assigned number to go along with the 00.
Answer: There is little doubt that the intent of Fleming and the Bond producers in using 00 is to emphasize the exclusivity of the agent number and it is explicit that his category is "licensed to kill", certainly a rarity in government agents.  There can't be more than ten of them (presumably), though often he interacts with special forces with dozens of members on a single team.
The specific choice of 7 almost certainly relates to his incredibly good luck:  lucky at games of chance, women, and getting out of tight squeezes.

How is naming done in MI6?


Is it possible to render an Android View to an OpenGL FBO or texture?

Question: Is it possible to render a View (say, a WebView) to an FBO so it can be used as a texture in an OpenGL composition?
Comment: Continuously? Or as a one-time snapshot sort of deal?
Comment: As far as I know, no. AFAIK best you can do is render View to Bitmap and assign it to texture using GLUtils.
Comment: @harism I can't imagine the frame rate of doing that being very high. There must be a better way than that.
Answer: I brought together a complete demo project which renders a view to GL textures in real time in an efficient way which can be found in this repo. It shows how to render WebView to GL texture in real time as an example.
Also a brief code for this can look like the following (taken from the demo project from the repo above):
<code>public class GLWebView extends WebView {

    private ViewToGLRenderer mViewToGLRenderer;
    ...
    // drawing magic
    @Override
    public void draw( Canvas canvas ) {
        //returns canvas attached to gl texture to draw on
        Canvas glAttachedCanvas = mViewToGLRenderer.onDrawViewBegin();
        if(glAttachedCanvas != null) {
            //translate canvas to reflect view scrolling
            float xScale = glAttachedCanvas.getWidth() / (float)canvas.getWidth();
            glAttachedCanvas.scale(xScale, xScale);
            glAttachedCanvas.translate(-getScrollX(), -getScrollY());
            //draw the view to provided canvas
            super.draw(glAttachedCanvas);
        }
        // notify the canvas is updated
        mViewToGLRenderer.onDrawViewEnd();
    }

    ...
}

public class ViewToGLRenderer implements GLSurfaceView.Renderer{

    private SurfaceTexture mSurfaceTexture;
    private Surface mSurface;

    private int mGlSurfaceTexture;
    private Canvas mSurfaceCanvas;

    ...

    @Override
    public void onDrawFrame(GL10 gl){
        synchronized (this){
            // update texture
            mSurfaceTexture.updateTexImage();
        }
   }

    @Override
    public void onSurfaceChanged(GL10 gl, int width, int height){
        releaseSurface();
        mGlSurfaceTexture = createTexture();
        if (mGlSurfaceTexture > 0){
            //attach the texture to a surface.
            //It's a clue class for rendering an android view to gl level
            mSurfaceTexture = new SurfaceTexture(mGlSurfaceTexture);
            mSurfaceTexture.setDefaultBufferSize(mTextureWidth, mTextureHeight);
            mSurface = new Surface(mSurfaceTexture);
        }

    }

    public Canvas onDrawViewBegin(){
        mSurfaceCanvas = null;
        if (mSurface != null) {
            try {
                mSurfaceCanvas = mSurface.lockCanvas(null);
            }catch (Exception e){
                Log.e(TAG, "error while rendering view to gl: " + e);
            }
        }
        return mSurfaceCanvas;
    }

    public void onDrawViewEnd(){
        if(mSurfaceCanvas != null) {
            mSurface.unlockCanvasAndPost(mSurfaceCanvas);
        }
        mSurfaceCanvas = null;
    }
}
</code>
The demo output screenshot:
Comment: Yeah it works. But the views still need to be added to Activity. Can we render them without adding them to the visible Layout?
Comment: This approach is problematic because the WebView now accepts all touch events from the screen.  There's no layer for translation of the position of the actual touch event to a virtual touch event to the GL representation of the webview.
Comment: @virus Is there a way to render the entire app, instead of one WebView?
Comment: @TimotejLeginus, I don't think so, but it depends on what you mean by the "entire app". You can render any view to GL and do with it what's suitable in your case. Also depending on your use case it might be helpful to use engines like Unity, AndEngine etc instead.
Comment: Actually, I'm trying to pass the texture to Unity. I want to know if there's an easy method to render an entire app to a texture.
Answer: Yes is it certainly possible, I have written up a how-to here;
http://www.felixjones.co.uk/neo%20website/Android_View/
However for static elements that won't change, the bitmap option may be better.
Comment: I found not all views can be draw.  TextureView can not be draw like this. Could you resolve it?
Comment: @fadden
 If I use TextureView, I found onSurfaceTextureAvailable of TextureView.OnFrameAvailableListener not called back.  Why can not TextureView drawed like this?
Answer: At least someone managed to render text this way:
Rendering Text in OpenGL on Android

It describes the method I used for rendering high-quality dynamic text efficiently using OpenGL ES 1.0, with TrueType/OpenType font files.

[...]

The whole process is actually quite easy. We generate the bitmap (as a texture), calculate and store the size of each character, as well as it's location on the texture (UV coordinates). There are some other finer details, but we'll get to that.

OpenGL ES 2.0 Version: https://github.com/d3kod/Texample2


is it possible to place repeat block in classic email HTML template?

Question: I am building an email template using HTML and I was wondering if I can place a repeat block in HTML to view a list of rows.
I know if I use Visualforce template I can achieve my goal using apex: repeat, but I would like to know if it is possible using just HTML.
Answer: Visualforce markup is only available in Visualforce email templates.  Hence, the answer is No.
But a Visualforce email template can be almost entirely HTML and in fact, shouldn't contain VF components with built in styling like apex:pageBlock so I'm not sure what the penalty is for using the VF template (unless the running user is Automated Process user where rendering can be problematic and VF components don;t work at all)


node publish state

Question: is there a simple way to control the node's publish state under a content type? eg: a content type "test", when the content is created by the admin, the article will be published. when the user iseditor, the article will be approved by admin that can publish. when i unchecked the box(published) which in the content type test workflow settings. both the admin and editor creating articles are can't be published
Answer: As Berdir stated you could use the rules module to un/publish specific content depending to the role of the creator.
You could also implement hook_nodeapi() in a module to get this done. The operation would be 'presave' and the code something like that:
YOURMODULE_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
    if($op == 'presave' && $node->type == 'YOURTYPE') {
        global $user;
        if (in_array('YOURROLE', array_values($user->roles))) {
            $node->status = 0;
        }
    }
}

Here I checked the contenttype and user role to upublish content. You can do all sort of things.
Comment: i am sorry, i have tested the above code, but it can't work. when i publish a story as role administrator. then i logout to see the page, it shows  i have no perssion to access the page, the articles status is unpublished.
Comment: The code requires the nodes to be published by default. It unpublishes them if the constraints (contentype + role) hit. You could do it the other way around (status = 1) if that fits your problem better (e.g. there are 10 roles which can't publish and only one is allowed to).
Comment: i changed the $node->status = 1; it still can't work. i want to the administrator role publish. the rest role unpublish.
Comment: Could you post your code? Can you debug (dsm() or print_r()) and check if the code inside the inner `if` is ever reached? Is the module not activated or are there any typos?
Comment: function alterform_nodeapi(&$node,$op,$a3=NULL,$a4=NULL){ if($op== 'presave' && $node->type == 'story'){ global $user;
if(in_array('administrator',array_values($user->roles))){ $node->status =1;}}}
Comment: i using echo 'test' on the if($op....), the page can output test. when i put the echo 'test' into the if body, the page can't output the test.when i delete the $op=='presave', it can output the test
Answer: If you change the default to don't publish, only users with the appropriate permission can change it, for all others, it will use the default.
You could then for example build a view with unpublished content, that you can go through and publish want you want. The default content list has a filter to show only unpublished content too, so that might work too.
Comment: Have a look at http://drupal.org/project/rules then, that might help you.
Comment: i am sorry,the description of my question maybe unclearly. i want to when the admin creates the article that published. the editor can't.

node publish state


How do I install Glippy?

Question: I just installed the brand new 11.10 and apparently the ppa for glippy don't work with oneiric. Maybe with the upgrade glippy can still be operating with you? thnx
Answer: The PPA has been updated! - Now you can find packages for Oneiric, too.

If you don't know how to install that/a PPA (in Ubuntu 11.10), please read the answer(s) of this UA question:

"What are PPAs and how do I use them?"

to install
you can install install Glippy...
sudo add-apt-repository ppa:bikooo/glippy
sudo apt-get update
sudo apt-get install glippy glippy-ubuntu-mono

sudo gconf-schemas --unregister glippy.schemas
sudo gconf-schemas --register glippy-indicator.schemas

source
Answer: I took a look at the Glippy PPA and it seems that there is not yet a package for 11.10 yet.
If the project is active, they they should be up within a few weeks.
If you try to upgrade from 11.04 to 11.10, the older glippy package might work for you, but is not recommended.
If you want to do so in a fresh install, you can add the PPA, then edit the source to point to natty. Go to Dash -> Software Sources -> Choose your PPA -> Edit

In my case it did not work, though, and I had to edit the /etc/apt/sources.list.d/bikooo-glippy-oneiric.list file manually.
To do that, Press Alt+F2 and type gksudo gedit /etc/apt/sources.list.d/bikooo-glippy-oneiric.list to launch gedit with the file. Replace the text oneiric with natty and save.
Of course you will need to run an update after this.
Comment: hi Capt.Nemo, thank you for you answer, I will try to edit the source list.

How do I install Glippy?


How does the partial pressure of oxygen affect mental focus?

Question: On this Wikipedia page it says that lower oxygen levels can cause light-headedness. Is there evidence that higher partial pressure of oxygen can improve mental focus?
Comment: Welcome to Biology.SE. Seems like the whole question is about the definitions of percentage and concentration. This question doesn't appear to be about biology. You probably read a text somewhere which talk about precentage of oxygen in the air and concentration (of oxygen I would assume) in the air that was unclear to you. If this is the case, you should include your passage and explain what you don't understand.
Comment: @Remi.b I mean concentration as in focus. If biology.SE isn't the right place for this question, please guide me.
Comment: Oh, I got it! Ok. Your question is on-topic! I retracted my close vote. Where did you read that lower concentration in oxygen decreases abilities to focus on a task? It will probably help having the reference.
Comment: please rephrase your question, maybe expand a little. Maybe include some reference to what to talk about. Otherwise it is hard to understand
Comment: @Remi.b well I thought it was well-known, but when I went looking for it, it was harder to find than anticipated. Edited my question with a source.
Comment: Vrwim: I made a pretty significant edit to try to avert the VTC. I *think* you're asking about altitude (which is the most common situation where inspired O2 is compromised), but that does not affect the *percentage* of O2 but rather atmospheric pressure--> partial pressure of O2. I also rephrased it so it seemed clearer to me. Please feel free to roll back whatever you don't like.
Comment: I know that it compromises concentration, I am asking about whether higher levels of oxygen improve concentration.
Comment: Vrwim, sorry I misunderstood. I just re-edited, but feel free to restate it however you'd like.
Comment: @Susan this is great! Couldn't have said it better myself.
Answer: Long term exposure to hyperoxia actually does more harm than good. Though short term hyperoxia is recommended after brain injuries (http://www.medscape.com/viewarticle/741751_3) as a valid clinical strategy.
For lower concentrations of oxygen, there seems to be evidence that cognitive function is improved:

You can read more about that here: Chung, Soon-Cheol, et al. "Effect of 30% oxygen administration on verbal cognitive performance, blood oxygen saturation and heart rate." Applied psychophysiology and biofeedback 31.4 (2006): 281-293.
And also this:

This study aimed to investigate whether inhalation
  of the air with 30% oxygen compared with normal air
  enhances cognitive functioning through increased activation in
  the brain. The verbal and visuospatial tasks were performed
  while brain images were scanned. The results showed that
  there were improvements in performance and also increased
  activation in several brain areas under the condition of 30%
  oxygen. These results suggest that a higher concentration of
  the inhaled oxygen increases the saturation of the blood
  oxygen in the brain, and facilitates cognitive performance.

Taken from: Sohn, Jin-Hun, Soon-Cheol Chung, and Eun-Hye Jang. "30% oxygen inhalation enhances cognitive performance through robust activation in the brain." Journal of physiological anthropology and applied human science 24.1 (2005): 51-53.
Though you have to be a bit careful about oxygen poisoning.

While oxygen is an essential component for living organisms, the
  formation of reactive O2 intermediates is commonplace in aerobically
  metabolizing cells. The stability of a variety of reactive O2
  intermediates varies, but in some instances their interaction with the
  intracellular environment sets the basis for the pathophysiology of
  several disease states.

Adapted from: Cadenas, Enrique. "Biochemistry of oxygen toxicity." Annual review of biochemistry 58.1 (1989): 79-110.

Pathophysiological processes are associated with increased levels of
  hyperoxia-induced reactive O2 species (ROS) which may readily react
  with surrounding biological tissues, damaging lipids, proteins, and
  nucleic acids. Protective antioxidant defenses can become overwhelmed
  with ROS leading to oxidative stress.
The continuous exposure of newborn rats to 70–80 per cent oxygen at atmospheric pressure throughout the first 9 days of life significantly inhibited the growth of the brain which normally occurs during this period of life. The accumulations of DNA, RNA, total protein, and proteolipid protein which accompany brain growth during this period were all approximately proportionately depressed by the oxygen-enriched atmosphere. RNA/DNA and protein/DNA ratios were unaffected. The increase in brain mass in the first week of life reflects mainly cell proliferation, and since the decreased DNA accumulation occurred with no changes in RNA/DNA and protein/DNA ratios, we conclude that the effect of oxygen was to inhibit cellular division. We estimate that the oxygen exposure caused an approximately 7 per cent deficit in the cell population of the brain. These results indicate that the use of elevated concentrations of oxygen may have serious deleterious effects on the growth and development of the brain.

Taken from:* Grave, G. D., C. Kennedy, and L. Sokoloff. "Impairment of growth and development of the rat brain by hyperoxia at atmospheric pressure." Journal of neurochemistry 19.1 (1972): 187-194.*
Also hydrogen peroxide is  produced:

Thus the H2O2 concentration in brains of rats exposed to room air is calculated to be about 7.7 pM, rises 60% when O2 tension is increased to 100% O2, and increases 300% at 3 ATA 100% O2, where symptoms of central nervous system toxicity first become apparent. These studies support the concept that H2O2 is an important mediator of O2-induced injury to the central nervous system.

Taken from: Yusa, T. O. S. H. I. K. O., et al. "Hyperoxia increases H2O2 production by brain in vivo." Journal of Applied Physiology 63.1 (1987): 353-358.
You can also always read the wiki page for oxygen poisoning: http://en.wikipedia.org/wiki/Oxygen_toxicity and also hyperoxia itself: http://en.wikipedia.org/wiki/Hyperoxia
Comment: Okay, what do about slightly higher percentages? Like 25-30?
Comment: @vrwim answer edited.
Comment: that is what I was looking for! Thanks! I will look at the references in there and read up on that some more.


Resident evil 5 saving blonde girl at the first chapter

Question: Is there a way to save her,she got dragged by zombie and i tried to shot the zombie but nothing happen.I just want to make sure if she cant be saved.
Answer: The Blonde-girl - I'm guessing you mean Allyson -
From here:

Death
  Later, she was seen bursting through a balcony door, calling for help only to be pulled back inside by the same Majini who abducted her earlier. The agents hurried up to the building to save her. She fell against Chris, seemingly in exhaustion. As Chris attempted to comfort her, Allyson gripped a strap on his back as the parasite expelled from her mouth reaching toward Chris and wrapping it's petal like lips around his face. Sheva shot at the infected Allyson as she jumped back, evading the bullet and went on to attack the two of them.
She was shot in the head by the two agents, killing her. After her death, a Cephalo-type Plaga erupted from her throat. This was the first Cephalo encountered in the game series and the first that the two agents ever saw. Her body, still controlled by the Plaga continued to attack the two. After the agents did enough damage to the Plaga, it exploded and her body dropped and disintegrated.

It would seem the character literally has it written that her death is inevitable. I wouldn't worry to much about it :)


Sketchup 3d model import with wrong topology?

Question:
Imported this 3d Model from google sketchup ,and when i open it with blender or 3Dmax i get those extra lines all over , is there a way to get them deleted ,or remove them with ease ?!?!
Comment: This seems to be triangles (instead of quads). You can Alt+J to make quads from triangles (select the corresponding surfaces before). But consider too that this not a real problem: triangles can stay triangles... very dependent of what you want to do after that.
Comment: What you are seeing are the results of Sketchup being a bad modelling tool topology wise. It creates NGons, bad topology and non-manifold geometry without discretion, and when imported to other proper modelling tools those problems light up. Also as mentioned most exchange formats only support triangles, so anything with more than 3 sides will be decomposed into simpler geometry
Answer: Those are the result of triangulating faces, possibly because of the file format used for the exporting (e.g. .3ds will do that regardless whether you asked it to or not).
To get quads-based topology back:

It should be possible to convert them back to quads with Alt+J, but this might not work in all cases (depends on topology complexity). You will need to convert faces which were converted not in desired way manually;
use another file format for import / export, e.g. .fbx or .dae.

Note: the need in converting depends on the final result you're aiming to.


Reading kanjis Kunyomi or onyomi

Question: I know use onyomi and kunyomi for kanjis but i confused for use other means of  kanjis for example 日 this kanji means sun,day
Kunyomi:ひ,び,か
Onyomi:にち,じつ
This example 昨日 means さくじつ why isn't use にち for kunyomi reading日曜日(にちようび) why is use び for this word we can use ひor か. I don't understand for Kunyomi or onyomi reading for kanjies
Answer: First of all, you'd most commonly read 昨日 as きのう (a special reading), though the reading さくじつ is used more formally.
Secondly, you have to bear in mind that the reading of a character is determined by what surrounds it (i.e. the word it is being used in). You can't predictably tell which reading will be used in a given word if the kanji in that word have multiple readings; you just have to remember what they are for a given word.
naruto's comment on your question contains a great answer.

Reading kanjis Kunyomi or onyomi


django development server with facebook connect

Question: What URL should i give facebook to get a FACEBOOK_API_KEY if i'm using facebook connect with the django development server?  I understand I need to edit my local host, but i'm not sure with what.
Thanks,
David
Answer: The correct course is to not change your local /etc/host, but to use "http://localhost/" as your Facebook Connect Redirect URL.  It is literally what Facebook returns to you, and if you're doing development locally, it's what you want.
Ideally, you want two FB application registrations: One for PRODUCTION, and one for DEVELOPMENT.  That way both continue to work correctly without interfering with each other.  (And maybe a third for BETA (or Staging, or Testing, or whatever you want to call it.))


Install chipset driver before nic driver?

Question: When installing drivers, should I be installing the chipset drivers first, or doesn't it matter?  i.e. can I jump straight to the nic driver?
Comment: Windows should automatically install the device drivers when the device is detected.
Comment: Through experience it shouldn't matter. @Ramhound - What if Windows doesn't have the driver in its store to begin with, especially if you have no network connectivity to download from Windows Update...
Comment: The obvious answer is if Windows is not aware of the driver. It will ask the user for the driver then automatically install the driver.  99% of network devices will work with the default lan device driver.
Comment: @Ramhound, windows 7 didn't detect the nic driver at all.  for the gc, it just installed a generic driver which only allows a resolution of 640x480.
Comment: I was speaking of the network driver, the chipset driver , is another story.  In any case just providing windows the driver is enough the order really isn't important
Answer: In windows 98 ages... Yes. Especially the chipset has onboard nic.
Now it doesn't matter. But I still prefer to install the chipset driver first.
Sometimes, it is more important to install chipset driver with integrated graphics device before you install individual graphic card driver.
Comment: Aye, old habits die hard.  Glad to see someone here who knows old hardware but doesn't perpetuate out-of-date knowledge that is so commonplace.


Can Firejails protect against malicious links?

Question: I would like to ask, if Firejails on Linux, protects when clicking a malicious link in the browser e.g. from downloading a keylogger or a trojan.
Comment: Downloading malware is not dangerous as long it is not executed. And jail breakouts are unlikely but they exist as far as I know
Answer: Firejail is a sandbox for process execution. While it could be used to limit network activity, it has no way to distinguish between a safe and a malicious link. So it does not prevent downloading it.
If the browser is executed inside the firejail and if the jail is configured to not share any data with outside the jail, then the jail can be used to limit the impact, i.e. keep anything malicious inside the jail.


Dataset of electro-mechanical data storage devices prices and storage capabilities

Question: I am looking for a data set of electro-mechanical data storage devices prices and specs. In particular, I am interested in the prices of memory storage (e.g. Hard Disk, Solid State Hardisk etc. etc.) comparing the $/GB, writing reading speed, the maximum capacity and so on I did my own table. But I want to validate it against a dataset.
Answer: Hard Drive Data and Stats
Hard drive failure data and stats from 2019
Except price you can find the other detailed dataset here:
The first row of each file contains the column names, the remaining rows are the actual data. The columns are as follows:

Date – The date of the file in yyyy-mm-dd format.
Serial Number – The manufacturer-assigned serial number of the drive.
Model – The manufacturer-assigned model number of the drive.
Capacity – The drive capacity in bytes.
Failure – Contains a "0" if the drive is OK. Contains a "1" if this is the last day the drive was operational before failing.


Does a bond mutual fund qualify as "bonds" for the purposes of risk management?

Question: I am re-balancing my portfolio to be a little more conservative.  I am considering taking some of what's currently in equity ETFs and putting them into VBMFX, a "Total Bond Market Index Fund".  Is buying shares of this the same thing as reallocating investments to bonds, for the sake of risk management?
Comment: VBMFX is not an ETF, it's a Mutual Fund.
Comment: @WakeDemons3 - I did, I edited the title after ruief commented
Answer: tl;dr A hold-to-maturity bond strategy has a different risk profile to a buy-to-trade bond strategy.

There are different kinds of risks as well as different amounts of each kind of risk. It depends on the risk you are seeking to mitigate.
For example, there's the risk that the entity behind the bond is unable to pay coupons or renegs on its bond-repayment obligations, or that whatever is paid doesn't keep pace with inflation, etc.
A bonds strategy would be expected to weigh these risks and come up with a portfolio that has an acceptable mix of bonds.
The headline advantage of bonds over shares is that (subject to the entity honouring its obligations) you know how much capital you will get back if you hold the bond to maturity. However, bonds can be traded, and trading brings with it the risk of capital loss, as well as the prospect of capital gain, which somewhat negates this headline advantage.
So buying shares in a bond fund is not "the same thing as reallocating investments to bonds, for the sake of risk management". For example, if you are buying a bond to hold to maturity, presumably you wouldn't buy one for which you'd make a loss at maturity. However, the 1-yr performance reported on the VMBFX performance page is currently:

Total Bond Mkt Index Inv: -1.31%
Spliced BloomBarc USAgg Flt AdjIx* (Benchmark): -1.09%

As with any managed fund or index, you need to consider its strategy and composition etc, not just the nature of individual assets in the asset class it invests in.
Answer: Yes, if you are looking for the asset class "bonds", the ETF you cite would qualify, as would individual bonds. The benefit of the ETF is the ease of buying and selling.
When looking at such ETFs, just be aware of what comprises the ETF. A long term bond or ETF will have a different risk/reward profile that one that's short term, for example.
Answer: There are many types of bonds and some have higher risk than others.  You can generally learn more about a fund's holdings by going to the provider's website.  In your example, you can find out more about the holdings by going here: https://investor.vanguard.com/mutual-funds/profile/portfolio/vbmfx


Nginx SSL + Varnish + Nginx HTTP server, .css and .js files URL's are getting rewritten to http

Question: I am using Nginx as an SSL terminator that serves requests to Varnish, and then Varnish passes the cached data to Another Nginx Vhost. Everything works well so far, but for some reason, only .css and .js files are being rewritten to http instead of https. I have been looking for solutions, including  https://www.rsreese.com/redirect-http-to-https-using-varnish/
But it does not rewrite the assets URL's on my case. Can someone shed some light here ?
This is the NGINX conf : There are one redirect from www to non wwww, a server listening on port 80 that rewrites the URL to the HTTPS version, the SSL terminator server that passes to Varnish and then back to the last server wich is the regular HTTP server.
    server {
        server_name www.domain.com;
        return 301 $scheme://domain.com$request_uri;
    }

    server {
        listen       80;
        server_name domain.com;
        rewrite     ^   https://$server_name$request_uri? permanent;
    }

    server {

            listen 443 ssl;

            server_name domain.com;
            access_log  off;
            ssl_certificate /etc/ssl/private/cert_chain.crt;
            ssl_certificate_key /etc/ssl/private/server.key;

            if ($allow = no) {
            return 403;
            }
            if ($bad_referer) {
            return 444;
            }
            proxy_redirect     off;

            location / {
            proxy_pass https://127.0.0.1:8080;
            proxy_set_header X-Real-IP  $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto https;
            proxy_set_header X-Forwarded-Port 443;
            proxy_set_header Host $host;
            }
    }

    server {

            listen 8081;
            root /var/wwwd/domain.com/wordpress;
            index index.php index.html index.htm;
            server_name domain.com;

            if ($allow = no) {
            return 403;
            }
            if ($bad_referer) {
            return 444;
            }

            location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
                    access_log off; log_not_found off; expires max;
            }

            client_body_buffer_size 124K;

            client_header_buffer_size 1k;
        client_max_body_size 100m;

        large_client_header_buffers 4 16k;

        error_page 404 /404.html;

        gzip on;
        gzip_disable "msie6";
        gzip_vary on;
        gzip_proxied any;
        gzip_comp_level 6;
        gzip_buffers 16 8k;
        gzip_http_version 1.1;
        gzip_types application/json application/x-javascript application/xml text/javascript text/plain text/css application/javascript text/xml application/xml+rss;

        # Rewrites for Yoast SEO XML Sitemap
        rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
        rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
        include hhvm.conf;
        #       include domain.com-ps.conf;
        include multisite.conf;
        rewrite /wp-admin$ $scheme://$server_name$uri/ permanent;
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
              root /usr/share/nginx/html;
        }

         if ($bad_client) { return 403; }

        location / {
        try_files $uri $uri/ /index.php?$args;

        }
}

And this is Varnish .vlc
vcl 4.0;

import std;
import directors;

backend server1 {
  .host = "127.0.0.1";             # IP or Hostname of backend
  .port = "8081";                  # Port Apache or whatever is listening
  .max_connections = 800;          # That's it
  .first_byte_timeout = 300s;      # How long to wait before we receive a first byte from our backend?
  .connect_timeout = 300s;         # How long to wait for a backend connection?
  .between_bytes_timeout = 300s;   # How long to wait between bytes received from our backend?
}

# Only allow purging from specific IPs
acl purge {
    "localhost";
    "127.0.0.1";
    "domain.com";
}

sub vcl_init {
  # Called when VCL is loaded, before any requests pass through it. Typically used to initialize VMODs.
  new vdir = directors.round_robin();
  vdir.add_backend(server1);
  #vdir.add_backend(server2);
  #vdir.add_backend(server3);
}

sub vcl_recv {
  # Called at the beginning of a request, after the complete request has been received and parsed.
  # Its purpose is to decide whether or not to serve the request, how to do it, and, if applicable,
  # which backend to use.
  # also used to modify the request

  # send all traffic to the vdir director
  set req.backend_hint = vdir.backend();

  # TURN OFF CACHE when needed (just uncomment this only when needed)
  # return(pass);

  # Allow purging from ACL
  if (req.method == "PURGE") {
    if (!client.ip ~ purge) {
    return(synth(405,"Not allowed."));
    }
    return (purge);
  }

  # Normalize the header, remove the port (in case you're testing this on various TCP ports)
  set req.http.Host = regsub(req.http.Host, ":[0-9]+", "");

  # set or append the client.ip to X-Forwarded-For header. Important for logging and correct IPs.
  if (req.restarts == 0) {
    if (req.http.X-Forwarded-For) {
      set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip;
    } else {
      set req.http.X-Forwarded-For = client.ip;
    }
  }

###
### Do not Cache: special cases
###

  # Do not cache AJAX requests.
    if (req.http.X-Requested-With == "XMLHttpRequest") {
        return(pass);
    }

  # Post requests will not be cached
    if (req.http.Authorization || req.method == "POST") {
        return (pass);
    }

  # Only cache GET or HEAD requests. This makes sure the POST requests are always passed.
  #if (req.method != "GET" && req.method != "HEAD") {
  #  return (pass);
  #}

  # Dont Cache WordPress post pages and edit pages
    if (req.url ~ "(wp-admin|post\.php|edit\.php|wp-login)") {
        return(pass);
    }
    if (req.url ~ "/wp-cron.php" || req.url ~ "preview=true") {
        return (pass);
    }

  # Woocommerce
    if (req.url ~ "(cart|my-account|checkout|addons)") {
        return (pass);
    }
    if ( req.url ~ "\?add-to-cart=" ) {
        return (pass);
    }

  # Paid memberships Pro PMP
    if ( req.url ~ "(membership-account|membership-checkout)" ) {
        return (pass);
    }

  # WordPress Social Login Plugin. Note: Need to develop this. Please share if you have an example.
    if (req.url ~ "(wordpress-social-login|wp-social-login)") {
        return (pass);
    }

  # WP-Affiliate
    if ( req.url ~ "\?ref=" ) {
        return (pass);
    }

  # phpBB Logged in users and ACP
    if ( req.url ~ "(/forumPM/adm/|ucp.php?mode=|\?mode=edit)" ) {
        return (pass);
    }

###
###    http header Cookie
###    Remove some cookies (if found)
###    Cache This Stuff
###
# https://www.varnish-cache.org/docs/4.0/users-guide/increasing-your-hitrate.html#cookies

  ### COOKIE MADNESS.

    # Remove the "has_js" cookie
    set req.http.Cookie = regsuball(req.http.Cookie, "has_js=[^;]+(; )?", "");

    # Remove any Google Analytics based cookies
    set req.http.Cookie = regsuball(req.http.Cookie, "__utm.=[^;]+(; )?", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "_ga=[^;]+(; )?", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "utmctr=[^;]+(; )?", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "utmcmd.=[^;]+(; )?", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "utmccn.=[^;]+(; )?", "");

    # Remove the Quant Capital cookies (added by some plugin, all __qca)
    set req.http.Cookie = regsuball(req.http.Cookie, "__qc.=[^;]+(; )?", "");

    # Remove the wp-settings-1 cookie
    set req.http.Cookie = regsuball(req.http.Cookie, "wp-settings-1=[^;]+(; )?", "");

    # Remove the wp-settings-time-1 cookie
    set req.http.Cookie = regsuball(req.http.Cookie, "wp-settings-time-1=[^;]+(; )?", "");

    # Remove the wp test cookie
    set req.http.Cookie = regsuball(req.http.Cookie, "wordpress_test_cookie=[^;]+(; )?", "");

    # Remove the phpBB cookie. This will help us cache bots and anonymous users.
    set req.http.Cookie = regsuball(req.http.Cookie, "style_cookie=[^;]+(; )?", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "phpbb3_psyfx_track=[^;]+(; )?", "");

    # Remove the cloudflare cookie
    set req.http.Cookie = regsuball(req.http.Cookie, "__cfduid=[^;]+(; )?", "");

    # Remove the PHPSESSID in members area cookie
    set req.http.Cookie = regsuball(req.http.Cookie, "PHPSESSID=[^;]+(; )?", "");

    # Are there cookies left with only spaces or that are empty?
    if (req.http.cookie ~ "^\s*$") {
    unset req.http.cookie;
    }

  # MEGA DROP. Drop ALL cookies sent to WordPress, except those originating from the URLs defined.
  # This increases HITs significantly, but be careful it can also break plugins that need cookies.
  # Note: The /members/ directory had problems with PMP login and social login plugin.
  # Adding it to the exclude list here (and including it below in the "Retain cookies" list) fixed login.
  # This works better than than other cookie removal examples found on varnish's website.
  # Note phpBB directory (forumPM) also passes cookies here.
  if (!(req.url ~ "(wp-login|wp-admin|cart|my-account|checkout|addons|wordpress-social-login|wp-login\.php|forumPM|members)")) {
  unset req.http.cookie;
  }

  # Normalize the query arguments.
  # Note: Placing this above the "do not cache" section breaks some WP theme elements and admin functionality.
  set req.url = std.querysort(req.url);

  # Large static files are delivered directly to the end-user without
  # waiting for Varnish to fully read the file first.
  # Varnish 4 fully supports Streaming, so see do_stream in vcl_backend_response() to witness the glory.
  if (req.url ~ "^[^?]*\.(mp[34]|rar|tar|tgz|wav|zip|bz2|xz|7z|avi|mov|ogm|mpe?g|mk[av])(\?.*)?$") {
    unset req.http.Cookie;
    return (hash);
  }

  # Cache all static files by Removing all cookies for static files
  # Remember, do you really need to cache static files that don't cause load? Only if you have memory left.
  # Here I decide to cache these static files. For me, most of them are handled by the CDN anyway.
  if (req.url ~ "^[^?]*\.(bmp|bz2|css|doc|eot|flv|gif|ico|jpeg|jpg|js|less|pdf|png|rtf|swf|txt|woff|xml)(\?.*)?$") {
    unset req.http.Cookie;
    return (hash);
  }

  # Cache all static files by Removing all cookies for static files - These file extensions are generated by WP Super Cache.
  if (req.url ~ "^[^?]*\.(html|htm|gz)(\?.*)?$") {
    unset req.http.Cookie;
    return (hash);
  }

  # Do not cache Authorized requests.
    if (req.http.Authorization) {
        return(pass);
    }

 # Cache all others requests.
 # Note Varnish v4: vcl_recv must now return hash instead of lookup
    return (hash);
}

sub vcl_pipe {
  # Called upon entering pipe mode.
  # In this mode, the request is passed on to the backend, and any further data from both the client
  # and backend is passed on unaltered until either end closes the connection. Basically, Varnish will
  # degrade into a simple TCP proxy, shuffling bytes back and forth. For a connection in pipe mode,
  # no other VCL subroutine will ever get called after vcl_pipe.

  # Note that only the first request to the backend will have
  # X-Forwarded-For set.  If you use X-Forwarded-For and want to
  # have it set for all requests, make sure to have:
  # set bereq.http.connection = "close";
  # here.  It is not set by default as it might break some broken web
  # applications, like IIS with NTLM authentication.

  # set bereq.http.Connection = "Close";

  return (pipe);
}

sub vcl_pass {
  # Called upon entering pass mode. In this mode, the request is passed on to the backend, and the
  # backend's response is passed on to the client, but is not entered into the cache. Subsequent
  # requests submitted over the same client connection are handled normally.

  # return (pass);
}

# The data on which the hashing will take place
sub vcl_hash {
  # Called after vcl_recv to create a hash value for the request. This is used as a key
  # to look up the object in Varnish.

  hash_data(req.url);

  if (req.http.host) {
    hash_data(req.http.host);
  } else {
    hash_data(server.ip);
  }

  # hash cookies for requests that have them
  if (req.http.Cookie) {
    hash_data(req.http.Cookie);
  }

  # If the client supports compression, keep that in a different cache
  if (req.http.Accept-Encoding) {
      hash_data(req.http.Accept-Encoding);
  }

  return (lookup);
}

# Handle the HTTP request coming from our backend
sub vcl_backend_response {
  # Called after the response headers has been successfully retrieved from the backend.

  # Sometimes, a 301 or 302 redirect formed via Apache's mod_rewrite can mess with the HTTP port that is being passed along.
  # This often happens with simple rewrite rules in a scenario where Varnish runs on :80 and Apache on :8080 on the same box.
  # A redirect can then often redirect the end-user to a URL on :8080, where it should be :80.
  # This may need fine tuning on your setup.
  # To prevent accidental replace, we only filter the 301/302 redirects for now.
  if (beresp.status == 301 || beresp.status == 302) {
    set beresp.http.Location = regsub(beresp.http.Location, ":[0-9]+", "");
  }

###
### Overall TTL
### Note: The TTL is designed to be somewhat aggressive here, to keep things in cache.
###
  # Lets get this party started.
  # This will keep things in cache longer
  if (beresp.ttl > 0s) {
  unset beresp.http.expires;
  set beresp.http.cache-control = "max-age=900";
  set beresp.ttl = 4d; # how long you cache objects
  set beresp.http.magicmarker = "1";
  }

  # Allow stale content, in case the backend goes down.
  # make Varnish keep all objects for x hours beyond their TTL
  set beresp.grace = 12h;

###
### Static Files
###
  # Enable cache for all static files
  # Monitor your cache size, if you get data nuked out of it, consider giving up the static file cache.
  # More reading here: https://ma.ttias.be/stop-caching-static-files/
  if (bereq.url ~ "^[^?]*\.(bmp|bz2|css|doc|eot|flv|gif|ico|jpeg|jpg|js|less|mp[34]|pdf|png|rar|rtf|swf|tar|tgz|txt|wav|woff|xml|zip)(\?.*)?$") {
    set beresp.ttl = 2d; # set a TTL for these optional.
    unset beresp.http.set-cookie;
  }

  # Cache all static files by Removing all cookies for static files - Note: These file extensions are generated by WordPress WP Super Cache.
  if (bereq.url ~ "^[^?]*\.(html|htm|gz)(\?.*)?$") {
    set beresp.ttl = 1d; # set a TTL for these optional.
    unset beresp.http.set-cookie;
  }

###
### Targeted TTL
###
  # Members section is very dynamic and uses cookies (see cookie settings in vcl_recv).
  if (bereq.url ~ "/members/") {
    set beresp.ttl = 2d;
  }
  # My Shop section is fairly static when browsing the catalog, but woocommerce is passed in vcl_recv.
  if (bereq.url ~ "/psyshop/") {
    set beresp.ttl = 1d;
  }
  # phBB Forum
  # Note: Cookies are dropped for phpBB in vcl_recv which disables the forums cookies, however, logged in users still get a hash.
  # I set the anonymous user as a bot in phpBB admin settings. As bots dont use cookies, this gives 99% hit rate.
  if (bereq.url ~ "/forumPM/") {
    set beresp.ttl = 2h;
  }
  # Long ttl sites
  if (bereq.url ~ "(example.com|example2.com)") {
    set beresp.ttl = 1w;
  }

  # Large static files are delivered directly to the end-user without
  # waiting for Varnish to fully read the file first.
  # Varnish 4 fully supports Streaming, so use streaming here to avoid locking.
  # I do not stream large files from my server, I use a CDN or dropbox, so I have not tested this.
  if (bereq.url ~ "^[^?]*\.(mp[34]|rar|tar|tgz|wav|zip|bz2|xz|7z|avi|mov|ogm|mpe?g|mk[av])(\?.*)?$") {
    unset beresp.http.set-cookie;
    set beresp.do_stream = true;  # Check memory usage it'll grow in fetch_chunksize blocks (128k by default) if the backend doesn't send a Content-Length header, so only enable it for big objects
    set beresp.do_gzip = false;   # Don't try to compress it for storage
  }

  # don't cache response to posted requests or those with basic auth
  if ( bereq.method == "POST" || bereq.http.Authorization ) {
    set beresp.uncacheable = true;
    set beresp.ttl = 120s;
    return (deliver);
        }

  return (deliver);
}

# The routine when we deliver the HTTP request to the user
# Last chance to modify headers that are sent to the client
sub vcl_deliver {
  # Called before a cached object is delivered to the client.

  if (obj.hits > 0) { # Add debug header to see if it's a HIT/MISS and the number of hits, disable when not needed
    set resp.http.X-Cache = "HIT";
  } else {
    set resp.http.X-Cache = "MISS";
  }

  # Please note that obj.hits behaviour changed in 4.0, now it counts per objecthead, not per object
  # and obj.hits may not be reset in some cases where bans are in use. See bug 1492 for details.
  # So take hits with a grain of salt
  set resp.http.X-Cache-Hits = obj.hits;

  # Remove some headers: PHP version
   unset resp.http.X-Powered-By;

  # Remove some headers: Apache version & OS
  unset resp.http.Server;
  unset resp.http.X-Drupal-Cache;
  unset resp.http.X-Varnish;
  unset resp.http.Age;
  unset resp.http.Via;
  unset resp.http.Link;
  unset resp.http.X-Generator;

  if (resp.http.magicmarker) {
  unset resp.http.magicmarker;
  set resp.http.age = "0";
  }

  return (deliver);
}

sub vcl_synth {
  if (resp.status == 720) {
    # We use this special error status 720 to force redirects with 301 (permanent) redirects
    # To use this, call the following from anywhere in vcl_recv: return (synth(720, "http://host/new.html"));
    set resp.http.Location = resp.reason;
    set resp.status = 301;
    return (deliver);
  } elseif (resp.status == 721) {
    # And we use error status 721 to force redirects with a 302 (temporary) redirect
    # To use this, call the following from anywhere in vcl_recv: return (synth(720, "http://host/new.html"));
    set resp.http.Location = resp.reason;
    set resp.status = 302;
    return (deliver);
  }

  return (deliver);
}

sub vcl_fini {
  # Called when VCL is discarded only after all requests have exited the VCL.
  # Typically used to clean up VMODs.

  return (ok);
}

Answer: After quite a lot of struggle, I found the solution, add this fastcgi param on your hhvm / php-fpm locations
fastcgi_param HTTPS on;

Check here for another example : nginx > varnish > hhvm
Comment: What file did you change to add this param in your "hhvm / php-fpm:" locations?


A puzzle of protection

Question: Solve the rebus below. The answer is a word. What word is it?
Answer: The answer word is:

 COPYRIGHTABLE, a famous 13-letter heterogram.

First, let's identify what some parts of the rebus suggest we do... The items in red...

 ...suggest a rotation and the number 13 (there are 13 boxes in the row of letters - the characters in red suggest we ought to count them). This naturally suggests that at some point we will need to employ rot-13 (a Caesar shift of 13 alphabet positions).

The boxed letters...

 ...resemble 13 different keyboard keys, and are ordered approximately (but not exactly) as found from left to right on a standard QWERTY keyboard. (This keyboard-esque arrangement may or may not turn out to be important later - we'll find out as we go.)

The words 'A RAGMAN'...

 ...are an anagram of the word 'ANAGRAM' (!), suggesting that at some point an anagram will be involved.

The final icon resembles...

 ...the backspace key on a keyboard, suggesting we need to look at something that has been deleted.

Let's put all of this together:

 1. Which 13 letters of the alphabet are missing (have been 'deleted') from the row of lettered boxes? These are (in alphabetical order): BCEGLNOPRTUVY.

 2. If we apply the rot-13 cipher to these we get: OPRTYABCEGHIL

 3. If we anagram this we can get the word COPYRIGHTABLE...

 4. ...and this ties in with the title because when you copyright something you are protecting it from being reproduced!

Note one slight deviation from the OP's intent:

 In a comment later posted below this answer, the OP mentions that the rightmost image is not actually intended to represent a backspace key (and hence any similarities to computer keyboards in this puzzle are unintended); instead it is a rebus for 'LEFT OVER', from the left-pointing arrow being positioned over the line. Thus the intent (which was ultimately the same as my reckoning using the backspace interpretation) was for us to "anagram what's leftover of the 26 letters of the alphabet after you applied rot-13 to the 13 letters given."
Comment: @Prim3numbah Ah, okay - not how I interpreted it but I see! Will incorporate your intent into the write-up for posterity.
Comment: Minor note, not really relevant, but the red herring of the QWERTY-esque order was also a fascinating coincidence; if you rot13 the boxed letters themselves, they're just in alphabetical order.
Comment: To perform the operation on the missing letters was my first idea but I thought was bogus oh well nice solve +1!
Comment: Well done! I Intended the right part to be *nantenz yrsgbire*. In whole: Nantenz jung'f yrsgbire bs gur 26 yrggref bs gur nycunorg nsgre lbh nccyvrq ebg13 gb gur 13 yrggref tvira.
Comment: @Idran Nice observation there - feel like I should have noticed that sooner myself!

A puzzle of protection


Adding Older iOS SDKs to Xcode 4.1 in Lion

Question: I just installed Lion and Xcode 4.1. How do I add older SDKs so I can build and run in 4.1 or 4.2 in iPhone/iPad Simulator? Xcode 4.1 only comes with the iOS 4.3 SDK.
Does Lion have some sort of minimum SDK for builds?
Thanks,
Answer: Actually it is possible to add older SDKs as long as you can still get your hands on an older version of Xcode with the older SDK. It's useful too sometimes: when you do this you get to find out about unsupported constants and methods you may be using during compile rather than at runtime. Here's how to do it.

Get hold of an older version of Xcode with the older SDK. The Apple iOS Dev Center currently lists the 4.3 SDK with the Xcode 3.2.6 download.
Mount the dmg and open up the Packages folder hidden within the dmg via Terminal:
open /Volumes/Xcode\ and\ iOS\ SDK/Packages/
Double click the pkg file for the SDK version you want. I was looking for iPhoneSDK4_3.pkg but, in addition to 4.3, found packages as old as iPhoneSDK3_0.pkg. So perhaps older SDKs may still be packaged with the App Store download if you know where to find it (I didn't).
Let it install in it's own folder of choice since you won't be able to force it to install in Applications/Xcode.app/Contents/Developer (which is where the Developer folder is now)
You'll find the package installed in the Platforms folder in the volume you chose. Move the relevant SDK over to the Developer folder within Xcode.app. You'll likely have to use sudo:
sudo mv /Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Restart Xcode and you should see the new (old) SDK listed in your options for Base SDK. Yay!

Update as of 12 Sep 2013
If the "older SDK" you're trying to add comes bundled in Xcode 4.3 or later, adding the SDK is as simple as downloading Xcode from dev center link that says "Looking for an older version of Xcode?" (currently points here), mounting the dmg, then copying the relevant files over.
In terminal, you'd do something like this (edit for the appropriate SDK version number):
cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

For SDKs from versions of Xcode prior to 4.3, the older steps are still relevant.
I found this happens to work for getting the Xcode 5 GM to compile builds that carry the old iOS 6 UI even when deployed on iOS 7 devices. Useful for fixing bugs pending a UI redesign. That said, there's got to be an easier way to get the iOS 6 UI on an iOS 7 device.
Comment: ok i tried this on Lion 10.7.4 with xcode 4.3.3 to install iPhone5.0.sdk but xcode doesn't seem to recognize it. I have IOS 5 simulator running and I can set the BaseSDK to 5.0 but my iPad has 5.0.1 and nothing gets transferred there. In Snow Leopard no problem. All the certs are there on both systems. It's weird..
Comment: Any errors/warnings from xcode? Is your iOS Deployment Target version set correctly? Also ensure that armv7 is set as a valid architecture
Comment: This even works for older version of the OS X SDKs. For example I was able to copy /Developer/SDKs/MacOSX10.5.sdk on my old build machine to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.5.sdk on my new machine.
Comment: I use this technique to get older SDKs compiling for ARMv6 code on Mountain Lion by running old XCode 4.4.1 and then using these techniques to copy SDKs from XCode 4.1
Answer: You can't. What you can do, however, is click on the top-level entry in the File Navigator. It'll take you to the application settings. Go to the tab called Build Settings, and change the iOS Deployment Target to whatever version of iOS you'd like to support from (the earliest version you support).
See "To Edit a Build Setting…": http://developer.apple.com/library/ios/documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/Building/Building.html#//apple_ref/doc/uid/TP40010215-CH9-SW5
Comment: As seen in the anwer above, you can add additional SDK's as long as you have a copy of the older xcode which bundles it [or you simply have a copy of the older sdk and copy it to the correct location]
Answer: Open Xcode and open Preferences (Xcode -> Preferences menu). Click the Downloads icon and look in the Components tab. All versions from 3.0 to 5.1 should be available. Just click Install for the ones you want to use.
Answer: None of these answers worked for me for Mac OS 10.8 and XCode 4.5. But now that things are installed under the Applications folder, it's much easier to manage.
Option #1: Keeping an older copy of XCode is easy to do by renaming it before you install the new one. Then you can use Product->Preform Action->Run Without Building on the new version to test on newer devices or newer simulators.
Option #2: If you REALLY want to build with older SDKs in the newer XCode, then you can simply copy over an SDK using finder. You'll need to have an older version of XCode installed under Applications for this to work. In the following example, I just renamed XCode 4.4 to XCode_old before I installed XCode 4.5. Note: You can right click on the .app file and choose Show Contents to get to these files or just use the cp from a terminal window.
from: /Applications/Xcode_old.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
to:   /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

Then, iOS 5.1 will show up under Build Settings as a Bask SDK. You can do the same thing for simulators:
from: /Applications/Xcode_old.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk
to:   /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/

Answer: You can't, but it will build fine for a device that is plugged in running an old version of iOS (what you should be conducting your proper testing on).
Answer: You have to run your application in the older version of Xcode that came coupled with the older iOS version. I have 3.2.5 installed under /Developer-3.2.5/. I have to say it's about 10 times faster than Xcode 4... You can download old versions here: http://iphonesdkdev.blogspot.com/2010/04/old-versions-of-iphone-sdk.html
Comment: Nothing older than what he has is supported on Lion.  I'm in the same boat.  I upgraded to Lion, and now I can't run any old simulators.  Lame.
Comment: Hmm, I'm not sure there. I had 3.2.5 lying around from snow leopard, but if it ran I imagine it's compatible. If it doesn't install it'd be a deliberate restriction I guess.
Comment: Well, I'm pretty sure.  For the first few weeks, Apple had an explicit disclaimer on the page linked to with "Looking for XCode 3?" that said that it wasn't supported on Lion.  In case you're not familiar with how Apple works, they do stuff like this constantly to make sure you always have to upgrade to whatever their newest is (hardware and software).
Answer: I had a similar issue in Xcode 4.02 for Snow Leopard using SDK 4.3. I wanted to test on an iPhone 3G, but iOS4.2 is the latest (and correct version) for that device. In order to 'see' and run on that device in the Scheme, I had to change the Build Settings for iOS Deployment Target as described above. (btw you also have to have restrictions on the iPhone turned off to let Xcode install the app :) )
Answer: In addition to Steven's answer, you can find older versions of XCode - including the older SDKs:
Looking for an older version of Xcode?


Block internet access except for a Virtual Machine and Windows Update

Question: My brother has a laptop (using Windows 7) that he really wants to keep secure. Originally, he was not going to connect it to the Internet, but I suggested that I could probably set up a Ubuntu virtual machine for him so that he could still browse the Internet and have the files on the host machine protected. I am planning to use either Virtual Box or VMWare for the virtual machine. Is there anyway that I can restrict internet connections so that traffic is only to either Windows Update or the Virtual Machine?
Answer: For VMWare you can disable IPv4 and IPv6 under the adapter settings this will disable the network on the host but still allow it to be accessed by the VM if it is set to Bridged. You can re-check IPv4 to temporarily enable the internet to allow updates if you are having an issue an update fixes.
Why not just use Ubuntu as the main OS? If you need Windows you should consider running the browser in Sandboxie and/or using something like Rollback rx because a VM will be cumbersome.
Comment: This actually works surprisingly well due to VMWare Unity. You can create a shortcut on the desktop and you can have a running program integrate in with your Windows tasks
Answer: There are a few different things that you can do. To distinguish between windows and the virtual machine you can give each system a different static IP address, and then the firewall can assign rules to each of those IP address. You could for example assign Windows 192.168.1.50 and Ubuntu 192.168.5.50. In any case, I wouldn't imagine that you could use the same IP address in both as it would cause problems.
Additionally you can combine IP address information with OS packet fingerprinting. Originally this was done only with pf on the BSD platforms, but it looks like there is support for iptables today.
Furthermore to generate rules for only the Windows Update systems it is possible to use a firewall creation script called mason. It generates firewall rules based on traffic. Although, I suspect that there are many servers involved here and as a result it may be best to just enable all outgoing traffic destined to microsoft.com, unless you have the drive to find all of them.