Does bonemeal promote bigger and stronger plants through root growth?

Question: There are many web sites on how to use bone meal with claims like "Using bone meal will help your flowering plants, like roses or bulbs, grow bigger and more plentiful flowers." Is this true for all plants, just vegetables and bulbs or not at all?
Comment: check out the link I've now added to my response at the bottom...
Answer: It is going to be true if it contains nutrient(s) that are in short supply.
Bonemeal is considered a slow-release high phosphate fertilizer: bones are primarily apatite - a Calcium Carbonate Phosphate, and the phosphate is more tightly bound than in mined phosphates which are often just simple salts (ie. that dissolve easily). It also has a small quantity of nitrates, and I would expect it to make a good source of Calcium (a micronutrient).
So if your soil is short of phosphate relative to your plant's requirements, then yes it would be a good amendment. If the soil isn't short, then you're not going to see much change. Too much and you may even see damage (eg. fertilizer burn). This is true of any required resource of nutrient. E.g. Extra water is only going to be beneficial if it is dry.
Comment: I doubt that you could burn with bone meal... solubility of apatite being rather low.
Comment: True fertilizer burn may be less of a risk compared to say Ammonium Nitrate fertilizers, but damage is still a potential risk - everything is harmful if there's too much of it!
Comment: I done know...  Can't find anything indicating that you could... Good ole le chaltllier's principle should keep dissolution in check.
Comment: so, is phosphate commonly deficient in garden soils? Or does this change by area?
Comment: I would expect it to vary by area. For example, some parts of southern England probably have quite a bit as it can be found in some of the Cretaceous rocks of S.England / Low Countries. A sandstone rich area is probably going to have much less - primarily from rotting vegetation & animals I should think.
Answer: The answer, according to my old Horticultural College lecturer, is no, it's not going to do much for your plants at all, because it takes so long to break down.
UPDATE JUNE 2014:
Here's confirmation of the science behind what I've said - I note I've been marked down two points, one of which was done yesterday (no prizes for guessing who that one might be from):-
http://puyallup.wsu.edu/~Linda%20Chalker-Scott/Horticultural%20Myths_files/Myths/Bonemeal.pdf
The only other thing I can find which Linda Chalker doesn't mention is that the phosphorus content in bonemeal is only available to plants growing in soil with a ph of 7 or less, so if your soil is alkaline, the plants won't be able to access it anyway. This was the result of a study carried out by Colorado State University into organic fertilisers - there's a link to it under Wiki.
Comment: I have found this reference as well.  Any other ones to corroborate?
Comment: When I first started reading up on gardening I saw a lot of people on forums who seemed to know what they were talking about be very dismissive of Linda Chalker Scott. Over the years I began to understand why, especially after an online back and forth I had with her. I prefer to see the studies she's referencing rather than count on the conclusions she makes.
Comment: I've actually had good results using the stuff. It breaks down fine in healthy soil.
Comment: Bones actually contain a good amount of protein as well. Protein = nitrogen once composted.


Unitary time evolution operator and the corresponding Hamiltonian

Question: Could someone tell me how to find the eigenvalues $(E)$ of a time independent Hamiltonian $(H)$ if the eigenvalues of the corresponding unitary time evolution operator $U$ $\left(=e^{itH/\hbar}\right)$ are given , at a particular instant of time $t_0$,  and given in the form of $e^{i\theta(t_0)}$. That is, I need the relation between $E$ and $\theta(t_0)$.
Comment: Are you familiar with the notion of functions of operators? There should be several posts here on SE (and I guess some Wikipedia pages etc) explaining the basics.
Comment: is $t$ also given? note that $U$ is a function of $t$, so for different times $U$ will have different eigenvalues. Therefore $\theta$ should be $\theta(t)$ somehow (or given at a fixed value of $t$)
Comment: @yyy; yes the value of t is also given. That is, eigenvalues of $U$ are given at one instant of time. I'll explain the exact situation: we have 2 states a and b and it is given that U evolves a into b in time t. Thus $U(t,0)$ $|a>= |b>$. We know the eigenvalues of $U(t,0)$ and I need the  eigenvalues of the corresponding time independent Hamiltonian $H$.
Answer: I will try to give a more general answer: given an operator $A$, how can we interpret a function of the operator $f(A)$?
There are two possible options:
i) if the function $f(x)$ admits to a power-series expansion about $x=0$, we can use this to define the $f(A) = \sum \frac{f^{(n)}(0)}{n!} A^n$ and we know how to take integer powers of operators - we just apply the operator $n$ times.
ii) if the operator $A$ can be diagonalized and has eigenstates $|a\rangle$ with eigenvalues $a$ where the eigenstates form a basis, then we can define $f(A)$ via its operation on the eigenstates $f(A)|a\rangle = f(a) |a\rangle$. Then, for any state $|\psi\rangle$ we can know how $f(A)$ acts upon it by expanding $|\psi\rangle$ in the eigenbasis $|\psi\rangle = \sum_a c_a |a\rangle$ and then acting with $f(A)$ on each of the states in the expansion.
If both $A$ has a basis of eigenvectors and $f(x)$ has a power series, it is easy to see that both definitions are consistent with one another. If none of the things apply, then the function may be ill-defined (for example - $\ln(a^{\dagger})$, where $a^{\dagger}$ is the Harmonic oscillator raising operator, is not well defined).
Now for the case at hand -- you have the function $U = \exp(-i H t/\hbar)$ of the Hamiltonian. As both definitions can be applied here, we can choose to focus on the second. It is clear the the eigenvectors of $U$ are the eigenvectors of $H$, and if $H$ has an eigenvalue $E$ when acting on a state $H|\psi_E\rangle = E |\psi_E\rangle$, then $U|\psi_E\rangle = \exp(-i H t/\hbar) |\psi_E\rangle = \exp(-iEt/\hbar)|\psi_E\rangle$, which gives you the answer.
Comment: Thank you very much, I have understood and the answer has been very helpful!


Second Derivative of a matrix

Question: Pardon me for not knowing LateX representation,
I have following function, where $\mu$ and $\Sigma$ are both Matrices.
$$ h = \mu^T \Sigma \mu $$
which is a function of $\alpha$, such that its derivative can be written as
$$ \def\p#1#2{\frac{\partial #1}{\partial #2}}
 \p h\alpha = \left(\p \mu\alpha\right)^T\Sigma^{-1}\mu - \mu^T\Sigma^{-1}\p\Sigma\alpha \Sigma^{-1}\mu  + \mu^T \Sigma \p \mu\alpha
$$
I need to find out the Second derivative wrt $\alpha$. Please help, I searched through net, but couldn't fond any such property.
Comment: I suppose you have a typo in your function, the derivative is the one of $h = \mu^T \Sigma^{-1}\mu$.
Answer: Assuming that $h = \mu^T \Sigma^{-1}\mu$, as suggested by the derivative, we have: Taking another derivative we apply the product rule as we did for the first and use the chain rule for $\Sigma^{-1}$, in using $\def\pd#1#2{\frac{\partial #1}{\partial #2}}\def\pdd#1#2{\frac{\partial^2 #1}{\partial #2^2}}$
$$ \pd{\Sigma^{-1}}{\alpha} = -\Sigma^{-1}\pd\Sigma\alpha\Sigma^{-1} $$
So for the first term of $\pd h\alpha$ we have
$$ \pd{}\alpha\left(\pd{\mu^T}\alpha \Sigma^{-1}\mu \right)
   = \pdd{\mu^T}\alpha\Sigma^{-1}\mu - \pd{\mu^T}\alpha \Sigma^{-1}\pd\Sigma\alpha\Sigma^{-1}\mu + \pd{\mu^T}\alpha \Sigma^{-1}\pd\mu\alpha
$$
For the second term
\begin{align*}
&\!\!\!\!\!\!\!\pd{}\alpha\left( \mu^T\Sigma^{-1}\pd\Sigma\alpha \Sigma^{-1}\mu\right)\\
  &= \pd{\mu^T}\alpha \Sigma^{-1}\pd\Sigma\alpha\Sigma^{-1}\mu
  - \mu^T\Sigma^{-1}\pd\Sigma\alpha\Sigma^{-1}\pd\Sigma\alpha\Sigma^{-1}\mu
  + \mu^T\Sigma^{-1}\pdd\Sigma\alpha\Sigma^{-1}\mu\\& \ \ {} - \mu^T\Sigma^{-1}\pd\Sigma\alpha\Sigma^{-1}\pd\Sigma\alpha\Sigma^{-1}\mu + \mu^T\Sigma^{-1}\pd\Sigma\alpha \Sigma^{-1}\pd \mu\alpha
\end{align*}
And for the third term
$$ \pd{}\alpha\left(\mu^T \Sigma^{-1}\pd\mu\alpha \right)
   = \pd{\mu^T}\alpha\Sigma^{-1}\pd\mu\alpha - {\mu^T}\Sigma^{-1}\pd\Sigma\alpha\Sigma^{-1}\pd\mu\alpha + {\mu^T} \Sigma^{-1}\pdd\mu\alpha
$$
Adding everything, we should have
\begin{align*} \pdd h \alpha &=
  \pdd{\mu^T}\alpha \Sigma^{-1}\mu - \mu^T\Sigma^{-1}\pdd\Sigma\alpha\Sigma^{-1}\mu + \mu^T\Sigma^{-1}\pdd\mu\alpha\\
  &{}+ 2\left(\pd{\mu^T}\alpha \Sigma^{-1}\pd\mu\alpha - \pd{\mu^T}\alpha\Sigma^{-1}\pd\Sigma\alpha\Sigma^{-1}\mu-\mu^T\Sigma^{-1}\pd\Sigma\alpha\Sigma^{-1}\pd\mu\alpha + \mu^T\Sigma^{-1}\pd\Sigma\alpha\Sigma^{-1}\pd\Sigma\alpha\Sigma^{-1}\mu\right)
\end{align*}
Comment: Thanks :) it was of great help, as we don't have it as our course syllabus, so just had to search net for everything. Could you suggest any tutorial, which contains all formulas of second derivatives, as a handbook or something? thanks in advance :)

Second Derivative of a matrix


When should we put a comma before "but"?

Question: I think the word "but" is a conjunction. Can someone explain me when in English we put a comma before it and in what cases we do not do this?
Answer: The comma must be used before "but" when this word is separating two independent clauses. For example:
"I like sunny days, but Carla prefers the rain."
In this case "I like sunny days" and "Carla prefers the rain" are two valid, therefore independent, sentences. For this reason you must use a comma before the word "but".
Now look at this other sentence:
"I like sunny days but Carla, the rainy ones."
Notice that "Carla, the rainy ones" is not a valid and independent clause, it depends on the first clause to make sense, so no comma is used before the word "but".
Comment: Thanks a lot for explanation. I noticed your comma before "the rainy ones" in the second sentence. Earlier it was strange to me, but now I got used to such commas. In Russian we mostly use dashes in such cases.


Crossserver SQL Procedures Failing Mid Process

Question: Really need help understanding whats happening. We have two LANs at work with a shared subnet between them acting as a bridge (migration from A > B underway) we recently migrated the server subnet from the old LAN to the new one and are now experiencing issues that are causing scheduled jobs that reach out to COLO servers to mirror data (both directions) to fail. Sometimes they fail upfront, sometimes they fail mid process, and sometimes they just work (not often). The problem is extremely unpredictable and inconsistent. Any thoughts? Where can I check?
SQL2000 reaching out to SQL2005, 2008, and mySQL.
Not a firewall issue nor a route issue.
Answer: Upstream firewall was blocking P2P connections which can look like SQL remote connections.


Checkpoint code in text editor (like a micro version control)

Question: When I'm editing code, I want to periodically checkpoint my code (ranging from every 10-20 minutes to a few hours). Consider it as a micro version control at local level & something that I discard  at the end of the day. Basically after certain edits, I save the file with a flag (a checkpoint or milestone) & move on. Then maybe later, revert back to it for a shortwhile.
I do not want to commit this to the main version control & I want this to be extremely seamless (like press CTRL+Shift+S.
Is this possible in a text editor or with a plugin. Currently I'm using Sublime Text 2. There's an autosave plugin that keeps saving a timestamped file whenever I hit CTRL+S but the shortcoming is that I can't annotate my saved file with  a flag. I suppose it's possible to modify the plugin to have this functionality. Wondering if it already exists.
Answer: Maybe try to request such a plugin at ST3 community, so it can make BAKs with a description.
Other option is make symlink for a folder, and push symlink's folder to Git with BAT file.


Need to know the wrench size for 10.9 screw

Question: My pedal just unscrew. It has a hexagon-headed screw with '10.9' screw label. Anybody knows what size of wrench I need for this screw?
Comment: Yeah, you use the one that fits.  Just be sure you're using metric wrenches, and the one you choose fits snugly.
Answer: 10.9 is the type of steel alloy used, not the size of the hex key (aka allen key) you need.
Get a set of hex keys (almost surely a metric set is needed, given that its on a bicycle) and then try them out to see which one fits. I'd guess its something in a 3mm, 4mm, 5mm or 6mm range.
Comment: The mechanic is wrong - 10.9 an [ASTM F568M](http://en.wikipedia.org/wiki/ASTM_F568M) class number, and does not determine the torque in Nm you can use (this is obvious - you can use the same class of steel to fasteners of different sizes/threads and you shouldn't expect them to behave the same). However, higher class numbers do correspond to stronger fasteners (somewhat - there are subclasses and stuff, but lets ignore those). If you want to know the torque you should use, you have to look in the pedal manual this case (or maybe its written somewhere on the pedal as well).
Comment: Yeah. Off the top of my head its 4Nm for a typical stem, 40Nm for a typical cassette, other numbers I'd need to look up. But we're not talking 0.1Nm, and we're not talking 100Nm, that's all I really meant when I said "order of magnitude"
Comment: A mechanic once told me this number is maximum torque in `Nm` and the higher it is, the higher quality the bolt is.
Comment: Also I've never seen any bike torques specified to that sort of precision. Certainly my torque wrenches would not allow me to set anything so specific. 10Nm would be the right order of magnitude for pedal tightness but I think, as Batman says, this is coincidence
Comment: This [link](http://www.fullermetric.com/technical/information/tech_torque_figures.aspx) might be useful but this is only a guideline. I'd guess it would be less than 10Nm (maybe 7Nm), but this should be in the pedal manual.
Answer: Common sizes are a 5 or 6 millimetre Allen key or Hex Driver on the back side of the crank. Or, you can also use a 15mm pedal spanner on the two flats which will be on the pedal-side of the thread.  These tend to be a bit thinner than a normal adjustable spanner.
Do be aware your left foot pedal is a left hand thread so you turn it the opposite way to tighten than what you would expect. The rule is that tightening the pedal will tighten the chain if you don't stop the crank rotating.
Also consider why did it unscrew in the first place?  Was it never tight?

I've recently found clipless pedals with either 8mm or 10mm hex sockets on the end.   That's a hefty-sized hex key, too big to carry on the bike for regular use.
Comment: @dlu I feel you're getting a mite-petty with the edits there.
I don't go correcting Americanised spellings (eg color/aluminim/meter) to International English (eg colour/aluminium/metre) on other people's posts.  If you disagree with my statements, perhaps a comment would be better than an edit.
Comment: Shoot, I didn't mean to correct the millimetre spelling. Was just trying to find a way to mention that 5 mm is also common (I've got pedals with both). I'm sorry about that.


What basis would a school have to suspend for bullying?

Question: Say a student was insulting another or some individual. If the remarks aren't categorized as a death threat, would the "bully" be suspended? Also, what if this was a case of Cyber Bullying, where the problem didn't occur on school grounds? Does a school administration have the jurisdiction to punish students who make insulting remarks on the internet?
Comment: The [tag:internet] is not a jurisdiction - since what schools can and can't do will vary based on what kind of school it is and where it is, answers are... likely to be very general unless you can [edit] a jurisdiction (location) into your question. If you can't create a tag you need, post a comment here.
Answer: The school must comply with relevant legislation and regulations within its jurisdiction.
Unless there is something specifically forbidding their suspending a student who makes insulting remarks on the internet, they will generally be permitted to take reasonable disciplinary action.
Answer: In the United States, education is largely handled by the States.  A similar, but broader question, concerning suspensions is this one by jimsug.  In it, you'll find a helpful compendium of U.S. student disciplinary laws.
As an example, Illinois recently allowed suspension for bad behavior via electronic means.
united-states


behaviour Syncing of contacts in telegram app

Question: When I installed telegram, I was astonished to see the contacts which I had deleted long before. I wonder how they are still in my phone or still attched to my google contacts. What happens when we delete a contact from android phone? will it be deleted forever of google just hides it?
Answer: It depend where you delete the contact from. There are local copies and copies on your Google account, you have to delete it from both places, because if sync is enabled it will automatically re-add them. But if you did delete it from both places, but it could be an error (Things like this do happen sometimes).
Additional Info: if you had another device with the same Google account on it, and edited your contacts then Google automatically keeps the latest record of your contact book and saves the latest version of it. Hope this helps


Hide new folder option in telerik editor file uploading

Question: I am using telerik rad editor in my projct. To add image I am using Image manager,while click on Image manager it opens the pop up where I can upload multiple images to the specified folder. It also showing me image editing option in same popup. My requirement is I don't want to show default image folder to user  and don't want any image editing. I also want to hide add new folder option. please help me. If you have any sample code. Please share with me.
Thanks in advance.
Answer: i think the below url help you through this hope this helps:)
http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor---image-manager---removing-commands.aspx
Comment: Friend I already visited this but no luck, I don't want any css patch for this. I want to disable these with help of code. I hope it will be fixed through C# code with help of telerik classes. but I am not able to find any such solution.
Answer: <code><telerik:RadFileExplorer ID="RadFileExplorer1" Height="410px" Width="400px" TreePaneWidth="150px"
runat="Server" EnableOpenFile="false" AllowPaging="true" VisibleControls="TreeView,Toolbar,Grid,AddressBox"/>
</code>
for more info see this link http://goo.gl/k9LMuR
Answer: You can customize the dialogs so that the elements you do not want visible to the user are not, e.g. by setting their display CSS property to none or by editing the markup. See this demo for an example:
http://demos.telerik.com/aspnet-ajax/editor/examples/externaldialogspath/defaultcs.aspx. Note that just removing controls is likely to cause an error so you should test your custom dialog carefully.
Regarding the folder you show - in order to upload images you need to access the folder, so the files will be shown to the user. You can try implementing a custom provider to hide certain files, see this demo on the matter: http://demos.telerik.com/aspnet-ajax/editor/examples/dbfilebrowsercontentprovider/defaultcs.aspx.


show why a post was off-topic in close-vote reviewing

Question: I notice that when I review a post in the close-vote review queue that has been voted as off-topic, I only see at the top that the post was off-topic. I have no idea of finding out why it is off-topic unless I click "close", then select "off-topic" as the reason, then see which reasons have the blue marker that indicates other people voted like that. So I requested that instead of a generic message like "This question is off-topic", to see a message such as "Questions require valid code to reproduce the problem".
Answer: I believe you should be reading the question and deciding why you believe the question should be closed before clicking the "Close" link, without taking into consideration with what other people think.
To show why a question is up for closure on the page would likely cause people to see it and just vote on the same thing because "everyone else is doing it." To close a question, each person who reviews it should be thinking critically about why the question needs work, why it doesn't fit our Q&A format, or why it is just plain bad. Or better yet, helping to improve it with comments!
Regardless, 5 close votes of any type closes it, so your reasoning doesn't need to match everyone else's if you do decide it is worth closing.
Comment: I generally try to make up my mind on my own before I vote to close.  But once I've done that, I do take into consideration how others have voted.  I do agree, however, that this information does not need to be displayed in the review queue directly.
Comment: Exactly, if it's displayed, then it's easy to just follow the flock. It's still available, you just have to click for it. I believe that deterrent is sufficient.


How to search google places api using keywords?

Question: I want to build an application that allows users to search Google Places and have the data represented in a simple format like a tabular data. Say if my user type "san francisco restaurants" my application will then return a table with all restaurants in san francisco. I don't need to display maps just the names and address of restaurants. I have looked into Google Places API and this requires a latitude and longitude in its parameters. How will I get that lat. long. base on the query? Thanks!
Answer: You can use the google geocoding API (http://maps.googleapis.com/maps/api/geocode/json?address=san+francisco&sensor=false) to get the lat/long, but you'll have to come up with some sort of parsing methodology to get the location out of the query string ('restaurants in san francisco' vs. 'san francisco restaurants')


Resetting Attributes not working

Question: For some reason my reset time isn't working. This part of the code, I want it to basically do what it's saying it's doing, I am checking for the txt boxes to be numberic
If timeM = (txtWDM.Text + txtRDM.Text) And timeS = (txtWDS.Text + txtRDS.Text) Then
    timeS = 0
    timeM = 0
End If

And here is the whole code, Could someone kindly fix my code for me thanks
Private Sub timClock_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timClock.Tick
    'Plays the go sound
    If timeM = 0 And timeS = 0 Then
        My.Computer.Audio.Play(My.Resources.Beep_Go, AudioPlayMode.Background)
    End If
    'if Time in seconds below 9 then add 0 to the start of the label
    If timeS < 9 Then
        timeS += 1
        lbltime.Text = timeM & ":0" & timeS
        'If above 9 then make it normal timeS
    Else
        timeS += 1
        lbltime.Text = timeM & ":" & timeS
        'If Seconds are 60 then Add 1 to Minutes and reset Seconds
        If timeS = 60 Then
            timeM += 1
            timeS = 0
            lbltime.Text = timeM & ":0" & timeS
        End If
        'If rest period is reached play Rest Sound
        If timeM = txtWDM.Text And timeS = txtWDS.Text Then
            My.Computer.Audio.Play(My.Resources.Beep_Stop, AudioPlayMode.Background)
        End If
        'If Rest period over then Reset process abd go back to play start sound
        If timeM = (txtWDM.Text + txtRDM.Text) And timeS = (txtWDS.Text + txtRDS.Text) Then
            timeS = 0
            timeM = 0
        End If
    End If
End Sub

Comment: You should definatly put option strict on. Playing with strings and numbers like you are doing will give you weird results. Also, I would suggest you don't hope your timer will fall directly on the second. Check if it's equal or greater.
Comment: What do WDM and RDM mean?
Comment: Workout duration minutes and rest duration minutes
Comment: And what is your question? People here tend to frown on "fix my code" questions.
Answer: Use CInt
  If timeM = (CInt(txtWDM.Text) + CInt(txtRDM.Text)) And timeS = (CInt(txtWDS.Text) + CInt(txtRDS.Text)) Then
        timeS = 0
        timeM = 0
    End If

Also do not create your own way of managing time, as what you did in configuring hour and minutes manually. Take a look at Custom Date and Time.

Resetting Attributes not working


How to automate tokenomics research and data collection?

Question: I want to create a tokenomics database.
I want to build a bot to automate data collection that answers for each token on the blockchain some of the questions asked and answered in this article.
I am a total newbie when it comes to blockchain. So, I have some basic questions.
Where is this information located? How did the author discover the numbers he quotes? Is there an API one could use to collect this information? (See update.)
Update: In writing this question, I discovered this Etherscan API. How might one leverage that API to obtain the tokenomics data I want?
Source [emphasis mine]

There will only ever be 21,000,000 bitcoin, and they're released at a rate that gets cut in half every four years or so. Roughly 19,000,000 already exist, so there are only 2,000,000 more to be released over the next 120 years.

What about Ethereum? The circulating supply is around 118,000,000, and there's no cap on how many Ether can exist. But Ethereum's net emissions were recently adjusted via a burn mechanism so that it would reach a stable supply, or potentially even be deflationary, resulting in somewhere between 100-120m tokens total. Given that, we shouldn't expect much inflationary pressure on Ether either. It could even be deflationary.

Dogecoin has no supply cap either, and it is currently inflating at around 5% per year. So of the three, we should expect inflationary tokenomics to erode the value of Doge more than Bitcoin or Ethereum.

The last thing you want to consider with supply is allocation. Do a few investors hold a ton of the tokens which are going to be unlocked soon? Did the protocol give most of its tokens to the community? How fair does the distribution seem? If a bunch of investors have 25% of the supply and those tokens will unlock in a month, you might hesitate before buying in.
Answer: You can use https://coinmarketcap.com/ or https://www.coingecko.com/, they both have a pretty extensive information per token and they got a good API with historical data.


Is "these words" in Deuteronomy 6:6-9 referring to the Shema, or the whole book?

Question: When Deuteronomy 6:6 commands that "these words" should be displayed, remembered, and obeyed, is the phrase referring to the Shema, or is "these words" referring to the whole book? Deuteronomy 11:18-20 uses very similar language, but without using the exact wording of the Shema. Without discrediting that the Shema is the beautiful sum of the Torah to be in our minds and displayed always, could Deuteronomy 6:6-9 be commanding that not only the Shema but also the whole instruction be put on display everywhere, remembered, and obeyed?
Comment: Shavuah tov Sam. Since you reference in your screen name: 1 Samuel 12:23, it should be noted that "I will instruct you in the GOOD way" relates to your question. That the word "these"  (אלה) in Hebrew is a reference to what is called G-d's name associated with good (טוב). And that name (אהוה) which is the first letters in Hebrew associated with all of Creation in the first sentence of the Torah (את השמים ואת הארץ). That we are to see and acknowledge G-d in all of Creation. There is nothing "apart" from G-d. And this is the true and straightforward way. With blessings only…
Comment: Thank you for the food for thought. For the record, it is the first part of 1 Samuel 12:23 that makes it so precious to me that I use it as a reminder to myself, the part about prayer for the people being so important that to cease is sin. Do you draw the connection of the Name to that word because of the similar spelling?
Comment: Torah tradition teaches that Hebrew, the Holy Tongue, is a language literally 'pregnant' with meaning. We are taught many, many types of language transformations that are broadly included  under the category of Hebrew grammar. One of those transformations is learned in connection with Moshe Rabbeinu and the concept of 'striking stones'. Hebrew letters, which have numerical meaning too, are compared to stones and striking is the process of multiplication. In the context of G-d's name associated to 'Good' (אהוה), by striking the middle 2 letters, it reveals the expression 'these' (אלה).
Comment: I'm going to ask a question about this. Please answer it!
Answer: Ibn Ezra states explicitly in his commentary on Devarim that 'these words' refers to all of the commandments. I don't know of any credible authority who disputes this - but then, I am not especially learned. Ibn Ezra's commentary can be found on Sefaria.org.
Answer: "These words" are to be understood in a more general application.
Rashi brings the Sifrei (who forms the basis of many commentators' explanations) which notes that these words are a recognition of G-d and to cleave to his ways
The Chizkuni builds on this Sifrei:

והיו הדברים האלה, "and these words...shall remain" - Seeing that Moses had said previously that we should love G-d, and he had not added any adjective describing the kind of love he had in mind, he adds additional dimensions, primarily the fact that this should be a steadfast, constant feeling of love for Him. If it is, we will doubtless get to know Him better. (Sifri)

@TomW has already noted the Ibn Ezra that is to be understood more widely as a reference to all the commandments.
The Malbim explains that one should let no thought arise in their heart except for the love of G-d as if it is written on the tablet of your heart forever.
Rabbeinu Bachya would seemingly appear to demonstrate that it is an alludes to two things:

והיו הדברים האלה, "these things (concepts) shall be" - The idea of G-d's Unity, the love for Him which Moses mentioned, shall all be deeply engraved on your heart.
Alternatively, Moses refers to the commandments, all of which should be firmly engraved on our hearts. אשר אנכי מצוך היום, "which I command to you this day, etc." Sifri Vaetchanan 93 explains the reason that Moses adds the word היום, this day, as if he were commanding all the commandments on that day for the first time, to mean that the commandments should forever be something fresh in our minds. We should not relate to them as something deja vu, something which has lost its freshness and therefore its appeal. It should always be like some new decree the depth of which we have not yet explored. You should view them as if you had received them from Mount Sinai only this day.

Finally, Ralbag explains its application in a more general sense but does link it to the points mentioned in Shema (namely Tefillin and Mezuzah). In other words that "these word" should always be in our hearts and thoughts so we don't forget them as they are fundamental to the Torah. And that it is why afterwards (in the Shema) it goes on to detail the commandments to speak it (the Torah) out and to write tefillin and mezuzos. That is why it specifically writes "These words" to demonstrate that one should not change the order of these things nor the language and all of that is included in the term "These words".


pick a number 1 to 10 on web page

Question: I want to create a web page where a registered user picks a number from 1 to 10. When a user picks a number that number is removed from the available list.
Is there a way to guaranty that no 2 or more users can have the same number?
Thanks,
rod
Comment: Yeah, but it'd be more like "Click a number to attempt to claim it and we'll tell you whether it worked." - You'd use locking and a table in a database to figure out whether the number had been claimed. (Placing as a comment because I realize this isn't a well written answer, sorry.)
Answer: I dont know how to do it in the technologies in your tags, but you will need a database, that keeps the state of each number: taken or free. You will have a form on a page, that will submit the number chosen to a form handler that will check the state of the number in the database. If it is taken, you will send the user a page that says "too bad thats taken" or something, if it is free, you will mark it as taken, then send then a page saying they got it.
Your server probably handles requests on a first come first serve basis, and if you use any modern database it will block for you (you just wouldn't want two people trying to get the same number at the same time)
also, the form and the form handler don't have to be different files
and you probably want to record who took what number, so the state of not being taken might was well be the state of not having a username for the number yet.
Answer: This question was tagged sql-server so I will offer a SQL Server answer...
If you had a table with a registered user id and the number, with a unique constraint on those two columns, then if inserting the record succeeds that record is claimed by that user, otherwise it is not available.
CREATE TABLE dbo.UserSelection
(
    user_id int not null,
    selection int not null,
    CONSTRAINT UK_UserSelection__user_id__selection UNIQUE (user_id, selection)
)

There are many ways to tell if the insert failed.  One way would be to check if there were errors.  Execute some SQL similar to this from your app:
SqlCommand cmd = connection.CreateCommand();
cmd.CommandText = "INSERT INTO dbo.UserSelection(user_id, selection) VALUES (@id, @selection); SELECT @@ERROR;";
cmd.Parameters.AddWithValue("@id", userId);
cmd.Parameters.AddWithValue("@selection", selection);
bool youHaveThatSelection = 0 == (int)cmd.ExecuteScalar();

pick a number 1 to 10 on web page


How can you stop dual pocket doors so they close in the center and do not come off the track

Question: New pocket doors installed, but if you close the doors and maybe one is beyond the center, it comes off the track. What can be done to stop the doors in the center?
Comment: Well, clearly the stop can't be something you could trip over.... so it has to either stop the top of the door, or catch the back edge if the door somehow. The former seems easier, almost to the point of being obvious...?
Answer: Usually there is a metal stop (like an angle bracket) inside the top track area that stops each door at the center. If you cut away the top corner of the door you could use wood, metal is thin enough that it's often not bothered with, or could be done (if looking for perfect closure) but is a much smaller cut.
You could also block the track to stop the wheels at the proper position, but it's harder to get right.
Comment: Your last part of the comment is what we done at the company I last worked at. It is tough to get it right, but when secured properly, it work very well and is out of sight. For the Johnson 1000 series track for example, it took a piece of wood about 3-4" long, 7/8" or 1" deep secured in edgewise. Trail and error tunes up the stopping points.


can you trust the statistical control

Question: I'm reading a paper that compares two vaccine types. THe people who got vaccine 1 are of lower SES and have more chronic conditions compared to those who got vaccine 2. Multivariate logistic reg was used to compare the vaccines on mortality, emergency room visits, diagnosis and a couple other outcomes (no adjustment for multiple comparisons). In the logistic model they controlled for SES, chronic health conditions, sex and age. Vaccine 2 was found to be significantly protective for all outcomes compared to vaccine 1. How do I know that the statistical control was good enough to account for the group differences (SES and chronic conditions)? Seems like the deck was stacked against vaccine 1.
Comment: In principle such controls can work, but their success depends on the details. Please add a web link to the paper in your question so that those details can be examined.
Comment: This is a difficult question that would require significant context and field specific expertise to reasonably answer.
Answer: You are right to question the inclusion of control variables, but this issue is a current debate in statistics. Rubin (1974) along with his protege Gelman (2013) feel that including as many control variables as possible is helpful for model estimation. Gelman in particular seems to believe that including more control variables increases information gained by having more joint probability distributions. However, Pearl (2000) along with Spector and Brannick (2010) and others believe that including such control variables without a strong justification may lead to contamination of outcomes. For example, the model in the paper you mention implies that SES has an effect on mortality and ER visits, or x->y and x->z, but perhaps SES only effects ER visits and not mortality, such that it is fair to say x->z but x->y would be an urban legend (Spector & Brannick, 2010). I like the prospect of gaining ifnormation by creating more joint probability distributions, a la Gelman, but the potential contamination la la Pearl et al gives pause. I would question any model that includes control variables without justification.
Comment: My concern is more with the adequacy of statistical control via a multivariate model. The groups are not similar on several important variables but by putting those variables into a model we can now feel confident that any differences we see is based on the type of vaccine used and not that the groups were different to begin with?
Comment: As I said, such confidence comes from two places: the justification of inclusion of the variables in the model as well as the model itself. Including control variables to be confident whether "differences we see is based on the type of vaccine used" without justification is an urban legend. There must be justification for including control variables. I guess I side with Pearl and Spector & Brannick.

can you trust the statistical control


How to add TextMate to my PATH on Mac?

Question: When you start using TextMate, you are instructed to create an alias for mate='open -a TextMate.app'. But now I am using another program that requires me to add it to the PATH. I'm not sure how to do it though. Can anyone help?
Answer: My TextMate installation includes Terminal Usage... item in the Help menu, that allows me to install a symlink in a directory of my choice, the default being /usr/local/bin. This seems to be the preferred way to do this, as it is accessible from within TextMate itself.
In TextMate2, the option is located under TextMate » Preferences… » Terminal.
Answer: mate is actually a utility that comes with TextMate. It is located at /Applications/TextMate.app/Contents/Resources/mate. The easiest way to add it to your path is to create a symlink to it:
ln -s /Applications/TextMate.app/Contents/Resources/mate ~/bin/mate

Then add ~/bin to your path by adding the following line in your ~/.profile:
export PATH=$HOME/bin:$PATH

More details can be found in the TextMate Manual. Info such as this:

Mac OS X comes with an open shell command which can be used to simulate a double click from within Terminal. It can also perform an Open With… operation by use of the -a argument, e.g.: open -a TextMate . will open the current folder in TextMate (as a scratch project).
This standard command has a few shortcomings: it can only open one file at a time, it cannot open a document at a specific line and it cannot "stall" the shell until the file has been closed, which is useful e.g. when using an editor to write something like a subversion commit message.
For this reason TextMate comes with its own mate shell command, which supersedes the open command. For usage instructions you can run mate -h (from Terminal).
Answer: you can add to your path in osx with the following command:
echo 'export PATH=YOURPATHHERE:$PATH' >> ~/.profile, replacing "YOURPATHHERE"

obviously replacing 'YOURPATHHERE' with the path you need. This will add it to your profile so that every time you log it is set.
Comment: There's more needed here specifically for `mate`. See my post.
Answer: You can also check out the TextMate wiki: http://wiki.macromates.com/Troubleshooting/TextMateAndThePath
Comment: This is to change the PATH that is accessible to TextMate, *not* about how to put TextMate or `mate` in your PATH.

How to add TextMate to my PATH on Mac?


Best way to respond to a request for CV

Question: A couple of weeks ago I met this person who had come to our institute for an invited talk. Her domain of work was same as my area of research. Later I discussed with her some of the topics and asked her if there are any openings in her company (she is in the industry as an R&D head). She responded: "Send me your CV, I will look into it."
Now I want to write to her. How do I begin with that? Should I send my CV in the first mail itself? If so should I also include a cover letter? What's the best way to introduce myself?
Comment: Do you have a website with your cv? Having one is a good idea and can avoid dealing with such requests.
Comment: Since any potential job is apparently outside of academia, you might want to ask on http://workplace.stackexchange.com/
Comment: what did u keep as the subject?
Answer: Well... there are lot of important variables not mentioned, but this is how I will generally draft it:

Dear Madam Give-me-a-job,
It was great talking to you after your talk on Jan 17th, 2014 at
My-Little-Institute. I found your experience and nature of your job
fascinating. In our conversation about pursuing a career in
Whatever-you-are-working-in, you were so kind to offer giving comments
to my CV. And if you don't mind, I would love to take up your
generous offer.
Attached please find my CV. I would love to follow up with you in two
weeks and set up a phone conversation to discuss how I can strengthen
my profile so that I can be a more competitive candidate in this job
market. Thank you very much for your time, and I look forward to your invaluable critiques and suggestions.
Sincerely yours,
Penguin Knight

My approach:

Don't treat it like a lead to a job. She might just say that to be nice. If I come off too pushy, I may not even get a chance listening to her comments. For that reason, I will not attach a cover letter that details my experience, research interest, and why I am suitable for the position. There isn't even a job, a catch-all cover letter is difficult to write and hard to be made impressive.
Ask for follow up and act on it. A lot of the "send me your CV" didn't get follow up because the candidate really just "sent the CV" and that's the end of it. I specifically tweaked it as wanting advices from her, making it easier for both parties to engage in another conversation.
No need to worry about "what if she really just gives me comments?" She probably knows and remembers. If my CV is really good, she will mention the availability of openings. If there isn't or I am not good enough, then I can use this chance to flush out weaknesses and improve them.
Comment: All jobs I have applied for (via email), which to be honest isn't very many, I have written a brief, courteous email introducing the proper cover letter and CV as PDF attachments. For a number of reasons (formatting, ease of distribution, professionalism etc), I think it's a bad idea to make the email itself a cover letter.
Comment: I don't understand your answer: "I will not attach a cover letter" what is the thing in yellow if not the cover letter?
Comment: @cbeleites, you can call that e-mail a cover letter. The cover letter in my mind (the one that I will not send) was a separate letter detailing my research experience, interests, and why I am suitable for the posted job. I revised the answer to clarify.
Comment: @Moriarty OK for formatting (though not much is needed) but why is making me have to open _two_ files in an external program more professional or easier to distribute?
Comment: @terdon Because there is a potential for formatting to get messed up on different devices through forwarded emails. Nothing wrong with combining the CV and cover letter into one PDF - many job ads request that specifically.
Answer: I wouldn't make a big deal of it:

FirstName,
Good to meet you the other day. Interesting presentation.
Attached is my CV as discussed.
Best wishes,
  Your full name

Most people are busy and they're not going to read more than a couple of sentences anyway.
Also, the longer the email, the more desperate and obsequious your tone; save time and your dignity - keep it brief.
Comment: If you want to save your dignity, I recommend writing in complete sentences.
Comment: Try with a Haiku: Was good to meet you / Here attached is my CV / Best wishes Your name.
Comment: While shorter is better, especially in industry, too short can come across as lack of interest and that is usually a turn-off.
Comment: @Bohemian Telegrams were also often written in all caps.  That doesn't make it good email practice.  I agree that what you've written would sound fine as spoken English if you said it, but written in an email, I don't think it comes off well. Would it really be that hard to write instead: "It was good to meet you the other day. I really enjoyed your interesting presentation. I've attached my CV as we discussed." instead?
Comment: I agree with the notion of keeping it short, although @BenWebster has a **very** valid point ;)
Comment: Indeed, if I received this note, I'd bit-bucket it because there's no evidence the sender is actually interested. Brief is fine, but this is too brief.
Comment: I'd go as far as to say that this email is so short on evidence of interest that it closely resembles many spam messages I get; if I received such an email and I wasn't paying close attention to (or didn't remember) the name of the sender, this would go into my spam folder right away.
Comment: @ben abbreviating/truncating sentences in writen communication by omitting obvious and unambiguous pronouns and verbs is a very old, common and acceptable practice (probably dating back to the telegraph, where the cost was charged per letter/word). The *implied* sentence is clear and meaningful. My dignity is intact.
Comment: @Ben your version sounds fine. Perhaps mine is too casual. Fine. Morse code, which the telegraph used, doesn't cater for mixed case.
Answer:
Hello (Speaker-name),
We spoke on (date here) when you came to our institution and presented
  on (topic here). I very much enjoyed your speech and our discussion
  afterwards on (a few words on what you talked about) and possible
  openings in your company. As discussed, I've attached my cover letter
  and resume for your consideration.
Thanks so much, and I look forward to hearing back from you!
Sincerely,
(Your name here)

My post is making the email a bit less formal, as I assume you talked to her in an informal way. By bringing up where you guys were, when you met, and what you talked about, you're likely sparking her memory (unless she gave two talks and had identical conversations that day, which is unlikely). I'd also keep the email relatively concise, because your intent is to seek jobs, not make a new friend.
Personally, I would attach my cover letter, because the cover letter gives a better indication on not only what your skills and past experience is, but also on what your desired position is. It also gives the employer a bit more indication into what you're like as a person, and whether or not they'd want to hire you.
This is all, of course, assuming you're emailing her and not mailing it. If you mail it, I would put a shorter version of this email into the cover letter and only send the cover letter and resume.
Answer: CV and cover letter in an email and maybe send physical copies as well.
Just a friendly brief email with the attachments in the companies preferred format.
Make sure to mention the sort of position you are looking for in the cover letter.

Best way to respond to a request for CV


What is the default HTML document you use, and why?

Question: Meaning: doc-type, header, body, etc.
Comment: This is really a poll of sorts so it should be community wiki.
Answer: I use xhtml 1.0 transitional because it is flexible, does what I need, and is relatively up to date.
Answer: I've been using "html" for the doc-type for a while:
<code><!DOCTYPE html>
</code>
HTML5 is actually standard, even if I do prefer XML syntax and parsing.
Comment: **@Paul McMillan:** Agree HTML5 is the future, and laughed when I saw the "html" doc-type, really have a hard time understand how that's a standard... :-) ...even more funny is that w3.org "says" it's not a standard... ;-) **SOURCE:** http://www.w3.org/QA/2002/04/valid-dtd-list.html
Answer: I use XHTML 1.0 Strict because (a) I edit in plain-text and I like to see my markup validate because I have a perfectionist streak, (b) get things pixel-perfect across browsers (though it's less of a problem w/the slow demise of the accursed IE5.5 - rendering differences with whitespace - need I say more?) and (c) strict markup tends to be forward-compatible (though I've got to say I'm not looking forward to the lax requirements posited by HTML5 ... pSeUdO-CaMeLcAsE markup may be "valid" but it isn't easy on the eyes).
Comment: +1 on _Strict_ (HTML or XHTML) being forward-compatible. You can always drop to a Transitional DOCTYPE on the odd page that requires a deprecated attribute/tag.


Why did Lord Krishna settle at Dwaraka?

Question: Lord Krishna grew up with his people at Mathura (U.P). But why did he move with all his people to Dwaraka? Dwaraka is almost 1300 Kms from Mathura. Was there any logical reason for Krishna to set up his kingdom at Dwaraka?
Answer: Was there any logical reason for Krishna to set up his kingdom at Dwaraka?
Yes there is a specific reason behind Lord Krishnas setting up his kingdom at Dwaraka.. Which is discussed in this chapter of Shreemad Bhgavatam. SB 10.50: Kṛṣṇa Establishes the City of Dvārakā

Background – After Shree Krisha killed Kamsa , his two wives "Asti & Prapti" went to their father "Jarasandha" .After hearing the
  incident Jarasandha got very angry with yadavas. And he decided  to
  make the earth free of Yadavas. And he then prepared  for war.He
  seized the Mathura with his 23 Akshhouni warrior force or army . But
  was defeated by Krishna-Balarama. After that he repeatedly attacked
  Mathura for next 17 times , but due to the power of Shree Krisha got
  defeated all the times.
एवं सप्तदशकृत्वस्तावत्यक्शौहिणिबल: | युयुधे मागधो राजा यदुभि:
  कृष्णपालितै: ||  41 ||
evaṁ saptadaśa-kṛtvas tāvaty akṣauhiṇī-balaḥ  yuyudhe māgadho rājā
  yadubhiḥ kṛṣṇa-pālitaiḥ  Seventeen times the King of Magadha met
  defeat in this very way. And yet throughout these defeats he fought on
  with his akṣauhiṇī divisions against the forces of the Yadu dynasty
  who were protected by Śrī Kṛṣṇa.SB 10.50.41

But when 18th  time the war Between Yadavas and Jarasandha  was about to start ,A another warrior called  "Kalavayan" also joined Jarasandah in his fight against Yadavas.  Kalavayana brought  3 core  foreign warriors  and sieged  Mathura . So Krishana and Balarama thought that this time we are facing two very strong armies  and  If we  fought with "kalvayana" this time  , the "Jarasandha" will also attack us and will kill the people of mathura.

आवयोर्युध्यतोरस्य यद्यगन्ता जरासुत | बन्धून् वधिष्यत्यथवा नेष्यते
  स्वपुरं बली ||48||
āvayoḥ yudhyator asya yady āgantā jarā-sutaḥ bandhūn haniṣyaty
  atha vā neṣyate sva-puraṁ balī
"If powerful Jarāsandha comes while We two are busy fighting
  Kālayavana, Jarāsandha may kill Our relatives or else take them away
  to his capital.SB 10.50.47

And because of this reason Krishna decided to build Safe fort kingdom.

तस्माददय विधास्यामो दुर्गं द्विपददुर्गमम |
  तत्र ज्ञातीन् समधाय यवनं घातयामहे ||48||
tasmād adya vidhāsyāmo durgaṁ dvipada-durgamam  tatra jñātīn samādhāya
  yavanaṁ ghātayāmahe
"Therefore We will immediately construct a fortress that no human
  force can penetrate. Let Us settle our family members there and then
  kill the barbarian king."SB 10.50.48 इति सम्मन्त्र्य
  भगवान् दुर्गं द्वादशयोजनं |  अन्त:समुद्रे नगरं कृत्स्नाद्भुतमचिकरत
  ||49||
iti sammantrya bhagavān durgaṁ dvādaśa-yojanam
  antaḥ-samudre nagaraṁ kṛtsnādbhutam acīkarat
After thus discussing the matter with Balarāma, the Supreme
  Personality of Godhead had a fortress twelve yojanas in circumference
  built within the sea. Inside that fort He had a city built containing
  all kinds of wonderful things. SB 10.50.49

So the logical reason of Shree –Krishna to set up his kingdom at Dwarak was to safeguard the his people (yadavas) and to protect them from "Kalavayana" and " Jarasandah". And after their departure to Dwaraka ,fighting and killing these two.
Answer: According to Mahabharata, it was due to the fear of Jarasandha that he had to settle in Dwarka.
https://www.sacred-texts.com/hin/m02/m02014.htm

We also, O king, from fear of Jarasandha, at one time had to leave Mathura and fly to the city of Dwaravati.

Krishna told Yudhisthira that if he wants to perform Rajasuya Yagna, then Jarasandha has to die.

If, O great king, thou desirest to perform this sacrifice, strive to release the kings confined by Jarasandha, as also to compass his death. O son of the Kuru race, otherwise this undertaking of thine can never be completed. O thou foremost of intelligent men if the Rajasuya is to be performed by thee, you must do this in this way and not otherwise. This, O king, is my view (on the matter).

Why did Lord Krishna settle at Dwaraka?


XSS browser JS execution with website accessed though iFrame Proxy solution

Question: I've a question on XSS on a website accessed through a iframe proxy solution...bypassing
corporate proxy and executing code in browser's victim.
This is in a security test process.

I'm on a LAN of a company, which use a corporate proxy (obviously), [ named corporate.proxy below ]
To illustrate security phishing campains and XSS I need to find a way to illustrate lack of security filtering from the proxy part (I know the vuln need to be corrected on server side, but as a company you don't always choose which websites your users go.. :)
I put a php proxy to navigate in an iFrame on my server outside, on the internet, [ named my.outsideserver.com below ]
(somethink like miniproxy).
The url of my miniproxy is in my test: h**p://my.outsideserver.com/miniproxy.php
If a traditionnaly blocked webpage (youpr0n) is accessed this time, by going from internal to this URL:
h**p://my.outsideserver.com/miniproxy.php?url=youpr0n.com
==>  I Access the website...

Now my question: If a website is vulnerable to XSS [ named xss.vulnwebsite.com below ]
here: h**p://xss.vulnwebsite.com?q=
NB: Imagine website is youpr0n..
I can create a link like this :
h*p://my.outsideserver.com/miniproxy.php?url=h*p://xss.vulnwebsite.com?q=
and send this link to a company's victim in a Phishing campain.
If the victim click on the link, i see there 2 vulnerabilities :
1) First one is the proxy filtering bypass
---> The user from company go on a website which is normally blocked and now accessible..
2) The real website (youpr0n) has a xss, and leveraging this xss code is executed in the victim's browser.
NB: I know because of Same Origin Policy, the content loaded in an iFrame won't be able (if vuln to xss) to be read...but..
Here's my question, the code is executed in the victim's browser..
The SOP (Same Origin Policy) will protect any user to read by the attacker, the content on youpr0n (his sessions cookies e.g), but NOT protect it's browser !!
If i send this link:
h*p://my.outsideserver.com/miniproxy.php?url=h*p://xss.vulnwebsite.com?q=alert(1)
I successfully see the popup displaying "1" in my browser.
At the moment, the only browser protection is the browser's XSS filtering mechanism (?).
Corporate proxy mechanisms are bypassed (correct ?  /0)

What do you think about all of that. It's crap i'm sure (or not) don't blame me...
What are the mitigations (except telling users not to click shit..) for corporate proxies...
are there dynamic security content filtering solutions working.... ?

My point is is to illustrate the risks , imagine I send phishing links by mail
spaming thousands of corporate users. The email subject is
"Access Any website from your Company"
by using our free proxy mechanism... You can see pr0n at work  !!!!!
Then users will surely click on link (I would) :D
Thanks for your answers : Do you agree that code can be executed in victim's browser.
Do you agree on the proxy filtering bypass ?
What are solutions (for the company...)
Answer: A proxy like Miniproxy is acting as an HTTP client and displaying HTTP responses on http://my.outsideserver.com/miniproxy.php,  the SOP is enforced by the browser.  There for the browser treats all JavaScript displayed on http://my.outsideserver.com/miniproxy.php as originating from that source,  regardless of where the miniproxy is obtaining the content.
In short,  this is not an SOP abuse.  Corporate firewalls are easy to bypass,  but that is well known.
I recommend picking up a copy of "A tangled web"  and reading the Google Browser Security Handbook.


Plug fell in a bucket of water, is it safe after drying?

Question: My flat iron's (for clothes) plug fell in a bucket of water. I pulled it out almost immediately.
If I let it dry, is there any concern if I use it or is it not safe anymore?
Answer: Take the cover off and inspect, if all dry and clean without corrosion then good to go.
If it is a "new" molded plug, then dry with a tissue and should be good. If worried wait 24h.
However, with either position above, test for continuity between both pins and the earth or ground connection. If a low resistance is measured then either water is still causing a short or something else may be wrong.
Checking for continuity between the pins may just be measuring the normal resistance of the device.
Comment: @Jim what plug? If you post a photo - as it is your plug then we could see the detail. I work with several versions of plugs that fit into the same socket so I gave an answer relevant to two types of plugs: one that comes apart and one - molded - that does not.
Comment: What cover are you referring to? It is a power plug that has a small hole at the top between the two spiked that go in the wall. Not sure what that is
Comment: I updated the post and added a photo of the plug
Comment: This worries me as being so popular - it's 'give it a day, then see if it shorts'. Not the best way to treat mains electricity.
Comment: @Tetsujin on the other hand, it's not practical to overly worry about low probability risks. This answer could be improved by talking about why the risk is small and what to look for to assess the damage: it should describe what concerning amounts of corrosion looks like.
Comment: @PipperChip - You **can't** assess the damage, it's a moulded plug. You have absolutely no way to know when it's dry. 5-minute plug swap vs hope & pray.
Answer: What's really bad is electricity plus water:

That causes electrolysis, and that will eat through the metal contacts very quickly.

There's a risk for the user if the wet parts are touched.

As long as you don't plug it in while wet, and let it dry, it'll be fine.
You can leave the device in a hot environment to dry it, for example in a car parked in the sun for a few days.
Comment: They're not washed with tap water. Contaminants create corrosion.
Comment: This is a metal plug we're talking about here: there really shouldn't be any circuit boards involved. This answer could be better by explicitly addressing why wet plugs are bad, corrosion rates, and why a quick dip is not a concern.
Answer: I'd change the plug just to be safe.
You don't know what the inside of the plug looks like - nor can you open it to see. You don't know what little nooks & crannies could hold water for several days before it dries fully, so a 24h wait might or might not be long enough - you'll find out when you plug it in… if it goes bang you didn't wait long enough.
After that, there's corrosion. Wires tend to be copper. Plug innards tend to be brass, which contains copper. Copper will verdigris [oxidise] after some time in a wet environment which in extreme circumstances can completely 'rot' away the copper. That may never become an issue depending on how the wires are connected to the plug pins… but again as it's a moulded plug, you'll never be able to see for sure.
So, for the sake of a buck & 5 minutes of your time - change the plug.
Comment: All plugs can be changed. If, as with a moulded plug you can't unfasten it, you just clip off the old one, prepare the wires properly to match the new one, then connect.
Comment: I am not sure how is that possible. How can I know If the plug can be changed? Because it is attacked to the iron.
Comment: I know a bit more about corrosion than the average bear, and IMHO a quick dip in some water shouldn't cause any concerning amount of corrosion. Repeated dips, extended time (over hours, days), and dipping in non-potable water would make this a concern for me
Comment: @PipperChip - my point is, you don't know how long it's going to stay wet in there - primary concern is a short. Corrosion is a long-term possibility. Either would make me change the plug.
Comment: I give up on this stack. I posit something others consider to be dodgy, cutting corners, I get downvoted. I propose safety over convenience & again I'm downvoted. *There is no consistency here.* Lead answer says' hope it doesn't go bang.' which is the equivalent of putting your wet phone in rice & hoping it'll be OK. Can't argue with that:\


Can bundled products be put in an order through the admin

Question: I have bundled products with dynamic skus and would like to be able to add them to orders through the admin. The bundled base products do not show when using the Add Product search. Is this possible on a newer version or should it be possible on CE 1.4.
Answer: Personally I don't have a Magento 1.4 instance running anymore, since this version is very outdated. So I checked your question on a Magento 18.104.22.168 instance, which is the latest version.
When creating a new order from the backend, you have to select the products you want to add to the order. For a bundled product you get a link "Configure" behind the product name. When clicking that link, you get a popover in which you can select the options you want to be added to the bundled product. The same goes for configurable products and grouped products.
This is Magento 22.214.171.124, but it should be really easy to check this for other Magento versions as well.


Should we change the availability date when we resubmit the app in to App Store?

Question: Last month(15-Feb-14) I have uploaded an app in to App Store with availability date 20-Feb-14 and my app status was "Waiting For Review". Yesterday(1-Mar-14) I got one issue and again I had to resubmit the app in to App Store and my app status is "Waiting For Review". My question is Should we change the availability date also when we resubmit the app?
Answer: There's no need to manage an availability date and it is separate than the review submission process and only is considered once approval is granted for the app to be sold.

If your date is in the future, it will sit and wait to go on sale when that future data arrives.
If your date is in the past, it will go on sale as soon as approval is processed and the store can update the database.

You might in the future hold your patch until the first review finishes, since you may have put yourself at the end of the queue by resubmitting. If the first review gets rejected, you still need to resubmit and can bundle the fix then. If the first review gets approved, you can then decide on how long it took and whether you push the change you had before releasing or if you want to release with that issue.
Comment: I don't have hard numbers on the "skip a place in line" but I believe it to be true. Also, I feel that when an app gets reviewed the first time or if it's a major change - it tends to get the full inspection. Sometimes, when you have an approved app and then change one thing only - that can be reviewed much more rapidly. And lastly, sometimes reviews are just slow and sometimes they are very fast. You could be impacted by thousands of other apps and anything you do won't matter at all.
Comment: So Apple will freshly consider my app review date from Yesterday! right?


Deactivate user, what about sandboxes?

Question: If i deactivate a user in production, will it still be possible to login to Sandboxes created by this user? Or does it make any automatic deletion of sandboxes?
Answer: Yes, it is still possible to log in to Sandbox.  You will have to deactivate it manually in each instance.
Note that if you refresh a new sandbox after you deactivate a user then the user is deactivated in the new SB instance.
Comment: Thank you very much!
Answer: Yes, you can definitely log in to the sandbox even you deactivated the user in production because both user instances are different. If you want to deactivate the same user as production, you need to freeze that user in the sandbox. After deactivating the user you are restricted from login into the sandbox.
Note: If you refresh a new sandbox after deactivating a user then the user is deactivated in the new sandbox instance.
Let me know if you have any doubt.
Thanks.
Comment: Thank you very much Sachin for your response :)

Deactivate user, what about sandboxes?


Is there a word that means "to rotate into the correct position"?

Question: Say you have a rocket in the incorrect orientation, and it moves into the correct orientation, what is a word instead of moves that describes what the rocket did?
Comment: Hi user112513312, I have added the tag `single-word-requests` to this post as you are essentially looking for a word. Please include a usage sentence in accordance with the [tag-info](http://english.stackexchange.com/tags/single-word-requests/info) that will attract more answers.
Answer: I would use align; depending on the exact situation, one or the other of these definitions might apply:

to arrange things so that they form a line or are in proper position
to change (something) so that it agrees with or matches something else

(source merriam-webster.com)
The rocket might be aligned with some target it is being launched towards, or simply with an imaginary line that it must be pointed along in order to reach its target.
Another possibility is simply aim.
Answer: Re-orientation
( Orientation alignment , Orientation fit are two words )
Comment: *Reoriented* would better address the *single*-word request.


What are some of the ways to make an arraylist read-only other than Collections.unmodifiableList()?

Question: What are some of the ways to make an ArrayList read-only other than  Collections.unmodifiableList() ?
Comment: @austinwernli It's not a duplicate. Read the question again.
Comment: possible duplicate of [make ArrayList Read only](http://stackoverflow.com/questions/2419353/make-arraylist-read-only)
Comment: Maybe because the conclusion should have been : *it is indeed possible, but in real world application I would use what JDK has, because it already meets the requirement and has been extensively tested*
Comment: @sᴜʀᴇsʜᴀᴛᴛᴀ seems to be very similar.
Comment: This was asked to me while a job interview. Although I explained to him that it could be done by extending the arraylist class. The interviewer was not convinced.
Comment: So what will happen if I make change to original list? Will changes be made to returned immutable list too ?
Comment: If you use Collections.unmodifiableList, then changes to the backing List will be viewable to consumers of the unmodifiable list (ignoring issues of concurrency).
Answer: Extend the array list class and re-implement the methods that change the list to not change the list.
You could also make it final if you know the values ahead of time.
Why would you re-invent the wheel?
Comment: If you can't reinvent something, how can you invent something new?
Answer: There is no (practical) way to make an ArrayList read only. Wrapping with Collections.unmodifiableList creates a new object which is read only. The original ArrayList is still mutable.
If you want to build a List which is immutable, use guava's ImmutableList.
Comment: So what will happen if I make change to original list? Will changes be made to returned immutable list too ?
Comment: From the [javadoc of immutable list](http://docs.guava-libraries.googlecode.com/git-history/v18.0/javadoc/com/google/common/collect/ImmutableList.html#copyOf(java.util.Collection)): *Despite the method name, this method attempts to avoid actually copying the data when it is safe to do so. The exact circumstances under which a copy will or will not be performed are undocumented and subject to change.*
Comment: A look at the source code shows that there is special handling when copyOf is called with another ImmutableCollection. Otherwise, a copy of the data is created.
Answer: The most direct way would be to create a wrapper class, implementing an  List but explicitely returning UnsupportedOperationException for all methods modifying the list. You could just extend AbstractList to have this with less code from you.
And you will obtain a clone of what Collections.unmodifiableList would have given you for free... Doc says : Returns an unmodifiable view of the specified list. This method allows modules to provide users with "read-only" access to internal lists. Query operations on the returned list "read through" to the specified list, and attempts to modify the returned list, whether direct or via its iterator, result in an UnsupportedOperationException, but less tested so with a higher risk of silent bugs.
My advice is: if it exists, and if it meets your requirements, use it and do not reinvent it.


Computing Coefficients for Generalized Combinatorial Sets

Question: I'm new to Combinatorics and am wondering if there is a well-known generalization to the binomial coefficients in the following sense:
The binomial coefficients, $n \choose d$, can be considered as the number of ways in which $d$ objects can be chosen from among $n$ such that order of selection doesn't matter and no object may be selected more than once, while the multi-set coefficients, ${\big(\!{n\choose d}\!\big)}={n+d-1\choose d}$, enumerate the ways in which $d$ objects can be chosen from among $n$ objects such that order doesn't matter but any object may be chosen any number of times.
Is there a middle ground? Specifically, one in which $d$ objects are chosen from among $n$ such that order doesn't matter but the $i^{th}$ object may be selected no more than $k_i$ times?
Heuristically, there are two fairly obvious approaches for calculating these numbers (aside from brute force). Let's call these numbers $C(n,d;K)$ for convenience, where $K\equiv \{k_1,k_2,...,k_n\}$. First, one could find the coefficients of polynomials of the form
$$
{\large\prod_{i=0}^{n}{\huge(}\sum_{j=0}^{k_i}(x^j){\huge)}=\sum_{m=0}^{N}C(n,m;K)x^m}
$$
where $k_0\equiv 0$ and $N=\sum_{i=0}^{n}k_i$.
On the other hand, one could use an algorithm similar in logic to that of Pascal's Triangle wherein the $C(n,d;K)$ are calculated by summing $k_n$ terms with $n$-value $n'=n-1$ and with $K'=K-\{k_n\}$ and $N'=N-k_n$ (i.e. from the previous "line" in a generalized Pascal's Triangle).
$$
\large{C(n,d;K)=\sum_{m=d-k_n}^{d}C(n',m;K')}
$$
with $C(n',m;K')=0$ for all $m<0$ and all $m>N'$.
To help clarify, here's an example: Suppose we have 4 object types with the following $k$-values $k_1=1,\ k_2=2,\ k_3=3,\ k_4=4.$ From this we can construct a generalized Pascal's Triangle:
$\underline{n=0}:\ 1\\\underline{n=1}:\ 1\ \ 1\\\underline{n=2}:\ 1\ \ 2\ \ 2\ \ 1\\\underline{n=3}:\ 1\ \ 3\ \ 5\ \ 6\ \ 5\ \ 3\ \ 1\\\underline{n=4}:\ 1\ \ 4\ \ 9\ \ 15\ \ 20\ \ 22\ \ 20\ \ 15\ \ 9\ \ 4\ \ 1$
Each term in the $n$th row of the triangle is computed by sliding a window of size $k_n+1$ across the $(n-1)^{th}$ row of the triangle and summing the terms within that window (i.e. for the 3rd row [recall that $k_3=3$], $1=0+0+0+1$, $3=0+0+1+2$, $5=0+1+2+2$, and so on).
Like Pascal's Triangle, these generalized triangles have many convenient properties. For instance, the $n^{th}$ row always has $N_n+1$ terms in it; the rows are always symmetrical; and, the final row in the triangle (the one which provides the coefficients we are looking for) doesn't depend on the order in which you compute the previous rows (i.e. the $n=4$ row would look the same in the above example even if the $k$-values were swapped around [e.g. $k_1=2,\ k_2=4$, etc.]). Perhaps the most interesting property is the following:
$$
\large{\sum_{m=0}^{N}C(n,m;K)=\prod_{j=0}^{n}(k_j+1)}
$$
So in the above example this implies that the sum of the $n^{th}$ row is $(n+1)!$, or in the limiting case of the binomial coefficients (in which all $k_i=1$), the sum of the $n^{th}$ row is $2^n$ - as expected.
Clearly, there are methods for computing these general set coefficients, but I have been unable to find any literature on a concise formula for the $C(n,d;K)$ given all the parameters of the problem or even anything about efficient methods for computing one of these coefficients without the use of the polynomial generating function cited above.
Does anyone know of any such methods or formulae? Any help would be greatly appreciated.
Thanks!
Comment: See the question http://math.stackexchange.com/q/553960/18880/, which I answered yesterday. Although this question is better formulated than that one it asks pretty much the same thing, so I am going to ask to mark it as duplicate. In short, you are looking for the coefficient of $X^d$ in the polynomial $\prod_{i=1}^n(1+X+\cdots+X^{k_i})$, and the properties you ask for follow from that. In the end it comes down to multiplying polynomials in $X$, there is n escape from that.
Comment: I appreciate the quick response. I'm a self-study when it comes to combinatorics, so I've never heard of "stars-and-bars" until just now. A quick search for that term turns up several pages of almost identical questions. Who knew...
Comment: Stars-and-bars is just a way to help you remember the formula $\binom{-n}k=(-1)^k\binom{n+k-1}k$ for "negating" the upper index in binomial coefficients in a few combinatorial context where you might encounter them. But it is quite limited as method, and I would prefer learning more general methods.
Answer: Ok, so you want to buy $d$ items in a store with $n$ elements, but where item $i$ only has a stock of $s_i$. What you are looking for is the coefficient of $x^d$ in the product
$(1+x^1+ x^2+ \dots+ x^{s_1})(1+x^1+ x^2+ \dots+ x^{s_2})\dots (1+x^1+ x^2+ \dots+ x^{s_n})=$
$\dfrac{(1-x^{s_1+1})(1-x^{s_2+1})\dots (1-x^{s_n+1})}{(1-x)^n}$
But, I don't think you can get something nicer than that. There is a good method for when all of the stocks are equal. I leave a link here.


Handling data copied from remote databases

Question: We have a contracts database that pulls data from our job management system overnight using a simple stored procedure.  The stored proc simply deletes the data from the local table and refills with the new data copied across.  Obviously this means we cannot set up any relationships to this data in the local table / database.  Does anyone have any good strategy ideas to improve on this so that we can set up the correct relationships to this table.  How can I handle a deleted record in the remote table if a relationship to this record has been established in the local table as just deleting it would break the relationship.
Answer: I imagine you are talking about a syncing problem. As in, how can you make the associations when the data is blown away and recreated every night?
What I would do is create nullable foreign keys on the local data that needs to reference it. The stored procedure should null all the foreign keys on the various local tables when the new data is coming in. Then, when the data is restored from the remote database, have the stored procedure then go through and shore up the foreign keys again to re-create the relationships.
Answer: How about truncating the table instead of deleting it?
If you are using SQL Server: TRUNCATE TABLE


What does "transaction failed" mean in simplewallet?

Question: When I opened my account in simplewallet, it said that my transaction failed even though I saw them in a transaction pool on a block explorer. What does the message mean in simplewallet?
Answer: Once the wallet creates a transaction, it can fail at several steps.
The first one is to be rejected by the daemon. This can happen if the daemon sees that transction uses already spent key images, has too low a fee, etc. Normally, this should not happen, and the ringCT branch contains fixes for a few of these problems - hopefully fixing all of it.
When this happens, the wallet will warn you with a red message when trying to send.
The second one is that the transaction will never be mined. It may be that the daemon accepted the transction, but other nodes will not accept it, or will never mine it, or simply were never told about it (the latter one could be a temporary problem if using a new daemon with an older wallet).
When this happens, the wallet will first show the transaction as pending
in the transactions history (show_transfers), while the transaction is waiting to be mined in the pool. If it is dropped by the pool, and was not added to the blockchain, this status will then change to failed. At this point, you used to need to run rescan_spent as the wallet became confused about which coins were spent and which were not, but this is now fixed in the RingCT branch (this one does seem to fix a lot of things, doesn't it).
Comment: rejected by the daemon can also happen if the last transaction is not long time ago as each transaction has to be confirmed with 10 blocks before the wallet is available for further transactions.
Answer: Failed means two things happened:
the wallet sent a tx, which was accepted by the daemon. sometime later, the wallet doesn't find it in the pool nor the blockchain. There are fixes for this in newer versions.


Running websocket server with stomp

Question: I have torquebox installed in my jruby on Rails application. And I am experimenting with using stomp + websockets. But I can't tell if the websocket server is even running? I am booting up torquebox in my console with: sudo torquebox run --clustered -b my.ip.address
I keep going through the output from torquebox booting up and the only relevant output I am seeing is this:
[org.torquebox.stomp.as] Initializing TorqueBox STOMP Subsystem
and
[org.projectodd.polyglot.stomp.as] Initializing Polyglot STOMP Subsystem
I don't see anything referencing port 8675, which according to the docs is the port it is supposed to run on. I tried telnet as well and received a 'connection refused' message.
Any help or references would be great. Thanks
Answer: Apologies for the dumb question. I just had a typo in my torquebox.yml file. I can now see the output in the bootup that specifies the websocket server is up and I can successfully telnet in.

Running websocket server with stomp


How to keep food moist for longer?

Question: I sometimes carry food to work (freshly made food e.g. burger or sandwich) but by the time I eat it, it is dry and not edible (unless you are too hungry to eat it anyway), what are ways to keep it moist and fresh so it not soft and not too chewy?
Comment: https://cooking.stackexchange.com also has some information that may be of some help. Search their answers, too. Good luck.
Answer: I'd try using Aluminium foil:

Being sealed, the moist should stay inside and leave the original texture and taste for the several hours until you eat it.
Comment: @WeatherVane yeah this might fit in new answer, I don't like giving different tips in one answer. :)
Comment: I know some say it's not healthy for aluminum foil to touch the food, but in my experience, it works best for sandwiches.
Answer: You could try using a ziplock type of plastic bag.
One thing against using a tight wrapper, is that the bread can go soggy from the filling if all the air is expelled from the bag before sealing it.
So you can experiment with how much air you leave in the bag, to find the right compromise between not going dry, and not going soggy.
Alternatively you could also experiment with different sizes of rigid plastic box, if you want to protect the food from getting squashed. Again: not too big and not too small.
Answer: A trick that might work for food that needs to keep really moist is to wrap them in a moist dish towel; this is great for keeping moisture, might be too much for your purposes. We use it for a sandwich that doesn't have any crust, so moisture keeping is critical.
Link (in Spanish):
https://laopinionaustral.com.ar/como/como-mantener-frescos-los-sandwiches-de-miga-en-la-heladera-455052.html
Answer: How to keep food moist for longer?
For years now, I have never bought food at lunchtime, as I have allergies to deal with. Besides, I find it more economical to do so. My job location now even has a lunchroom with frige and coffee maker, so life is better.
But when I was landscaping for over two decades, I kept food fresh in different ways.

Sandwiches and burgers I used Saran Wrap also called cling wrap and plastic wrap. I have never had issues with this.

Vegetables and meat slices I generally kept in Ziplock bags of one form or another for lunch.

Sandwiches from places such as Subway will get soggy in Saran Wrap and even in their original wrappings! One of girls on my former crew used to bring all her ingredients for her sandwiches separately: (1.)Bread in Saran Wrap; (2.)Fresh ingredients such as vegetables and meat slices in a Tupperware container; and (3.) Condiments such such as salt, pepper, mustard, mayonnaise, ketchup is another container for making her sandwiches. She used the condiments saved from eating out at fast food restaurants such as McDonalds. It was amusing to to watch, but it worked.
Answer: Invented by accident 89 years ago:

See also https://www.britannica.com/dictionary/seal: v. 1. to close (something) tightly so that air, liquid, etc., cannot get in or out

How to keep food moist for longer?


Token Content Access blocks access for author too

Question: I use the Token Content Access module to hide member created nodes from public view and allow them  to share private links with private links (URL tokens). My problem is when a user restricts access to individual nodes using URL tokens, he cannot access them without the token either!
Answer: I briefly looked at the module. I think you will need to make some serious code changes, I could not find an easy tweak.


How do I get a hot enough signal by plugging in my guitar into a DI directly?

Question: I want to get a really clean signal for my guitar but the amp I use to record with (Using the FX loop) only has two gain stages (VX Kraken has gain 1 and gain 2 but no clean). I've tried plugging my guitar into the interface but the signal is so quiet that it just doesn't work. There's nothing wrong with the guitar (I've checked). Any suggestions?
Comment: Can you clarify what signal path(s) you actually want? What have the amp's gain stages to do with the level of the DI use use straight from the guitar?
Comment: What interface do you have?
Answer: This is normal: guitar out is pretty low as it is expected that you will gain the heck out of it. You can adjust the level in the recording device/software track mixer but try for +0dB rather than boosting till you hear it. If this is a software DAW, then just add a VST gain stage to the track to help you hear it better. VST effects are usually applied in realtime after the recording stage (they need a track to work on), so your clean signal will still be clean on the recording.
The track will still be clean. Instead of a adding a VST on the track, you could also set it up so that the output is to a "reamp box"--kind of like a DI but for the reverse purpose (don't use a DI in reverse, it isn't the same thing AFAIK). From the reamp box, you can go to the amp's HiZ guitar-in.


What is the optimal method to shuffle an organised deck of cards

Question: In a number of games I play there are a play deck and a discard deck (for example Ticket to Ride and Pandemic).  The discard deck, by the way the games are constructed, becomes organised as cards are discarded in groups.  However, the play deck needs to be as close to random as possible for the games to work well.  I would like to know if there is an optimal way to shuffle a deck to overcome the self organisation of the discard decks in these circumstances.  I can riffle shuffle well but have read some research that it would take 7 full riffle shuffles to effectivley remove the affects of an organised deck.  Are there any other methods of cuttings of the deck or shuffle types that create a random deck in a more efficient manner?
Comment: Do you want something fast or something thorough?
Comment: I am looking for a trade-off between fast and thorough.  With Ticket To Ride you have potentially a very organised deck and a short turn around as the game has effectively stopped while you are waiting for a shuffle.
Comment: possible duplicate of [What is a safe and accurate technique for shuffling cards?](http://boardgames.stackexchange.com/questions/2594/what-is-a-safe-and-accurate-technique-for-shuffling-cards)
Answer: That's very, very simple in fact: shuffle the discard pile constantly. Take a player that, while not playing his turn, shuffles the discard pile of cards. When discarding, simply give the cards to this player (who can change when he's tired), he will put them in the deck and go on shuffling.
Comment: @AlexC I see what you mean, I had this problem too. Then I changed the kind of people I played with ;-) (This, of course is to be taken as un-seriously as possible). Anyway, that's true. You found the flaw of my technique.
Comment: I like this idea but it is going to reduce the lifetime of the cards which in games like TtR which, in my experience, tend to get pretty badly handled.
Answer: The article on Shuffling at the Wikipedia discusses the famous paper by Persi Diaconis and Dave Bayer which shows that a 52 card deck of cards doesn't become random until the fifth shuffle, and requires seven shuffles to become "truly" random.
Your question "Are there any other methods of cuttings of the deck or shuffle types that create a more random deck?" isn't really asking the right question. Even just cutting the deck will randomize the deck just as well as any other method, given enough cuts. No other method will make it any "more random". The real question is "how many cuts are required to fully randomize a deck of X cards?" or "How many riffle shuffles are required?".
Pokerology.com has videos and tutorials for six different methods of shuffling cards. I think that for smaller decks like Ticket To Ride, simply splaying them out on the playing surface face down and messing them about, followed by a few riffle and overhand shuffles should be enough to randomize the deck.
Comment: "Even just cutting the deck will randomize the deck just as well as any other method, given enough cuts." Depends on how you cut it. If you just do the type of cut where you lift off a section and place it at the bottom, you're only keeping the same order of the cards, so there are only 52 possible combinations rather than the 52! from proper shuffling.
Comment: Agree with the answer, I have amended the question.  The point I am trying to get at is not the nature of randomness but the most efficient manner in which to get a deck that appears random.
Comment: @JoeZeng I admit I don't have enough math knowledge to dispute this. Does it hold true if you perform multiple Scarne's Cuts, where you take a portion from the middle, put it on top, then perform a regular cut?
Comment: @ghoppe Scarne's Cut doesn't have that problem because it takes a middle portion as well as the top portion. I was talking about the simplest cut that usually gets performed only once before the dealer starts dealing.
Comment: For Scarne's Cut, it seems like it would take about 50 or 60 cuts to achieve "true" randomness. But I haven't analyzed it enough to say either way either.
Comment: Ditto Joe Z about cutting not really helping with randomization. I wanted to add that I'm dubious about the Pokerology methods. It looks to me like weave, riffle, and table riffle are all equivalent to each other (so they would take seven shuffles to randomize a standard 52-card deck, per Diaconis); and the overhand, "Hindu", and strip methods all look equivalent to each other (and overhand requires 2500 iterations to randomize a deck according to (https://www.math.hmc.edu/funfacts/ffiles/20002.4-6.shtml)). So I think the method does actually matter.
Answer: With Ticket to ride, 3-5 riffle shuffles should be sufficient to randomize the deck sufficiently for play. As long as the runs of matched cards aren't 5-6 cards long, it's not a big issue.
I'll note that japanese style block shuffling is inadequate for TTR until about the 9th or  time through the deck, which I discovered due to using sleeved cards in Nordic.
However, for sleeved cards, riffling is a nearly surefire way to strip the sleeves, so sliding a block sideways into the deck works well. Holding the deck loosely, pull a block, the place it looselysideways against the side of the deck, and gently push - it should interpenetrate. This is actually about as efective as riffling if done with half the deck at a time, but it's easier to stack a deck this way, so have someone else cut the deck.
Comment: I absolutely adore the "mash" shuffle method described in the last paragraph. It's less damaging than a riffle, and much easier to do.
Comment: Wikipedia calls it a 'weave' (http://en.wikipedia.org/wiki/Shuffling#Weave_and_Faro_shuffles) and I also find it to be superior to a riffle. It's about as fast, easier than a riffle, and doesn't bend the cards nearly as much when done subtly.
Answer: With every card game I play I do a mix of Riffle, Stripping, and Mongean-Stripping Combo.  I generally intermix these in a random order with a random number of times, usually at least 3.
I've found that mixing shuffling techniques, especially in a random order, will result in a fairly nice card distribution and randomization.
Answer: Generally speaking, I shuffle using a combination of overhand and Hindu shuffle. I start with the pack in my left hand, pluck out the middle half with my right, and then proceed to drop blocks of cards alternatively onto the top and then bottom of the pack, using a quick flick of fingers or thumb to swap between cards dropping onto the top or bottom of the pack. Two or three rounds of this do a pretty good job of randomising for most games. For highly ordered discard piles however, this can leave small clusters of related cards, even after quite a few rounds.
If I really want to ensure that I break up sequences though, I use a Pile shuffle with the slight variation that I deal each card onto a random pile rather than visiting each pile in turn. One round of this is usually enough to break up the sequences, then I usually finish off with a quick round or two of hand shuffling, as I describe above.
If I have the time, I'll do a pair of pile shuffles, picking two different prime numbers for the number of piles in each round. This can can substantially amplify the randomisation, even if you use a sequential pile shuffle, since correlations between number of piles and sequence length will be broken by lack of correlation between the number of piles in each round.
I'll let people I trust riffle shuffle game cards, but it is far to easy to damage cards with this technique if you aren't good at it. I certainly don't trust myself not to damage my cards.
Finally, when playing at a table, with plenty of space, it's very tempting to just do a big wash, but I've never been happy with the results of a this technique. It is far too easy for related cards and even quite large blocks to end up staying together.
Answer: For Ticket to Ride, as cards are turned in I distribute them across up to six stacks, trying to not place cards on top of like cards (orange does not go on top of orange). Sometimes a card gets tucked to the bottom of a stack. When it comes time to shuffle, the stacks get shuffled together pair by pair (stack 1 with 2, then 3 with 4, etc.), ultimately combining things. It seems to make things more random than otherwise.
(For Pandemic, there's often very few cards, so things can go bad very fast and it may just seem like it's not random.)
I guess my point (and others') is, doing some kinf of pre-shuffling the cards during play as cards are discarded can help with randomization.
Comment: By trying not to place cards on top of like cards, you are moving toward even distribution, which is not random. The rest of your technique sounds good, but if you're going for randomization, don't ever arrange cards according to a pattern.
Answer: ghoppe already posted the link to wikipedia and aramis told you about shuffling sleeved cards.
I personally employ a strategy of about 2 riffle and 1 strip shuffle repeated 2-3 times depending on how heavily the deck is ordered. Riffle is good to mix cards, and strip to reorder the top and bottom part of the deck. If you have a smooth and large enough surface also don't underestimate a wash shuffle - it's an especially convenient way to shuffle large and heavily ordered decks.
Comment: Though, I think a lot of people have a bad habit when wash-shuffling of just moving the cards around together without mixing them. Don't do that, and you'll be fine.
Answer: Or there's always the lazy option: automatic card shuffler. I was surprised, they're available easily for less than $20 on Amazon.
Comment: the problem i have with these is that 1. they break easily (at least the ones i've used do), 2. they don't hold larger decks well
Comment: Yeah. I've never used one, but the reviews on Amazon were mixed. One in particular complained that it didn't work well on MTG cards, as they're slightly smaller than typical playing cards.
Comment: In my experience, with the cheap ones at least, the *biggest* problem with them is that they are so *noisy*. In the time that it takes to walk to the room where you've stashed the shuffler, you could have shuffled it several times. *8')
Comment: They are also really hard on cards, so good for cheap poker ones, but bad for CGC.