Screen flickering Ubuntu 16.04 Intel graphics 620

Question: I have recently switched to Ubuntu and my screen flickers when I watch videos. I have searched the forum a lot, tried the Intel graphics tool, modified the grub file and it's still flickering. I have read that some bug associated with Intel graphics got fixed in kernel version 4.10 and up so I don't know what the problem is.
My laptop is a Dell Latitude 7280, i7, Graphics: Intel HD Graphics 620 (Kaby Lake GT2), Ubuntu 16.04 and kernel version 4.13
Also, I tried connecting to a different screen with HDMI and it flickers there too.
Thanks.
Comment: I've found the same problem on a Dell Latitude 7280 with Ubuntu 20.04, but it only occurs when the CPU is idle -- if you force it to be busy (e.g. run `dd if=/dev/zero of=/dev/null`) then it doesn't flicker.  Haven't found a better fix yet than this hacky workaround, and the only current answer doesn't work for me, but if I do find a fix then I'll answer this question!
Answer: I had been experiencing the same problem with my Dell Vostro 5370 and Ubuntu 16.04 LTS.
This is how I solved it:

Go to "Software & Updates" application
Under "Additional Drivers" tab, you should find "Intel Corporation: Unknown" section.
Choose "Do not use the device"

Because DKMS will "pollute" your kernel until you purge the kernel using apt-get. The way I did is:

reboot to an older working kernel (to choose different kernel in boot menu, you might want to check out How to get to the GRUB menu at boot-time?)
use $ dpkg -l | grep linux-image to check what kernel you have installed
use similar commands to # apt-get purge linux-image-4.4.0-73-generic linux-image-extra-4.4.0-73-generic to purge linux completely
install latest kernel back by version if you wish: # apt-get install linux-image-extra-4.4.0-116-generic
Reboot your computer and good luck!

If you are not so lucky that you have a functional kernel, you would probably either work under the flicker screen or use the old console without GUI.


Pronunciation Dilemma

Question: How acceptable/appropriate is the pronunciation of words such as "Christian" and "fortune"/"fortunate" with a [t] sound as opposed to [ʃ]? I personally prefer the former but I believe that it's not that common. Still, I'd like to hear what others have to say here.
Comment: If you pronounce words like this with /tj/ in the U.S., you'll sound like you learned British English. But if you pronounce *fortune* as /ˈfɔːtjən/ in England (as opposed to words which *are* sometimes pronounced with /tj/), you may just sound like you don't know English very well.
Comment: I think this is an AmE/BrE difference. Nobody pronounces [Christian](http://www.merriam-webster.com/dictionary/christian) with a /tj/ in AmE, but the pronunciation is present in [British](http://www.oxforddictionaries.com/definition/english/Christian) dictionaries. And I have heard British speakers pronounce words like this with /tj/, although maybe not the specific words *fortune* or *Christian*. The pronunciation /ˈfɔːtjən/ is not in any of the British dictionaries I've checked, so I suspect that particular word is very rarely pronounced with /tj/ in either dialect
Comment: if you think the director is going to retake a scene because one of the actors pronounced *fortune* in a somewhat too-modern manner ... movies and TV series often have accent coaches, but much worse mistakes than that end up slipping through.
Comment: @PeterShor Fortune or Fortunate pronounced with a "tj" don't implicate that one hasn't received a proper education. In fact, only recently I watched a TV series, Pride and Prejudice, the 1995 version, the character of Mr. Collins - David Bamber demonstrates the "tj" usage in it; I also remember Gwyneth Paltrow opting for this usage in Shakespeare in Love. These are renowned artists and people often tend to imitate their style, which makes me think that this is more a question of preference than of acceptability.
Comment: Both of these productions are set quite a while ago, when people pronounced things differently. Of course, you wouldn't actually be able to understand them if they authentically pronounced English the way they did in Shakespeare's time, but maybe the actors are using some archaic pronunciations for these shows set in the past.
Comment: I'm afraid that's not the case, because in the same series another actor makes the "ʃ" usage for fortune. The phrase goes something like - "Oh, I'm fortune's fool".
Comment: @Peter Shor, if you search for Baltimore Shakespeare Factory you'll find that authentic Shakespearian English *can* be understood in the 21st century.
Answer: I'm British and we would never use the [ʃ] sound in any of these words, always a /t/. In British English the [ʃ] sounds American or (when spoken by a Brit) lazy.
Answer: In British English they are pronounced with a [tʃ] i.e. somewhere in the middle of the two. I would regard just the [t] as being a little too stilted and the [ʃ] as a little too lazy.
Answer: /t/ is palatalized to /ʃ/ when it precedes the -ian and -ion suffixes. (Well, "Christian" has like two different pronunciations, depends on speaker), except when preceded by S, where it becomes /tʃ/.
/t/ is palatalized to /tʃ/ when it precedes the -ure suffix (e.g. nature), as well as in fortune and its derivatives.
In several American dialects (though not all) /t/ is often retracted to near /tʃ/ when preceding the R sound. (betrayal, nitrogen, try, train, Tracy, etc.)
Comment: The cases of -ure and "fortune" are separate. I don't know why I missed -stion.

Pronunciation Dilemma


Can Peltier Modules be used as an Air Conditioner?

Question: Air Conditioners are very expensive so I'm planning to build a split type air conditioner using Peltier modules for my sealed room that is 6.5 length, 7 feet height, and 5.6 wide. I plan to use nine modules. To cool the room, the cold side will be attached to a copper heatsink with pc chassis fans to circulate cool the warm room air in between the heatsink layers. To cool the other side, I'm going to insulate the hot side and I'll use a liquid cpu cooler with coolant where the radiator is placed outside the room. To increase the efficiency of the modules, I'll use a voltage regulator which can adjust from time to time. The cost source all of the parts is 60% lower than buying an air conditioner and the power usage per day is also lower as far as my computation. Is it practical or are there any designs/modifications that can make it better?
Comment: 9 modules of what size? What differential you want?
Comment: The cheapest air conditioner at Walmart is $109 USD and would provide way more cooling than such a small room would need.  Is your problem that air conditioners don't exist for your minimal cooling load?  I find it unlikely in the extreme that you can beat the cost/performance of an imported window unit.
Answer: Your calculations are probably wrong. Peltier effect coolers are known to be extremely inefficient in converting electrical power into useful refrigeration. This is why they are not commonly used in things like home refrigerators and air conditioning units, where heat pumps are far more effective.
The figure of merit for refrigeration efficiency in things like air conditioners is called the coefficient of performance or COP. Try looking up the typical COP of a Peltier effect device versus the COP of a heat pump as used in a refrigeration-type  air conditioner.
Answer: A useful measure for this comparison is the COP (Coefficient of performance) which measures ratio between the heat energy transferred over the energy used.
The following is a theoretical prediction of the COP a Peltier element, with respect to temperature difference.

For a split unit heat pump, you can find different values but in most cases, the COP of the heat pump is greater, when the temperature of the cool side (where the heat energy is drawn from), is close or above 10 $^oC$.

In the image, I've circled the 25$^oC$, on the green line, because at that point the temperature difference is 20$^oC$.  In that image the COP of the heat pump is just over 5.

$\Delta T$
max COP Peltier
COP Heat pump

10
2.5
~7

20
1.2
~5

30
0.7
~4

So, to sum up, the efficiency of the Peltier is not very good. Given the size of the air-conditioning market worldwide (and the lack of moving components i.e. easier maintenance), I would have thought that if there was a performance/cost benefit, it would have been exploited. (To be honest I am guessing that although the cost of your components is only 60% the retail value of the airconditioning of similar size, the cost of the equivalent  components for the heat pump should be in the order of 20 to 30% of the total cost).
In any case, IMHO the only scenario where you might have a benefit is  if you have a small temperature difference and the heat source is sub zero (where conventional heat pumps underperform).


Why was my question locked after edition?

Question: Recently, I asked a question. Another user edited it a little. But now I see it's locked for about one hour. Why did it happen? Did I do a bad thing to deserve it?
Comment: The word "edit" is a verb and also a noun e.g "It was **a** useful **edit**" The noun "edition" means a copy for sale, or a version of a text.
Answer: I merely locked it against comments.
I did this because, per usual, within a few moments of the question's appearance people had already begun answering in comments, something which is not allowed because it breaks the Stack Exchange model.
It is not otherwise locked in any way.
This was the timeline:

2023-10-07 17:43:48Z: Question posted.
2023-10-07 17:48:00Z: Answer posted in comment.
2023-10-07 17:48:36Z: Question edited.
2023-10-07 17:48:42Z: Answer in comment deleted.
2023-10-07 17:48:54Z: Question locked against comments for an hour.
2023-10-07 17:56:25Z: Answer posted in answer.
2023-10-07 18:48:56Z: Question unlocked against comments.
Comment: I think you didn't realize it. I didn't mention the question which was about makeup. I meant the question that was about "word". It got locked just minutes after I published it. No comments were added yet at the time. The only thing was that the question got edited a little by a user (and it was a good edition). Thankfully, the question is going to be unlocked a few minutes later. But it's strange for me why it got locked at the first place.
Comment: @SnackExchange Actually, there was an answer posted in a comment. I deleted it. See the timeline I've added to this answer.
Comment: Gods forbid people should learn the simple answer to their simple question without paying homage to the all-consuming Stack Exchange model, which is known not to work in ELU anyway. The hell with the  the Stack Exchange model.


What would be an english translation for "手中法訣"?

Question: By "手中法訣", I mean where their hands are rapidly moving in certain patterns in a special movement, but I don't know what's it called (if there's a name for it) nor how to say it english.
Comment: Find one on wiki. http://naruto.wikia.com/wiki/Hand_Seals. So maybe "hand seals" is what your looking for?
Comment: Or is it "mudras", which is basically the same as "hand seals"?
Comment: Like in the ones they used in Naruto? I never read the English version. But I think it should count as a type of maneuver.
Answer: First of all, what you are saying doesn't even exists in Chinese.
Chinese magic emphasis ritual and 心法口诀. It never specifically mention any gesture. Let alone a combination of multiple gestures.
So your translation is determined by what magic system you use.
If your system is based on naruto. I think you already got the answer.
If your system is based on western magic. The I think "spell" is the word you are looking for.
Answer: Over here, I'm taking an educated guess here but I think you may be focussing on Chinese Taoism/Taoists or something that focusses on "fairy/divine/immortal" (仙) where there is an element of magic/Taoist spells being involved that are composed of rituals, symbols and hand movements.
A less literal translation would be "invocation" as in the invocation of a spell or magic.


Persistent mild knee pain due to squats - push through or stop?

Question: Over the last 2 months or so of doing heavy squats (200 lbs - 262 lbs) I've frequently had pain in my knees. During the last 2 weeks, it's been especially persistent and seems to be mostly in my left knee. I'm normally sore after working out, especially in my legs and lower back, but the knee pain seems to persist long after the other pains go away.
What does it feel like? Well, it's on the front side of the leg, centered just below the knee cap. By "below" I mean "in the direction of my foot", not "closer to the bone". It's hard to describe the sensation exactly. It's kind of a pulling/burning feeling. It feels somewhat different than muscle soreness elsewhere, but I don't feel like anything's grinding or scraping or popping. It's not a "sharp" pain.
As far as intensity goes, it's not excruciating. Actually it's mild enough that I feel that I could ignore it when doing my squats and continue performing my workouts as planned. I'm just not sure that's a good idea. It is bad enough though that running for more than a minutes or so is a very unpleasant idea.
I do not feel any pain when standing, sitting, or walking. I do feel it whenever I ascend/descend at all. Getting up from a chair, walking up or down a flight of stairs, and of course when doing squats. I also feel it when running.
I've tried skipping a couple workouts, and although the pain seems to gradually get better with time, 5-6 days is not enough to get rid of it, and it comes right back when I resume my workouts. I had been more or less ignoring it for the last month or so, but since it's now preventing me from running, I'm getting more concerned.
I have also tried using a foam roller on the muscles surrounding my knee (but avoiding the knee itself). This seemed to help with some other pains/soreness I'd had, but not with the knee pain.
I'm 95% sure the pain is caused by my squatting. It always gets worse during/after I squat. I squat just below parallel, with a shoulder-width stance and my feet pointing outwards about 15 degrees. I try to keep my knees following that 15 degree direction, pointing in the direction of my feet, when I descend. Historically I've done 5 sets of 5 reps, but more recently I've been doing 3 sets of 5. I rest about 5 minutes in between sets.
So, should I be concerned about this, if so how should I handle it? Is it likely that I'm doing something wrong? Should I take a couple weeks off from squatting and running? Ignore it and keep going? Deload significantly and work back up so my body adapts more? See a doctor? I know you are (probably) not a doctor and not qualified to give medical advice. I'm just hoping to find out if this (1) ignorable, (2) a concern, but something that can be solved with a period of rest and/or dealoading or (3) a big problem I'll need professional help with.
Update 2011-09-09
Update: I saw an osteopathic doctor yesterday. He told me my tendons and ligaments were fine. In fact he said "your ligaments look like they're built to take a lot of punishment!". He diagnosed patellofemoral pain syndrome AKA "runners knee". He told me the inside of my knee cap had become rough. He prescribed R.I.C.E (Rest, Ice, Compression, Elevation) as well as a twice-daily stretching regimen, and weighted leg extensions 3 times a week. He also suggested I take ibuprofin, especially if I'm doing anything to aggravate my knees. He told me recovery could take 6 weeks or more, but call him if I didn't see a significant difference by the end of the month.
So at this point I'm going to follow the routine the doctor gave me for the next 6 weeks or so, and avoid squats, deadlifts, and running. I will continue doing the other exercises I'd been doing (bench press, overhead press, rows, and pull-ups). I may also try swimming if I feel like doing cardio (but I'm a terrible swimmer). After I feel I've recovered I'll start squats with about 50% of the weight I was last doing (262 lbs was my peak work weight) and I'll work my way back up. I'll have someone check my form then too.
Thanks for the answers. They helped me to realize that this wasn't something I should ignore, and that my squat form was likely at fault. I'm marking Dave's answer as "most helpful" for the strong suggestion to see a doctor, which I did. But I also really appreciate Berin Loritsch's answer for the form tips and the TUBOW suggestion especially.
Comment: @Dave - I'm pretty sure what I asked is exactly what you suggested. "how should I handle this" is in bold. I guess it could be read as a request for a specific diagnosis, but I was really only expecting one of 3 possible answers: (1) This is a normal consequence of squatting and you needn't be concerned. (2) It sounds like you might have a minor injury, try taking a couple weeks rest and then trying again or (3) This sounds like it could potentially be serious and you should see a professional. Based on the 2 answers I've received so far, I've ruled #1 out.
Comment: @Dave - I'll edit my question to sound less medical.
Comment: I think we should avoid the medical side of this question by modifying it to ask "how should I handle this situation" and "to whom should I go to get this checked out" or "is this problematic" instead of "diagnose this medical issue".
Comment: My concern was the very specific description of symptoms, then "why do my knees hurt" repeated twice. On first pass I wasn't sure, but the first part of parkker's question pushed my concern over the edge. We can discuss on Meta if you prefer.
Comment: Try squatting less deep. That will probably help.
Comment: Shallow squats often make the problem worse.
Answer: That sounds like a ligament or tendon issue, which could be serious. I would worry about your squat form: perhaps your knees are tracking forward, or your stance is too narrow, or you're coming off your heels, or perhaps something else is going on that no one can figure out through the Internet.
Whichever one it is, it doesn't sound like a muscle problem. It sounds like a joint problem that you need to get looked at by a coach/physical trainer, or doctor. Or both. (The doctor is there to diagnose the issue, but don't let them convince you to stop squatting or lifting for the rest of your life.) If I were you, I would:

Stop squatting for a couple weeks.
Go to a coach who knows the squat inside and out, and have them do an extensive form check. (This would entail a significant deload.)

I believe Mark Rippetoe sums it up aptly: "[If] you squat wrong it fucks things up. If you squat correctly, those same fucked-up things will unfuck themselves." It's kind of important that you find someone who can tell you what's wrong and how to do it right so that the corrective process can begin.
Comment: I just want to recommend [this](http://www.runningwritings.com/2011/09/injury-series-tendon-remodeling-part-ii.html) article as well because it helped me.
Answer: Very likely it might be a form of tendinitis caused by some form problems.  Someone I know recently had similar symptoms, and posted about their journey here.  The thing causing most of his issues was a slight slide forward at the bottom of the squat.  He isn't the only one who experienced this problem, and it is common enough for Rippetoe to write about it.
The solution is twofold:

Use a TUBOW (Terribly Useful Block Of Wood) in front of your shoes.  You should touch your knee to it in the first third of the squat, but do not move the wood while going down.
Deload to a weight you can do with the TOBOW in place.

Eventually your squats will look like this: http://www.youtube.com/watch?v=cQlI_ztFk1g
The happy ending to the rehab work that this guy did is that the knee soreness is gone and he's lifting heavier than before.  I recommend fixing the form issue before going any further.
Comment: Super helpful answer, thanks! The video that Sking posted in the forum in your first link was especially helpful. Yeah, I think I'm doing the exact same thing he was doing. For now, I'm going to take a few weeks off from squats, and see a sports doctor for a professional opinion. After that I am going to revisit my form, and I will definitely try your TUBOW suggestion.
Comment: This seems good, but I've heard letting your knees track forward a little is not all that bad.  I have the same issues and my knees don't go out in front of my toes, but I wonder if they are still going forward too much.  _I guess I'll give it a try._
Comment: @Jordan, yes, a little is OK.  The bottom line is that the bar needs to remain as much over mid-foot as possible.  For some people, their anatomy is going to require slight forward knee motion.  However, it is easy to get sloppy and over do it.  Another common problem is a slight twisting of the knee joint because the knee travel is not on the same plane as the direction your foot is pointing.
Answer: Is there a hard bump there that hurts when you press on it? If so, it could be Osgood Schlatter's. Actually, even if there isn't a bump yet, it could still be this.
On the other hand, if the pain is in the tendon attached to the kneecap, it could be Jumper's Knee.
Either way, as Dave said, make sure your squat form is perfect, BEFORE you go heavy. If you're squatting right, there will be no joint pain, only possible muscle soreness.
I had Osgood Schlatters a while ago; it seemed it was because I wasn't sitting back in my squat enough. If you don't sit back on your heels and take the force of the squat in your glutes and hamstrings, all the force goes into your quads and knees.
You should be taking barely any weight on your quads at the bottom of a squat; your core should be tight, and your glutes and hams should be TIGHT, taking the weight. Concentrate on feeling that tension in your glutes, ready to explode the weight upward.
If you read the Stronglifts "how to squat" article I think he explains it pretty well.
Comment: I've never been quite sure if I'm sitting back far enough. But whenever I've tried to go any further back I've literally fallen over backwards (thank God for the sawhorses that caught the bar!). I've read the "how to squat" article numerous times, but I haven't found any way to improve yet. I guess I really will need to find a trainer or at least post some videos online for a form check.
Comment: Thanks @parkker007. No there is no bump or any physical deformation that I can detect. There is no pain when I press on my knee anywhere. It does sounds like it could be Jumper's Knee. From what you've posted it sounds like, at a minimum, I need to take it easy for several weeks or possibly months.
Comment: I am concerned that this answer drifts into the realm of providing medical advice, which is outside our scope: see [meta](http://meta.fitness.stackexchange.com/questions/70/medical-questions), and [meta](http://meta.fitness.stackexchange.com/questions/133/what-should-main-fn-faq-say-about-health-medicine-questions-answers). I think the question is borderline.
Comment: @Dave Good call, I hadn't thought about that. Joshua, you should definitely not rely only on the advice or articles given to you by random people over the internet when it comes to medical issues. The links I gave you were suggestions of knee problems I've had experience with, based off your description. Only a real doctor can tell you what it is for sure though. All I can say is that proper squatting WON'T hurt your knees. Keep trying to perfect your form when you're back in the gym, and don't try to fight pain. Rest up!
Answer: I had an ACL reconstruction on one of my knees 12 years ago.  I started a workout routine with squats and deadlifts earlier this year.  After about 4 weeks I had similar pain in my ACL knee.  I figured out I wasn't warming up enough.  I started doing 5 min of bike when I first walked into the gym and the knee pain disappeared.
Comment:  Hmm, might give that a go as well.  Did you have knee pain after, like the next day?  That is what I'm running into.
Answer: I have a torn medial meniscus in my left knee, so I was always terrified of squats. However, after 2 years of doing squats now below parallel and working on form, I can say that not only have I not had knee pain after squats, but my legs actually feel a lot stronger. I have a fast synopsis of how to avoid knee pain after squats here.
Answer: Usualy the form of performing is really important. Now knee pains might come from many areas not just from squatting, but it might manifests there.
I would advise you to go through few of the basics of squatting before squatting and a proper warm up.
http://www.bodybuilding.com/fun/no_pain_squat.htm
http://healthy-joints.net/sport/how-to-squat-to-avoid-knee-and-back-injuries/


Wifi vs Mobile Network efficiency?

Question: I have 3G mobile data plan on my smartphone.
I also have a WiFi router in my home.
I want to know which of these 2 can provide internet to my smartphone in the most battery efficient manner?
Consider same amount of data transfer with same speed for comparison.
Comment: This is basically unanswerable, as it depends on the device and the various components used within the device.  Why not perform your own benchmarks for your device(s)?  Beside, questions about phones are off-topic for SU when not about connecting it to a PC.
Comment: I work for an LTE R&D company (although I'm a developer I had a brief overview) - the phones are always working very hard, and one of the *many* factors is speed! The quicker the data can come through, the faster the machine works and this is a big factor. Another factor is CQI (the quality of the channel) as if it's bad reception, it's going to have to keep receiving the data and disregarding corrupted data etc resulting in more work
Answer: Short answer: WiFi requires less energy than 3G.
Both WiFi and 3G waste energy right after completing a transfer. As the phone uses much more power than normally when transfering data, there is a short time after each transfer where the phone is still using a lot of power, even though there is no longer a need. This is unavoidable, but WiFi is significantly more efficient than 3G, so if you spend the same amount of time connected, using the network in the same way, your battery will drain faster with 3G.
Note that if you are using the phone where the 3G coverage is limited, your device will waste more energy constantly trying to connect. Same goes for WiFi.
Also, there is something I read about, that by keeping WiFi on all the time, you are actually keeping 3G off, so it increases battery life.
From AndroidCentral:

This tip is one that seems counter-intuitive, but you can save a lot
  of wear and tear on your Android phone's battery if you tell it to
  keep the Wifi radio turned on and connected while the phone is
  sleeping.  Your phone needs a lot of juice to keep pinging those cell
  towers, and even more to transmit data to and from them.  Wifi radios
  use much less power because of their design, and they don't have to
  keep searching for a better access point.  It's the way cellular data
  communication was designed, and it's a necessary evil.
But what if you're spending all day (or all evening) in one place,
  connected to Wifi?  If you tell your phone to shut off Wifi when idle,
  it bounces back to cellular data (be it 2G, 3G, or 4G) and starts
  sucking down the electrons again when the screen shuts off.  That's no
  good, and easy to fix:
Open the advanced Wifi settings by pressing the menu button, then Settings, Wireless &
  networks, Wi-Fi settings, and tapping the menu
  button again.  You'll have a choice to either Scan, or go Advanced --
  go Advanced.
      Tap the Wi-Fi sleep policy entry, and you'll get a pop up dialog with the choices you see in the picture above.  Choose Never.
Now even when your phone goes into standby mode, you'll stay connected
  to Wifi and be able to get mail and messages without turning the cell
  radio back on and trouncing your battery life.  And for the times when
  you're not in an area with a Wifi connection, just shut Wifi off,
  either through the menu or with a handy toggle widget.  Your battery
  will thank you for it.

Wifi vs Mobile Network efficiency?


Is simulation a necessary part of writing a research paper?

Question: In fields like machine learning, where the validity of your solution is measured on the basis of the accuracy of your model, it is important to have a simulation i.e. write and run code to implement the machine learning algorithm you're working on. However, if I am just proposing a new framework, is it necessary for me to run a simulation for that? What else can I do to evaluate the validity of my solution?
Comment: Why should I care about your framework, if I don't know whether it works or not?
Answer: Yes, it seems in your case simulation is necessary. In many cases, not probably for the situation involving machine learning, simulation results must be backed by mathematical analysis and proofs.
If you have proposed a framework or an idea, how would anyone know if it is workable?
Science requires hard proofs backed by experiments. So, Yes it is necessary for you to run a simulation.


How to get PIP for python

Question: I am trying to install pip.py. Whenever I search for the installer, it opens to a new tab with codes in it, with nothing that I can download. What am I meant to do, am I meant to copy-paste the code into the Python interpreter? How can I get it to work for the Windows 7 32bit version?
Comment: check this, it works on every platform : https://stackoverflow.com/questions/17443354/install-numpy-on-python3-3-install-pip-for-python3/33964956#33964956
Comment: in one command: python2 `curl https://bootstrap.pypa.io./pip/2.7/get-pip.py | python` or python3 `curl https://bootstrap.pypa.io./get-pip.py | python3`
Comment: "bootstrap.pypa.io. " why you adding . after io
Answer: Installing with source
Go to this link: https://bootstrap.pypa.io/get-pip.py
Copy the contents of this file onto another new file and save it as get-pip.py (when it asks you what you want to do with the file, click Save, then copy the contents of the file onto another new file), and open your Windows Command Prompt as an admin and go to the file path and then enter (you need Internet for this) the following command,
python get-pip.py install

For help on installing with different operating systems
Refer to this link: http://www.pip-installer.org/en/latest/installing.html
Installing with an exe file
Click here to get the file, and install it and you need to set a path to the pip directory, you will find a source folder in the C drive and you can find the pip file, then set the folder path.
Comment: how can i install with no internet connection to linux box?
Answer: You can use these binaries to install pip or any other packages of your interest.
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip
Answer: You can use this guide to install the latest version of Python, PIP and virtualenv for any platform. http://docs.python-guide.org/en/latest/

How to get PIP for python


Gallieo And Android Plugin Error

Question: I am using Eclipse Gallieo and trying to use the Android Plugin.But i am getting the following errors.

Cannot complete the install because one or more required items could
  not be found.   Software being installed: Android Development Tools
  16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534)   Missing requirement: Android Development Tools 16.0.1.v201112150204-238534
  (com.android.ide.eclipse.adt.feature.group
  16.0.1.v201112150204-238534) requires 'org.eclipse.ui 3.6.2' but it could not be found
Answer: You need to have at least Eclipse Helios installed to proceed with the ADT installation.
Comment: I downloaded the Indigo version and then checked and unchecked the updates and then later added the adt plugin URL and now its fine and working. Thanks for the response.
Comment: I have Eclipse Helios but I can't install the ADT, some dependency problem comes up.
Comment: I suggest you to check/uncheck the updates for Helios and delete ur ADT plugin URL and then first check for Software updates, once it done. Then Add the url for ADT plugin. I hope it helps you.
Answer: I had indigo installed and received this error so it is clearly not the version that matters. My install of the ADT fails giving me this error as well.
Uninstall and re-install the latest version from the website. This fixed it for me.
Answer: I'm on Windows Vista and I had the same error message. What I did to solve it was to run the application as administrator (right click in the icon/shortcut and then click on "Run as Administrator").
I read the solution from a linux user who solve the problem runnin
Answer: when you are asked to enter the sites address select the option "all the available sites" and the select android packages you want to install thee should be 4 packages.. select these packages .. and proceed ,..
Answer: I had the same problem yesterday...and I wasted the whole day..I tried to find the solution, but I couldn't
At last today, I downloaded eclipse again and re-installed it....and now the error has gone...
If you are starting new one..then before that delete the previous one...by removing Workspace folder from your C drive...and then start it...
If you have downloaded recently or have latest version, then try to start it again..after removing the workspace folder and all connected folders....even then, if you don't find solution...Disable your Firewall and Antivirus...and try, you will find the solution....
You can also see this video on youtube "How to install Eclipse / android adt plugin ubuntu/kubuntu 11.10"...Or visit this link for this video "http://www.youtube.com/watch?v=HCNC34BflOo"...that might help you.
Answer: On windows 7 right-click and click on troubleshoot compatibility and run in the windows xp mode as suggested and it should work.
Answer: For me (Ubuntu 11.10, Eclipse 3.7) it helped to start eclipse with sudo.
I choose the same workspace as normal but that shouldn't matter.

Gallieo And Android Plugin Error


Rear wheel seizing

Question: I Have a modern road bike, all has been good for 2 to 3 years. This morning my rear wheel/pedals/chain seized completely. I eventually found out the problem was the the wheel and/or axel thread and nut rather than a chain/gears problem. When I loosened the nuts on the thread the wheel turned fine again. But I can't seem to find a point where the nuts are loose enough for the wheel to not seize but be tight enough to hold in place. I thought perhaps the springs on the threads maybe needed replacing as they didn't seem to be doing their job, but I fear it maybe a bigger problem. Before I try to get it seen to, Does this sound familiar to anyone?
Comment: It sounds like the rear bearings are mucked up somehow.  A competent shade-tree mechanic could probably fix this, but since you don't seem to be mechanically inclined I'd suggest you take it to your mechanic.  (The axle should be bolted tightly to the frame, with the bearings allow the wheel to spin on the fixed axle.  Since you're saying the axle must be loose to allow the wheel to turn that suggests a problem with the bearings or hub.)
Comment: Just developing on @DanielRHicks comment - if you need to have loose axle nuts, then the bike is unsafe to ride any distance at all.
Comment: @Criggie -- Right.  Even if you could manage to ride it a few blocks, you'd likely destroy several more parts of the bike in the process.
Answer: I have had that happen when the freewheel body inside the hub has completely disintegrated and a shard of the broken metal jammed inside the hub.  The solution then was to buy a new wheel - it wasn't worth fixing (and that was with an extremely expensive Tune hub - :-( ).
Sadly, I think something similar has happened to you.  As Daniel commented, it sounds like your hub has seized/jammed and you are only enabling the wheel to turn by partially undoing the nuts (which makes me think that you don't have quick release - is that correct?).
I have to point out here that THIS IS DANGEROUS.  If you ride the bike in that condition the spinning wheel could either a) undo the nut completely, thus enabling the wheel to come out, or b) do them back up again and the hub could jam again [imagine if that happens in traffic...].
Please take the bike to your friendly local bike store and ask them to check the hub out.

Rear wheel seizing


Does the bootcamp with Windows 10 use the same kernel that the MacOS uses on a Macbook Pro?

Question: I am just wondering how the boot camp on the macbook pro works? Does it use the same exact kernel as the one that the MacOS uses? Or does bootcamp switch over to a kernel for the windows 10?
Answer: Windows works on a Mac that same as a PC. The words "Boot Camp" are associated with the following.

There is a Boot Camp Assistant application included with macOS that can download the Windows Support Software and aid in the installation and removal of Windows.
There is the "Boot Camp Support Software" (which has been renamed "Windows Support Software") which contains the Windows drivers and other software to be installed in Windows.
The name of the volume where Windows is installed is labeled "BOOTCAMP".
There is a Boot Camp application which is accessible from the Windows Control Panel and System Tray.

When you boot to Windows on a Mac, you are running an entirely difference operating system from macOS. If fact, once Windows is installed on your Mac, you could remove macOS entirely.


Deadlock and locks on multitenant database

Question: I work for a saas company that uses multi tenancy by a tenant_id, however we perform nightly jobs that dump mass amount of data from the last day of each tenant, sometimes we face deadlocks or simply locks that makes all operations run slow due to shared tables between tenants.
Are there any alternatives to this problem besides using a DB per tenant to avoid DUI locks due to shared tables?
Comment: I've updated your tags to include `sql-server` please also update them with which version and edition you're using as well.
Comment: I think one database per tenant is a good design pattern for data management and more accurate data statistics, but *can* be more work from a schema management perspective. That being said, knowing what database system, version, and edition (when applicable) would be good for us to try to help solve your problem.
Comment: We use SQL server right now, but im considering any approach to resolve this problem since I really want to know which are my alternatives
Answer: Without specific details on individual examples of locking and / or deadlocking issues you're facing, there's not much of a dedicated answer that can be provided. If you're aware of a specific case or two that is particularly troublesome, especially with the deadlocks, providing the queries, DDL of the entities involved, the deadlock graphs, and the execution plans, in a targeted question, would all be very useful to trying to improve those particular cases.
That being said, a general potential fix you could look into is changing the isolation level on the database to something more conducive to your locking tolerance. By default SQL Server uses the Read Committed isolation level, which employs pessimistic concurrency - essentially writers blocking readers and other writers during data changes. One particular isolation level you might be interested in is called Read Committed Snapshot Isolation aka RCSI.
RCSI helps reduce locks during concurrency of DELETES and UPDATES with SELECT statements by using row versioning to preserve the data at different points in time. This comes at the tradeoff of additional resource overhead on the server, generally with tempdb. It is considered optimistic concurrency by nature.
You may find these additional readings on RCSI informative:

An answer by David Browne regarding RCSI
Implementing Snapshot or Read Committed Snapshot Isolation in SQL Server: A Guide - By Kendra Little on Brent Ozar
How to Choose Between RCSI and Snapshot Isolation Levels - By Kendra Little
Comment: As i said in the post, it is a scenario of multiple DUI(over millions) on the same tables from different tenants,even if a deadlock doesnt occur, the sql server still run these queries slowly due to the fact it is many bulk DUI at the same time, so I wonder If theres any alternatives besides one db per customer to deal with this problem. Each client of my saas depends upon these night jobs to update data from their last day
Comment: @beto Can you clarify what you mean by `DUI`? Your post asks how to reduce / improve locking and deadlock issues, which my answer provides a global way that is sometimes recommended for doing that, without needing to break out your database into multiple databases. If you're having other performance issues occuring that are unrelated to locking / deadlocking then that's a separate question we'd need more details on, and using multiple databases wouldn't help you with anyway.
Comment: Deletes, Updates and Inserts. Im sure using multiple databases would help cause  tenants wouldnt be competing with eachother for locks during these night jobs that our bussiness needs to perform, your solution might help
Comment: @beto Sorry I feel like you're not understanding what I'm saying: "*If you're having other performance issues occuring that are **unrelated to locking / deadlocking**...using multiple databases wouldn't help you with anyway.*" It sounds like your issues with high DUI concurrency is locking related, in which case my answer provides you a global potential solution without having to split up your database. If anything is unclear about that, please let me know.


List of materials (almost) satisfying the Cauchy relations in each symmetry class in linear elasticity

Question: There are eight symmetry classes in linear elasticity: triclinic, monoclinic, orthotropic, tetragonal, trigonal, transversely isotropic, cubic, and isotropic. I was wondering if there existed a material in each of those symmetry classes which almost satisfies the Cauchy relations: $C_{ijkl} = C_{ikjl}$ for all $i,j,k,l \in \mathbb{R}^3$ where $[C_{ijkl}]$ is the linear elasticity tensor (basically the elasticity tensor is completely symmetric). Any help would be greatly appreciated.
Answer: It may be easier to analyze this problem using Voigt or reduced notation, in which, e.g., $\mathbb{C}_{1112}=C_{16}$, where $\mathbb{C}$ is the 3×3×3×3 stiffness tensor and $C$ is the reduced 6×6 stiffness matrix. In Physical Properties of Crystals, for example, Nye presents certain implications involving the elasticity tensors using this reduced notation:

From physical arguments, we already have $\mathbb{C}_{ijkl}=\mathbb{C}_{jikl}=\mathbb{C}_{ijlk}=\mathbb{C}_{klij}$. You're asking about the additional constraint that $\mathbb{C}_{ijkl}=\mathbb{C}_{ikjl}$. In reduced notation, this can be verified to imply 6 additional relationships:
$$C_{12}=C_{66}$$
$$C_{13}=C_{55}$$
$$C_{14}=C_{56}$$
$$C_{23}=C_{44}$$
$$C_{25}=C_{46}$$
$$C_{36}=C_{45}$$
We can see from the image above that these all hold for any isotropic material (including fully amorphous materials, isotropic crystals, and any crystalline material with sufficiently small and equioriented grains) if $\frac{1}{2}(C_{11}-C_{12})=C_{66}=C_{12}$, or $C_{11}=3C_{12}$. Since
$$C_{11}=\frac{E(1-\nu)}{(1+\nu)(1-2\nu)}$$
$$C_{12}=\frac{E\nu}{(1+\nu)(1-2\nu)}$$
where $E$ is the Young's elastic modulus and $\nu$ is the Poisson's ratio, we have $\nu=0.25$, which is allowed. (Stable materials must satisfy $-1<\nu<0.5$.) Ceramics, for example, often exhibit a Poisson's ratio of around 0.25.
Since materials do exist (under this Poisson's ratio constraint) that obey $\mathbb{C}_{ijkl}=\mathbb{C}_{ikjl}$ under this most symmetric and tightly restricted crystal class of isotropy, I'd argue that it wouldn't be physically prohibited for such materials to exist in any of the other crystal classes (although it may require that some of their $\mathbb{C}_{ijkl}$ indices that need not be identically zero are nevertheless approximately zero).


Impact of a grade W for grad school if I'm changing majors?

Question: I'm changing my major to philosophy from computer science in the middle of a semester, and I'm doing pretty poorly in one of my math classes. My advisor told me it would be a good idea to drop it since I'm changing my major. Would it have any impact in grad school admissions, especially if I want to go to a highly reputable school?
Comment: You might want to explain what "W" means?
Comment: Nobody cares if you dropped a class.
Comment: This question is probably country-specific. Could someone add the relevant tag?
Answer: In general, no single thing like this would have much impact. In this case, I'd say even less. People aren't looking for small reasons to reject your application, but for evidence that you will be a success in your chosen field as well as in the program you apply to.
So, if you do well overall and do especially well in Philosophy then you should be fine. Good letters of recommendation will overcome a simple thing like a W.
But be prepared, if asked, to talk about why you wanted to switch. And make the reasons positive, about philosophy, not negative about math or CS.
Answer: A "W" on your transcript typically comes with no explanation.  A pessimist reading your application might conclude that you withdrew from the math course because you were failing the course.  In comparison, a B or even a C in the course would look better.
Whether this would be a significant factor in an admissions decision depends a lot on the person reviewing your application.
Comment: _you withdrew from the math course because you were failing the course_ — My university doesn't allow students to withdraw from a course (after the usual drop deadline) merely because they're failing; withdrawal requires extreme circumstances beyond the students' control, like serious illness or injury. So this pessimistic explanation would never have occurred to me.
Comment: I once dropped a course (non-major, but required) and got a W, but there were no consequences. No one ever mentioned it. I was over-extended with extra courses and all were suffering. It would be different, perhaps, for a major course. But, like all things negative, you want to have an acceptable explanation if asked about it.
Comment: Our institution has 3 time limits for getting out of a course.  In the first 3 weeks, a student can drop the course with no mark on their transcript.  Between weeks 3 and 10 they can withdraw from the course with a W on the transcript.  After week 10, they can only request a "withdrawal without prejudice" for unusual circumstances. Policies on this vary.


Can you change permission to all files except one directory in Linux?

Question: Is there any way to change all files/directories permission except one single directory in a single Linux command line command?
Comment: `grep -v "directory to exclude"`
Answer: Assuming that you wish to set the permission bit 755 recursively for the contents of the folders in your current working directory, apart from the contents of the folder called "nameOfFolderToBeExcluded":
 chmod 755 -R $(ls | awk '{if($1 != "nameOfFolderToBeExcluded"){ print $1 }}')

Comment: Why not just use `-I (--ignore)` option of `ls`?
Answer: You can use find to search for all the files that does not match the given filename and exec a command on all such files found as:
Assuming you need to exclude directory test and give file permissions 755 to all  other files and directores. This would be excecuted from the top of the tree.
find ! -name test -exec chmod 755 {} \;

Tested
mtk@mtk4-laptop:$ touch a1.txt a2.txt a3.txt test
mtk@mtk4-laptop:$ ls -lrt
total 0
-rw-rw-r-- 1 mtk mtk 0 Sep 17 23:55 test
-rw-rw-r-- 1 mtk mtk 0 Sep 17 23:55 a3.txt
-rw-rw-r-- 1 mtk mtk 0 Sep 17 23:55 a2.txt
-rw-rw-r-- 1 mtk mtk 0 Sep 17 23:55 a1.txt
mtk@mtk4-laptop:$ find ! -name test -exec chmod 777 {} \;
mtk@mtk4-laptop:$ ls -lrt
total 0
-rw-rw-r-- 1 mtk mtk 0 Sep 17 23:55 test
-rwxrwxrwx 1 mtk mtk 0 Sep 17 23:55 a3.txt*
-rwxrwxrwx 1 mtk mtk 0 Sep 17 23:55 a2.txt*
-rwxrwxrwx 1 mtk mtk 0 Sep 17 23:55 a1.txt*
mtk@mtk4-laptop:$

The file permissions for file test remained unchanged. Same is applicable for directories.
Comment: This only exclude files by that name -- not folders.   Try `mkdir test` + `touch a1.txt a2.txt a3.txt`, and then execute the command.
Answer: What shell?
If you're running bash (likely if you're on Linux), you can check out extglob, which gives you more options for globbing, including the "negative glob" !()
shopt -s extglob
chmod 774 !(file-to-ignore)

Answer: Using find more simply like this:
find <from_where_to_change> -not -path "*/<excluded_dir_name>*" [-and -not -path "*/<another_excluded_dir_if_you_want>*"] -exec chown <user>[:<group>] {} \;

In my case it was:
find /data/project -not -path "*/.svn*" -exec chown :www-data {} \;

This way I changed group on folder /data/project recursively, except all folders ".svn" recursively.
Answer: Just a simple command will do :-
chmod 755 /x/y/!(abc)

Where x/y/z = path.
abc = name for the folder/file to be excluded
Answer: Even easier way with basic commands:
chmod 755 -R $(ls -A|grep -v 'directory_name_to_exclude/*')

Answer: I am using below command, it will give files 644 and directory 755 to all files and directory in Present working directory but will exclude var directory to provide permission.
find . -not -path "*/var*" -type f -exec chmod -c 0644 {} \; && find . -not -path "*/var*" -type d -exec chmod -c 0775 {} \;

Answer: And more easily with basic commands:
chmod -R 755 $(ls -I folder_excluded)

Comment: Please edit your answer to explain it. Otherwise it may get deleted.


Modern Warfare 2 Connecting to Servers Take 15 Mins

Question: I just started to play Modern Warfare 2 and I notice it takes me about 15 minutes in order to connect to a server.  I open all the router ports, defrag game files from steam, and troubleshoot to the best to my knowledge, but still no luck. Any one else have any ideas?
Comment: I've gotten this too, it seemed to help when I created a custom game and then quit.
Comment: The game is dead.. Everyone moved to MW3, and there are no dedicated servers for MW2.
Comment: do you mean "15 mins to connect" or "15 mins to find a server which is not empty/not full/meets my filter criteria"
Comment: 15 mins to find a server and then after that I get in. If I back out and try again I get in instantly.
Comment: we're all sad about it
Answer: I suspect this is a combination of factors but most likely:

Hard-core COD players moving to the latest and greatest COD iteration
Not having any map-packs installed

Both of which will reduce the pool of sessions you can join. It's particularly noticeable after new map packs come out as most of the regular player base will have brought them and therefor only be in sessions where all players have access to the same maps.
You don't mention where you are or what time you play. That might also have an effect on how many active games you are seeing.


Debian server makes internet connection drop

Question: I have setup a small home server / NAS running Debian 7. The server is connected directly to the router with a static IP set in the router's control panel. There are no port forwarding rules set for the server machine.
The server has been running fine for over two weeks, providing a samba share and a Plex service to the home network. Last week I wanted to use it to wake other devices in the house, so I installed the ethtool and ethwreake packages to do so. After those installs, when the server is attached to the router (or indirectly via a switch), it makes the internet connection drop randomly, for about 1-2 minutes. After this time, the connections returns and I can ping google.com for about 20-30 seconds, and that keeps repeating forever.
I have absolutely no idea what could be causing this. How can a machine make the internet connection drop for the entire network? The only thing I could think of is some king of packet flooding, and the router can't keep up with the requests and reboots itself or something like that.
This has happened before on another Debian install, and I had to reinstall the OS entirely since I couldn't find a solution.
When I disconnect the server to the network, the connection returns after about 1 minute.
Is there some kind of test I could do to find the cause, or do I have to clean install Debian again?
Comment: You could try watching the network with `wireshark` when this happens (ideally from another machine, if it involves the server getting connected).
Answer: It sounds like what happens when two devices on the same network have been given the same IP address. Check both devices and ensure that they have different IP addresses.
Comment: I set a static IP of 192.168.1.51. The router's DHCP service assigns IPs from 192.168.1.101 to 192.168.1.150, so it should work. No other devices share the same IP address, but it still doesn't work.
Comment: Nevermind, setting the IP from the server directly and not from the router resolved the issue. Thanks for the help.


Do I say "bismillah" in 2nd rakat?

Question: before starting every work as a muslims we say "bismillah".
before starting namaz in ist rakat we say bismillah is it important to say bismillah in 2nd rakat and 3rd rakat or not?
Answer: If you are reciting al-Fatihah in the first rak'a starting with bismillah following the Kufi qira'at and Moshaf (For example qira'at Hafs 'an 'Asim the mostly known qira'a nowadays) you should recite it in the second too as it is part of the qur'an according their opinion.
Else in the Hijazi Moshafs and qira'aat (The Madani for example) it is not part of al-Fatihah nor at the beginning of any other surah, except with the verse in the middle of surat an-Naml (where it was quoted in the middle of the surah and therefore there's a clear consensus that it is part of the qur'an) but a blessing one should say when reciting qur'an. So it can be left out according to this view. But many scholars hold the opinion that avoiding disputes is better and one could say this blessing for oneself.

Do I say "bismillah" in 2nd rakat?


What to do after the looker bureau

Question: I finished the looker bureau and there is nothing to do is there anything else to do
And I have completed the elite four and the looker bureau
Answer: I found this a long time ago on Tumblr. I do not have a source to credit, and this is not my list. But it has a lot of things to do in pokemon XY after you have finished the game.
Answer: Consider breeding competitive and or shiny pokemon or you can just wait until Pokemon Omega Ruby and Alpha Sapphire come out next month and play your heart out on them.
Answer: After the original game, Shauna will come to your house and ask if you would like to trade Pokémon, the Pokémon will be the starter whatever your starter is strong against. After you trade Pokémon and beat the Elite Four, Zapdos, Moltres, and Articuno will show up on random routes, depending on what starter you chose.

Articuno: Chespin
Moltres: Froakie
Zapdos: Fenniken

Then, you can complete the Pokédex. Once you complete the Pokédex, Professor Sycamore will give you a shiny something... and this will increase your chances of finding a shiny and beating everyone in the game and on the internet in battle.
Answer: Wonder trade... Battle spot... Talk to every freaking person in the game... Try to get all the mega stones.

What to do after the looker bureau


Is talking to myself mean that i am talking with Satan?

Question: Sometimes I talk to myself. Then there are two voices in my head. I ask a question an the other voice answers. Sometimes I am suprised at the answers it gives. I wouldn't be suprised if it was me right  ? What does this mean  ?
Answer: It was commonly observed that people talk to them-self in order to resolve or to find some solution for their problems. But if anyone found some negative thoughts then he or she should avoid that thinking or talking. They should try to talk real persons, because if he or she continue this practice in large it will lead him/her separation from social community.
As per Islamic perspective there are many saying which talk about evil whispers. One of the hadith is mentioned below which talk about Waswaas (Whispers from the Shaytaan). These waswaas at any time or during prayer time comes from the Shaytaan.
"Allah's Messenger, the Satan intervenes between me and my prayer and my reciting of the Qur'an and he confounds me. Thereupon Allah's Messenger (ﷺ) said:, That is (the doing of a) Satan (devil) who is known as Khinzab, and when you perceive its effect, seek refuge with Allah from it and spit three times to your left. I did that and Allah dispelled that from me." [Sahih Muslim 2203]
If anyone feels that he/she is affected by this waswaas, then he/she should say: "Aamantu Billaahi wa Rasoolihi (I believe in Allah and His Messenger)".
Also try to stop thinking too much and try to distract or get yourself busy in some other usefull stuff.
Answer: Brother here i am sharinbg a tip.Check the voice you hear in your head if it contains shirk or kufar in the light of  Quran and Sunnah.After checking if the thing is wrong then negate it and if the thing is right then  take it.Thats it.
we humans always talk with self and its very normal.The thing is that we have to check our thoughts.To check our thoughts earning of right knowlwdge is inevitable.


How is "little $h$" measured in cosmology? The dimensionless parameter from the Hubble constant, $H_0$

Question: Hubble's law has been well-know for close to a century now. It is written as
$v = H_0 d$
where the Hubble constant $H_0$ is the constant of proportionality between recession speed $v$ and distance $d$ in the expanding Universe.
The expression for the Hubble constant itself is normally written as
$H_0 = 100\,h\,{\rm km}\,{\rm s}^{−1}\,{\rm Mpc}^{−1}$
where $h$ is the dimensionless parameter expressing of ignorance. How is this "little h" measured?
Do astronomers measure the Hubble constant (using Cepheid distances, Type Ia Supernovae, etc.) and then calculate $h$?
Supposedly the value agreed upon today is around $h\approx0.7$. Give or take.
Comment: Note that $H_0h=100\cdot0.70=70\,\rm km/s/Mpc$ which is the one of the accepted values of [Hubble constant](http://en.wikipedia.org/wiki/Hubble%27s_law), then extrapolate the definition/meaning of $h$.
Comment: Why should $h$ be measured, when we can instead measure $H_0$ and use the above definition? $H_0$ has physical meaning; $h$ is a shorthand.
Comment: I wrote $H_0$ but it should just be the 100, sorry for confusion.
Answer: The little $h$ is a historical artifact, one that will probably die out soon enough.
The thing is, $H_0$ was extremely difficult to measure precisely for many decades after its importance was realized. At some point, cosmologists were divided between the "$H_0 = 50\ \mathrm{km/s/Mpc}$" and the "$H_0 = 100\ \mathrm{km/s/Mpc}$" camps. Because the quantity appears as an overall scale factor to some power in many cosmological formulas, people adopted $h$ to be $H_0/(100\ \mathrm{km/s/Mpc})$ by definition. Rather than plugging in their preferred value of $H_0$, they quoted formulas in terms of $h$ and its powers, so that others using different values of $H_0$ could compare to them. All $h$ does is make undoing someone's erroneous value for $H_0$ easier (sort of).
Today, we know $H_0$ to a few percent or so, and few people lose sleep over the imprecision. Since there is nothing physically meaningful about the $100\ \mathrm{km/s/Mpc}$ scaling, it is $H_0$, not $h$, that is more fundamental.
Comment: The rumours of little $h$'s death is greatly exagerated:) The use of $h$ is so ingrained in cosmology that I expect it to be with us long after we hit sub-percent accuracy. The value is also model dependent so as long as there exist viable alternatives to $\Lambda$CDM it will stick around. I bet it has at least $50$ more years left.
Comment: Was about to ask this question as I would have killed for a google-able answer to it when I was a fledgeling student, and came across this. Recent too, I guess I was a little bit too slow. Anyway, I took the liberty of editing in a link to a paper of immense use (imho). The "little h" rabbit hole is deeper than I could have guessed...
Comment: Ah, so "little h" is basically just a historical artifact at this point. This answers my question: today, we try to measure $H_0$ and then extrapolate from there.
The Hubble constant $H_0$ has been measured fairly precisely.
For a recent paper, read Efstathiou, 2014, arXiv:1311.3461v2

Planck (2013) measures $H_0 = 67.3 \pm 1.2 km s^{-1} Mpc^{-1}$, while direct measurements of Cepheid data comes up with $H_0 = 72.5 \pm 2.5 km s^{-1} Mpc^{-1}$.
Comment: Could you actually provide some more information as to when/why people started using "little h"? It would be good extra historical background.
Comment: @KyleOman: I was just about to link to that very important paper when I was your comment. :)


Generating Separate Output files in Hadoop Streaming

Question: Using only a mapper (a Python script) and no reducer, how can I output a separate file with the key as the filename, for each line of output, rather than having long files of output?
Answer: The input and outputformat classes can be replaced by use of the -inputformat and -outputformat commandline parameters.
One example of how to do this can be found in the dumbo project, which is a python framework for writing streaming jobs. It has a feature for writing to multiple files, and internally it replaces the output format with a class from its sister project, feathers - fm.last.feathers.output.MultipleTextFiles.
The reducer then needs to emit a tuple as key, with the first component of the tuple being the path to the directory where the files with the key/value pairs should be written. There might still be multiple files, that depends on the number of reducers and the application.
I recommend looking into dumbo, it has many features that makes it easier to write Map/Reduce programs on Hadoop in python.
Answer: Is it possible to replace the outputFormatClass, when using streaming?
In a native Java implementation you would extend the MultipleTextOutputFormat class and modify the method that names the output file. Then define your implementation as new outputformat with JobConf's setOutputFormat method
you should verify, if this is possible in streaming too. I donno :-/
Answer: You can either write to a text file on the local filesystem using python file functions or if you want to use HDFS use the Thrift API.
Comment: How is multiple mappers writing to the same file at the same time handled, when writing to the local file system or to the hdfs?
Comment: Doing this is bad. It conflicts with retrying tasks and guarantees you the need to babysit your jobs.


Non-Final Action response timeframe?

Question: What is the deadline time frame for a Non-Final Restriction Requirement, one month or two months?
Answer: Read the restriction requirement.  The answer will be printed right on it!  It used to be a month, but now it's two months.
See: https://www.uspto.gov/patents/init_events/PLT_Memo_to_Examiners_12-13-2013.pdf
Of course, you can extend the time up to six months by paying extension of time fees.

Non-Final Action response timeframe?


error while open rails console or while doing rake db:create

Question:
I'm getting this error , able to do bundle install sucessfully.
Note- Application uses ruby.2.2.0 and rails 4.2
Answer: It seems like the gem uniform_notifier (1.12.0) use Here Documents with a squiggly line. This feature is introduced in Ruby 2.3.0. This means that you have to upgrade your Ruby version, or downgrade the uniform_notifier gem.


Are there question-pumping bots out there?

Question: What is motivating people who clearly have little to no understanding of anything related to computer science, programming, or general use of computers to ask dozens of completely vague, unrelated questions?  There are several of these "users" on SO (I won't point any out; if you use the site regularly, you probably know a few).  They will ask questions covering four different languages, platforms, databases, technologies, etc., etc., within a couple hours.  It seems as though they are bots just randomly reposting questions found elsewhere on the internet.  It's bizarre.  These users also almost never accept answers, and their posts have a third-grade spelling/grammar level (even for an ESL person).  Why are people answering questions from these users?  They clearly do not even have enough contextual knowledge to know what they are asking... it's just annoying.
Comment: +1 I have been meaning to ask this for days, but couldn't come up with good wording.
Comment: At some point in my travels on MSO since the last time I was here, I came across a related topic: [the Dunning-Kruger effect](http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect) (link goes to Wikipedia).
Comment: -1 For being too general.  Certainly the type of behavior which you reference exists out there (in great numbers) and I get frustrated at times too but this post degenerates from question to rant as the question in the title mismatches the question asked later on which is the gist of the argument.
Answer: It's simple: the more questions you pump out, the higher the chance of getting upvotes, the higher your rep becomes. They either:

only do it for the rep (eventually it adds up until you're well over 3k; that's why the new question vote rule was applied) or
they are so completely devoid of any programming knowledge, that they need to be hand-held while programming. It's almost unthinkable, but some users have basically outsourced their projects to Stack Overflow, one problem at a time. They don't care about marking answers as accepted since they already got the info they needed.

Regarding the poor spelling/grammar, why bother? Someone's going to clean it up anyway? Why learn English or use a spell-checker when Stack Overflow has a built-in spell checker (2k+ users and moderators)?
Comment: http://meta.stackexchange.com/questions/41660/convincing-a-stack-overflow-user-to-switch-careers
Comment: please flag users who are particularly problematic -- we do actively ban users who ask tons of questions without ever improving or seeming to care.
Comment: @STingRaySC Let's not be so dramatic about it. The question pumps will never learn, let's agree on that, but they are a minority. There are users who ask a lot of questions because they want to learn. They'll also improve their knowledge of English by simply observing the edits made on their questions. In the end we should help them, we don't know what their motivation is. The language barrier is, sadly, quite a large problem. Some will simply fail to understand the rules of SO because of this barrier.
Comment: we have a spell checker on SU, it's called "Eight Days of Malaise" :-]
Comment: @SLaks I wrote my answer with that user in mind. I think it's just sad, really...
Answer: I have always attributed this to people who are desperately trying to teach themselves a language, but lack any sort of willingness to learn. I suspect some are also programmers who are totally unqualified for their jobs, and are trying to get the community to write their code one function at a time.
Comment: For some, the language they should be trying to learn is English...
Answer: I've seen a couple of cases where the user posting the questions seems to have been doing so on behalf of a group: maybe the whole company,  maybe a number of colleagues or classmates. This may have been due to the other members of the group not being fluent in English.
I know of at least one SO member who has posted 476 questions in 425 tags and has 64 badges, including a Famous Question.
Only one answer, though.
Comment: +1 just because that's a scenario I'd never considered
Answer: This is hardly unique to the SO family. I've been on numerous other forums where users ask very basic (or scattershot) questions that could usually be easily answered with some searching. I suspect that posting a question is the first thing they think to do, either due to ignorance or laziness.
Granted, sometimes it is legitimately tricky business to find the information you are looking for, so posting the question to a forum or the like will be more likely to produce results.
Also, the site's primary language being English may cause difficulty for those who are not native English speakers. Not being well versed in the language can result in somewhat broken text that is sometimes difficult for native English speakers to comprehend - it does go both ways.
Answer: Whether they are real users or bots, I say let them pump.  They are a veritable gold mine of interview weed-out questions.
I understand and agree to an extent about them wasting community resources, but unless that waste is significant - to the point where they're competing for front-page space with "good" questions - I see them as being mostly harmless.  And, as stated above, they do have a certain value, even if it's not the kind of value that the author expects.
Answer:
Are there question-pumping bots out there?

shifty eyes
...
No.
...
walks off hurriedly...


Is it illegal to create a website that allow a user to upload a file and make it accessible and downloadable for others?

Question: I am working on a website in which a user can sign in and upload a file and other users can search for it by name and download it. Those files will be catagorized as audio, video, apps(linux, windows, mac), documents etc. So, I was wondering if it is legal or illegal. I'll also add a "report" option with each file by which visitors can report a pirated content.
Comment: Be careful! Any user can upload a file that is copyrighted. Make sure you have a take down process that is paid attention to and responded to very quickly.
Comment: @dan Thanks for the hat! I am wearing it now. Merry Christmas / Happy Holidays my friend and to everyone here. Cheers!!
Comment: Sorry, but this is too broad and opinion-based for this site. It depends on what files are uploaded and if they are copyright protected...
Answer: Building a website where people can share files is not illegal.
If people upload content where the copyright is owned by someone else and they don't have permission to share it, then that is illegal and they are responsible.
If you then share that content, you become responsible.
Comment: And what about thepiratebay? I've heard that it is illegal
Comment: Do your research.  TPB doesn't host any files at all, it is simply a search engine.


If I create a fictional brand name in a movie script and then copyright the script can the fictional brand name be considered my trademark?

Question: Let's say I write a movie script. The movie gets made and it does well. In the script a fictional brand exists with a specific, un-trademarked name. Now let's say someone created a real brand that had the same name as my fictional brand and offered the same product; would I have grounds to sue?
Comment: The Wikipedia article [Duff Beer](https://en.wikipedia.org/wiki/Duff_Beer) covers various attempts to market genuine examples of fictional beer from The Simpsons. It may vary from country to country, and will also depend on how much you and they can spend on lawyers.
Comment: I don't know enough to offer an answer but I suspect the producers or studio would own the rights, subject to their contract with the script writer.
Comment: This may be of some interest: https://www.wipo.int/pressroom/en/stories/ip_and_film.html
Comment: I have seen examples of this situation. Namely a T-shirt which looks like advertising a specific drink brand. However the brand only exist inside a computer game. Unfortunately I don't know whether the T-shirt manufacturer has some kind of agreement with the game producer or not.
Comment: @Jen. Copyright as in I registered the script with the federal government as copyrighted intellectual property.
Answer:
If I create a fictional brand name in a movie script and then
copyright the script can the fictional brand name be considered my
trademark?

No. The fictional brand name (which I often call a "fakemark" in this context) cannot become a trademark from the movie or its script alone.
To register a trademark federally under the Lanham Act you need to describe a novel mark and you have to show that it has been used in interstate and/or international commerce. (You can file an intent to use application to hold that trademark for a bit, but it isn't final until the proof of use in commerce application is filed.)
There are state common law trademarks, and evidence from state filings can help to prove a state common law trademark filing, but this just postpones the timing of showing proof of use in commerce sufficient to establish trademark protections prior to the time of infringement. In a state common law trademark you present proof in the court case alleging infringement and not to a government agency at the time you start claiming the trademark exists.
Now, if you created a spin-off real life business based upon a fake business in a movie, like Bubba Gump's Shrimp Company, at that point, you could get trademark protection for it. But, merely having a brand in a movie that is never used in actual commerce does not established a trademark.
Comment: @SlowlySwift Yes.
Comment: Interesting. That answers my question.
Comment: To ask a slightly different question. Let's say someone makes a real business with the same name as my fictional business and then later I make a business with the same name. Can THEY sue for trademark infringement?


Android Strip Audio From Video

Question: In my program, it gets MP4 video in, and I want it to output a MP3 (without any server-side stuff.) Since Android (and my app) needs to run on many different hardware configurations, this means I probably cannot use FFMPEG. I know this may be very battery and processing power intensive, especially for a mobile phone, but I need this option for my users.  I cannot find any native libraries for Java that don't use FFMPEG.
Answer: I see little problem with FFMPEG, since apparently it runs on 11 architectures supported by Debian. Only architecture not supported is apparently m68k, others are old versions in ports to FreeBSD kernel, or Hurd kernel. And from what I know of Android, fact that it's based on ARM isn't going to change any time soon.
Of course, there could be some issues with Java wrappers around native code. Is that the issue? I'm not an Android nor a Java programmer, but I'm sure you can detect the platform and dynamically load appropriate native wrapper.
Answer: MPEG_4 Part 14 (.mp4 file extension) is a container format.   In other words, this specifies how multiple media streams can be packaged together.   Processing container formats is much less computationally expensive than - for example - compressing or decompressing video.   I would be surprised if it turned out to be too computationally expensive to read through an .mp4 file and extract an audio stream on a cell phone ARM processor.
I haven't seen any immediately suitable Java libraries either.   It probably wouldn't be too hard to build your own library.   Parsing container formats is much simpler than decompressing video.   And you do have the libavformat implementation in ffmpeg as a reference.    The MPEG4 Part 14 standards can be found here:
http://webstore.iec.ch/preview/info_isoiec14496-14%7Bed1.0%7Den.pdf
and here:
http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html
Answer: I haven't used it, but I downloaded and am looking at the API for IBM Toolkit for MPEG-4.  It looks a little light on data access features, though.  The implementation is pure java, though.  It looks like they've obfuscated their codec jars.

Android Strip Audio From Video


clerestory wall

Question: I am building a 24 by 30 cottage with 2 x 4 exterior walls, 8' high. I want to have a clerestory style roof with the front 1/2 of the house having a roof pitch of 3/12, and the back roof 6/12, which will leave space for clerestory windows facing the front. How should I construct the center wall, which will be holding both roofs? It will be 14' high in total. Can I build this wall with 2 x 4 or should I use 2 x 6? Can I build a 10' wall first, topped with 2 2x12's to support an opening of 12' in the wall, and then put an additional 3' high section on top to complete the height for my tallest roof?
Comment: I'd caution you on using 2x4 exterior walls. Not because of the structural concerns, but because of the energy concerns. Most codes require a certain R-value for the exterior "envelope" and it's extremely difficult to get it with 2x4 walls. Also, just from a practical issue, the energy savings will easily pay for the extra cost for 2x6 studs in the first year or so.
Comment: I can imagine the framing experts saying that if you intend to divide the interior space along the line of the clerestory windows, the best design is to make that interior wall a load bearing wall.
Comment: @JimStewart Seems like it would be difficult to enjoy the clerestory windows without a load bearing interior wall. I guess trusses doubled up at 4' o.c. would work and still give a vaulted appearance. Or some kind of "rigid frame" steel construction would work, but difficult.
Comment: @Lee Sam, I presume 2x4's would be sufficient for the clerestory wall, but if there was a lot of plumbing in that wall would it be better for it to be 2x6s? The downside would be that the doors through that wall would have to have the larger jambs for 2x6 framing.
Comment: I would agree that using 2x6 would be the way to go with today's 2x4s the wood is not as old as in years past and is not as strong a grader told me the boards only have to have 4 swirls per inch that's not much where in years past that would have been chip wood.+ on energy and code lee sam
Comment: This is a DIY site, but even a "cottage" like the OP envisions should probably be professionally designed, including the foundation.
Answer: There are of course lots of ways to accomplish this.  Since the ends of the rafters from both roofs (rooves?) need support, at different levels, it's a bit of a challenge.
It would be easy to construct the center load bearing wall with balloon framing methods.  (Actually the whole structure is very well suited to balloon framing.)  However since balloon framing is seldom used these days, not many people know how to do it, and it can be difficult to get permits / approvals etc.  But it's very well suited to multi level challenges like this.
The picture below shows a pretty straightforward way to frame it with familiar, standard platform framing.  If you look closely you can see that there are really two built up columns in the center.  Inside, you could have a double wall - one side built to support the front roof, one  side built to support the back roof.  That is probably the simplest, most straightforward way to go.
If you wanted the interior wide open, you could also have the built up columns supporting beams, one to support the front roof and one to support the back roof.  The beams would have to be carefully sized to support the roof load across the span, and buying / building them and getting them in place would be a big job.

clerestory wall


Do I need to wear a veil to touch or move the Quran?

Question: I am new to Islam and I just received a Quran and was told to put it at the highest point in my room so I am going to put a special shelf up for it. Do I need to wear a veil to touch or move the Quran?
Answer: We thank Allah for your acceptance of Islam, and may Allah make our faith and yours remain steadfast.
You do not need to wear a veil to read, touch or move the Qur'an. There is no evidence to that effect. When you come across certain verses in the Qur'an, prostration (sajda, Arabic: سجدة) is required. This prostration of recitation (sujūd al telāwah), too, does not require that a woman wears a veil (see Islam Q&A: Is putting on hijab a condition of reading Qu'aan?).
It is also worth noting that elevating the mus'haf (the manuscript of the Qur'an) does not mandate putting it on a high shelf; rather, it is about not putting it directly on the floor or in a place where it can be trodden upon or likewise.
The elevation of the mus'haf is based on a hadith in Muwatta Malik where the Prophet ﷺ was talking to the Jews about the punishment of adultery according to the Torah. When a written version of the Torah was brought forth, he ordered that it be put on a chair. Since we as Muslims hold all books revealed by Allah as sacred, and the Qur'an to be the highest among them, scholars deduced that the Qur'an should be elevated from the ground in a similar fashion. Having said that, a higher shelf is better than a chair (albeit not a mandate).


Is DC Pedestal fan motor whine normal at low speed?

Question: I have a brand new DC motor pedestal fan with 12 speeds. At the very low speeds the motor makes a whiny bearing type noise. Is this normal for low voltage DC fans?
Answer: Dead common, but it's more often the circuitry providing the DC voltage to the fan, in my experience.
Not clear what you are powering this from (AC/DC/Voltage...), but the speed control probably consists of some sort of switching circuit, and when there are electronic components that are being switched at audible frequencies, you sometimes get noises you can hear - often quite irritating.
Answer: DC fans can be brushless or direct drive (Servo). The sounds could be caused by the low DC voltage generating oscillations in the stator windings. I don't have a whole lot of experience with DC motors. However, I see this issue a lot in AC replacement motors that are poorly manufactured overseas. If it's a new fan, I would return it for another one. It will probably only get worse.


Getting started with windows mobile development

Question: I have a personal pet project I'd like to start on, targeted at windows mobile 6.  I've never done win mobile dev and would like to know what resources are out there, good tools to use, perhaps a jump start tutorial, as well as any gotchas I might want to keep in mind when developing for the platform?
Answer: Windows Mobile 6 devices come with .NET Compact Framework 2.0 in ROM and also expose .NET APIs for a lot of things (camera, system notifications, email, contacts, ...).
I'd recommend using Visual Studio 2008 and the refresh version of the Windows Mobile 6 SDK, which includes emulators, documentation, tools and samples.
Besides MSDN, a good resource for Windows Mobile samples is Chris Craft's Blog, who recently built 30 mobile applications in 30 days. There are samples for a lot of different techniques which you can use for a jumpstart.
Comment: The link to Chris Craft's Blog does not work anymore.
Comment: His blog works, but most of the links in his "Categories" section do now work, including the "30 Days of" links. The last one for day 30 was on Monday, June 30, 2008, so the rest are all in June 2008. After the "30 Days of .NET [Windows Mobile Applications]" a new series starts for "30 Days of Pimp My Windows Mobile Phone."
Answer: If you have C# background jumping to the windows mobile development is quite easy. Of course there are lot of differences but you will get hang of it.
Some gotchas:
Get familiar with .NET CF memory management and how garbage collector works on mobile devices.
Steven Pratschner's .Net CF WebLog.
Steve also have's nice tutorials how to use RPM (Remote Performance Manager) tool to get rid of memory leaks etc.
Also some things are done through pinvoking librarys like core.dll so browse to
P/Invoke.net and take a look for methods under Smart Device Functions.
And finally few blogs
Rob Tiffany's Windows Mobile Accelerator
Mobile Development by Raffaele Limosani
Edit:
Oh there seems to be similar question with great answers @
Windows Mobile Development - Where to begin?
Answer: Depending on the scale of the project, look at .NET compact framework. If you're familiar at all Visual Studio then it's pretty easy to get started. Of course MSDN is the place for resources.
Running managed code on a mobile device does take a big performance hit, but for a small personal project it's pretty good.
Also, most devices have all sorts of odd and weird quirks as well as strange hardware configurations. Look for any sort of developer program from the maker of your device.
Answer: For Visual Studio you can download the Windows Mobile SDK which comes with starter kits and emulators. You can program either native C++ or .Net applications quite easily and quickly.  Take a look at the samples provided with the SDK for a good entry point.  This is likely going to be the best resource out there for getting started.  I suggest installing the SDK then running some of the samples to get your feet wet.
Answer: Start at the Windows Mobile Developer Center. There you will find a great getting start section with lots of links to the software you need and tutorials. Windows Mobile development is a lot of fun. :)
Answer: A good reference book to check out is "Microsoft Mobile Development Handbook" by Wigley, Moth, and Foot. It covers a lot of topics in mobile development with the .NET compact framework, and also the Windows Mobile platform.
You also might want to learn about Windows CE, which Windows Mobile is a flavor of.  A good place to start learning about Windows CE is windowsembedded.com.  From there you can download an evaluation version of "Platform Builder" which is the tool to create a Windows CE image to test with.
Answer: Another good source of Windows Mobile Development code samples and example apps can be found at Chris Fairbairn's blog.


small dataset for a regression task

Question: I am trying to train a NN model in MATLAB to predict the amount of overflow for flooded junctions in an urban runoff system and I have 45 samples and 15 features. The issue is, I don't think 45 samples are quite enough for predictive modeling. Is there anything I can do to have a have good model without the need to augment my dataset (maybe training another model instead of NN is a better choice?), or should I just jump right into data augmentation techniques? Is data augmentation even a wise choice?
Answer: As I wrote yesterday, there are issues with data augmentation. If you have a small sample size, you put yourself at similar risk of overfitting as you would be fitting a complex model, and if you have a large sample size where that is not such a concern, then I question the need to synthesize artificial data.
With just $45$ observations, you lack the sample size to do sophisticated modeling like neural networks (unless you just want to learn the mechanics of writing neural network code). Unless this overflow follows a simple pattern, consistently strong performance is unlikely.
My suggestion is to work with a simple model like a linear regression on a few features, perhaps three to five features, following a rule-of-thumb for using one feature per $10$-$15$ observations. This is unlikely to achieve the kind of performance that you would get from sophisticated modeling on a large data set, but this is probably all your data will allow.

small dataset for a regression task


Loading ASP.NET User Controls By Type And Passing Parameters?

Question:
Possible Duplicate:
Asp.net Usercontrol LoadControl Issue

In ASP.NET 2.0 it is my understanding that although the API existed for loading a user control by type, it didn't actually work.
Or at least I never managed to get it to work, and I know from blogs that others have had similar issues.
So I use a wrapper type that provides the functionality I need, invoking the relevant control constructor using reflection.
Has ASP.NET 3.5 made the loading of user controls by type and passing in parameters any easier?
Edit:
Further clarification....
There are two overloads for the TemplateControl.LoadControl method:
<code>Control TemplateControl.LoadControl(Type t, object[] params) and,

Control TemplateControl.LoadControl(string virtualPath)
</code>
My question is; in ASP.NET 2.0 the first overload didn't seem to work. Does anyone know if this method truly didn't work, and if so has it been fixed in ASP.NET 3.5.
I'll be testing this myself tomorrow, and will update the question with the answer if noone else knows.
Comment: Perhaps you could detail your question more, or give some code of example.
Comment: good idea, i will do so after work around 1900 GMT
Answer: Answering my own question:
Answer here: Asp.net Usercontrol LoadControl Issue


Correct way to open a new window in Appcelerator Titanium

Question: I have a rather large app made in Appcelerator Titanium, which I've not ported from the SDK version 3.2  because the Ti.Ui.Window's "url" property has been removed, which my application uses extensively. Unfortunately, I have not been able to find the new, correct way to do this. The info I'm finding out there does only point to the removal of the url property, or suggests that I should move to Alloy (which at the moment is not doable for me as it would require a complete rewrite of the app). Can anyone point me to an example of the right way this should be done?
Answer: If you're not using Alloy, then it's really a two step process. First you need to get the handle to the window. That is usually done with Ti.UI.createWindow (see http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI-method-createWindow). Now that you have a reference to the window, you simply open it. So,
var win = Ti.UI.createWindow({title: 'My first window'});
win.open();

Documentation on the window object is here.  http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Window
If you have windows defined in other js files. ie. myWindow.js, then you can use require to get the js window. Have the code in your window return a "Window" object, then open that.
ie. myWindow.js
var win = Ti.UI.createWindow({title: 'Window from another file'});
return win;

Then in your calling file, don't use url, require the window:
var myNewWindow = require('myWindow');
myNewWindow.open();

You can see information about calling require here: http://docs.appcelerator.com/platform/latest/#!/api/Global-method-require
Hope that helps.
Ray
Comment: I've been experimenting with something similar to this, but I'm not sure if it's the best practice. I put my second-window code in a CommonJS module. I require() the module, and call a single exported function from it. The exported function creates the window and handles all of its logic. Is there a downside to doing it like this?
Comment: It's really the same thing. So doesn't matter. Big thing is changing to Alloy when you get a chance and a new project. Much easier and more maintainable for projects.


Show that limit does not exist ($\varepsilon$-$\delta$)

Question: By means of $\varepsilon$-$\delta$, I am looking for some ideas to prove (a beginner math class) that limit does not exist.
For instance, consider the function
\begin{equation}
f(x)=
\begin{cases}
x,&x>1\\
3-x,&x\leq1,
\end{cases}
\end{equation}
show that $\lim_{x\to1}f(x)$ does not exist.
Answer: Seems pretty tough for a beginner maths class lol. If you end up with an answer which doesn't satisfy $|x-x_0|<\delta \implies |f(x)-L|<\varepsilon$, then you just say 'limit doesn't exist'.
Answer: I used to find the negation of $\varepsilon-\delta$ very tricky as an undergrad. It appears I still do because I am not 100% sure of this.
I reckon the limit does not exist if for all $\delta>0$ and $L$, there exists an $\varepsilon>0$ and an $x$ such that $0<|x-1|<\delta$ but  $|f(x)-L|\geq  \varepsilon$.
In this is the correct negation, then for any $\delta>0$, and any $L$, choose $\varepsilon=1/3$. We might have to pick $x$ according to what $L$ is.
Say
$$x(L)=\begin{cases}
1+\min\{\delta/2,1/6\}, & \text{ if }L\leq 3/2
\\ 1-\min\{\delta/2,1/6\}, &\text{ if }L>3/2
\end{cases}.$$
Suppose that $L\leq 3/2$. With $x=1+\min\{\delta/2,1/6\}$, we have have $|x-1|=\min\{\delta/2,1/6\}<\delta$, so $x$ is $\delta$-close to one.  Then $|f(x)-L|=|L-(1+\min\{\delta/2,1/6\})|\geq 1/3$.
Similarly for $L>3/2$, there exists a point $\delta$-close to $1$, $x=1-\min\{\delta/2,1/6\}$, such that $|f(x)-L|\geq 1/3$.
I wouldn't be one bit surprised however if I have messed up the negation.
Comment: I did similar proof in the class. I used $\varepsilon=1/2$ and showed that there is no $\delta>0$ for $L=1$ and $L=2$. And, mentioned that the proofs for the cases $L<1$, $12$ follow similarly.
Comment: If for every $\varepsilon>0$ there exists $\delta>0$ such that $0<|x-1|<\delta$ implies $|f(x)-L|<\varepsilon$. Then, this is also true for $\varepsilon=1/2$. And obtain contradiction for every possible $L$...
Comment: @bkarpuz yes that is a far easier approach!
Answer: It doesn't exist because the left limit at $x = 1$ is $2$ and right limit at $x = 1$ is $1$. If a proper limit existed there, left and right limits would be equal.
Comment: The question asked for proving that via $\epsilon$-$\delta$.
Answer: I guess there's no easy way of doing this. Here's the way I would proceed:
Assume the limit exists and is some number $L$. Then for $\varepsilon =1$, there is an $\delta > 0$ such that $|f(x) - L|<1$ for all $0<|x-1|<\delta$.
Now if $\delta <1$, let's define $\delta ' := \delta$, and otherwise let $\delta '$ be some number with $\delta ' <1 \le \delta$.
Now pick $x_1$ and $x_2$ such that $1-\delta ' < x_1 < 1 < x_2 < 1+ \delta '$.Then it is clear that  $0<|x_1-1|<\delta$ and $0<|x_2-1|<\delta$.
Thus, $|f(x_1) -1| < 1$. This means $|3-(x_1 + L)| <1$. Now, by using the fact that $x_1>0$, we can conclude that $|L|>2$. (Check this!)
Also, we have that $|f(x_2) -1| < 1$. This means $|x_2-L|<1$. Then $|L| < 1+ |x_2| < 1+\delta ' <2$.
But we showed $|L|<2$ and $|L|>2$, which is a contradiction. Thus, limit does not exist.


Convert image into mp4 that zooms in to precise point in image

Question: I have an image. From this image, I need to create an mp4 that zooms in to a precise square within the image (about 1/64th the original size). How would I go about creating this file? The most obvious way seems to be to create a series of pictures which progressively zoom, and to then convert those images to video. However, I can't figure out how to create the individual images such that they eventually end on the desired square within the image. Alternatively, I tried Windows Movie Maker but could not specify the final space on which I need the video to stop, nor the rate at which the video should progress.
Comment: Try animating this in reverse. Start on your target and zoom out.
Comment: Have you explored Photoshop's Timeline animations?
Comment: Iwould use a real animation sofware, after effects or blender for example.
Comment: Possible duplicate of [How to make a layer change size in an animation in Photoshop?](http://graphicdesign.stackexchange.com/questions/25605/how-to-make-a-layer-change-size-in-an-animation-in-photoshop). It should be possible t do this in CS 6 and beyond just as easily as in AE See the last answer.
Comment: I disagree that there are "too many possible answers"... A MP4 file is a video file and should be produced with a NLE, most of them work the same way...
Answer: I will explain how to do this in After Effects, but many other NLE such as Premiere Pro or Final Cut Pro X offer the same features, only slightly differently presented:

Open After Effects (or your NLE editor)
Import the image into it
Make it the exact duration that you want your shot to be
Create keyframes for "position" and "scale" on this layer at the beginning of the timeline with your image zoomed out
Go to the last frame of the animation, and zoom and position it the way you want the zoom to be
Export to MP4

I just did it to try out this solution; it took me 5 minutes to do this in AE and the result was a professional 1080p MP4 file at 59 pictures per second, very smooth.
Answer: I'm sure there are easier ways of doing this such a AE or 3ds max etc but it is completely possible in photoshop. As you say, this will be a series of the same image expanding to achieve your result. You will need the one image and then x amount of animation frames on the timeline. In the first frame you will set the image so it zoomed out as much as you want. then each frame you will need to duplicate the image and increase the size - thus resulting in the zoom effect, this can be very time consuming BUT possible. see attached, I mocked up a gif to illustrate this.
Hope this helps,
Mark
Comment: As you've said, this seems very time-taking and the resulting movement is extremely choppy.
Comment: hey, didn't say this was the best idea, just said it was possible. that gif took about 5mins to make so will obv be choppy. If you have after effects just use that and set a camera path to fly to it or 3ds max.
Comment: but the user needs a MP4 file, could your solution produce one?
Comment: sure, same process, I initially rendered it as an MP4 to upload here to show you, but was more than the 2mb upload limit here.
Comment: Ok. Why would you recommend using a photo retouching tool to produce a video file rather than a video editor, though?