Are galaxies really structured the way they look in pictures?

Question:
Are real galaxies really structured the way they are in pictures online?
I'm wondering this because if the speed limit of the universe is light speed, which means stuff we see on the sky or detected are delayed. Therefore,
shouldn't galaxies look extremely distorted and not structured like what we see?
Or some clever tricks are taken to make it look correct?
Answer: Although a galaxy may recede from us at arbitrarily high velocities (even superluminally) because space expands, their rotation and motion through space happen at non-relativistic speeds, of the order of a few 100 km/s, or a few 1000 km/s at most. Hence, every part of a galaxy moves with roughly the same speed with respect to the observer, and are thus not distorted.
However, there is another effect that may distort the image of a galaxy, namely gravitational lensing: If you observe a distant galaxy lying behind a massive cluster of galaxies, then the huge mass of the cluster curves space in such a way as to make the light from the background galaxies take slightly different paths toward you. This  distorts the look of the background galaxies (and may even cause it to appear at multiple locations on the sky).
In the image of the cluster Abell S1063 below (from APOD), you see this effect. In fact, by measuring the "banana-shaped-ness" of the background galaxies, it is possible to calculate the mass of the foreground cluster; one of the ways to infer the presence of dark matter.
Answer:
Are real galaxies really structured the way they are in pictures online? I'm wondering this because if the speed limit of the universe is light speed, which means stuff we see on the sky or detected are delayed.

There are a couple of ways to interpret what you're asking and as other answers already address some forms of distortion, I'll mention one that your question suggests to me you may mean.
Using the Milky Way as an example the Sun takes an estimated 200 million years to "orbit" the galaxy.
The Milky Way is about 200,000 light years across, so the time it takes for light to travel the entire diameter is (of course) 200,000 years.
In 200,000 years the Sun would complete about $\frac 1 {10}$th of a percent of it's orbit.
So from a visual point of view of someone in another galaxy observing the Milky Way, that movement is barely visible (if at all).  So the time it took for light to travel the entire diameter of the the galaxy is not enough to affect the appearance to a distance observer due to the difference period of time it takes light to reach the observer.
Answer: Let's first assume that we are looking at a distant galaxy, meaning that the distance to the galaxy is much larger than its diameter. This would mean that the apparent angle subtended by the galaxy is very small (e.g. arcsecond to arcminute range).
The result is the ratio of the distance that light rays from the edge of the galaxy and from the centre of the galaxy need to the observer is approximately one. This means that the time required to reach the observer is nearly the same. Therefore, the observer sees a picture of a galaxy that is not "distorted".
Obviously, for nearer objects, this assumption will not hold. However, the  motions of stars in a galaxy are relatively slow compared to the speed of light and will not contribute much to the distortion that I assume you wrote about.


Can the Network Operator know my whatsapp number on roaming?

Question: If I am roaming and change the SIMcard, is the original Whatsapp data stored anywhere? Is there any way for -let's say the police- to track down all places I have traveled to?
Answer: In Android, actions such as accessing datas, running scripts, calling functions etc. are done by users which are simply applications. Every application got their own data folder that can't be reached by other apps. That includes your Whatsapp data too. Your GSM operator can't reach your Whatsapp data that is stored on your phone. However, since all data transaction is done through Whatsapp servers, should they get the required papers from a court, cops can ask or force Whatsapp to turn in the information the have about you, depending on the jurisdiction you live in.
Additionally, if you have a SIMCard in your phone that is in reach of any GSM towers, GSM company can detect of which tower you get your signal. They can even use satellites to pinpoint your location. But if you haven't at least murdered anyone, I don't believe any court would give that an OK. I don't think cops would try at all.
Also, SIM cards have very low internal storage area to store any actual information on them anyway.


Controlling process priority/Stepper motor missing steps

Question: I have recently started trying to control stepper motors with the Raspberry pi I have succeeded in getting motion. The problem I am having though is that it seems the stepper motor is missing steps and operates very rough. I took my project to a local hacker space here in Chicago "Pumping Station One" to see if the CNC build club could help clue me in on the problem. Their opinion was that certain processes are taking priority and always executing that it may be causing the issue. I hooked my stepper up to an Arduino Uno and the stepper motor performed wonderfully. There was also mention of the Pi not having a RTC on it and the "delay()" function I use in my code for the pulse width might be getting out of sync. Has anyone experienced anything like this before? Is there anything you know of to test these theories? Maybe another explanation?
Comment: Check my question and answer regarding [Realtime](http://raspberrypi.stackexchange.com/questions/8808/zero-crossing-activated-relay) use in Pi, and its caveats (esp. the comments). You can't reliably do continuous PWM with RPi. You could get away with half-stepping, or 900ms long  PWM sequences, but uninterrupted PWM = microstepping is out of your reach, unless you hack the Linux kernel to generate PWM for you.
Answer: don't even try to generate PWM pulses using RasPi.
instead, get any cheap microcontroller, connect it to RasPi over usb, i2c or serial and use it as a dedicated (multichannel?) PWM generator. I've build this to control servos from PC, works for RasPi just perfectly.
Answer: Linux is NOT a real time operating system.

It is event based and managed by a stack by either First In First Out or more rarely used Last In First Out.
The time it takes for the same event to repeat will always vary depending on the queue size.
It is a GPU that can render graphics independently from the secondary ARM, that runs the OS.
It has hardware to help with other things like, Audio, Networking and Universal Serial Interfacing. None of which help with real time operations.

Arduino is a micro controller that processes signals in real time.

It is entirely designed to read input and generate outputs precisely and in a timely fashion.
The hardware is tuned to react to a oscillating crystal so that each cpu cycle takes precisely the same amount of time as the previous one.
The MCU has allot of dedicated built in hardware that does specific tasks to help complete CPU cycles on time.
Even slight variations due to atmospheric changes won't be noticed by hobbyists and even many professionals.

And unfortunately the GPIO's on the Raspberry Pi are for educational purposes only. To learn programming and some engineering.
Combing the Arduino and Raspberry Pi is a match made in electronics heaven!
The cost of an Arduino, or an Arduino shield for the Pi (Like Alamode) and the Pi is still the cheapest option for a extremely powerful prototyping environment that can be used in production sometimes.
We are talking about prices under USD80 for a full operating system with network connectivity, GPU processing, USB interfacing AND real time MCU for all the specialist hardware requirements. If you look around and price together all the shields for an Arduino the price will exceed and you won't even have a third of the features.
Arduino is very easy to learn and has an abundant library of tutorials and code.


Name of error measure based on top |positives| results

Question: I am evaluating a retrieval algorithm. I remember that I read about an error measure which basically entails the quotient of the number of true positives in the top $N_p$ results, where $N_p$ is the number of positives in the set.
$$M = \frac{|TP_{N_p}|}{N_p}$$
I can't remember the name of this measure. Can anyone help me?
Answer: The word you're looking for is recall.


Just curious of the odds of this happening

Question: Was having lunch with a lover on the boardwalk and he pulled a random couple off of the boardwalk to have lunch with us. As we were talking, we discovered that both men had the same birthday, and the woman shared her birthday with me. (Not year; just dates). We pulled out our ids to prove this to each other. What are the odds of this happening?
(It was also weird that she and I shared the same first and middle name, albeit spelled differently, but that's not relevant to this analysis.)
TLDR: What are the odds that a random couple you meet will share birthdays? What are the odds that the birthdays will specifically match by gender?
Comment: Probability calculations relate to events specified before the observation.  This problem arises in various guises in statistics (it's equivalent to getting a hypothesis from data and then using the *same* data to test the hypothesis). See [**here**](http://stats.stackexchange.com/a/1425/805) which gives an example that highlights the sort of silly answers we get if we do that. If you see something weird happen, and go "Wow, what are the odds of that?" you're in effect saying "what are the odds that *something* surprising enough for me to ask about would happen in some period of time",.. (ctd)
Comment: ... (ctd) On that basis both answers really address a calculation for a situation different from the one you're in. If you'd said, just as your companion was first talking to the other couple "I wonder what the chances are that she'll share my birthday and the two men will as well" ... the answers attempt to address that question. If that happened, it would be astonishing. But when noticing *something* 'surprising' *after the fact*, there are *so many* other surprising things that might occur (e.g. the woman grew up in the next street from your companion) --> "different numbers on the dice".
Answer: Let m1 and f1 denote your birthdays (values between 1 and 365). Assume you have distinct birthdays. For the sake of simplicity and without loss of generality you might assume m1=1 and f1=2. Let m2 and f2 denote the birthdays for the other couple.
The probability of sharing the birthdays with the other couple is simply the probability of (m2=1, f2=2) or (m2=2, f2=1) which is equal to 2/365^2 hence

What are the odds that a random couple you meet will share birthdays?

the odds is $\Large\frac{\frac{2}{365^2}}{\frac{365^2 \,-\,2}{365^2}}=\frac{2}{365^2\,-\,2}$ .

What are the odds that the birthdays will specifically match by gender?

Similarly is $\Large\frac{1}{365^2\,-\,1}$
Comment: Just to finish the calculation: Odds of sharing birthdays is 1 in 66611.5 or 2 in 133223. Odds of also matching gender is 1 in 133224
Answer: Assuming all days of the year are equally likely for a birthday, and accounting for the leap year, then there is a $1/365.25$ probability of being born on a given day. Before answering your question, note that the probability of two people sharing a birthday is $1/365.25$.
You want to know the probability of this happening twice (male birthday same as other male birthday and female birthday same as other female). The probability of this is $(1/365.25) * (1/365.25)$, which is roughly $0.0000075$ or one in $133,408$. In other words there are $133,408$ possible combinations of birthdays for two people. If you grabbed a random couple every day at lunch, you would expect this event to happen once every $365.25$ years.
For the second question, note that the probability of your birthday matching either the other female or the other male is $1/365.25 + 1/365.25$. The probability of this happening twice is $(1/365.25 + 1/365.25) * (1/365.25 + 1/365.25)$ which simplifies to $4/365.25^2$.  This is roughly $0.00003$ or one in $33,351$. This would happen roughly once every $91$ years.
For such small numbers the odds are approximately equal to the probabilities.


Did Beethoven assist to rehearsals?

Question: As you may know, Beethoven spent the last decade of his life almost completely deaf. That made me wonder :

Was he a conductor ?
Did he assist to the rehearsals of his concerts ?
Answer: There is a very funny story where Beethoven (whilst conducting one of his symphonies I believe) slightly accelerated through a few bars of the music whilst the orchestra were playing a very quiet section. He failed to hear that they were still on the quiet section, nowhere near finished when Beethoven all of a sudden threw his hands in the air, conducting away at a more louder moment where he thought he was in the score. It took him a few seconds to notice that actually he couldn't hear the more tender section.
Aside from this, he also contemplated suicide many a time, as he found it difficult to content with everyone knowing him as the man with an excellent ear for music, and now this excellent ear, that everyone loved him for - was failing.
He did have access to a few devices like an ear trumpet but  they weren't of much use to him.
There is a great video on YouTube about his personal life story. Well worth a watch, or two or three.
https://youtu.be/aNoZw6Im86k

Did Beethoven assist to rehearsals?


Copy/Paste pose operator not working

Question: I am trying to copy the pose of an armature to another armature. I was, unfortunately, unable to find a solution that would work for me. Both of the armatures have the same amount of bones that are named identically. I tried using the Pose -> Copy pose operator, however when I try to paste the pose into the second armature, nothing happens. Before copying the pose, I first select all of the bones. Are there some specific naming conventions that I have to follow, or could the issue be entirely different? I am importing both of the armatures from an .fbx file. Below is a hiearchy of both the armatures.
Comment: The operations you described work well for me. Would you mind sharing your blend file ? You can remove everything except the two armature and the pose you want to Copy/Paste.
Comment: Thank you for the quick answer, here is the blend file. https://pasteall.org/blend/78f0a6a6a769469890dc719025b552ea
Answer: On your second armature "Armature.001", the mode "Rest Position" is enabled. That prevents you from modifying the pose.
Select "Armature.001", go to "Object Data" properties, then select "Pose position" instead of "Rest position". The Copy/Paste operation should now work as intended.
Comment: Thank you for the tip, I haven't noticed that! However, I am still doing something wrong, or perhaps I have misunderstood the mechanics of armature poses entirely. I have switched the Armature.001 to "Pose position", but I am still unable to reach the desired effect. My understanding was that after pasting the pose, the two armatures should look identical (the bones should all have the same settings as in the second armature). Is this understanding wrong? Currently, when I copy/paste, I do get the little pop-up menu, but nothing happens (at least that I am aware of).
Comment: No, they shouldn't look identical - unless Armature.001 is a perfect copy of Armature ; but, what would be the point ? But "RigSpine1" and "RigSpine2" should have the same relative transform in both armatures.
Comment: Also, I noticed you're in Pose Mode with both armatures selected. As far as I know, it's not a good idea for this kind of operation. You should select an armature in object mode, switch to pose mode, ctrl+c ; switch to object mode, select the other armature, switch to pose mode, ctrl+v. Multi-edit in Blender is a work in progress, so a lot of things don't work "naturally" for now...
Comment: Ahh, that is probably where I went wrong, I completely misunderstood how the posing coordinate system works. I have now noticed in the documentation, that poses are determined by an offset from their rest position, so it makes sense now why "nothing happened" in my eyes (please correct me if I said it wrong).

The root problem for me is that I have a skinned model saved as fbx file and a bunch of animations also as fbx files. The animations are however not skinned, so I have to transfer the animation action to the skinned model. The animations however have different "default" poses.
Comment: And because the default poses are not identical, when I apply the animation to the skinned armature, the animation looks "messed up". I was trying to copy the bone settings, so that both the armatures look identical, but I now see that I misunderstood how poses function. Is there any easy way to achieve my goal? Is it possible to easily skin the animation, or is it possible to copy the "default/rest" pose position to the skinned model, so that the applied animation works properly?
Comment: Thank you for all your help, I have finally found the solution. I will mark your answer as the solution, as the error was on my side for not understanding the mechanics properly. I have also added a link to the post, which contained the information I was after.
Answer: I have finally found the solution to my problem, which was unrelated to the question I asked due to the initial lack of understanding on my side. I was trying to copy the "absolute transforms" of the bones, which can be achieved by adding "Copy transforms" bone constraints to each bone. Thankfully a script exists, which automates the process and produces the results I was after.

Copy/Paste pose operator not working


Edit IDA signal handler

Question: In Ida Pro while debugging linux process with gdbserver I got window that show than SIGTRAP has been arrived, I choose to pass it to application.
How can I edit that choose now? I want to ignore this signal and not pass it to application
By the way,what signals are causing the process to die in linux  ,so I will choose to not pass them to application?
Answer: Debugger > Debugger Options..., Edit Exceptions.

Edit IDA signal handler


NGINX wordpress 404 for all subpages

Question: I have two problems but I think they're related. Subdirectories like /wp-admin, /blog return 404, consequently, permalinks do not work as they follow /blog/category1/page.php
My setup:
I have a server 192.168.1.4 running nginx. On another server, 192.168.1.1 I have an apache web server using virtualhosts which is hosting my wordpress site. The setup works fine without nginx, but when I turn nginx on I have a few issues.
Nginx will not work with permalinks. I have used default, so now its like: http://www.mywebsite.co.uk/?page_id=90 which works fine (as long as its not in subdirectory).
Everything in subdirectory (not in root) breaks. Including admin pages http://www.mywebsite.co.uk/wp-admin, or (before turning off permalinks) http://www.mywebsite.co.uk/blog. They all go to 404, specifically: 404 Not Found nginx/1.4.6 (Ubuntu)
Here is my config:
server {
   server_name mywebsite.co.uk www.mywebsite.co.uk;
   location / {
        index index.php;
        proxy_pass http://192.168.1.1$request_uri;

        proxy_set_header Host $host;
        proxy_set_header X-Real-Ip $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;

        try_files $uri $uri/ =404;
        #try_files $uri $uri/ /index.php?$args; #not working, error: rewrute or internal redirection cycle while interally redirecting to index.php
   }
}

For reference, here is my permalinks: /blog/%category%/%postname%/
Update
Tried adding this to my config:
server {
    ... config above ...
   location /wp-admin/ {
       index index.php
       try_files $uri $uri/ /wp-admin/index.php?$args;
       proxy_pass http://192.168.1.1$request_uri;
       proxy_set_header Host $host;
    }
}

this retrns an error in log:
rewrite or internal redirection cycle while internally redirecting to "/wp-admin/index.php", client: xxxxx, server: mydomain.co.uk`

Comment: The `try_files`'s 3rd path assumes final move out, but this path comes again to this `location`.
Comment: @Deadooshka yeah you're probably right. But this is what a number of posts suggest to do to get by the problems that I'm experiencing
Comment: `index` also makes an internal redirect out of `location`
Answer: You have bits of a working configuration. The purpose of nginx in your configuration, is to reverse proxy to the Apache server. The index and try_files are inappropriate in this case. Try:
server {
    server_name mywebsite.co.uk www.mywebsite.co.uk;
    location / {
        proxy_pass http://192.168.1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-Ip $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
   }
}

Comment: I'm sure I tried this but it's actually working... Thank you so much!
Comment: Please where is the http://192.168.1.1 coming from?
Answer: Why you dont want to try wordpress without apache ?
working config would be like this :
server {
    listen 80;
    server_name site.com;
    root /home/www/site.com;

    access_log /var/log/nginx/log;
    error_log /var/log/nginx/error.log;

    index index.php;

    location / {
        try_files $uri $uri/ /index.php?q=$uri&$args;
    }

    # SECURITY : Deny all attempts to access PHP Files in the uploads directory
    location ~* /(?:uploads|files)/.*\.php$ {
        deny all;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php-fpm/php.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
    }

    location = /favicon.ico { log_not_found off; access_log off; }

    location = /robots.txt {allow all; log_not_found off; access_log off; }

    error_page 404 /404.html;

    location ~ /\. { deny all; }

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

Answer: I found in my case the problem was that mod_rewrite was not enabled. I had to run a2enmod rewrite on the server with apache
Answer: May be you could get your answer here Ultimate NGINX configuration for Wordpress » www.geekytuts.net

NGINX wordpress 404 for all subpages


What is the difference between 乗り越すand 乗り過ごす?

Question: I don't understand the difference between these two words. In my textbook they appear like "miss the stop" (norisugosu) and "pass my station" (norikosu), but they both sound like you don't go out the train when you should.
Comment: What else do you know about these verbs? Do you know how they are written in Japanese? (By the way, a Japanese speaker could ask exactly the same question, saying that in their textbook "miss the stop" and "pass my station" both sound like one didn't get off the train when one should have, even though their difference wasn't explained in the textbook.)
Comment: Norikosu - 乗り越す, Norisugosu - 乗り過ごす.
Comment: @Earthliŋ I know it could also sound weird for a native Japanese speaker in English. I'm just asking what's the difference between them
Answer: 乗り過ごす (nori-sugosu): "to miss one's stop (by mistake)". This happens typically when a passenger was sleeping. After you do this, you usually get on another train going in the opposite direction.
乗り越す (nori-kosu): This can refer to the same thing as 乗り過ごす, but usually refers to something different, "to go beyond one's stop designated by your ticket (intentionally)". This typically happens when you change your destination after getting on a train/bus. After you do this, you usually get off the train near your new destination, and pay for the additional distance at a fare adjustment machine/office (aka 乗り越し精算).


Travelling with a boxed/sealed ipad to the UK

Question: I bought my boyfriend an iPad Pro for his birthday. I am travelling from New York via Dublin to to Aberdeen, Scotland. Am I okay to take the unopened and sealed iPad in my carry on? Will I be asked to take it out of the box?
Answer: Security at your departure airport may ask you to take it out of the box, although it's unlikely: security do reserve the right to more closely inspect any electronic device.
Customs will not require you to remove it from the box unless they have suspicions that the box contains something other than an iPad. They may, however, require you to pay customs duties (in this case, VAT) on the iPad if it was purchased outside the UK and is being imported.
If you remove the iPad from the box, you will likely not be asked to pay VAT since customs have no real way to differentiate between a device you're bringing for yourself and intend to take home, or one you intend to leave in the UK. That said, you should still declare it, even if you are unlikely to be caught out.
Comment: I can confirm a similar experience around sealed vs opened (or rather no box).  Sealed = brand new = importing; no box = item for personal use = not importing.
Comment: AIUI removing it from the box makes no legal difference. If it's value is over the threshold (it is), it was purchased outside the EU and you do not intend to take it back out with you then you need to declare it and pay the duty/VAT.
Comment: @PeterGreen that's why I said I won't comment on the legality - although I may amend my answer slightly to make it sound less like "No box = legal"
Answer: The following is my understanding, IANAL this is not legal advice.
There are two sides to this, security and customs.
Security will open something if they can't figure out from the x-ray whether it is ok to go on the plane or not.
Customs will open something if they belive it may not be what it appears to be.
So both would be within their rights to open the box but in practice are unlikely to do so.
Afaict your ipad pro is over the VAT threshold, so assuming it was bought ouside the UK and your boyfriend lives in the EU then to be legal you need to go to the red customs channel, declare the item and pay the VAT (and possiblly customs duty).
If you were bringing the ipad for your own use on a visit to the UK and intended to take it back out with you when leaving then it would be "reasonable personal effects" and you would not need to declare it.
I'm not sure what the legal situation is regarding a gift where the recipiant is only in the UK on a temporary basis, such that the item will be re-exported but by a different person to the one who imported it.
AIUI being in or out of the box doesn't change the legal status of the item, but it does change how suspicious customs are likely to be if you explicitly or implicitly* claim it is part of your personal effects.
* Remember walking through the Green lane is a customs declaration even though you don't normally fill out any forms or talk to anyone.


Program to open .fig files saved by Matlab

Question: Is there any program able to open .fig files saved by Matlab?
Comment: You mean, besides Matlab itself? :-)
Answer: Update 29/04/2016
According to johnml1135's answer, fig files are essentially just mat files, and johnml1135 figured out where the various plot elements are stored, for converting a fig file to a Python plot.
Original
According to the answer here the fig file saved by Matlab is in a proprietary binary format. I don't know of any other software capable of loading this format.
Your best option is probably to have the figure saved as a pdf/png from within Matlab depending on the type of figure.
Possible workaround
I recently noticed that octave will load a fig file as a structure, so if you're stuck with trying to open fig files without being able to access Matlab you could try and write an octave function that will load the fig file and reconstitute the plot from the contents of the struct. This would probably require knowing prior information about the plot though.
Comment: Actually, Python/SciPy can read the files as seen [here](http://stackoverflow.com/a/36923358/2140414).
Comment: @johnml1135 : Thanks for the link to your solution - it seems then that fig files are just mat files and you've figured out the structures that the various plot items correspond to - nice!
Answer: As mentioned by @mutzmatron, .fig is not easily opened, but this is mostly due to it being poorly documented (not sure about proprietary aspects...). As can be seen here, there is a simple format to them quite similar to .mat files, which might give you another direction to go in.
I've always been quite fond of plot2svg. It exports Matlab figures (most anyway) to the non-proprietary vector format SVG.
Comment: Yes, it's buggy, and Mathworks should start supporting it natively! Pros and cons are too numerous -- it deserves its own post. Most relevant for me has always been that SVG is supported by most browsers natively, whereas PDF support has always been difficult. Also, image conversion from PDF to something else can be a pain, whereas SVG has never treated me badly.
Comment: I tried `plot2svg` once and found it a bit buggy - but I was mostly wondering what the pros and cons are to svg over pdf?
Answer: Create a script (for example FigViewer.m) containing simply the command figure and compile it by running

mcc -e -v FigViewer.m

from the Matlab command window. This way you get a platform-dependent application that runs on any computer with the right version of the Matlab Compiler Runtime installed, which is freely available. If you are looking for further information on the Matlab Compiler, use the MathWorks homepage instead of Google since some information is available only behind a login screen and thus cannot be found by Google.
Answer: Python through SciPy has the ability to open a fig file (scipy.io.loadmat), which is really just a mat file by another name.  This post can show simple line plots with labels, etc. but can easily be extended.  It is fairly straightforward to grab the data from it as well.
Answer: As it turns out, there is actually a command in matlab itself that lets you save any figures you want to file in whatever format. Try this:
print('theNameYouWant','-dpng')

This lets you save the figure to a png file which can then be opened by numerous applications like MS Paint or Paintbrush on Mac


Fan is constantly running after 15.10 update

Question: Updated to Kubuntu 15.10, after that the fan is running constantly.  I've installed tlp, fancontrol, etc.
Sensors show a CPU temperature of only 50°C.
I've got a GT620M but run the offical nvidia driver.
Any Ideas?
Answer: Just installing fancontrol is not enough; you have to set it up.
Run

pwmconfig

I have an nVidia 560Ti. I have used fancontrol for just about every release since 14.04. 15.10 has proven no difference.
When you run pwmconfig, pay special attention to the prompts and status of your fans.
If fancontrol is already runnin (but not properly setup), you must first stop the service with
service fancontrol stop

Then, run
sudo pwmconfig

Follow directions closely while listening for fan activity. Do the detailed fanspeed/rpm correlation. Allow pwmconfig to make a a config file for you. Be sure to
5) Show Configuration

before you exit. You may need to go back and retest a few things.
Finally, if everything is setup according to planned,
/etc/init.d/fancontrol start

will setup the fan to be controlled via the temps assigned earlier.
To start this automatically in ubuntu 15.10, I hope it is the same as previous version: just setup a SXX.fancontrol file in the appropriate rc directory.
All feel free to add to my post.
Comment: Yeah I did that , the problem was more or less sensors did not recognize it and therefore i could not setup fancontrol
Answer: Had a similar problem.  Was resolved by sorting out the bumblebee system.  The update to 15.10 installed new nvidia drivers, which were not initially used.  Another symptom was optirun glxgears complained the bumblebee daemon was not started.
I edited my /etc/bumblebee/bumblebee.conf file, so that the version of the loaded driver matched that chosen in the "System Settings->Software and Updateds-> Additional Drivers".  This was changed in 3 places in bumblebee.conf: KernelDriver, LibraryPath and XorgModulePath .
After that, sudo service bumblebeed start, and I watched the temperature drop, and the fan go off.


Discover all websites that point to an IP address

Question: Our company owns over 60 domains and a few external IP addresses (several domains share an external IP address).  How do I discover all the domains that use a particular IP address (e.g. 69.x.x.7) without going through the DNS information on each domain?  The particular webserver is running Windows 2003 and IIS6.  Thanks, in advance, for your help!
Answer: If you know the web sites in question you can simply do an nslookup on them, which can be done via a batch file.
I suggest that when you get this information you use it to start the documentation that will allow to to easily look up the answer to such questions in the future.
Comment: +1 on documenting this disaster (& developing/implementing/buying a system to keep track of it in the future so your documentation stays up to date!)
Answer: The place to look is your DNS data.  Your DNS administrator(s) should be able to to tell you which A records exist for the the address.  As noted above you also need to get them to find all the CNAME records which point to one of these CNAME records.
If you know all the domains your company owns, you may be able fetch the data using zone transfers.
Answer: Reverse IP can do what you want.
http://www.domaintools.com/reverse-ip/
These people charge for a big/long list of domains, but who doesn't...
Comment: Ah, sorry dude. I'll be sure to stop recommending them.
Comment: I just gave it a try and for the IP address I tested it indicated there are 82 domains, whereas in reality there are 154. Hardly worth paying for that result.
Answer: You can use the IIS administrative API to enumerate your server's settings, including bindings.  Have a look at this post from David Wang.  There's a nice example of a script that'll do it, including your IP bindings.
You should also be able to look in the IIS metabase for details on your server config.  The location is <code>%systemroot%\system32\inetsrv\MetaBase.xml</code>.
Answer: Try This.  It's free, but may not necessarily be 100% accurate.
Comment: Relies on reverse DNS, which may or may not exist.
Answer: Domaintool's Reverse IP may get you all the A records, but it's going to miss any CNAME records, subdomains, or forwarded domains.  The lack of a centralized authority for this kind of information makes this particularly difficult.  That was all hashed out in this question.
If you're also hosting DNS on Windows Server 2003, you can accomplish the same thing for free by searching for your IP addresses in all the files in %SystemRoot%\System32\DNS.  Alternatively, if you can get even read access to the zone files from your DNS host, you might be able to do something similar.
You'll still have to come up with another way to handle CNAMEs though.


Spammers are trying to take advantage of this site. Shouldn't actions be taken, before things get out of control?

Question: I've noticed spammers with blatant usernames like ChineseHulu.com and Chinese.Tutor.Frank, who have extensive advertisement in their profiles, and are spamming random questions just in order to advertise themselves. They seem to have found the wrong place for spamming. Shouldn't administrators delete those promotional questions ASAP and block/delete those users? If no action is taken, then other spammers might think this site is an easy target and swarm in, therefore quickly deteriorating its quality and putting the community at risk.
Comment: Sadly you can't report a user's profile(and as I understand it's OK to leave contacts/self promotion in user's profile), the only thing you could do is probably flag their posts, But what do you put for the reason"asking questions that they actually know", or are they "gaming the platform"? I am not sure. But I believe people will flag their post(I personally will) if they went too far.
Comment: The questions and answers from those two accounts look decent enough. However, it is a violation of site terms to use them for cross-voting. The moderators can choose to merge duplicate accounts or tolerate them. However, if you believe the user is trying to game the system, do flag those posts up so that moderators can take a closer look. I believe they have the proper tools to look out for these. Meanwhile, if the questions and answers are of low quality, you can down-vote once you earn enough reputation.
Comment: Unless they are consistently promoting their own sites/services via questions and/or answers, then I don't see a problem with it.
Answer: Are user names that represent domains allowed?
Policy on display names
The consensus is that unless the username is blatantly offensive, there's nothing wrong with self-promotion via username (or their profile as an extension). Plus if they are contributing useful content, there is no downside.


How do you recover a Facebook account without supplying a government issued ID if the DOB is set to 1900?

Question: My friend set their DOB to 1/1/1900 and forgot their password. Now they can't log in. When they try to reset their password, it asks them to verify their DOB, but the options only go back to 1905. I even tried opening the developer console and changing the value 1905 to 1900 manually and submitting, but it still wouldn't accept it. How can they recover their account without supplying a government issued ID?
Answer: I don't think there is anyway to set it to 1900.
Additionally, your friend violated Facebook Terms of Service. It does not make sense to recover an account via verification that intentionally gave false information to being with.
On the sign up page

Facebook requires all users to provide their real date of birth to encourage authenticity and provide only age-appropriate access to content. You will be able to hide this information from your profile if you wish, and its use is governed by the Facebook Privacy Policy.

Under Facebook Terms, here is what you need to be aware of

Registration and Account Security
Facebook users provide their real
  names and information, and we need
  your help to keep it that way. Here
  are some commitments you make to us
  relating to registering and
  maintaining the security of your
  account:

You will not provide any false personal information on Facebook, or
  create an account for anyone other
  than yourself without permission.
You will not create more than one personal profile.
If we disable your account, you will not create another one without our
  permission.
You will keep your contact information accurate and up-to-date.

Your friend's option at this point I guess is that he/she somehow keeps being persistent with trying any contact to Facebook support (however as stated above I doubt this will happen)
The other option is make a new account (possibly from a different IP) and hope Facebook doesn't lock it down next time.
Comment: I changed my mind. This is a bad answer. The only way is to burn your email and make a new one? What if the person had that email for a long time? Facebook doesn't even have a way to update the info? That's just retarded. Part of your answer says "without our permission", but they don't even have a way to contact them!
Comment: @Chloe how about next time you don't use fake birthdays.
Comment: It wasn't my account. @phwd I'm thinking this will be the failure of Facebook. As Americans have more & more money, 3rd world scammers will try to hack into American Facebook accounts. Facebook will respond by creating obstacles for Americans to verify accounts. However, Americans will have more options and choices, and it wouldn't be worth their time or effort to jump through the hoops, and so will abandon Facebook altogether. Already my dad had his account locked too, and he just won't bother or deal with it. Time will tell...
Comment: @Chloe lol yes because only America exists on Facebook it's clear you don't want an answer you have an agenda. Please consult elsewhere.
Comment: I definitely would like an answer, but this isn't an answer. It can be summarized as "Your friend is SOL" or "Make new account". The more people I hear about being locked out the more I dislike it and see it as unjust and unfair.
Comment: @Chloe Your friend broke the TOS and you want an answer other than obvious. Yes, your friend is out of luck. Make a new account and get over it.


Is there a way to clear the terminal screen during a running process?

Question: For example, I'm running tail -f someLogFile. My screen has gotten full to the point that only the last line is changing. I now want to clear the screen; but the usual Ctrl+L doesn't work, just shows me the output ^L.
Answer: Using Ctrl + L Won't work as input from keyboard is not accepted, but you can do this:
Toolbar options of Terminal > Terminal > Reset and clear
This will do the trick!
Comment: Ah... I'm using guake at the moment which doesn't have a menu bar. But yes this would work on the default terminal.
Comment: Then best option will be to redirect the output i.e. use `$ command > output.txt` This will write all the output in file output.txt
Answer: For Ubuntu (16.04) :
Go to Terminal > Preferences > Shortcuts (tab)
Under Terminal Section set Shortcut key for "Reset" and "Reset and Clear", which is disabled by default.
Hope this helps!
Answer: ctrl+L unfortunately doesn't work during tail.
There are a few things you could do. If you are using the default unity terminal, you can go to Terminal > Reset and clear.
If you are not using a graphic terminal or you're using a different terminal The best thing you could do is run the log into a text file using
tail -f /foo/bar > ~/output.txt

then you can view it using a text editor. That would let you scroll the file manually.
Answer: This will vary depending on what terminal client you are using.
Alt+F8 cleared the screen in my cygwin terminal (or right-click and choose "clear" if you are running from Windows).
PuTTY and other terminals probably have similar behavior.


How do I add text to an object mid animation?

Question: I have a cube which changes colour at frame 10 & 20 then changes size at 30 but at frame 40 I want to add text. I also want the text to change colour at frame 60. I cannot find a tutorial about this.
Answer: You can use text object (Shift+A>Text) or create a texture with no background and text on it and add it to the cube and mix color You like the text to have with cube color using Alpha channel of this texture.


Contract job (hourly rate) as a 1099: How much would I be making after taxes?

Question: I have an opportunity that would pay me $70 an hour but it would be corp to corp, which as far as I understand would mean I would need to do all my own taxes and Social Security.  I live in Raleigh, NC with about 3-4 dependents.  Roughly how much could I expect to be making an 80 hr pay period after taxes?
Comment: Does this assume you have no other income?
Comment: My wife does work, but does not have any benefits.
Answer: There are way too many details missing to be able to give you an accurate answer, and it would be too localized in terms of time & location anyway -- the rules change every year, and your local taxes make the answer useless to other people.
Instead, here's how to figure out the answer for yourself.
Use a tax estimate calculator to get a ballpark figure. (And keep in mind that these only provide estimates, because there are still a lot of variables that are only considered when you're actually filling out your real tax return.) There are a number of calculators if you search for something like "tax estimator calculator", some are more sophisticated than others. (Fair warning: I used several of these and they told me a range of $2k - $25k worth of taxes owed for a situation like yours.)
Here's an estimator from TurboTax -- it's handy because it lets you enter business income. When I plug in $140K ($70 * 40 hours * 50 weeks) for business income in 2010, married filing jointly, no spouse income, and 4 dependents, I get $30K owed in federal taxes. (That doesn't include local taxes, any itemized deductions you might be eligible for, IRA deductions, etc. You may also be able to claim some expenses as business deductions that will reduce your taxable business income.) So you'd net $110K after taxes, or about $55/hour ($110k / 50 / 40).
Of course, you could get an answer from the calculator, and Congress could change the rules midway through the year -- you might come out better or worse, depending on the nature of the rule changes... that's why I stress that it's an estimate.
If you take the job, don't forget to make estimated tax payments!

Edit: (some additional info)
If you plan on doing this on an ongoing basis (i.e. you are going into business as a contractor for this line of work), there are some tax shelters that you can take advantage of. Most of these won't be worth doing if you are only going to be doing contract work for a short period of time (1-2 years). These may or may not all be applicable to you.
And do your research into these areas before diving in, I'm just scratching the surface in the notes below.

Retirement plan. You can set up an Individual 401(k) account and stash "up to" $49k tax-free (you wouldn't qualify for this much though). Or you can open a SEP IRA (which is a bit cheaper and simpler to set up), and save around $35k tax-free.
Health care. You don't mention if you have a spouse who works, and if you have health care through that employment. If you get a high-deductible health plan and establish a Health Savings Account, the premiums for the insurance should be deductible, and you can save up to $6150 in the HSA which is deductible. (To be clear, I think the health care premiums you pay are deductible whether you have HDHP+HSA or not, but check with your accountant first.)
Disability insurance. It will take you a couple of years to have a track record before you'll be able to buy it, but disability insurance premiums may be deductible. Be sure to talk to your accountant first, though, because choosing to deduct these premiums can have large consequences in the event that you need to collect on this insurance.
Answer: In addition to taking into account your deductions, as mentioned by @bstpierre, you also need to account for vacation, and other time off such as sick days. You also need to estimate what percentage of the year you expect to be working and pro-rate your salary accordingly.  For example it is not uncommon to use 40 weeks out of the year which is about 77% of the time.  Also check to see if you would be eligible for unemployment for the times you are not working.  I suspect not.  But in any case, you might want to use worst case scenario figures to see if it is worth it, especially in this economy.
Comment: Another thing to watch for is a capped-hour contract with a government agency or large company. If you have to work extended hours, it's possible to get in a situation where you run out of hours in the contract and end up getting kicked out at an inopportune time (usually at the end of a fiscal year when issuing new contracts is difficult)
Comment: @duffbeer703 - if you've hit your cap on hours, then shouldn't that mean you've earned "as much as you could" for the year .. even if it's only been in 8 months?
Answer: Does your spouse work? That's one factor that can put your income into a higher bracket.
The one difference to note is you will pay 2x the social security portion, so even though not "federal" tax, its right off the top nearly 13%.
I'm not familiar with your states tax. It's really worth dropping the $75 on a copy of the software and running your own exact numbers.
Answer: If it's just you working, I'd use a ballpark figure of 35% owed - it may be a little high or low, but it's a safe margin to keep set aside for paying your liabilities at the end of the year.


Eb major question

Question:
The first  and sencod note is one step, so in Eb major, do you think that Eb is the first note while send note is Fb or E# makes sense ? Why is F?
Answer: In any key, the scale representing those notes (in order) need to each have a separate letter name. This is so that when written on the stave, each note has its own line or space. So, there's an E,F,G,A,B,C and D. One of each. In Eb, there are 3 flats, due to the spacing of each note - 1>2 tone, 2>3 tone, 3>4 semitone,4>5 tone, etc. So E, A and B need to be Eb Ab and Bb.
If the second note was Fb, as you suggest, it would only be a semitone from the root - it would be wrong. It can't be called E# (enharmonic to F), as there's already an E of some sort, and we try not to mix # and b anyway.
Comment: Hi, Tim. Eb is lowering semitone to E and Fb is raising semitone to E, so Eb to Fb is tone and Eb to F is a semitone+tone, am I right? Thanks for the note for not mix # and b. ;)
Comment: @Lee - E lowered a semitone gets to Eb. Fb is rarely used, as it's the same note as E, and E works in most cases. Eb >Fb =semitone, Eb>F = tone. If you use a keyboard with these notes, it's easier to understand.
Comment: Hi,Tim. Like you mentioned above, so E>F is semitone no matter in C major or Eb major, Right?
Comment: @Lee - in 12tet, E>F is always a semitone, the key has no bearing on it at all, major or minor. Find a keyboard or even a picture of one, and you can count the steps easily.
Answer: All major scales follow the following pattern of Whole steps (W) and Half steps (H): W W H W W W H.
All letters must be represented in alphabetical order (A, B, C, D, E, F, G, etc.)
So and Eb scale would be:
Eb   F   G    Ab   Bb   C   D     Eb
do   re  mi   fa   sol  la  ti    do
I    ii  iii  IV   V    vi  vii*  I
This is why Ab is called Ab, not G#.  You can not have the same letter twice and all letters must be represented.  And why F is called F, not E#.
Hope this helps.
Comment: The Roman numerals are used to represent chords which are made from each note in a key. The caps are major, lower case minor. Thus in Eb, iii=Gm. The solfege only works for moveable do, as fixed do is always C, making Eb then mi bemol (in French). It's a minefield!
Answer: You can think of f as e#, but why would you want to? Musicians are trying to play two things in their head at the same time, so we want to make it easy for them. If we say e# they have to calculate that this means f. Why give them the extra step?
Comment: Also, E# doesn't exist in the key of Eb, because there's already an E - Eb.

Eb major question


What happens when you put (pour) water on water with the same density? (Archimedes)

Question: Suppose you have a glass of water, and you pour on it a volume V of water of the same density; if we consider the archimedes principle, what happens to the water that is poured? Does it float, sink, not move?
Comment: Why not try for yourself? Add some food colorant to the water and pour.
Answer: Archimedes Principle will not cause the poured water (at the same density) to float or sink. Generally however, the incoming water will sink due to its downward momentum, in proportion to the pouring height above the water surface, easily overcoming the surface tension of the incumbent water.
Any air bubbles trapped in the incoming water will then rise to the surface, along with some water surrounding it. See the picture below.
If you would like to view the interaction of the two bodies of water, you could colour one of them with a dye that insignificantly varies the water density, and then conduct the pour testing. Alternating which one (dyed or not) you pour should allow you to draw a confident conclusion.

Photo courtesy of https://www.dreamstime.com/royalty-free-stock-photos-pouring-water-image1790388
Answer: Archimedes law expresses relates the difference between actual weight (ideally weight in vacuum) to apparent immersed weight (weight in the medium) to density. This is through the following formulations:
Apparent immersed weight = Weight of object - weight of displaced fluid ...(1)
Weight of object/ weight of displayed fluid = Density of object/ density of fluid ...(2)
Since the object here is water with the same density, the above equations show that there is no apparent immersed weight. This means that the buoyant force (on the added water) is exactly equal to the weight of the (added) water, thus the added water will remain suspended wherever you add it.
Now, where you add it is a bit complex since it necessarily involves fluid dynamics, not just statics. Some water will sink due to momentum, as mentioned in the previous answer. Some will splash. Depending on the height of the splash, it could sink or remain at the surface. Once all these dynamic situations cease, each drop/unit of water will remain where it is.


Upgrading drush under Windows using self-update

Question: I installed Drush on a W/XP workstation using MSI and want to upgrade it.
I've tried using drush self-update but the suggestions it gives all seem to pertain more to Unix installations than Windows.
The best suggestion looks like drush dl /path/to/drush but I'm not 100% sure what the /path/to/drush would be on a W/XP system.
Answer: If you stick to using the Pear installation method for Drush then you can just update all Pear modules (or just Drush) at will. I don't even see the selfupdate command in Drush 6.2, but it just may be hidden now.
Answer:
In WinXP the folder to copy into is C:\Documents and Settings\All
Users\Application Data\Drush. The Application Data directory is also a
hidden folder. (Please see above instructions regarding hidden
folders).
There is an extra folder named classes (containing one file named
DrushRole.php) in the unzipped drush-All-versions-5.x-dev that was not
in the download on the Windows 7 machine. I went ahead and copied it
over with all the others into the C:\Documents and Settings\All
Users\Application Data\Drush directory with all the rest of the
folders and files.
Source : https://groups.drupal.org/node/265678

You can read more about upgrading drush on Windows XP, by this article


Is Philosophy simply the appreciation of wise thoughts?

Question: I was reading a post called "Why Do Philosophers Ignore Ayn Rand?" by John David Ward, and the author stated the following: "Philosophy is basically about the appreciation of wise thoughts, not the development of new ones". I was wondering if this is what everyone agrees upon because this seems limiting?
Comment: I doubt many philosophers would agree with that definition.
Comment: The philosophy of language tag is used for questions about the philosophy of language, a specific field of philosophy that examines topics like the nature of meaning, reference, and intentionality. This question is about the definition of philosophy, which is not what the philosophy of language is about. I think a better tag would be something like meta-philosophy because you're asking about what philosophers think the purpose or practice of philosophy itself actually consists of.
Comment: Is he suggesting that Ms. Rand is providing us with some new thought?
Comment: The word "philosophy" has more than one meaning: you are using it to denote a sort of "attitude". But it means also (and primarely) a [discipline](https://en.wikipedia.org/wiki/Philosophy) : "the study of general and fundamental problems".
Answer: I would say that few philosophers would agree with that definition.  Philosophy, from its linguistic origins in Greek, is "the love of wisdom" (φιλοσοφία).  Calling the "love of wisdom" "appreciation of wise thoughts" is like saying the football fan who decorates his car in his team's colors and holds giant parties when his team makes it to key games is "someone who likes sports."  It's an understatement to a sufficient degree that it becomes reasonable to question whether it is even a truth.  Such phrasing is indeed useful if one is actively dismissing philosophy (as Ward is), but those who call themselves philosophers are highly unlikely to accept it.
As a single example, I'd draw on my personal favorite philosopher Alan Watts.  In his lectures, he provided his definition for a philosopher:

A philosopher is a sort of intellectual yokel who gawks at things that sensible people take for granted.

Now Watts had a poetic tendency with his words, but even here we see a difference between his opinions and that of Ward.  Watts does not describe a "stiff," who merely passively appreciates the ideas of philosophy like an art critic appreciates art.  Watts describes a vibrant artist, who is actively experiencing the rich ideas that flow around them.
If you follow more of Watt's lecture in which he provides this definition, you will find he has great disdain for the "9 to 5 philosopher," who only does philosophy at his desk.  This 9 to 5 philosopher would fit well into the definition Ward provides, but Watts clearly considers these to be an inferior sort of philosopher, and holds the term "Philosopher" to describe someone quite different.
Answer: This is a reflective view and as such should be taken seriously. But I don't think it will quite do.
1 Philosophy needs a criterion for, or some way of telling, which thoughts are wise and which aren't. If this criterion or way of telling is a part of philosophy, then philosophy is not just the appreciation of wise thoughts - in addition to the appreciation it needs and includes the criterion (or more realistically, a set of criteria).
2 Philosophy at least since the time of the Ancient Greeks has been concerned with puzzles, aporiai - not just with these but certainly with these. How do we resolve the paradox of Epimenides the Cretan : 'All Cretans are liars', which is true on condition that it is false and false on condition that it is true ? Picking our way through this paradox is not just a matter of appreciating wise thoughts.
3 What is also missing from the characterisation of philosophy as the appreciation of wise thoughts is that a reflection on its own character or nature, a self-reflectiveness, is an essential part of philosophy. Is philosophy conceptual analysis ? high-level theorising about the fundamental nature of reality ? continuous with science or an autonomous discipline ? Philosophy is abuzz with such self-reflective questions, which can't be bracketed inside the restrictive formula of 'appreciation of wise thoughts'.
4 Finally, at least here, philosophy is home to various sorts of scepticism. If we can't know anything, as some sceptics suggest, then we can't know that some thoughts are wise and so cannot appreciate them.


Definition for Chiral Spin Liquid

Question: What is the definition of chiral spin liquid?
Especially what does chiral mean here?
I encounter a lot of terminologies with chiral. It seems they mean differently in different contexts. If you could generally answer what chiral means, it would be great.
Answer: A 2D chiral spin liquid (CSL) is a spin liquid state that breaks time-reversal and parity symmetries. For a CSL system with open boundaries, there may be chiral edge states propagate in only one direction, which is analogous to the case of integer quantum Hall effect.
Generally speaking, I think chiral, in a sense, means a particular direction, which is usually associated with broken time-reversal symmetry.
Answer: X.G. Wen first introduced the idea of chiral spin state (not necessarily spin liquid) in his paper. As Kai has mentioned above, the state breaks time reversal symmetry.
It's partially characterized, for example on a triangular lattice, by
$E_{123} = <S_1\cdot(S_2\times S_3)>$
If the system has T, then $E_{123}=0$ since spin operator $S$ is odd under T. Thus, a nonzero $E_{123}$ suggests a CSL.
A recent technical and detailed classification based on PSG on CSL is here.

Definition for Chiral Spin Liquid


How To Access Repeater's Items Randomly

Question: I have a repeater with an ItemTemplate contains a CheckBox, TextBox
My repeater represents a check list plus a TextBox to put a comment to each item I select from the list.
Now, I've a page for editing an existing shopping cart in my database and it uses this repeater to enable the user to update his list. So I need to update the List with the previous selected values from the database. I can't think of a simple logic or way to access only the repeater's items that are on the previous list   ...I'm thinking about trying to access each item that's in my database only instead of looping and looping.
I know It's really confusing so I'll just put it in a more illustrative way:
Database View
Items
=======================
ID     Name
---    -----
1      Banana
2      Apple
3      Strawberry
4      Orange

ShopCart_Items
========================================
ItemID    ItemName     CartID     Value
-------   ---------    -------    ------
2         Apple        1          1
4         Orange       1          2
2         Apple        2          2

PageView
First the repeater is populated with all the items that I have in my 'Items' table and no boxes check or anything.
Then I choose a specific cart (say cartId = 1) to edit, and here's what I'm really confused on how to do:
Now the repeater will have like 15-20 items, so I need to access just the items that the user choose on the current cart (cartId = 1) that the user want to edit, so he could know what did he choose and start choose new values, check/uncheck CheckBoxes, etc.

I'm sorry for all this long question, but I'm really confused should/can I access each item directly or what logic do you advice me to use ? ..Thanks =)
Answer: I believe that you have mix two different entities in a one repeater - an orders and order items.
In my opinion the better approach is to place two repeaters onto the page: the first one for displaying orders and the second one for displaying order items for the selected order. This way you may use simple SqlDataSource controls for both repeaters and add a ControlParameter to the datasource used for retrieving order items depending on current order selection in the first repeater.
Comment: Ok I didn't understand u quite well, if you can illustrat your idea with some code that would be great .. and btw how about having a hidden field and on RowDataBinding I get a counter and add 1 to each HiddenField created ? ..Sorry for my late but I have some work issues =)

How To Access Repeater's Items Randomly


I want to know the place of publicationa and publisher name

Question: In reference to the patent: US4464123
Comment: It's a US patent. Are you asking who owns it?
Answer: Any patent application information for a US patent can be obtained from this link (USPTO). The information retrieval is pretty simple and I'll walk you through it so you can do it yourself here forth. I feel that the question I'm addressing here is generic and It would be great if this answer is linked for future questions regarding USPTO information retrieval. I'll try to make it as elaborate as I can so it's easy for anyone to obtain the required information. Click the link and lets get started.
1.As soon as you're on the site you will be asked to verify that you're a human being with the help of a captcha code. Go ahead and verify your existence.
2.Next, you will be asked to fill in the reference number of your document to retrieve the relevant information. Here you'll have to choose the right column to enter your document number.
These are the options:

Application Number (If you have the application number)
Control Number (If you have the control number provided by USPTO)
Patent Number (If the patent is granted)
PCT Number (If you have thePCT application number)
Publication Number (If the patent is an application)
International Design Registration Number (If it's a US design reference)

3.Choose the relevant column and fill in the details. Remember to remove the kind code when you enter the number. Kind codes are the prefixes to the reference number. For eg. For the document under question US4464123, remove US and enter 4464123 in the patent column as the document is granted. It should take you to the Patent Application Information Retrieval page.
4.Here in the application data tab you'll find all the relevant information you need. While you're here you can choose the Assignments tab and see all the assignments of the document under question.
There you go, you have your information. I'm gonna go ahead and answer your question but I would recommend you to confirm my answer by cross checking it on the USPTO site.
The document under question is a US patent document and hence its place of publication is United States. And I'm assuming you mean the applicant's name when you talk about publishers name and for the document under question it is WAYNE GLOVER , ODESSA, FL (US).
Hope this helped!


Matter beyond the event horizon should time travel?

Question: when anything passes the event horizon of a blackhole, it must be moving faster than light as even light cannot escape. So then, shoundnt it time travel?
Answer: I think you may be mistaking something here. The event horizon is the point which light can't escape because of the black holes extreme gravitational influence not because the black hole is pulling it in faster than c nothing can go faster than c.
If you mean time dilation this question doesn't make sense still because anything going c or greater than c can't experience time there is no reference. Hope this helps.


What test to compare two frequencies?

Question: In my project I have to study the vigilance behaviour of birds, and I need to determine if adults start escaping from an approaching human more often than chicks. So I have the frequencies of adults starting the behaviour, and the frequency of chicks starting the behaviour.
What type of statistical test would be most appropriate to determine if there is a significant difference between adults and chicks in starting the behaviour? I have been reading that some people suggest a t-test but I'm not sure it would be appropriate. I was thinking of a Fisher exact test but I am not sure since it usually compares two categorical variables, and here I have one.
Answer: If 69 of 100 adults started first and 161 of 300 chicks started first, then you can use prop.test in R to see if the proportion of adults starting first is significantly greater (one-sided test). The observed proportions for adults and chicks are $\hat p_A = 0.59, \hat p_c=0.537.$ The question is whether the observed proportion of adults starting first is significantly larger.
The P-value $0.0036 < 0.01 = 1\%$ shows that the null hypothesis $H_0: p_A = p_C$ is rejected in favor
of the alternation $H_a: p_A > p_C$ at the 1% level
of significance. On account of the moderately large
sample sizes, I have declined the continuity correction
(with paramater cor=F)
prop.test(c(69,161),c(100,300), alt="greater", cor=F)

     2-sample test for equality of proportions
     without continuity correction

data:  c(69, 161) out of c(100, 300)
X-squared = 7.2157, df = 1, p-value = 0.003613
alternative hypothesis: greater
95 percent confidence interval:
 0.06372501 1.00000000
sample estimates:
   prop 1    prop 2
0.6900000 0.5366667

Except for syntax of usage and details of output, this
test is similar to a chi-squared test on the relevant
$2\times 2$ table of counts, where columns are for Adults/Chicks and columns are for First/Last.
However, the chi-squared test is usually considered
to be two-sided, so the P-value is double that for the
the test above.
TAB = rbind(c(69,31), c(161,139))
TAB
     [,1] [,2]
[1,]   69   31
[2,]  161  139

chisq.test(TAB, cor=F)

        Pearson's Chi-squared test

data:  TAB
X-squared = 7.2157, df = 1, p-value = 0.007227

Notes: (a) An advantage of using chisq.test is that if data are too sparse for the P-value to be considered
useful, then one can use parameter sim=T to
simulate a possibly useful P-value.
(b) Fisher's exact test could also be used for
sparse data; it also uses a table as input.

What test to compare two frequencies?


How does Powerline cope with line fluctuations

Question: I have a powerline (Ethernet over power) between two sockets in the house. And it seems to work even when I turn some heavy load (ie hairdryer, washer, etc) to the point even the lights dim for a second... And the powerline does not skip a beat. How does it do that?
Comment: Because it operates internally at a much lower voltage and doesn't care.
Comment: You have "Powerline" in the title suggesting a brand (proper) name and "powerline" twice in the post indicating an unknown object. Which is it? Capitals matter. Welcome to EE.SE. With regard to the question, how do you know it doesn't skip a beat? You'd have to use something like Wireshark to monitor the network for transmission errors to be confident in that claim. There could be errors all the time that are sorted out by re-transmission.
Comment: Why shouldn't it do that?
Answer: First, because communications-over-power schemes run the communications at some frequency well separated from the power line frequency.  Dimming the lights for a second is an event that happens in the frequency range of roughly 0 to 120Hz -- your Ethernet-over-power will be running at 100kHz to 100MHz, depending on the scheme.
Second, because it's Ethernet, so when (not if) the equipment on the power line inject some noise in there that interferes with a packet, the network will retry.
Answer: Most communication devices and protocols are pretty much adaptive to the changing properties of the media used.
In general, it starts with some extra power on the transmitter side and an automatic gain control (AGC) stage at the receiver. In more sophisticated cases the receiver contains also an automatic equalizer and the protocol allows for negotiating the power used by the transmitter. The protocol may also be able to retransmit the lost data packets invisibly to the upper network layers. That's o
Regarding to the Ethernet over power, you are not changing the media (in the Ethernet sense) properties much by plugging in a kilowatt or two of load. You are (probably) connected to the same power transformer that powers 10 or 100 more households where everyone plugs and unplugs everything as they see fit.
I assume Ethernet over power cannot cross the power transformer because the transformer is profoundly frequency-dependant. OTOH, I have seen Ethernet over power to work flawlessly between houses accross the street. Different Ethernet-over-power networks are isolated by encryption and not physically.


What kind of window glazing is this?

Question: I need to replace a broken window pane and have been watching several DIY videos on the subject. There are so many glazing types to secure in the windows and I'm wondering if anyone can tell me what type of glazing this is and if this is a common easy DIY project.
Comment: If you can, carefully pull off glass to expose the inner edge, and then post a picture of it.
Answer: At a quick guess from a blurry picture, that looks like a double-pane "thermal glass" unit (very common in modern windows) and probably  requires taking the sash it is in (aluminum or vinyl?) out of the windowframe and dissassembling to replace.
Anything involving glazing putty and points almost certainly does not apply here.

What kind of window glazing is this?


Mean field theory and neural networks

Question: Mean field algorithm has been proposed to be used in combination with convolutional networks and recursive neural networks. What is the purpose of doing this? Is the goal to estimate a probability distribution which can be used for the loss function (to perform maximum likelihood)?
Comment: Can you provide more details about where this was proposed and what the context was?
Comment: Here is a paper: https://arxiv.org/pdf/1606.07230.pdf references 24 and 26 propose some similar techniques.
Answer: The use of probablistic models is a common way to formulate the problem of semantic segmentation, but the interest is in assignment of labels to pixels not the uncertainty associated with the labels. Markov random fields and recurrent neural networks are commonly used as a refinement step to improve performance.
In semantic segmentation you want to assign discrete label  $w \in \{1 . . . M\}$ to each pixel so that we know which of the $M$ objects is present, and we want to do this based on image data $I$. Now the adjacency of pixels in $I$ has a grid structure, so it's natural to want to encourage smoothness on the $w_i$. A classical way to do this in computer vision is  by imposing a grid-based graphical model such as pairwise  Markov random field model as a prior on the pixels.
$$
P(w) = \frac{1}{Z}
\Pi^J_{j=1}
\phi_j(w_{C_j})
$$
where Z is the normalisation constant, $\phi_j$ is a potential function and $C_j$ is a clique in the graph. Inference in these types of models is okay as long potentials are convex and the cliques are small. Unfortunately, non-convex potentials and large cliques are natural things to want because they better model real images.
The work that you mention in [26], is based on the paper in [18] in which they define an approximate inference algorithm for a full connected CRF (another type of graphical model). In particular, in [26] they start with fully connected CNN (a popular way to do semantic segmentation) which predicts pixel labels without regard for structure and then the refine the predicted pixels with a CRF. The trick is that they show that the mean field algorithm for training the CRF can be approximated by a sequence of CNN layers, and thus that CRF model can be approximated by RNN. This lets you train the CRF part and the fully-connected CNN part at the same time.

Mean field theory and neural networks


Domain accounts cannot log into this website - why?

Question: I have re-created an IIS7 site hosting an asp.net application. The old site allowed both local and domain accounts to log in.
The new site is working fine for local accounts, but no domain accounts can log into the site.
My settings:

Authentication: Only Windows Authentication is enabled. Negotiate & NTLM providers.
Authorization: Anonymous access denied; all others are allowed.
Domain users have read access to the wwwroot directory (is this even necessary?)

When I access the site as a domain user, IE9 asks my credentials repeatedly, eventually yielding to HTTP Error 401.1 - Unauthorized.
*Update: Binding is related. If I set the binding to use host header "x.y.com", and access the site via http://x.y.com, I get the error (local user accounts can authenticate, domain users cannot)
Binding to localhost:80 works fine for domain and local accounts.
Answer: The solution is to make sure the NTLM windows authentication provider is at the top of the list. "Negotiate" was denying access.


What is the proper function for multi dimensional localized menu?

Question: What is the proper function to get multi dimensional localized menu in Drupal 7?
after searching, I found i18n_menu_localize_tree(), but I didn't get it as tree menu.
Should I use i18n_menu_translated_tree(), or did I miss something?
Answer: menu_tree($menu_name) Seems to do that. It runs the items through  _menu_item_localize.
It works if your menu is translatable. In my setup menu items were not assigned to language, but translated with 18n_menu from site default language.
This atleast gets translated menu. Localized menu might imply also to version where certain items are only shown with specific language active(in that case this answer migth not work).
Answer: If you use the i18n_menu module for menu translation/localization, you can indeed use the i18n_menu_localize_tree() to retrieve the localized tree of an original given menu tree.
$tree = menu_tree_all_data('main-menu'); // Depending the requirements, you can use menu_tree or menu_tree_all_data

if(module_exists('i18n_menu')) {
    $tree= i18n_menu_localize_tree($tree);
}


User Authentication Dialog in TortoiseSVN

Question: I have saved the username and password in user authentication dialog. After some days it shows the dialog for username and password. I didn't clear the cache from SVN. I don't know why its throwing the dialog. any idea?
Comment: Put them again what's the big deal?
Answer: Check your Subversion configuration file (on Windows, it's in %APPDATA%\Subversion\config): http://svnbook.red-bean.com/en/1.7)/svn.advanced.confarea.html#svn.advanced.confarea.opts.servers
Set store-auth-creds on to cache user name and password.


If a court orders mining pools to seize funds, they will modify their software to do it, or be shut down' - can this happen?

Question: I thought nodes could prevent this too.  but if enough miners did do this, what could happen in worst case?  thanks in advance for responding
Answer: To spend some BTC, the network's nodes will require a valid cryptographic signature on the transaction that consumes the UTXO in question. Each UTXO is locked to some bitcoin address, and to create a signature that is valid for that address you'll need knowledge of the private key used to derive/create that address.
So a miner is not in any sort of privileged position to spend coins that are not theirs, since they do not have knowledge of everyone else's private keys. No matter what a court mandates, the miner will be unable to legitimately spend coins they don't own. Any attempt to do so would be easily identified as cryptographically invalid.
A miner could start creating blocks which move arbitrary coins to addresses of the miner's choice, but these transactions and blocks would be rejected by the rest of the network of nodes, so it would be of no consequence to the network. The miner creating these fraudulent transactions would simply be ignored.
Each network node is an individual instance of the code, working to independently verify the state of the network. Even if every miner started to break the rules, the nodes would simply ignore them (and we'd expect some miner to eventually capitulate and start mining valid blocks again, since they will gain profit for doing so, and otherwise lose money by mining invalid and useless blocks).
Comment: @user100601 happy to help. I would generally recommend ignoring whatever faketoshi has to say, save for the comedic value of his ramblings.
Comment: thank you chytrik for your excellent answer - having faketoshi say this was very disconcerting .  and your response is how, i thought, i understood it to be also - so having u validate my reasoning is reassuring.
Comment: yes i agree but unfortunately for me (and prolly others) we are the local bitcoin expert (and i am no expert ,but having read Andreas' book i am the closest thing to one -to those around me - lol.  so when i get these questions - i am not good enough yet to answer with certainty.  so again, thanks for the help


oxford dictionary database for NLP

Question: I am using NLP for sentiment analysis ,so I need to determine the type of speech , can any one help me where can I download dataset/database  for oxford dictionary?
Answer: AFAIK, the Oxford dictionary is not freely available.
As an alternative,
you can download The Gutenberg Project hosts Webster's Unabridged English Dictionary plus many other public domain literary works.

DictionaryDatabase - Project converter The Online Text Plain English Dictionary (OPTED) to SQLite database and JSON

oxford dictionary database for NLP


HAProxy configuration file

Question: Where it is located? Sometimes I see it under /etc/haproxy.conf, other times at /etc/haproxy/haproxy.cfg. IF both reside, which one precedes then?
Answer: If you look at haproxy manual, you can read:
haproxy  -f  <configuration file> other options...

So, the config file is not optional. It has to be specified when haproxy is started. So, you need to check your startup file such as /etc/init.d/haproxy.
Answer: my configuration as of the moment resides on /etc/haproxy/haproxy.cfg.
just run the config using proper permissions.

sudo haproxy -f /etc/haproxy/haproxy.cfg

HAProxy configuration file


Ethernet Transmission with one MAC and Multiple PHYs

Question: I have been recently learning about ethernet subsystem. I see that the MDIO interface is shared across multiple (upto 32) PHYs from a single MAC and each PHY's state can be accessed using the 5-bit PHY address. But can I route the MII/RMII signals to individual PHY or a subset of PHYs connected to the MAC and transmit the data only through those PHYs? Or Can the MII interface only be shared with all the PHYs and all PHYs simultaneously transmit the same data received from the MAC?
Answer: Typically, a set of MII lines are connected from the MAC to a single PHY. The reason for multiple addresses for MDIO is for SOCs that contain multiple MAC modules and for switch chips. The MII from each MAC module connect to its PHY. However, to save pins on the SOC, there will be only one set of MDIO pins. The MACs will share these lines communicating with their PHYs, selecting each one by address.
In the case of Ethernet switch chips, where there would be many PHYs attached, there will be multiple MDIO sets to connect to subsets of the PHYs.
Comment: Thanks DoxyLover, I am a bit confused on the Ethernet switch chips. Do these chips have multiple PHYs attached to a single MAC? Why are they different to typical setup?
Comment: No. Normally, there is a MAC (or the equivalent) for each port. The thing is that on a switch, as opposed to a hub, each port can be processing packets simultaneously so separate MACs are required.
Comment: Awesome, this clears things up. I found this text on [link](https://en.wikipedia.org/wiki/Management_Data_Input/Output#Electrical_specification) Wikipedia: "The bus only supports a single MAC as the master, and can have up to 32 PHY slaves." I guess this actually means that, "The MDIO interface could be shared by multiple MACs. But at any single point of time, the bus only supports a single MAC as the master, and can have up to 32 PHY slaves."
Comment: @gmancity Really the MDIO master doesn't have to be a MAC. In reality, it's probably a CPU. Also some types of connection can have multiple PHYs in a chain.


Can't select the actual object

Question: i have no idea what did i do, i can't select objects anymore well i still can select the object, however everytime i tried to transform it a yellow dot appeared and i just can transform the yellow dot. On the transform tab the object is 'transforming' however i don't see any difference i can't move scale or rotate the object, it feels like the object is represented by the yellow dot. sorry for the poor explanation, english is not my first language. here's a screenshot. the tv is the object i want to move, the yellow dot moves instead the tv is completely still
Answer: Maybe you have accidentally enabled the Affect Only Origins option (shortcut Ctrl.):

If enabled, you can only move the objects' origin.

Can't select the actual object