I want to encrypt the admin/members passwords, but I don't know if the MD5 is still strong for that, or became weak. And what is the strong alternatives for encrypting the passwords like MD5 in the past.
It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection.  This question,   suggests that hashing multiple times may be a good idea, whereas  suggests using salt.  I'm using PHP. I want a safe and fast password encryption system. Hashing a password a million times may be safer, but also slower. How to achieve a good balance between speed and safety? Also, I'd prefer the result to have a constant number of characters.   The hashing mechanism must be available in PHP It must be safe It can use salt (in this case, are all salts equally good? Is there any way to generate good salts?)   Also, should I store two fields in the database (one using MD5 and another one using SHA, for example)? Would it make it safer or unsafer?  In case I wasn't clear enough, I want to know which hashing function(s) to use and how to pick a good salt in order to have a safe and fast password protection mechanism.  Related questions that don't quite cover my question:
Microsoft.ACE.OLEDB.12.0 provider is not registered I have a Visual Studio 2008 solution with two projects (a Word-Template project and a VB.Net console application for testing).  Both projects reference a database project which opens a connection to an MS-Access 2007 database file and have references to System.Data.OleDb.  In the database project I have a function which retrieves a data table as follows   private class AdminDatabase    ' stores the connection string which is set in the New() method    dim strAdminConnection as string     public sub New()    ...    adminName = dlgopen.FileName    conAdminDB = New OleDbConnection    conAdminDB.ConnectionString = "Data Source='" + adminName + "';" + _        "Provider=Microsoft.ACE.OLEDB.12.0"     ' store the connection string in strAdminConnection    strAdminConnection = conAdminDB.ConnectionString.ToString()    My.Settings.SetUserOverride("AdminConnectionString", strAdminConnection)    ...    End Sub     ' retrieves data from the database    Public Function getDataTable(ByVal sqlStatement As String) As DataTable         Dim ds As New DataSet         Dim dt As New DataTable         Dim da As New OleDbDataAdapter         Dim localCon As New OleDbConnection           localCon.ConnectionString = strAdminConnection          Using localCon             Dim command As OleDbCommand = localCon.CreateCommand()             command.CommandText = sqlStatement             localCon.Open()             da.SelectCommand = command             da.Fill(dt)             getDataTable = dt         End Using      End Function End Class   When I call this function from my Word 2007 Template project everything works fine; no errors. But when I run it from the console application it throws the following exception     ex = {"The 'Microsoft.ACE.OLEDB.12.0'   provider is not registered on the   local machine."}   Both projects have the same reference and the console application did work when I first wrote it (a while ago) but now it has stopped work.  I must be missing something but I don't know what.  Any ideas? How to access a clicked URL in a URL handler application created in Automator I'm currently trying to modify the default URL handling behavior in OS X. I would like, when clicking on any link outside of a web browser, to copy this URL to the pasteboard instead of opening it in the default web browser – for instance, clicking a link in a Skype conversation should copy this URL to the OS X pasteboard instead of opening it in Firefox (which is currently my default web browser).  I have thought about solutions, but I’m currently unable to implement one. If I can create an application that puts URLs into the pasteboard that are sent to it, and can set this application as the default web browser, I would be able to achieve my goal.  I created an application with Automator that executes the shell command pbcopy and have set this application as my default web browser, but I didn’t get the expected result. I did some testing and I can confirm that the application runs on clicking on a link, however, I cannot get the URL passed to the application / shell script. I tried both stdin or a passed argument, but without success.  Is there a way for an application created with Automator to retrieve a clicked URL and send it to pbcopy, when that application is set as a (default) handler for URLs?  Alternatively, is there a better way to create a fake web browser that takes the input and puts it in the pasteboard than Automator? Or is there any other way that I can achieve my goal without a custom application / script? This is about a step in a derivation of the expression for the relativistic Doppler effect.  Consider a source receding from an observer at a velocity $v$ along the line joining the two. Light is emitted at frequency $f_s$ and wavelength $\lambda_s$. The frequency $f_0$ and wavelength $\lambda_0$ received by the observer will be different.  Some textbooks now argue that the wavelength received by the observer is given by $\lambda_0=(c+u)T_0$, where $T_0$ is the time period of the wave in the observers frame. The argument given is that the successive "crests" will be an extra distance $uT_0$ apart due to movement of the source. Upon relativistically transforming the time period in the source frame to the observer frame, the correct result $f_0=f_s\sqrt{\frac{c-u}{c+u}}$ is obtained.  But the argument for the wavelength seems reminiscent of the classical Doppler effect for sound. Is it really applicable here through this argument? And is there a way to show the same result for $\lambda_0$ mathematically? Progressive Draw 2 and Draw 4 Uno When playing with progressive Draw 2 and Draw 4 and (say that there are 2 players playing) and    Player 1 goes out with a Draw 2  Player 2 puts down a Draw 2    Does player 1 have to pick up 4 cards? Why should we care about groups at all? Copying unicode symbols from Firefox address bar as is Let's say I open a webpage with some Unicode characters, say, Cyrillic, in the address like this:        When I try to copy it from the address bar somewhere else, it becomes unreadable rubbish:        I guess this is for compatibility. However for readability I want to copy it straight away with proper Unicode characters.  What and how should I tweak to make that possible?  Edit: The answers are good, but they are hacky. Are there any settings in about:config? I would like to customize ubuntu for a library, they only want to display a web browser with their site in full screen.  No address bar, no button user can only click the link on the page.  If library's staff enter admin user name and password they can change any settings in ubuntu.  Any suggestion or usefully link is much appreciated. What is the difference between French and British cuts of beef? What is the difference between French and British cuts of beef?   I am told they just butcher the animals dfferently. Certainly the cuts don't seem the same. For example is faux fillet really exactly the same as British sirloin and is entrecôte really the same as rib steak?  Here is a picture of British beef cuts. The probability of two dice summing to k is simple enough, make a diagram of the throws,  $$ \begin{array}{c}  &amp;|&amp;1&amp;2&amp;3&amp;4&amp;5&amp;6\\\hline 1&amp;|&amp;2&amp;3&amp;4&amp;5&amp;6&amp;7\\ 2&amp;|&amp;3&amp;4&amp;5&amp;6&amp;7&amp;8\\ 3&amp;|&amp;4&amp;5&amp;6&amp;7&amp;8&amp;9\\ 4&amp;|&amp;5&amp;6&amp;7&amp;8&amp;9&amp;\color{green}{10}\\ 5&amp;|&amp;6&amp;7&amp;8&amp;9&amp;\color{green}{10}&amp;11\\ 6&amp;|&amp;7&amp;8&amp;9&amp;\color{green}{10}&amp;11&amp;12\\ \end{array} $$  and the probability of a sum is just the length of the corresponding diagonal divided by $36$. For instance, $\mathrm{P}(\mathrm{sum} = 10) = \frac{3}{36} = \frac{1}{12}$. However, it's not as easy to draw a diagram for three dice or more, so how would a general formula look? I need to find the closure of these sets on the ordered square: $$A = \{(1/n)\times 0 | n\in \mathbb{Z}_+\}$$ $$B = \{(1-1/n)\times \frac{1}{2}| n\in \mathbb{Z}_+\}$$ $$C = \{x\times 0 | 0&lt;x&lt;1\}$$ $$D = \{x\times \frac{1}{2}| 0&lt;x&lt;1\}$$ $$E = \{\frac{1}{2}\times y | 0&lt;y&lt;1\}$$ I know that the closure is just the set itself united with its limit points. For $A$, the set of limit points, I imagine, are $\{&lt;1,0&gt;\}$, that is, the $x$ coordinate is $1$ and the $y$ is $0$. But  is says the reverse. What am I getting wrong? Following the same reasoning, $B' = \{&lt;1,\frac{1}{2}&gt;\}$ $C' = \{&lt;0,0&gt;,&lt;0,1&gt;\}$ What am I doing wrong? Programmatically delete one entry from one field on one entity What's the proper way to programmatically delete one specific field entry for a multi-entry field from one specific entity? (that's specific fields and specific entities, not field types or instances and entity types)  Here's some possibilities I've looked into which don't work:   Loading the entity with entity_load(), setting the field entry to =null or =array(), then saving with field_attach_update(). It's the closest I've found but it leaves a zombie null field entry in the database which shows up as a blank row on forms until the form is saved and hook_field_is_empty() can kick in (hook_field_is_empty() is configured such that =null or =array() will flag as empty). Loading the entity with entity_load(), unsetting the field entry by key, then saving with field_attach_update(). This seems to do nothing - it seems that Drupal interprets the entry not being there as a sign to not modify it. (strangely I also sometimes get maximum query time expiration timeouts when trying this approach) field_attach_delete() - this is much too blunt: it kills all fields for the entity field_purge_data() - better, but still too blunt: it kills all entries of the field, not specific entries   So to clarify, I've got code that finds (and loads) an entity which has a field that has multiple entries, and finds a specific entry on that field that needs to be removed. I want to remove that entry completely, without touching any other entries or any other fields on the entity. Absolute Value Symbols What is the "best LaTeX practices" for writing absolute value symbols?  Are there any packages which provide good methods?  Some options include |x| and \mid x \mid, but I'm not sure which is best... What I am trying to do is to set a date in my date field and also update the object. I am using the class below to do so which works just fine in my sanbox but in production I am getting this error:      System.LimitException: Too many query rows: 50001   public with sharing class updateObject{     public  List&lt;NRProducts__c&gt;  values;     public PageReference updateObject() {         values=[SELECT Refreshed_Date__c FROM NRProducts__c ];         for (NRProducts__c s :values){            s.Refreshed_Date__c =Date.today();          }          update values;         return null;                       }     }   VF Page:  &lt;apex:page showheader="false" controller="updateObject" sidebar="false"&gt; &lt;apex:form&gt;  &lt;apex:commandButton action="{!updateObject}" value="Update"/&gt; &lt;/apex:form&gt; &lt;/apex:page&gt; Placing nodes midway on paths using |- or -| in tikz I make frequent use of |- and -| with computed points in diagrams, like so:  \coordinate (a) at (0,0); \foreach \x in (1,...,10) {     \coordinate (b) at ({whateverFunction(\x)},{whateverOtherFunction(\x)});     \draw (a) |- (b); %Straight line segment     \draw (b) -| (a); %Another straight line segment     \coordinate (a) at (b); }   To get plots like:   I would like to be able to label the midpoint of each line segment, but doing something like node[midway,above] {a} does not act like expected:    I want something like:    Why does midway not work, and what is a good workaround here? My professor sometimes asks me to referee papers for him.  Should I list the corresponding journals in the professionals activity section of my CV? I have a directory filled with files with names like logXX where XX is a two-character, zero-padded, uppercase hex number such as:  log00 log01 log02 ... log0A log0B log0C ... log4E log4F log50 ...   Generally there will be fewer than say 20 or 30 files total.  The date and time on my particular system is not something that can be relied up on (an embedded system with no reliable NTP or GPS time sources).  However the filenames will reliably increment as shown above.  I wish to grep through all the files for the single most recent log entry of a certain type, I was hoping to cat the files together such as...  cat /tmp/logs/log* | grep 'WARNING 07 -' | tail -n1   However it occurred to me that different versions of bash or sh or zsh etc. might have different ideas about how the * is expanded.  The man bash page doesn't say whether or not the expansion of * would be a definitely ascending alphabetical list of matching filenames.  It does seem to be ascending every time I've tried it on all the systems I have available to me -- but is it DEFINED behaviour or just implementation specific?  In other words can I absolutely rely on cat /tmp/logs/log* to concatenate all my log files together in alphabetical order? Is there a regular expression to detect a valid regular expression? $\prod_{k=0}^{\infty} \cos(x \cdot 2^{-k}).$ Task is to find $$\prod_{k=0}^{\infty} \cos(x \cdot 2^{-k}).$$  I tried to make it with double-angle formula: $\prod_{k=0}^{\infty} \cos(x \cdot 2^{-k}) = \frac{\prod_{k=0}^\infty \sin(x2^{1-k})}{2^\infty \cdot \prod_{k=0}^\infty \sin(x \cdot 2^{-k})} $ I'm sad to admit, that I'm stuck with that one. So I would appreciate any help, such as pointing the right direction. How to perform hard / cold reboot of iPhone or iPad? Proof of Convergence: Babylonian Method $x_{n+1}=\frac{1}{2}(x_n + \frac{a}{x_n})$ a) Let $a&gt;0$ and the sequence $x_n$ fulfills $x_1&gt;0$ and $x_{n+1}=\frac{1}{2}(x_n + \frac{a}{x_n})$ for $n \in \mathbb N$. Show that $x_n \rightarrow \sqrt a$ when $n\rightarrow \infty$. I have done it in two ways, but I guess I'm not allowed to use the first one and the second one is incomplete. Can someone please help me?  We already know $x_n \rightarrow \sqrt a$, so we do another step of the iteration and see that $x_{n+1} = \sqrt a$.  Using limit, $x_n \rightarrow x, x_{n+1} \rightarrow x$ (this is the part I think it's incomplete, don't I have to show $x_{n+1} \rightarrow x$, how?), we have that   $$x = \frac x 2 (1 + \frac a {x^2}) \Rightarrow 1 = a/x^2 \Rightarrow x = \sqrt a$$ b) Let the sequence $x_n$ be defined as $x_{n+1}= 1 + \frac 1 {x_n} (n \in \mathbb N), x_1=1$. Show that it converges and calculate its limit. &quot;Tip: Show that sequences $x_{2n}$ and $x_{2n+1}$ monotone convergent to the limit.&quot; I didn't understand the tip, how can this help me? Does it make a difference if the number is odd or even? Thanks in advance!