Spiral around cylinder
Helix on a cylinder
I need to somehow retrieve the client's IP address using JavaScript; no server side code, not even SSI.  However, I'm not against using a free 3rd party script/service. Is there a way (eg. a binary hack into Finder) to stop it from creating .DS-Stores on LOCAL Volumes?   I am using Leopard, therefore these don't work:    (requires Lion)  (requires Snow Leopard)   Also,  slows down my computer. Model Selection: Logistic Regression I have made a script that will sort files according to their extension and place them in the proper folder. For example, place abc.jpg in the directory jpg.  #!/bin/bash #this script sorts files according to their extensions oldIFS=$IFS IFS=$'\n' (find . -type f) &gt; /tmp/temp for var in `cat /tmp/temp` do name=`basename "$var"` ext=`echo $name | cut -d'.' -f2- | cut -d'.' -f2- | cut -d'.' -f2- | cut -d'.' -f2- | cut -d'.' -f2- | cut -d'.' -f2- | cut -d'.' -f2-` mkdir -p $ext mv "$var" $ext/ 2&gt; /dev/null done IFS=$oldIFS   problem with this script:    it involves use of IFS, it is said to avoid use of IFS, as much as possible it does not sorts file without file extensions  it will sort files like abc.tar.bz in folder named bz, but however such a file should go in tar.bz folder see line 9 of my script; if any file contain more no. of dots(in its name) than no. of cut -d'.' -f2- in the script than if will result in file name taken in extension part. for example, a file named i.am.live.in.india.and.i.study.computer.science.txt will be placed in folder named study.computer.science.txt   you may also suggest any tweaks to make this script more smaller and neat. I never liked that SO/SE relied on the external gravatar service, so I was glad to . However, it turns out that one cannot use as profile picture a PNG file with transparent background (something that is supported by gravatar):    Above is a screen capture of my profile page, with a profile picture that has a transparent background. That background is turned into black, which I suppose is a bug.  The method of upload doesn't change anything (I uploaded it manually to imgur, but the same black background is observed). See the difference between the two following URLs:  http://i.stack.imgur.com/Da3ex.png?s=128&amp;g=1   and  http://i.stack.imgur.com/Da3ex.png   The problem is thus in the resizing code from imgur. How to parse JSON in Java Correlation coefficient between a (non-dichotomous) nominal variable and a numeric (interval) or an ordinal variable I've already read all the pages in this site trying to find the answer to my problem but no one seems to be the right one form me...  First I explain you the kind of data I'm working with...  Let's say that I have an array vector with several names of city, one for each of 300 users. I also have another array vector with scores response to a survey of each user or a continuous value for each user.  I would like to know if exist a correlation coefficient that compute the correlation between these two variables so, between a nominal and a numeric/continuous or ordinal variables.  I've searched on the Internet and in some pages they suggest to use the contingency coefficient or Cramer's V or Lambda coefficient or Eta . For each of this measure the just say that they could be applied for such data in which we have a nominal variable and interval or numerical variable. The thing is that searching and searching, trying to understand every one of them, sometime is written or watching the examples that they are reasonable to use them if you have dichotomous nominal variable, except for Cramer's V, other time is not written any requirement for the type of data. A lot of other pages say that is right to apply regression instead, that is right, but I would just simply like to know if there is a coefficient like pearson/spearman for this kind of data.  I also think that is no so properly to use Spearman Correlation coeff since the cities are not sortable.  I have also built the function of Cramer'sV and Eta by myself (I'm working with Matlab) but for Eta they don't talk about any p-value to see if the coefficient is statistically significant...  In the matlabWorks site there is also a nice toolbox that says to compute eta^2 but the kind of input it needs is not understandable.  Is here someone that have done a test like mine? If you need more detail to understand the kind of data I'm using just ask me and I'll try to explain you better. Using biblatex and Biber, I want my bibliography to say "Ph.D. thesis" (with periods) rather than "PhD thesis" (without). MWE:  \documentclass{article} \usepackage{biblatex} \addbibresource{refs.bib} \begin{document} Hello \cite{testphd} \printbibliography \end{document}   and refs.bib:  @thesis{testphd,   title       = {Thesis Title},   author      = {Surname, Firstname},   date        = {2010},   institution = {Faculty of X, University of Y},   type        = {phdthesis},   location    = {Somewhere}, }   Output:    What's the easiest way to do this? I don't want to change the .bib file ideally. Is there a documentclass that produces 'endless' pages? Does anybody know of a documentclass that produces a page that has a fixed width and a variable length, depending on the actual content that needs to fit on the sheet? I'm trying to get something like a kind of scroll if possible. Read a file backwards line by line using fseek I have just installed Ubuntu on my pc. Everything is working fine but the Wifi is not working properly When i am trying to connect to a network it is not working and showing error "Activation of Network Connection failed ". Sometime i am able to connect to the network but the network strength is very week. My PC uses realtek driver for wifi.  Here's the output of lspci; lsusb      00:00.0 Host bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register (rev 21) 00:02.0 VGA compatible controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller (rev 21) 00:13.0 SATA controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SATA Controller (rev 21) 00:14.0 USB controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller (rev 21) 00:1a.0 Encryption controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine (rev 21) 00:1b.0 Audio device: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller (rev 21) 00:1c.0 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #1 (rev 21) 00:1c.1 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #2 (rev 21) 00:1f.0 ISA bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU (rev 21) 00:1f.3 SMBus: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx SMBus Controller (rev 21) Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 006: ID 5986:065e Acer, Inc  Bus 001 Device 005: ID 0bda:b720 Realtek Semiconductor Corp.  Bus 001 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse Bus 001 Device 003: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory Bus 001 Device 008: ID 2717:ff80   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   output of usb-devices | awk '/b720/' RS=  T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=04 Dev#=  5 Spd=480 MxCh= 0 D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1 P:  Vendor=0bda ProdID=b720 Rev=02.00 S:  Manufacturer=Realtek S:  Product=802.11n WLAN Adapter S:  SerialNumber=00e04c000001 C:  #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=500mA I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I:  If#= 2 Alt= 0 #EPs= 6 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8xxxu   How to fix this issue?? Does "Going Infinite" necessarily end the game? I have an older Nvidia video card and my PC crashes when installing the driver for the video card in Ubuntu 16.04. When I get to the login screen but no further: after entering my password, the system went into a loop and returned always back to the login screen [with funny stripes present].   How do I fix this problem? How should I unit test multithreaded code? Greatest common divisor of two positive integers I know that Greatest common divisor of two positive integers $a$ and $b$ is the largest positive integer that divides both $a$ and $b$, but how can I use that to prove that $\gcd(a, b) = \gcd(a, b-a)$. If $A + A^t = 2I$ then $\det(A) \geq 1$ Windows 7 SP1 Windows Update stuck checking for updates I installed Windows 7 fresh and installed SP1. Now, when I try to check manually for Windows Updates it just hangs on the Checking for updates screen.    I tried running the tools in , but this did not fix the issue either:  No matter what I do it just hangs on the "Checking for updates..." screen and goes no further. Color of questions with accepted answers on user profile page Related to these questions:    When viewing the Meta user profile, the difference between questions with accepted answers and questions without is pretty subtle. At first glance, I couldn't tell the difference at all. Can the contrast between the styles be increased a bit to make it easier to see?     This screenshot doesn't look too bad, but when looking at a list going down a whole page, it gets a bit difficult to pick one out at a glance. (I'm guessing even more so for some of the color-challenged users) Any examples of life forms on Earth that could have survived on Mars or Moon? Limit of derivative is zero. Does it imply a limit for f(x)?