Efficiently extract tokens from strings
Obtaining zero-length string from strtok()
Do professors get paid for supervising students? Coordinate descent soft-thresholding update operator for LASSO I was reading this paper () describing the coordinate descent algorithm for LASSO, and I can't quite figure out how the soft-thresholding update for each $\beta_j$ is derived for the linear regression case. Specifically, how does one go from equation (4) to equation (5) in the paper? Can anyone show me a detailed derivation of the update? Thanks!  Edit: actually this paper deals with the elastic net penalizing term, which reduces to LASSO when $\alpha=1$. I am mostly interested in LASSO, but I guess the derivation should be principally the same for elastic net. Lufthansa airline offers the &quot;Economy Flex&quot; fare. The listed advantages of this fare are:  Rebooking possible plus fare difference Refundable except 70 EUR plus fare difference  What does the &quot;plus fare difference&quot; mean? Imagine I buy a ticket for 200 €. Later I decide to cancel. They keep 70 Euro, so I get 130€ back. What's with the fare difference? Fare difference to what? As a comparison, the &quot;Economy classic&quot; states:  Rebooking: 70 EUR plus fare difference Refund not possible mysqli or PDO - what are the pros and cons? In our place we're split between using mysqli and PDO for stuff like prepared statements and transaction support. Some projects use one, some the other. There is little realistic likelihood of us ever moving to another RDBMS.  I prefer PDO for the single reason that it allows named parameters for prepared statements, and as far as I am aware mysqli does not.  Are there any other pros and cons to choosing one over the other as a standard as we consolidate our projects to use just one approach? Let's say I use a  with a lot of code inside. To improve readability and reusability I'd like to use helper/private methods. However, a Drupal .module file is not a class.  The idea is to split big methods from this file into more readable and reusable smaller methods.  What is the correct way to call helper/private methods from a Drupal .module file? How to find the build / version of Windows 10 During the beta of Windows 10 it was hard know what version you were running unless it had it posted to the desktop. Once that wasn't there - how do you tell what version / build you are running?   This will become more of an issue as Microsoft starts releasing more builds with the new update mechanism. When would you call java's thread.run() instead of thread.start()? When would you call Java's thread.run() instead of thread.start()? bash: syntax error near unexpected token `}' I tried to compile a (flawlessly working) LaTeX document on a different computer, and suddenly was faced with the above error message printed by the xparse package (after that, many errors follow).  I'm working on both computers with miktex 2.9 (and Texnic-Center) on Windows 7 (64 bit).  I tried EVERYTHING I found on stackexchange or anywhere else on the web, including:   Updating all packages Removing the l3 packages and reinstalling them Doing the above for both the current user and in admin mode Removing the complete miktex distribution and re-installing it   for only the current user for "anyone who uses this computer" with all packages only the basic packages  Downloading the newest l3 packages manually from CTAN and copying them into the miktex folder Refreshing the FNDB and updating formats afterwards   Nothing worked. Right now, I'm just out of ideas. ANY suggestions??  EDIT: After performing UlrikeFischer's suggestion, I get different errors. After a long compilation process, this is the log file I get: How to obtain the sum of the following series? $\sum_{n=1}^\infty{\frac{n^2}{2^n}}$ It seems that I'm missing something about this.  First of all, the series is convergent: $\lim_{n\rightarrow\infty}\frac{2^{-n-1} (n+1)^2}{2^{-n} n^2}=\frac{1}{2}$ (ratio test)  What I tried to do is to find a limit of a partial sum $\lim_{n\rightarrow\infty}S_n$ as follows: $S_n=\frac{\frac{1}{6} n (n+1) (2 n+1)}{\frac{1-\left(\frac{1}{2}\right)^n}{2 \left(1-\frac{1}{2}\right)}}$. Still, the limit is $\infty$ and I'm clearly doing something wrong. I have a problem when a lot of figures are in question. Some figures tend to "fly around", that is, be a paragraph below, although I placed them before that paragraph. I use code:  \begin{figure}[ht] \begin{center} \advance\leftskip-3cm \advance\rightskip-3cm \includegraphics[keepaspectratio=true,scale=0.6]{slike/visina8} \caption{} \label{visina8} \end{center}\end{figure}   to place my figures. How can I tell latex I REALLY want the figure in that specific place, no matter how much whitespace will be left? Proving that: $\lim\limits_{n\to\infty} \left(\frac{a^{\frac{1}{n}}+b^{\frac{1}{n}}}{2}\right)^n =\sqrt{ab}$ Let $a$ and $b$ be positive reals. Show that $$\lim\limits_{n\to\infty} \left(\frac{a^{\frac{1}{n}}+b^{\frac{1}{n}}}{2}\right)^n =\sqrt{ab}$$ Counter ions and charge of a complex how can I add the charge and the counter ions to my complex? I'm using chemfig.  \schemestart \chemname{\chemleft[\chemfig{Ni (&lt;:[1]OH_2) (-[2]OH_2) (&lt;:[3]OH_2) (&lt;[5]OH_2) (-[6]OH_2) (&lt;[7]OH_2) }\chemright]}{\ce{[Ni(OH2)6]Cl2}} \schemestop     Thanks! Mathematical induction for inequalities: $\frac1{n+1} + \frac1{n+2} + \cdots +\frac1{3n+1} > 1$ Where did the world go? I was playing on my main world when my laptop ran out of power.  I found a charger and woke it up, but Minecraft had crashed.  Now, it doesn't appear in the world selection screen!  I have verified that it still exists in the Minecraft folder, and the directory contents look to be in order.  Does Minecraft save an internal flag somewhere when it crashes hard?  If so, how do I reset it? Is it possible to switch from one area of graduate study to another in US universities? For example, suppose someone has enrolled in a computer science phd program. Can he switch over to math(or physics) phd program in the same school later?(or say from applied mathematics to pure mathematics?)  What are the steps for doing for doing that? I need to solve $3x^2 + 6x +1 \equiv 0 \pmod {19}$  I saw the same problem here -     but didn't understand how he got to the conclusion   $x(x+2) \equiv 6 \pmod {19}$  and anyway im trying to solve it how we learned in class -   multiply both sides and the modulo by $4a$ then solve the two equations  $y^2 \equiv b^2 -4ac \pmod {4an}$  $2ax + b \equiv y \pmod {4an}$  so I tried multiplying the hole thing by $4a$ , that is $4 \times 3$  and got to $(2 \times 3x + 6)^2 \equiv 36 -4 \times 3 \pmod {19 \times 4 \times 3}$  now I am stuck . any help will be appreciated Is it ethical to omit the PhD credential from my resume? I am applying for a Statistical Programmer position at a commercial research organization (CRO), and I am wondering if it is unethical to omit my PhD in Statistics from my resume?  All of my degrees (Bachelor's, Master's, PhD) are in Statistics, and I am just wondering if it would be ethical to just list my Bachelor's and Master's degree on my resume, and indicate my experience as a RA while I was a PhD student as my "work experience"? (Since this Statistical Programmer position only requires Master's degree plus some years of experience)  I am asking this question because I do not want to do anything unethical/cause me troubles later on. How does a non-mathematician go about publishing a proof in a way that ensures it to be up to the mathematical community's standards? I'm a computer science student who is a maths hobbyist. I'm convinced that I've proven a major conjecture. The problem lies in that I've never published anything before and am not a mathematician by profession. Knowing full well that my proof may be fallacious, erroneous, or simply lacking mathematical formality, what advice would you give me? I've used following codes and no luck  1  //Hide admin footer from admin function change_footer_admin () {     return ' '; } add_filter('admin_footer_text', 'change_footer_admin', 9999);  function change_footer_version() {     return ' '; } add_filter( 'update_footer', 'change_footer_version', 9999);   2  function wpbeginner_remove_version() { return ''; } add_filter('the_generator', 'wpbeginner_remove_version');   3  function my_footer_shh() {     remove_filter( 'update_footer', 'core_update_footer' );  } add_action( 'admin_menu', 'my_footer_shh' );   Still I see those texts and version on my footer.   So what is the accurate way to remove these? I've added these code snippets into my child theme function.php