Only side of chest feel sore after pushups

Question:
Only the muscle in red feel sore after pushups, why isn't my full chest feeling sore, what am I doing wrong?
Comment: I'm sorry, but we can't really help you with this. Winged scapula is something you should see a doctor about. And again, without seeing a video of your form, we can't tell you if it's right, or if it's going to improved your WS.
Comment: Hard to say what you're doing wrong, when you don't tell us what you're doing. A video of your technique would go a long way.
Comment: @Alec, Hi I am the one that asked the question but I seem to have locked myself out of that account as I can't edit the question also I don't have enough reputation to comment so i am posting in the answer section, I don't know how to post a video but I have seen myself do pushups in a video , everything seems right if I ignore my rounded shoulders(I have winged scapula). I thought pushups might help in fixing them but I only feel soreness in the area marked in the above photo, does it mean that my winged scapula is getting better?
Answer: welcome to Physical Fitness! I'm currently studying Kinesiology and Physical Education in university. Unfortunately, I can't say what exact exercises you've performed so I cannot give a specified answer or deduce why your exercise routine did not go the way you expected since your question is not super precise and detailed (e.g your goals, what exercises did you perform, how long was your exercise, etc.). Usually, muscles need to be worked past their threshold tolerance of a particular weight or load to be "sore" for a given amount of time. Perceived soreness essentially comes down to exercise-induced changes to the muscle's physiology (e.g inflammatory by-products) or physical damage (i.e. micro tearing of the muscle fibres). So, perhaps you need to reevaluate your pushup techniques, choose another exercise to do, add more volume, more load, or change up your usual routine altogether. Our chest muscles are generally categorized as the pectoralis major and minor (with certain neck muscles and a small muscle contributing). Can't say what you want to accomplish as a "full chest" workout since those are just the muscle involved. However, if you consider the chest as a part of the core (which it is) and what you meant by "full chest", I'd recommend you workout out the entire core (torso, for informal understandings).
There is quite a bit more exercise physiology tips and anatomical issues related that I could add. I see you have a winged scapula from the comments. Perhaps check with your Physiotherapist or Chiropractor (NOT PHYSICIAN - they are not as specialized in the workings of the musculoskeletal system). Winged scapulas could interfere with your pushups as the abnormal position of the scapula affects the position of our shoulders, which can translate to altered pushup technique. This is called a "kinetic chain" - one issue in some area can affect other areas as these areas all work together. Hope this helps :)
Answer: About the push-ups, you probably shouldn't worry too much, as soreness does not necessarily indicate progress and the inner and outer chest are essentially the same muscle regardless. I personally notice that my chest soreness is pretty unpredictable, but I make regular (and balanced) progress in size and strength anyway.
As for the winged scapula, I'm no physical therapist, but muscle imbalances usually seems to contribute to issues like this. If you aren't already, try doing just as many exercises for your back and external rotators as for your chest. Hope this helps!


Vim-Pandoc Overrides my Markdown Plugins

Question: I've been trying to get the vim-pandoc plugin to play nice with markdown nvim, and have not been successful in finding help so far. The trouble seems to be that vim-pandoc sets markdown files to be recognised by vim as pandoc files which prevents the vim-markdown plugin from running syntax highlighting etc. In any case, as soon as install the vim-pandoc plugin, my syntax highlighting goes out the door in markdown. If only I could get vim-pandoc not to do this, I'd be all set. It looks like this is the way to achieve this result:
let g:pandoc#filetypes#pandoc_markdown = 0

By default, the above is set to 1, but setting it to 0 has not helped. If anyone has any ideas about how to proceed, I'd greatly appreciate the help. The issue I'm having has also been raised in the vim-pandoc GitHub issue 70 and issue 382, but none of the suggestions there seem to help. What I've settled for instead is using the vim-pandoc-syntax plugin as well, simply accepting that all the other markdown plugins won't work as expected. One feature I really miss is where you have a list and it auto generates the next bullet point etc., when you create a new line in the list. The vim-pandoc-syntax plugin which is supposed to pair with vim-pandoc does not have this set be default, and I'm not sure how to get it to reproduce the autogenerate list item functionality that I used to have. I've even considered adding this bullets plugin, but it feels like the better option would be to prevent vim-pandoc from getting in the way of my original markdown plugin which was working great. Any help would be greatly appreciated!
Comment: Welcome to [vi.se]! Have you tried putting the `:let` *before* `:filetype on`? Re: bullets, have a look at `:help 'formatoptions'` and `:help 'formatlistpat'`
Answer: Correct. The setting g:pandoc#modules#enabled can mess with your keybindings, and many other things. Passing an empty list helped on my case.
let g:pandoc#modules#enabled = []


Sniffing router traffic

Question: I have a 10 MB connection, which runs really good but sometimes it get slower then 56kb dialup connection, i had my provider call up and asked, what is wrong but they say too much traffic is being consumed in your house by devices on the chart of connected devices. So i had my password of wifi changed and just connected my laptop, and it was running really like a 10 MB connection, but again i am facing same issue.
I want to monitor my network traffic and see what's the devices on router taking so much of my bandwidth and if possible website address too. I have a mac, i was wondering if there is any software that can really help me out?
Comment: What make, model and version of router do you have?  Some routers have the ability built-in to log all throughput.  Also with some routers and Wi-Fi connections you can validate the MAC Address of connected devices to allow/prohibit throughput.  Also look at [Wireshark](https://www.wireshark.org) and [How To Set Up a Capture](https://wiki.wireshark.org/CaptureSetup).
Answer: It's hard to comment on your question as you didn't give many details.
You could connect a switch with monitor/mirror port functionality between your router and your DSL modem/network terminator (if that is two discrete devices for you). This way you could connect a computer to the switch's mirror port and "see" (snoop, trace) all traffic that goes out your router's WAN port and analyze it.

Sniffing router traffic


What happens when a compass is taken to the site of magnetic pole of earth?

Question: We know that the direction of compass needle always points towards the magnetic north pole.
If we take the compass to the site of magnetic north pole, which direction will the compass needle point?
Comment: It will point straight up or down.
Answer: If the Earth's magnetic field were a perfect dipole, the compass needle would float aimlessly.  Or it might point in the last direction it was facing before you stepped over the magnetic north pole.  If you have magnetized metal in your pockets, it might point there.  If you tilt the compass from horizontal, it will point toward the low side.  If you started it spinning, it would continue spinning until friction slowed and stopped it.  Earth's magnetic field lines would be vertical at the magnetic north pole if the magnetic north pole coincided exactly with the geomagnetic north pole.  So a compass held horizontally there would have no preferred direction.
But the Earth's magnetic field is not a perfect dipole.  The north pole of the Earth's magnetic field does not fall exactly at the geomagnetic north pole (geomagnetic is the north antipodal point of a theoretical perfect dipole that extends through the center of the Earth), so the field lines are not exactly vertical.  A horizontal compass will be erratic and unreliable at the geomagnetic north pole, and may exhibit all the behavior in the paragraph above.
The magnetic pole and the geomagnetic pole are constantly in motion due to fluid movements in the Earth's core.  They wander many miles each year, but on average they hover around the Earth's rotation axis.  Here is a link which explains the movement of the geomagnetic pole: https://en.wikipedia.org/wiki/Geomagnetic_pole.
Comment: Which pole, besides the magnetic pole,  wanders from the rotation axis?
Comment: @nasu   The Earth's rotation axis itself wobbles, or changes its axial tilt over time.  This causes precession of the equinoxes, which can be noticed in climate as seasonal contrasts become more extreme in one hemisphere or the other.
Comment: Yeah,  the axis moves.  But the poles are still on the rotation axis,  by definition. The poles may move relative to geographical features but not relative to the axis.


What is the term for the category of words that request someone else do something

Question: Is there a term for words/phrases which request that someone do something, such as "contact us", "do this", "click here", "share your thoughts" etc.
Comment: Imperative might be what you're thinking of.
Comment: Hortative? Deontic?
Comment: The technical cover term for all of imperatives, requests, pleas, suggestions, etc. is ***Impositive***, a term coined by Georgia Green Morgan. The idea is that an impositive performative predicate **imposes on** the listener; in practice, it imposes the will of the speaker, though there are many ways to do this.
Answer: These sentence types are called imperatives.
E.g.,
Dormez-vous.
Give me that.
Shut up.
etc.
Comment: Which covers a subset of "requests that someone do something", and doesn't include questions like "Can you help?" or declaratives like "It would be helpful if you put the dishes away". That's why Green's concept *impositive* is a better match.
Comment: Since the asker wants "a term for words/phrases which request that someone do something", not really a name for SENTENCES expressing requests, 'imperative' does not seem to me particularly appropriate. I would suggest 'injunctive(s)', a general term often used to refer to expressions of ANY category that play an 'injunctive' role.


Does starting the engine with one of the spark plug wire disconnected damage the starter coil?

Question: A friend of mine (he is not my friend anymore) decided to pull a practical prank on my new motorcycle. He pulled the wire of one of the spark plug (my bike has three of them in the cylinder) and let it hanging by the engine case. I cranked up the engine without noticing it and let it idle for a minute before noticing sparks coming out the side from the spark plug cable. It was sparking against the engine case. I reconnected it and rode away thinking it wasn't any harm. Another friend of mine said that this prank could have damaged my starter coil and that spark plug could not be sparking at all. Now I don't notice any change in the performance of the motorcycle but is he right? Could this have done damage to the bike?
Comment: I guess you mean ignition coil instead of "starter coil"? If it works, it probably continues to work... I have had ignition issues with spark going to places it shouldn't on an old car, and none of this damaged the ignition coil.
Comment: yes I meant the ignition coil.
Answer: No.  The reason your other friend incorrectly said that is because if a charged plug was touching a ground (the frame or whatever) that's a short over a device designed to produce a high voltage, which, obviously, could ruin it.  However, the plugs cable ends are "highly" female in that there is plenty of rubber to prevent them from accidentally touching a ground.  You can't even touch the metal inside the cable with a finger.
From the coil's perspective, the electrical difference between sparking in a spark plug and sparking through the plug cap rubber and onto the engine isn't that much, except it has to go over a much larger air gap distance.  The main point is that it isn't being shorted because of the design.  Cars (where most of the engineering came from for your motorcycle) are > 100 years old.  Engineers thought of this exact situation already and designed accordingly.
That said, you might have died had the loose cable had touched you while you were driving 50 mph.  Unlikely you'd be doing that missing a cylinder of  power, but that's a bigger concern in my book.
Answer:
Could this have done damage to the bike?

One thing that can happen on all engines having multiple cylinders and a catalytic converter is this:

N-1 cylinders are firing, providing hot exhaust to the catalytic converter
The remaining cylinder is not firing, so the raw evaporated fuel goes to the catalytic converter
The fuel burns in the catalytic converter that's at the reaction temperature
Your catalytic converter overheats and is damaged

I used to have a faulty connection to one of the spark plugs on a 1989 Opel Vectra. So I know that temporarily running the engine on three cylinders firing won't ruin either the ignition coil or the catalytic converter -- assuming you immediately notice the condition and fix it.
I also once suffered an ignition coil wire disconnection, which obviously stopped the engine. Fortunately was easy thing to fix, in two minutes I was already driving again. This momentary event damaged neither the ignition coil nor the catalytic converter.
However, starting to genuinely drive at a fast speed on a car having one cylinder misfiring could damage the catalytic converter. I understand that new cars automatically detect this condition and stops fuel injection to the misfiring cylinder.


Can we query blocks by (extrinsics) timestamp?

Question: Can we query block data by timestamp? If so what time is the correct one to use? For a typical block object, there's a time property that seems to always be undefined, but the first extrinsic (index 0) usually provides timestamp. Is there a way to query details of all blocks whose timestamp is between some date range?
Answer: It's currently not possible to do that with substrate, short of manually searching through the blocks (you can use binary search). This kind of functionality will most likely never be provided by substrate as it can be built by external tools that create indexed databases, that allow answering such queries efficiently. You can find a list here of tooling that already exists that maybe helpful for your use case.
Comment: Would be nice to be able to go from timestamp to nearest block header though. Holding that data and having an RPC call for it would be a lot more efficient than having users binary search you via RPC calls. At the moment there's no linkage between the relay chains except via timestamps - it's the only way to find out what kusama block is happening when polkadot is on block X. Those external tools will be able to do it too but they will be centralised to one degree or another.
Comment: Both subsquid and subql are open-source tools that you can run yourself to create your own index, they are only centralized if you want to use someone else's already indexed data. Substrate does not even require that blockchains have a timestamp so creating an RPC call for this would be breaking this abstraction. While I do agree that timestamp is probably a very common and useful dimension to query I still believe that this is a job for other tools (and thankfully those tools already exist).
Answer:
Can we query block data by timestamp?

See André's answer above.

... what time is the correct one to use?

Just want to confirm that the first argument of extrinsic timestamp seems to be the conventional way. See example in Subquery tutorial
Comment: The parameter passed to `timestamp.set` is indeed the current UNIX timestamp. You can see the definition of the `timestamp.set` extrinsic here: https://github.com/paritytech/substrate/blob/master/frame/timestamp/src/lib.rs#L181-L215
Answer: We can do better than a binary search through block numbers to find the nearest timestamp.
If we have a starting timestamp A from the chain in question then we can use the estimation techniques listed in this question to tell us how many blocks forward or backwards we likely need to go (request blocks by block number not by block hash):
How to estimate the timestamp of a future block in Substrate?
Our first guess gets us timestamp B. If we diff A and B them we get a much more realistic value of how long blocks take over that period, and from that we can make a more accurate prediction than our initial prediction.
Comment: Yeah I wrote a function that does better than binary search based on the block time:
https://github.com/joepetrowski/rpc-sidecar-requests/blob/083a9f0/stakingrewards.py#L190L262
Comment: My rough cut rust version: https://github.com/gilescope/dotsamatown/blob/b9cd64d507051b45bc75a4640688e29faea13237/src/datasource/time_predictor.rs - alas didn't see your impl until I had written it.


How do you send a request with the "DELETE" HTTP verb?

Question: I'd like to create a link in a view within a Rails application that does this...
DELETE /sessions

How would I do that.
Added complication:
The "session" resource has no model because it represents a user login session. CREATE means the user logs in, DESTROY means logs out.
That's why there's no ID param in the URI.
I'm trying to implement a "log out" link in the UI.
Answer: Correct, browsers don't actually support sending delete requests. The accepted convention of many web frameworks is to send a _method parameter set to 'DELETE', and use a POST request.
Here's an example in Rails:
<%= link_to 'log out', session_path, :method => :delete %>

You may want to have a look at Restful Authentication.
Answer: I don't know about Rails specifically, but I frequently build web pages which send DELETE (and PUT) requests, using Javascript. I just use XmlHttpRequest objects to send the request.
For example, if you use jQuery:
have a link that looks like this:
delete

And run this Javascript:
$(function(){
    $('a.delete').click(function(){
        $.ajax(
            {
                url: this.getAttribute('href'),
                type: 'DELETE',
                async: false,
                complete: function(response, status) {
                    if (status == 'success')
                        alert('success!')
                    else
                        alert('Error: the service responded with: ' + response.status + '\n' + response.responseText)
                }
            }
        )
        return false
    })
})

I wrote this example mostly from memory, but I'm pretty sure it'll work....
Answer: Correct me if I'm wrong, but I believe you can only send POST and GET requests with a browser (in HTML).
Comment: Also Rails deals with it when there's no Javascript by adding a hidden input field called _method and setting it to PUT/POST/DELETE and then pretends it got that kind of HTTP method.
Comment: Correct; however, you can send requests with arbitrary verbs using JavaScript.
Answer: Rails' built in method for links will generate something like this:
Logout

If you don't want to use the Rails' built in method (i.e. don't want the rel="nofollow", which prevents search engine crawlers from following the link), you can also manually write the link and add the data-method attribute, like so:
Logout

Browsers can only send GET/POST requests, so this will send a normal GET request to your Rails server.  Rails will interpret and route this as a DESTROY/DELETE request, and calls the appropriate action.


Better looping, for string manipulation (python)

Question: If i have this code
s = 'abcdefghi'
for grp in (s[:3],s[3:6],s[6:]):
    print "'%s'"%(grp)

    total = calc_total(grp)

    if (grp==s[:3]):
        # more code than this
        p = total + random_value
        x1 = my_function(p)

    if (grp==s[3:6]):
        # more code than this
        p = total + x1
        x2 = my_function(p)

    if (grp==s[6:]):
        # more code than this
        p = total + x2
        x3 = my_function(p)

If the group is the first group, perform code for this group, if the group is the second group, perform code using the a value generated from code performed for the first group, the same applies for the third group, using a generated value from code for the second group:
How can i tidy this up to use better looping?
Thanks
Answer: I may have misunderstood what you're doing, but it appears that you want to do something to s[:3] on the first iteration, something different to s[3:6] on the second, and something else again to s[6:] on the third. In other words, that isn't a loop at all! Just write those three blocks of code out one after another, with s[:3] and so on in place of grp.
Comment: Sorry, i forgot to include my `total = calc_total(grp)` statement
Answer: I must say I agree with Peter in that the loop is redundant. If you are afraid of duplicating code, then just move the repeating code into a function and call it multiple times:
s = 'abcdefghi'

def foo(grp):
    # Anything more you would like to happen over and over again
    print "'%s'"%(grp)
    return calc_total(grp)

def bar(grp, value):
    total = foo(grp)
    # more code than this
    return my_function(total + value)

x1 = bar(s[:3], random_value)
x2 = bar(s[3:6], x1)
x3 = bar(s[6:], x2)

If
    # more code than this

contains non-duplicate code, then you must of course move that out of "bar" (which together with "foo" should be given a more descriptive name).
Answer: x = reduce(lambda x, grp: my_function(calc_total(list(grp)) + x),
        map(None, *[iter(s)] * 3), random_value)

At the end, you'll have the last x.
Or, if you want to keep the intermediary results around,
x = []
for grp in map(None, *[iter(s)] * 3):
    x.append(my_function(calc_total(list(grp)) + (x or [random_value])[-1]))

Then you have x[0], x[1], x[2].
Answer: I'd code something like this as follows:
for i, grp in enumerate((s[:3],s[3:6],s[6:])):
    print "'%s'"%(grp)

    total = calc_total(grp)
    # more code that needs to happen every time

    if i == 0:
        # code that needs to happen only the first time
    elif i == 1:
        # code that needs to happen only the second time

etc.  The == checks can be misleading if one of the groups "just happens" to be the same as another one, while the enumerate approach runs no such risk.
Answer: Get your data into the list you want, then try the following:
output = 0
seed = get_random_number()
for group in input_list:
    total = get_total(group)
    p = total + seed
    seed = my_function(p)

input_list will need to look like ['abc', 'def', 'ghi'].  But if you want to extend it to ['abc','def','ghi','jkl','mno','pqr'], this should still work.


A problem with texture changes when joining meshes

Question: I have a "wing" model that is made to look like it is made from palm fronds rather than feathers, so the color texture is designed for that - each leaf on a frond has a shaded color (using a color ramp) to give it a leaf-like look. The outer parts to which they are joined are a simple green vine color. When I join them, I lose the subtle shading on the leaf meshes. I have given them all the same UV name, but the shading is still lost when I join them. I'm not sure why, and it's frustrating.
Here it is joined:

And the texture node setup for the shaded color:
Comment: Hello could you please share your file before joining? don't forget to pack the images https://blend-exchange.com/
Answer: Maybe the two wings have been shaded in different ways? I know that if you join a Smooth Shaded object with a differently shaded object it can become messed up, but except for that I really don't know.


a question about the isotropy subgroup of circle action on manifolds with isolated fixed point

Question: Given a circle action on a closed, oriented smooth manifold $M^{2n}$ with isolated fixed points. My question is, does there always exist a point $p\in M$ such that the isotropy subgroup of $p$ is trivial? In other words, does there always exist a free orbit of this circle action?
Moreover, if the answer is yes, can we extend this free orbit to a tubular neighborhood
$S^1\times D^{2n-1}$ such that each $S^1$ in it is a free orbit?
Comment: COnsider the action of $S^1\subseteq\mathbb C$ on $M=\mathbb C$ such that $z\in S^1$ acts by multiplication by $z^2$. ($M$ is not closed but you can easily cook up a closed example like this; say, on the Riemann sphere with the "same" action)
Answer: Closed, orientable, and even-dimensional are irrelevant, as is the condition that all fixed points are isolated. Assume that the action is effective, and that the manifold is connected. Then for every $n>1$ the fixed point set of the subgroup of order $n$ is a submanifold of positive codimension (or possibly a disjoint union of countably many submanifolds of various positive codimensions), so the union of them all cannot be the whole manifold. In other words there is a point with trivial isotropy subgroup.
Comment: I believe that that Richard Montgomery was answering your second question with the slice theorem. In general, for any smooth action of compact $G$ on $M$, for every point $p\in M$ with trivial isotropy group, let $D\subset M$ be a disk transverse to the orbit $Gp$ at $p$, of dimension $dim(M)-dim(G)$. The map $G\times D\to M$, $(g,x)\mapsto gx$, is a submersion at every point in $G\times p$, therefore in a neighborhood of $G\times p$, and it's not hard to see that for a small enough disk nbhd $\Delta \subset D$ of $p$ in $D$ it gives a diffeomorphism of $G\times \Delta$ onto its image.
Comment: Thank you. But what about my second question?:-)(Moreover, if the answer is yes, can we extend...)
Comment: By the way, the condition "even-dimensional" is of course can be deduced from the fact that the fixed points are isolated. But the conditions "closed, orientable" are relevant:-)
Comment: Irrelevant in the sense of being unneeded hypotheses for the conclusion you are asking about. And does "the fixed points are isolated" imply that there is at least one fixed point? (Sorry.)
Comment: some literatures take "isolated" as "nonempty and finitely many fixed points" while some are not. So it depends on concrete situation.
Comment: Thanks, Tom. Yes, that is what I was trying to say. -Richard M.
Answer: The answer is `no', but for a stupid reason: you can have an action with an
 ineffective kernel, meaning that (normal closed) subgroup of $G=S^1$
consisting of those $g$ which act trivially:   for all $x$ in $M$, $gx = x$. For example,
take a free action of $S^1$ on $M$. Define a new action $g * x = g^p x$
(I'm thinking of the circle multiplicatively). The new action's ineffective kernel consists of the pth roots of unity.
You can   get rid of the ineffective kernel  by taking $G$   and
dividing by the ineffective kernel.  In this circle case,   the resulting action of this new'
$S^1$ will be free a.e.: that is it will have principal orbit type  the identity (check out, for example, Hsiang's book,Cohomology Theory of Topological Transformation Groups', p. 10-12, esp. p.12) which means, combined with the slice theorem' (p.10) or
theGleason theorem' (p. 9) the answer to your question becomes `yes'.
Comment: Thank you. But what about my second question?:-)(Moreover, if the answer is yes, can we extend...)


publicly available spam dataset of social networks

Question: I am trying to create a naive bayes spam filter for social networks and i need a spam dataset (containing posts/tweets etc.) of popular social networks like twitter/facebook. Is there any publicly available dataset which i can use to train the classifier?
Answer: From the Machine Learning Repository at UCI there are some datasets that may get you started.

emails
SMS

For emails you may also find this StackOverflow discussion helpful, or this 300+MB dataset.
For blogs marked as spam, check out this site.
Twitter data are not allowed to be publically shared. You can share the analysis or the visualization, but not the raw data of tweets. I imagine Facebook has a similar policy.
But, you can collect more than you ever dreamed of by using the public live stream. Here is an example python code to collect many, many tweets as they are sent. There should be plenty of spam if you let it run for a couple minutes.
Answer: More than a decade ago, when I worked for an ISP, I subscribed to the spamtools mailing list.  Unfortunately, their archives link doesn't work, so I have no idea if they're still active or not.
They also were more focused on e-mail spam, but at the time social network spam didn't really exist (as social networks didn't really exist in the state they do today).
I would suspect that if someone had a training set, it'd be someone on that list.  I'd also assume that twitter spam would be significantly different from blog or e-mail spam, due to the character limitations.


How can I embed a Stack Exchange question inside my blog?

Question: I love to save my favourite questions and show them off on my blog, eg. wordpress.com blog. How can I embed questions?
Answer: You want Stack Tack.
It's a neat app written using the API.

StackTack is a widget for bloggers and writers to easily tack questions and answers from the StackExchange sites such as StackOverflow, ServerFault and SuperUser, into their articles. The widget remains up to date as answers get added, modified, voted on and accepted.
Comment: StackTack is nice! I'm looking on StackTack website for a page to generate the HTML scripts for a given StackExchange id but I give up. Do you know if it exists?
Comment: @Nam, sorry but I do not.  You should try to contact the author(s).  They would know better.
Answer: Every question has an RSS feed. I'd expect that would be the most appropriate way to do it. How to do it depends largely on the blogging platform you're using. If it happens to be WordPress, then I suggest that http://wordpress.stackexchange.com would be the place to ask: "How do I embed an RSS feed into my blog?"
Answer: StackTack is just for self-owned blog. For blogger on wordpress.com like me (NOT wordpress.org), I prefer to use Stack2Blog.


loss of serpentine belt while running

Question: I have a 2015 Civic LX.  Recently the serpentine belt broke while driving.  The engine started making an odd noise.  After about 5 minutes the engine stopped running with the smell of something burning.  The belt is replaced now and car is running.  But it makes that same noise with the application of power at low rpm, such as starting from a stop. No noise at higher rpm once the car is rolling.
Questions:
1) Why did the engine quit when the serpentine belt broke.  Afaik it was still getting air, fuel and spark.  So why did it stop?
2) What equipment may be damaged as a result of driving without a serpentine belt?
3) Any idea what the odd noise is at low rpm when you press the pedal a bit?
Comment: @TimNevins - The serpentine belt doesn't turn the camshaft on any Honda I've ever worked on (or any other type of car I've ever worked on, for that matter). There is a cog belt (timing belt) which does that job, as well as run the water pump (in most models with Overhead Cam(s)).  Maybe you misspoke?
Comment: Is it really a fan belt?  Won't the fan be electrically driven on that car?
Answer:
Most likely alternator voltage drop could have cut the engine.
None of your equipment should be damaged with a loss of an accessory serpentine belt.
The odd noise could be a bad pulley or tensioner if it wasn't replaced with the belt. That can add odd noises before/after engine load.

loss of serpentine belt while running


When a photon hits a moving atom and stops it, why do we take momentum of photon rather than energy to calculate the change in motion of atom?

Question: In the case when hen a photon hits a moving atom and stops it, if we consider that while equating energy, we ignore transmission of energy into other forms, and thus, momentum conservation is better thing to do as it is particle nature of light. But why do we ignore the same transmission of energy into other forms in the case of photoelectric effect where photon collides the electron?
Comment: Could you rephrase this question please?
Comment: Related, though rather more technical: [How does one account for the momentum of an absorbed photon?](https://physics.stackexchange.com/questions/212614/how-does-one-account-for-the-momentum-of-an-absorbed-photon).
Answer: We don't ignore the transmission of energy.
The easy way to understand collisions is usually in the center of momentum frame. And for motivation here, assume it is all in one line. In that case, before the collision the photon is coming in from, say, the left, and the atom from the right. Their momenta will be equal but opposite. After, the photon goes back out the way it came, and so does the atom. They simply reflect off each other.
Knowing that, you just transform back to the lab frame. In the lab frame the atom is coming in from the right and finishes stopped. It means, in this frame, the photon had to start with less energy, and finish up with all the (kinetic) energy and momentum.
So you need to work out what the original speed of the atom is, and what the energy of the photon has to be to correspond to stopping the atom. Hint: don't forget to do relativistic velocity addition and kinetic energy for the atom.
Answer: When a photon interacts with an atom three things can happen:

elastic scattering, the photon keeps its energy and changes direction
inelastic scattering, the photon gives part of its energy to the atom and changes direction
absorption-reemission, the photon gives all its energy to the atom, and the valence electron moves to a higher energy level as per QM

In the case of absorption, there can be two ways:

the energy level of the photon is the same as the difference between energy levels of the atom, and the photon gets absorbed.
the energy level of the photon is too high, and it kicks the electron off the atom, that is the photoelectric effect

You are asking in this case why they ignore the transmission of momentum in the case of the photoelectric effect. They do not. If the photon energy is absorbed, some of the energy liberates the electron from the atom, and the rest contributes to the kinetic energy of the electron as a free particle.
Answer: Your question reveals a misunderstanding.  You ask "Why do we take the momentum of a photon rather than energy...".  For a photon, its total energy is equal to its momentum.  Given the relativistic Energy equation:
$$
E^{2} = (pc)^{2} + (m_0 c²)^{2}
$$
For a photon, $m_0 = 0$ so, $E = p c$.  Often in physics, the speed of light is set identically to $1$ so $E = p$.    [Note: $p$ is momentum].


add tabs in the sharepoint 2013 masterpage

Question: I need to show horizontal tabs on my SharePoint 2013 on premise masterpage below the banner .I am not good at the designing part, How can i achieve that . can anyone suggest me something?
Answer: Open your Master Page in SharePoint Designer. Find the controls on the ribbon tab which needs to be inserted. You can add a label or any other control available. The script added in the Master Page should be inside the  tag.
Note:Make a copy of your master page before you screw up :P


Circular matching. PHP / MySql

Question: Hi I need some help with the following scenario in php. I have a db with users every user has an ID, have_card and want_card. I know how to make a direct match (one user trades with another user). But if there is no direct match but there is a circular swap like:
User #1 has card A wants card B
User #2 has card B wants card C
User #3 has card C wants card A
In this scenario there is no direct match between two users. But if:
User #1 gives his card to User #3
User #3 gives his card to User #2
User #2 gives his card to User #1
Every ones happy.
All the info I have to start with is User #1 how do I find User #2 and User #3?
Thanks to everyone for your answers.
Answer: Interestingly, I came across a similar thing to this with the BoardGameGeek Maths Trade.  Basically, everyone specifies that they either want a game or have a game and the algorithm maximises trades including circular dependencies.
This is exactly what you want.
Here is an explanation of how TradeMaximizer works.  It uses Dijkstra's algorithm and skew heaps to find minimal matching solutions (ie a smaller circle is preferable to a larger circle).
Granted this is created in Java but algorithms are universal and you can recreate it as required, particularly once you understand what it's doing and why.
Comment: +1 for using graph theory (as opposed to the other hackish suggestions).
Answer: This is how I would do it:
Create a recursive algorithm like this:
1 take one user, see what he wants
2 find another user who has what user one wants
- if user two wants, what user one has, everything is fine an we're done
- if not, continue

3 find another user who has what user two wants
- if user three wants, what user one has, everything is fine and we're done
- if not, continue ...

... and so on, but you should a have limit for recursive levels to prevent endless searching.
Answer: Maybe this:
Finding possible first matches (users who have the card user#1 wants)
select name from user where has in (select wants from user where name = '1');

Iterate through those matches and try finding the missing link:
select name from user where name in (select name from user where has in (select wants from user where name = <match>));

Answer: This is a challenging scenario.  I had to build this for a book swapping application a while back and using a white board I was able to more easily visual and solve the problem.
What I did was use the same table inside the query multiple times, just using a different name.
In my scenario, the books that were needed were in a separate table from the books the users had.  Hopefully you'll be able to see the logic in this query:
$query = "SELECT
        A.Owner_ID as Owner_1, C.Owner_ID as Owner_2, E.Owner_ID as Owner_3
    FROM
        E_User_Books_Have as A, E_User_Books_Have as C, E_User_Books_Have as E,
        E_User_Books_Needed as B, E_User_Books_Needed as D,E_User_Books_Needed as F

    WHERE
        A.Book_ID=D.Book_ID AND
        C.Book_ID=F.Book_ID AND
        E.Book_ID=B.Book_ID AND
        A.Owner_ID='$ME' AND B.Owner_ID='$ME' AND A.ID='$ID'AND
        C.Owner_ID=D.Owner_ID AND
        E.Owner_ID=F.Owner_ID AND
        C.Owner_ID!='$ME' AND
        E.Owner_ID!='$ME'";

Circular matching. PHP / MySql


Is Liszt really pronounced like the English word "list"?

Question: I would think Franz Liszt's surname would be pronounced "least" or "leasht," but according to this, it is pronounced "list." Is that true? If so, why?
Comment: Not related to German language.
Answer: The name is pronounced as the German word "List" which comes very close to the English word "list".
To understand it, you have to know that Franz Liszt was an Austrian-Hungarian composer. In Hungarian his name is Liszt Ferenc. In Hungarian "sz" is pronounced similarly as the German "ß", and in fact in former times the modern German letter "ß" was written as "sz". And up to now in "ß" is pronounced as "s - z" ("ess- tsett") when one pronounces the individual letters.
His father was Adam Liszt whose name is also spelled as Adam List which is of German origin. His professional career took place in the Kingdom of Hungary (see Wikipedia) which was part of the Austrian empire. In Hungarian the letter "s" is pronounced as the English "sh", and this explains the spelling with "sz": Adam Liszt wanted his name to be pronounced reasonably correctly.
Here you can listen to the German pronunciation and Hungarian pronunciation.
Comment: @theonlygusti: I think "least" would be spelled *liest* in German. That's actually a word, the third person singular of *lesen*.
Comment: _pronounced similarly as the German "ß"_: Why complicate things? Hungarian _sz_ and German _ß_ are both pronounced identically to English _s_.
Comment: How about the vowel? OP guessed it should be 'ee' not 't**i**n"
Answer: Yes, true. It's a name. It's pronounced as the person who bears it wants to see it pronounced.
Further, it follows the usual way a 'i' is pronounced in German when followed by a consonant: short like the 'i' in the English 'list'. The sz is a rare and antique way to denote the ß character when the ß is not available - but the ß actually is a ligature letter for the combination sz - either way, it is pronounced as the 's' in the English 'list', too.
Comment: The _sz_ in Liszt's name is _not_ an alternative way of denoting _ß_, but stemming from Hungarian: https://en.wikipedia.org/wiki/Sz_(digraph)#Hungarian
Comment: @jonathan.scholbach In this special case, it's rather a *Hungarian transcription* of the German name "List" (That Liszt's father brought to Hungary).
Comment: @jonathan.scholbach if you look up the history of how the letter ß came into being: it *is* a ligature. Hence also its name. The fact that in modern German you may not replace an ß wit sz anymore does not change history. Also the actual choice of List to change the spelling of his name to keep its pronounciation in a predominantly Hungarian society does not change pronounciation rules - and that's all I elaborate on.
Answer: "Least" and "list" are good approximations, because the vowel in Liszt sounds similar to the one in "least" but it is short like the one in "list".
least /liːst/
list /lɪst/
Liszt /list/
Comment: "least" has a long i, but Franz Liszt is pronounced with a short i. At least for me as a German, the two do not sound very similar.
Comment: @Jan I've always heard it pronounced with a long i. That's however mainly by Austrians...
Comment: @jwenting this guy pronounces Liszt with a short i (about 48 seconds into the podcast). But then he is probably not Austrian.
Comment: The Hungarian pronunciation is exactly as @g.kertesz says: it is a _short_ vowel, but with the quality of the English _long_ vowel in _least_. Scots English pronounces _least_ this way. (By the way, _liszt_ means _flour_ in Hungarian; but this is not the origin of the name _Liszt_.)
Comment: @jwenting: I am Austrian and I am dealing a lot with classical music (I am singing in a [well known Austrian concert choir](https://www.wienersingakademie.at/)). I never ever have heard someone pronounce the name *Liszt* with a long [iː]. This would make no sense, because in German two or more consonants at the end of a syllable always indicate a short pronunciation of the vowel before, also in Austrian German. (Exceptions exist but are rare.) I only have heard a boy (a member of [Wiener Sängerknaben](http://www.wsk.at)) who pronounced s and z separately ([lɪst͡st]) before he was corrected.


How can I remove A friends phone from my google account? I used it and didn't sign out

Question: I have been on the security manager page and although the device is there, there is no option to remove it or deauthorise it. I have changed my password but am unsure if they can still gain access without needing a password as I have just clicked on my phone to gmail and it opened without needing a password. I'm not good with computers so don't know what else to do. Help would be appreciated x
Answer: If you changed your password, your account is signed out everywhere and requires the password to log in again. All is safe.
Answer: Ethan's answer is correct, but for peace of mind: You can also log in to Gmail on your PC, hit "Details" at the very bottom-right of the page, and choose "Sign out all other sessions".
Answer: If you are really worried about security you can go for Google two step verification
Everytime you sign in from any device or anywhere you will be asked for OTP.
It gives another layer of security to your account.


How to justify switching research disciplines after Ph.D for a fresh recruit?

Question: Consider engineering disciplines A and B. Assume that the mathematical skills required for A and B are same. Let us say I am a fresh Ph.D pass out in A and say I did a reasonable one compared to the standards. My experience in B is limited to some coursework, but I believe I do have the ability to do research in it. I wish to work in a company in B. Now one of them has shown some interest in me and has asked for a telephonic interview. How should I go about justifying my interest in B though I did a Ph.D in A?
Comment: And why are you interested in B exactly?
Comment: because I like it and I am bored to death of the other!!
Answer: You justify your interest in B like you justify your interest in any field, by simply explaining why you like it.  They might not ask you to justify your interest though, they might simply ask you to explain why you want that particular job and what skills you can bring to it.
If you have a PhD, you have learned how to learn and research independently. Its not unusual for people to end up working in something different to what they were doing in their PhD.  I know a professor of computer science whose PhD is in pure mathematics.
You should do some reading in B so that you are familiar with both the basic concepts i.e. refresh your coursework if it was completed a while ago.  Also, read the latest research in B; if its not an academic job they may not require this but because you have a PhD they may assume you have done it.
Answer: If you are interested in B, be prepared to expand on why you are interested in B. On the other hand:
Why should you ask "how should I justify my interest in B"? Is there anything about your interest in B that you should feel apologetic for and that you thus have to justify? You have the right to your preferences to the same extent that everybody else does. You have the same right to change your mind, adjust your preferences and pivot according to them that everybody else does. Without apology.
Answer: They're more likely to be interested, and to make you an interesting offer, if you can explain how you intend to bring your knowledge of A into B's field and develop something new from the combination.
("I'm bored to death of A" worries me a bit, though, given how much time and effort you've invested in it.)
Comment: I didn't literally mean the "boring" part. I have done some work in B during my undergraduate years and used to like it then.
Comment: You used to like A too, I presume -- certainly enough to stay with it through the PhD. I'm concerned that there's a deeper issue going on such as depression, in which case switching careers may not solve your problem.


What do you do when you don't know how?

Question: A client needs a task done and you don't have the skills to implement it. How would you respond to the request?
Comment: This is a bit vague.  Can you provide any more context?  Is it a creative task?  Do you have other people on staff that can execute it?  Is the problem a time/resource one?
Comment: Can you [edit] your question to clarify that this is an interview question and not an actual problem you're having?
Comment: It is a question being asked by a potential employer.
Comment: @Connie could you add in Information in the question, such as what you tried so far, what kind of employment?
Answer: If you don't have the skills it depends a bit on the context. If you're a freelancer you can take the job and subcontract the bits you can't do. I take on anything for enough money, and some projects I've basically just managed subcontractors who did the actual work. Many consulting firms do exactly this.
If it's a solo project then you realistically need to let the client know that you can't do it, otherwise you're just setting yourself up to fail.
Answer: If you aren't able to perform the task, simply do not take it on. You have the right to decline business at your discretion, so simply utilize that right.
Something along the lines of

Hello Sir/Madam, thank you for getting in touch.I've read over your requirements and have concluded that I'd need to decline this request as it isn't 100% aligned with the services I offer.
  Kind Regards,Me
Answer: It appears this is an interview question. So, you have an employer and the company probably has other employees too, and presumably a manager. (i.e. you're not a freelancer)
For some reason the client is asking you directly, which does happen. In this case, what I would do is tell the client that you'll discuss it with your manager (if it's a phone conversation... if it's an email you can skip this step).
Tell the manager you don't have the necessary skill. There may be another employee who can do it. It's up to the manager to either find another employee who can do it, subcontract it, give you time to learn how to do it, or tell the client that you won't be doing it / negotiate it with the client.

What do you do when you don't know how?


In Orange, is it possible to analyze or visualize real time, streaming data?

Question: Using orange, I would like to be able to do real time analysis or visualizations on streaming data. I would appreciate any input on the matter!
Answer: "Realtime" is a very big word, in many regards you would only call a system realtime when there is very little latency in a system, almost no latency. It would require specialized hardware and os, for a discussion of python and realtime see https://stackoverflow.com/questions/7079864/real-time-operating-via-python.
If you describe the requirement as "continously (or frequently) updated", it looks possible to me to do some mining on streamed data with orange. I am adding my 5 ct, as I have just started looking into orange.
You would need to create a widget that opens your input stream and propagates it in chunks to the subsequent widgets in the flow, i.e. when you want to build something like a "tail -f" on a file source, reads character by character until there is a linefeed in the stream. In that case it would release a signal with the line as data to the output.
Orange widgets are receiving their inputs as signals, "widgets receive inputs at runtime with the designated handler method (specified in the OWWidget.inputs class member)." This next widget would update on that signal and propagate on its own outputs. So the continued live analysis propagation of streaming data through orange widgets seems in general possible to me.
How close to or far from real time this would be depends on many factors like load, computing power, and memory. The choice of mining algorithms might also be limited by such factors.
Comment: Basically, Frankstr summed it up quite nicely. I would only add that, if you will start creating a widget for stream data, have a look at EnKlik Anketa and Google Sheets image in Prototypes add-on, which both implement data reload, which simulates streaming.


Cauchy Distribution in R

Question: Cauchy distribution. Draw 1000 sets of numbers from the Cauchy distribution using set.seed(100). Do this for set size 2, 5, 10 and 20. Compute the median of each set (use a matrix and apply()). Study the distribution of the medians, for each set size.
Comment: Programming questions are off topic here. Consider highlighting the statistical aspect of your problem if there is any.
Answer: Programming library functions usually yield uniformly distributed random numbers. To generate random numbers distributed according to a different distribution, there are two methods:

Transformation method
Rejection method

As your question looks like a homework assignment, you have most probably covered both methods in the respective course and this is an exercise for the methods. In this case, the transformation method is appropriate, because the CDF of the Cauchy distribution can be readily inverted:
$$y = \frac{1}{2} + \frac{1}{\pi}\arctan(x) \iff   x = \tan(\pi y - \pi/2)$$
Or you enter ?rcauchy in R ;-)

Cauchy Distribution in R


Determining the network class of an IP address

Question: How do you determine the network class of an IP address? For example, I have the IP address 127.0.0.1
Comment: IPv4 address classes have been deprecated 20 years ago. Since then CIDR (classless inter-domain routing) is used. Classes don't exist anymore.
Answer: <code>Class Ranges: First octet
-----------------------------
Class A     1 - 127

Class B   128 - 191

Class C   192 - 223
-----------------------------
</code>
Though 127.0.0.1 is class A, it's reserved for loopback/testing.
Source
Answer: Network classes are deprecated. As a attempt to cope with IP address exhaustion, the concept of network classes has been dropped in 1992. Before that, for a company with a need for 300 IP addresses, a class C network with 255 addresses would not suffice and it therefore received a class B address space with 65535 addresses, thus wasting 65535-300=65235 addresses.
See the Wikipedia article on network classes for further info.
Answer: The following are the classes of IP addresses.
Class A The first octet denotes the network address, and the last three octets are the host portion.Any IP address whose first octet is between 1 and 126 is a Class A address. Note that 0 is reserved as a part of the default address, and 127 is reserved for internal loopback testing.
Class B The first two octets denote the network address, and the last two octets are the host portion.Any address whose first octet is in the range 128 to 191 is a Class B address.
Class C The first three octets denote the network address, and the last octet is the host portion. The first octet range of 192 to 223 is a Class C address.
Class D Used for multicast. Multicast IP addresses have their first octets in the range 224 to 239.
Class E Reserved for future use and includes the range of addresses with a first octet from 240 to 255


Is this Shirk/Kufr?

Question: Assalamu Alaikum!
My mother was one time advising me not to spend to much time in the bathroom and was mocking me that I spend hours just rubbing my feet during wudhu.and she also said that dont close the tap again and again during wudhu and I laughed loudly at this. Would this be regarded as Kufr ? Or mocking wudhu or islam ?
Answer: No it is just shaytan waswas..U are suffering from
Ignore him,he will surely make you doubt that you have done kufr shirk but only way to make him weak and get to rid of him is to ignore him.
And try to recite 4 QUL (last 4 surahs of quran often)
Answer: Kufr = Close yourself (from the truth, which is Islam)/Deny (the truth, which is islam)
Shirk = Believe in something other than Allah سُبْحَانَهُ وَ تَعَالَى (I hope you know what i mean by this)
From these 2 definition up there, It shouldn't be regarded as Shirk Or Kufr.

Or mocking wudhu or islam ?

What makes you laugh, is it the Wudhu practice? or because of ur mum? Insha Allah if you don't have the intention to mock the practice, then it's not regarded as mocking Wudhu.
Wallahu a'lam. Hope that answers the question

Is this Shirk/Kufr?


How does real-time raytracing draw reflections of off-screen geometry?

Question: I know what raytracing is, but I'm a bit curious how games are able to reflect off-screen geometry using raytracing in real-time.
I tried looking up the technical details but most of the articles are "what it is"
Answer: The basic algorithm for raycasting is actually surprisingly simple. In pseudocode it is:
<code>for each pixel on the screen
  calculate an angle which begins at the camera and crosses through that pixel on the near-plane of the camera
  trace a ray from the camera position with that angle through the 3d geometry of your scene until you hit an object
     if the object is not reflective
         color the pixel in the color of the object
     else
         calculate the reflection angle at the impact point
         continue tracing the ray from the impact point with the new angle
</code>
The reflected ray might move out of the view frustum and still report back a color value which then gets applied to the screen pixel it originally originated from.
Decades ago I followed a tutorial about how to implement a basic CPU-based raytracing renderer and did it myself. I found that really illuminating. A real, modern raytracing engine would of course use the GPU for performance reasons, but doing it on the CPU as an academic exercise usually makes it easier to understand the basic principles if you are not familiar with GPU programming. All you need is some basic trigonomety and collision detection, which are both things most game developers should already be familiar with. I don't think it was more than 100 lines of code. It shouldn't be hard to find a similar tutorial in your favorite programming language.
The complicated stuff about raytracing starts when you want to implement light sources. Especially when you want to simulate them in real-time and not just have a pre-calculated lightmap. But that's outside of the scope of the question.
Comment: You don't really need to use trigonometry, most algorithms and formulas rely on linear algebra and skip calculating angles.
Answer: You can calculate the intersection of a ray with a triangle (you could use a lot of shapes, but since ray tracing usually needs a helping hand from rasterization, it's best to use those), that gives you a point on it. Then you can get the normal by taking the cross product of two vectors made out of any two sides of this triangle (and by additionally querying a normal map if needed). From there it's just a simple formula (this is a built-in in glsl, but I don't know about the shading language used for ray tracing)
This by itself is really fast, most modern computers can deal even with 5-6 bounces per ray. The part that's slow is shading the object correctly.
It's not possible to render a full, shaded scene with acceptable graphics in real time with consumer graphics cards using only ray tracing. Even stuff like that Quake 2 RTX port needs to do a lot of tricks to get a good framerate (it only does the ray tracing to part of the pixels every frame and guesses the others based on the surroundings. This can lead to some strange effects, but it works).
Comment: @Cerberus if it answered your question, press the tick button
Answer: One neat detail to add here is that we can use hybrid strategies to get some of what raytracers are good at (reflection accuracy) and some of what rasterization is good at (raw speed / coverage in one pass)
We can first draw our scene with regular rasterization to determine which visible pixels have reflective materials, and the detailed surface normal at those points from the normal maps via the G-buffer.
Then we can fire reflection rays from those point reflectors, and intersect them against a set of proxy geometry we've used to approximate our scene content (eg. a bunch of oriented boxes or ellipsoids)
This is a depth-only raycast: we don't try to compute the exact surface colour or illumination at the struck point, all we need to know is how far down the ray did we hit something. This and the fact that we're checking only against very simple bounding shapes helps this part go very fast.
Now with an estimated hit point in hand, we can look up into a conventional rasterized reflection probe. But now since we know not just the direction of the reflected ray but also its depth, we can use this to perspective-correct our lookup, and get reflections that parallax more correctly as the viewpoint moves.
It's not a perfect mirror reflection because of the approximations we took, but it can handle semi-shiny/bumpy surfaces or shallow puddles very convincingly, without the "infinitely distant background" artifacts we normally get from reflection probes.
So this is the kind of flavour of thing you'll often see with realtime raytracing at present: using raycasts tactically, in tandem with rasterization techniques, to add the kinds of detail rays are great at capturing, but without the full complexity of rendering all shading through recursive ray bounces as we might do in offline renders.


New GFCI outlet shows hot/neutral reversed either way I attach old 120V power line

Question: Some circuitry in my old house is just two wire w/o ground and as I'm renovating I replace these outlets with GFCI if I'm not pulling two wire w/ground. I've found such an outlet that shows HOT/NEU REVERSE either way I attach the hot and neutral wire to the GFCI outlet. What is going on here?
Comment: @PhilFreedenberg The GFCI actually does not care which is which, it just looks to see whether hot and neutral are **equal**.
Comment: Those 3-light testers are optimized for detecting wiring **mistakes** in new construction, not wiring **failures** in proven wiring. As such, their "what's wrong" answers are extremely wrong and misleading. Peel the label off and throw it in the trash.  The yellow-yellow-red lights are useful.
Comment: Are you connecting to the load? Terminals instead of to the line. Your hot and neutral feeder needs to go on the line terminals.
This is where I would look for the problem.
Comment: With no ground, how will the GFCI tell which wire is hot and which is neutral?
Comment: Can you post photos of the inside of the box in question please?
Answer: First, the lack of a ground wire does not imply lack of grounding.  Older construction often brings ground via the armored cable or metal conduit to metal boxes, and receptacles and switches can pick up ground via their mounting screws.  Receptacles do not do this reliably unless they are marked "self-grounding".
You haven't mentioned this, but you are using a 3-light tester both for GFCI testing and also to detect wiring problems. Those 3-light testers are extremely unreliable because the labeling is written for wiring mistakes in new construction.  The labeling is completely wrong for troubleshooting wiring failures in something that was properly wired.
On a grounded receptacle:  The tester should indicate 2 yellow lights.  When the "TEST" button is pressed, it should immediately trip the GFCI and the tester should indicate all dark. (because the GFCI tripped).
On an ungrounded receptacle: The tester should indicate 1 yellow light (middle).  While the "Test" button is pressed, the GFCI should not trip.  The light indications become meaningless, you might expect center yellow and red while you're holding the button down, but that is a testing artifact.
Always hook things up correctly. When "wiring correctly" and "optimizing for favorable messages on a tester" conflict with each other, always wire correctly.
When installing GFCIs, put all wires on "Line" (read the instructions for how each screw takes 2 wires). Do not use the "Load" terminals unless you understand how downline protection works and want to use it, note instruction 8(C) re: installation of "GFCI Protected" stickers.  Using "Load" and multiple GFCIs results in redundant protection and great difficulty resetting. Here's how to untangle that when you do it by mistake.
You MUST use "No Grounding Conductor" stickers on all GFCI-protected outlets without true grounds.  If you don't like the look of the provided stickers, feel free to make them on a Brother or P-touch label maker: any method is allowed except hand-written.
Comment: The test button built in to the device will work just fine without a ground wire.
Comment: Check, check, check, check to the many questions and answers, thanks. I've upgraded many of the old two wire receptacles to code with GFCI outlets, stickered them appropriately and the simple receptacle tester performs as expected (indicates no ground and button doesn't trip the GCFI). It is just this oddball that doesn't just show "no ground" but indicates the hot/neu reversal regardless of the way I wire it. I will leave the hot wire connected to line/gold on the GFCI.
Comment: When you use a GFCI in a receptical with no ground connection, how do you verify that the GFCI is working correctly? It isn't able to leak current to ground to simulate a fault, so the test button won't work. However, GFCI outlets do fail, so they need to be testable.
Comment: The internal test can either leak current from the load side back to the line side, or run a third wire through the sense transformer. Neither option needs ground. Example schematics: https://www.electroschematics.com/gfi-ground-fault-interrupter-wall-wart/


Meaning of the phrase "embedding theoretical knowledge into practice"?

Question: So, I have been writing my application for a job, and I want to mention that I consider the job as an opportunity where I convert the theory I have learned in my study into practice (real work). In this context, would it be correct to state "embedding theoretical knowledge into practice"? I read it somewhere online, but I am not quite sure about the correctness of it.
Comment: Hello, 4118. ELU does not provide services like proofreading, writing advice or style recommendations. If you point out a particular aspect of grammar or word choice that you are concerned about, this becomes on-topic, provided you supply reasonable research. // That said, though it's not ungrammatical and is probably acceptable semantically, I'd rate 'an opportunity where I can convert the theory I have learned in my studies into practice' many times better than  'embedding theoretical knowledge into practice' stylewise.
Comment: you've already said it
Answer: "embedding theoretical knowledge into practice" may appear grandiose. Another way to phrase this could be ;
"put my knowledge into action".
Or;
"Set what was learned to work".
Best of luck
Comment: +1 for 'grandiose'.
Answer: Embedding something into another is used and idiomatic. See, for instance, this article title:

Conole, G.C. and Oliver, M., 2002. Embedding Theory into Learning Technology Practice with Toolkits. Journal of Interactive Media in Education, 2002(2), p.Art. 7. DOI: http://doi.org/10.5334/2002-8.

The literal meaning of embedding is to put something within a substance, as the Oxford Learner's Dictionary explains:

embed something (in something) to fix something firmly into a substance or solid object
[Examples] an operation to remove glass that was embedded in his leg / The bullet embedded itself in the wall. / (figurative) These attitudes are deeply embedded in our society (= felt very strongly and difficult to change).

The title above, as well as your own usage, is a figurative usage that treats practice as a substance and theory as the ideas you affix within your practice. This usage appears fairly often, especially in more academic usage. The Corpus of Contemporary American English shows 9 results for a collocation search of "embedding (something) into":

So something like:

Embedding content into a selected topics course ...

or

embedding instruction into ongoing play activities ...

means that the direct object (content, instruction, theoretical knowledge) will be a large component of the item named after "into" (a selected topics course, ongoing play activities, practice). So that's how the current usage you have works: theoretical knowledge is a basis for your practice.
Finally, making precise stylistic recommendations is outside of our scope, but let me point out that an existing related phrase is already in usage: "theory into practice" (about 222,000 results on Google Scholar). So if you use that rather than "theoretical knowledge into practice," you'll be using a collocation readers may already recognize.
Comment: About 1000 results in a Google search for << "Embedding Theory into" + Practice >>. I didn't investigate how many of these were repeats, as reading them was so annoying. I know which our careers advice people would have advised offered  'an opportunity where I can convert the theory I have learned in my studies into practice' and 'embedding theoretical knowledge into practice'. I suggest you compare Google results for  "embedding theoretical knowledge into practice" and "converting theory into practice" before advising on potential life-changing CVs.
Comment: Thanks. I customarily run searches to work through issues of usage. Also, as someone who regularly works with people on job documents, I am aware that neither your suggested revision based on OP's phrasing nor the OP's original version are necessarily better (that depends on context, no?), which is why I also made it clear that "making precise stylistic recommendations is outside of our scope." Instead, I stuck to questions of usage appropriate to the site - what does the collocation mean and how is it used?
Comment: What exactly do you mean by "such phrasing"? You've shown that "embedding theory into practice" is idiomatic, but from what you've written ("...theoretical knowledge is a basis for your practice") it seems that the idiomatic use is different than the one the poster intended ("I consider the job as an opportunity where I convert the theory I have learned in my study into practice "). Perhaps you were intentionally not commenting on this discrepancy.  But it might be useful to do so.
Comment: @Juhasz The existance of a few examples doesn't  'make' an expression idiomatic (ie show that it is widely accepted as sounding natural). There are fewer than 400 Google hits for "embedding theory into practice", and these include many repeats. All of the ones I looked at seem to be in academic registers (often in articles).


downloaded 13.04 on inspiron 3520, at start it gives me two icons windows and ubuntu, windows works great, ubuntu gives error message

Question: Recently downloaded Ubuntu 13.04 on my windows desktop. It downloaded and partitioned automatically, after restart, two icons emerged, for the dual boot one for windows 8 the other for Ubuntu, Windows icon works great and pulls up windows 8, the Ubuntu icon, is a little slow and then brings up this error message. "windows failed to start, a recent hardware change might be the problem" it continues on " insert windows reinstall, choose language then next click repair, if you don't have disc contact system admin file/Ubuntu/winboot/wubi/dr.mr, status Oxcooooo7b required file is missing or contains errors." this has done this for three different versions of Ubuntu I have tried to install 12.04, 12.10 and now 13.04. Is there something I am missing? I am dual booting, from desktop, not a cd, from some reason even when I boot from cd first it does not start.
Answer: I installed Ubuntu 13.04 on a Dell Inspiron 5720.  Are you booting in UEFI mode? Or Legacy?  If you are booting in UEFI mode, you may need to go into the BIOS (hold down F2 at the Dell boot screen) and go over to the Boot tab.  My laptop lists boot priority.  If Ubuntu isn't listed, go down to Add and select the Ubuntu partition, then go down to the file selection and look for the bootx64.efi file in the /boot/efi/EFI/ubuntu.  (It has been a little bit since I did this.  And I can't edit my entry to see what I have selected.)  This may allow you to boot ubuntu.  It sounds like Ubuntu isn't passing secureboot, and the laptop is attempting to go to Windows by default.  I hope this will be of some help.


RF Communication

Question: My friend and i have a project. We should make a rf communication system in mines. This system should run from 1km distance. It will send and take cryptic information. Mine's shapes are variable. We thought that we can use a similar system with 15km open range walkie talkies. What are your opinions about it? What kind of system should we use?
Comment: how about a relay system see http://www.aprs.org/cave-link.html
Answer: Very tricky. Conventional frequencies used by walkie talkies are rubbish at penetrating strata. See this wiki site called "Through-the-earth mine communications".
In that article they mention the use of ultra low frequencies (300–3000 Hz) as a means of communication because the low frequency nature of the wave means it penetrates much better. However this is not likely to be useful because it requires galvanic connections into the rock to create circulating currents (basically you amplify the voice signal thru a power amp and use the strata/rock as the load and hopefully a conduit to a sensitive receiver also connected to the rock.
Another option is magnetic signalling. Here's what wiki says:

Portable magnetic-loop cave radios have been used by spelunkers for
  two-way communication and cave surveying since the 1960s. In a
  typical setup the transmitting loop, consisting of a many turns of
  copper wire, is oriented horizontally within the cave using a spirit
  level, and driven at a few kHz. Though such a small antenna is a very
  poor radiator of propagating radio waves at this low frequency, its
  local AC magnetic field is strong enough to be detected by a similar
  receiving antenna up to a few hundred meters away. The received
  signal's strength and its dependence on orientation of the receiving
  coil yields approximate distance and directional information.

The basic problem of RF thru rock and strata is the conductivity due to water molecules killing off the E part of the EM wave. Once the E part is killed off the H field remaining (magnetism) reduces with distance cubed - compare this with conventional RF - the H field and E field reduce linearly with distance (not squared or not cubed). This is why RF is so great out in the open and why it is so vulnerable in the presense of mineralized water.
A solution I was involved with back in the 80s was "the leaky feeder" principle. See this wiki site.

It makes use of a piece of coax snaking around the shaft complex and works by allowing EM waves to both penetrate it and exit it. In other words it's what you might call really crappy coax. I'm not saying this is a convenient solution either but it is known to work in coal mines (I've seen it in operation in them).
A bit more I dug up on the path-loss of a radio wave through wet soil. Below is a telling graph shwoing how transmission frequency affects attenuation. The graph is for two RF devices placed 3 metres apart: -

Take the two data sets that have the lowest pathloss. The lowest by far is the pathloss in free space and at 300 MHz the pathloss over 3 metres is 31 dB (this calculation is based on the Friis transmission equation converted to dB form. The 2nd lowest is thru soil with 5% water content. At 300 MHz, attenuation is about 85 dB. Notice also that as water content increases not only does the attenuation increase but it also rises more rapidly with frequency.
The graph above was taken from this paper  entitled "Communication Through Soil in Wireless Underground Sensor Networks – Theory and Practice"
Answer: This is unlikely to work without some additional infrastructure.
100s of meters of earth is going to attenuate to oblivion any radio signal you can reasonably send.  There are ways to go thru large amounts of earth, but those require very low frequencies and large powers.  That just won't work for a handheld transmitter and voice bandwidths.
You have to give the radio energy a path to get around the blockages.  A simple wire attached to the ceiling of every tunnel might work.  This is hard to predict, so you'll just have to try it.  If there are already electrical cables, like for providing power to lights, they might be useable.  It may be necessary to to install common mode chokes in places to keep the RF signal from getting shunted to ground, while letting the power pass normally.  Depending on how the power distribution network works, you may also have to install capacitors in places to allow the RF signal to hop over power transformers and the like.
This is really difficult to predict up front.  You need to experiment, both with what needs to be done to existing wiring to act as a RF conduit, and what frequencies works best.  I'm guessing wavelength on the order of a meter or a few will work best, but I could be totally wrong about that.

RF Communication


My 2011 Equinox LT

Question: Early today I had a message that my gas cap was loose. I was going try tighten it when I stopped, but forgot. Later my engine light came on after I ran my car through car wash. I remembered about about the gas cap and tightened it. Started car and engine light still on. Is there any connection here?
Answer: It could be connected, but without knowing what the code is behind the check engine light (CEL), there's no way to tell. That said, I'm doubting the two are connected. If the dash readout told you specifically the gas cap wasn't tight (or isn't sealing), it would have either continued to tell you the same or would have turned off if it is re-secured.
If it was the gas cap which caused the CEL, it takes a little while for it to turn off. The computer does its checks and discovers the gas cap is back in place, it will then turn the light off, though the code will still be stored.
Take your vehicle somewhere and have the codes read. You can have it done for free at most major chain auto parts stores.
Comment: Is it possible it might throw an evap emissions system code if the cap isn't tight after some period or miles?
Comment: @DizzyFool - Sure, but without reading the code, it could be any of a 1000 things. Isn't the evap code the usual code for when the gas cap is not fitted correctly? I don't remember off the top of my head, but I'm pretty sure you're right.
Comment: Yes but I thought maybe this model (which I am wholly unfamiliar with) has some kind of latch switch or physical trigger on the petrol cap given that it has a separate tell-tale light or message for a loose cap? Ignore if irrelevant.

My 2011 Equinox LT


How to bacon infuse solid cheese block for smoking?

Question: I already cold smoke cheese. I'm looking to add bacon flavor to that cheese. Would soaking it in cooked bacon grease and cutting off the heavily saturated outer section work?
Comment: A lot of bacon's flavoring is in the smoke. You have to be careful for the bacon not to overrun the cheese flavor.
Comment: How would you define "bacon flavor"?  What should it get you that smoke does not?
Comment: I suspect if you cut off the outside, you would find that the rest of the cheese would have very little of the bacon flavour - fats and flavour compounds within the fat will permeate very little into the block of cheese.
Comment: Not really an answer therefore comment :) if you like to baconize so much your cheese, consider cutting it in little or mid pieces, and then roll them in bacon slice. This is often done here with salumi and soft cheese, but something more rustic can be interesting too (I suppose your cheese to be semi hard). I am sure you can also make cubes for tasty appetizers
Comment: Appreciate the feedback, sorry for the delay in response, I've been trying to figure out how to better phrase what I'm trying to achieve. I've had "bacon infused cheddar" before, but it was at one of those tourist traps with "gourmet" food. EZ Cheese makes a product, a cheddar bacon, I want to infuse bacon into the cheese to that degree. Without, who knows what's in EZ Cheese.
Comment: I want some of the pork flavor in the cheese.
Answer: Part of it depends on how you use the cheese.
To get a bacon-infused cheese block, the best and easiest way would be to buy some cheddar culture and make your own - the bacon fat, or even crumbles, well dried, can be added during the process, layered between curds, etc.  The block can be aged and/or smoked after pressing.
It may, maybe, be possible to take a block of cheddar, shred or chunk it, toss in some grease and/or crumbles, and press it into another block.  You would need to start with a young cheddar, and give a great deal of time and/or pressure to re-combine the cheese - seems like a lot of work for little return, and it saves very little work over making from scratch.
Soaking the cheese block in the grease, or adding a layer of such onto it after smoking and before storage, would get flavor into the outermost edges (it would not likely infuse far without extensive time).  Cutting those edges off would readily undo most of the flavor addition, though.  That saturated section you're concerned about, though, would not necessarily be a large part of any portion - it would be mainly be around the rind of a slice (small surface area) or mixed into a shredded pile... though additional cheddar can be added if the smoking on top of grease is still too much flavor.
The only other alternative I can think of would be keeping the bacon flavor on hand (as grease, or as commercial seasonings or flavorings) to add to the cheese at the time of use.
Answer: I would try coating the cheese (I also assume you are working with semi-hard cheese) with bacon grease, making sure to cut the cheese into smaller(2-3lb blocks) and letting it 'marinade' for 12 to twenty four hours. I would then wrap the cheese with bacon before smoking, if you are going to be using the cheese in the shredded form, you could try shredding it first, mixing in some bacon grease and bacon bits, then cold smoking it. Hope this helps.


Where can I enable the Desktop Gadgets in Window 10?

Question: I have upgraded from Windows 7 to Windows 10 and I miss the Desktop Gadgets from Windows 7. What happened to them and can I bring them back?
Answer: Microsoft retired the Desktop Gadgets in Windows 8 to push the usage of Store Apps. The purpose of the gadgets are served by the Live Tiles that you can pin to Start/Start menu.
You can use 3rd party installers which bring back the Windows 7 sidebar if you really like them.
Download and run the setup,

click next and wait until the setup is finished. Now do a right click on the desktop to open the Gadgets again and drag & drop the requested gadgets to the desktop:

That's it, now your Gadgets are back on the desktop.
Answer: Consider also the Gadgetarian at
http://windowslivegadgets.com/gallery/317/enable-sidebar-gadgets-windows-8-metro/
Gadgetarian does not add any new abilities to Windows 10, it just enables the native gadget functions, now unfortunately hidden. This way you can keep using all of your old desktop gadgets or add new ones, without compromising the integrity of the OS.


Modeling vectors of an unknown exploit

Question: Looking for a formula and parameters to feed it that will aid in the isolation of relationships within a system when the origin and cause of an exploit within it is unknown. Here's an example of an attack where the vector(s) are unknown, but there is an awareness of the exploit's occurrence: Verifying that I have fully removed a WordPress hack?
Comment: Can you expand further on what you mean by formula - I don't understand your question. Perhaps an example?
Comment: @Rory Alsop: Well since I've already given an example, I'll stick to it. A wordpress site had HTML inserted into the homepage, there is ZERO trace of how it got there, how would you backtrack from that asset to it's access points to zones beyond control, including the possible conclusion that those zones maybe that source of the attack, and that there is no countermeasure for that threat zone; in thing case, the site's on a shared server, which is not 100% in control of the site itself. Just seems to me, basic problem is if there no logs, how to you traces vectors of the known exploits.
Comment: Example understood, but what do you mean by formula here?
Comment: @Avid: A systematic approach with expected inputs and outputs, but any method is fine.
Answer: If you have zero trace of what happened then you can only make assumptions as to what happened.
Standard practice is to identify all platforms and versions, then to look at vulnerability databases to see if there are known weaknesses in your environment.
Then look at all information flows and transforms - identifying entrance points.
The above are common initial steps in identifying vulnerabilities, but I don't understand what your question means regarding isolating relationships etc.
Hope this helps.
Comment: Nice work in providing concrete actions and standard practice.
Comment: +1 @Rory Alsop: The intent of isolating relationships in to limit the scope of analysis to the attack.
Comment: So by isolating relationships you mean identifying information flows and connections?

Modeling vectors of an unknown exploit


555 Timer delay vs. Delay IC

Question: I need to create a delay in my circuit (about a second) and I'm wondering what are the advantages/disadvantages of using a 555 Timer to create a delay vs using a specialized delay IC like the LTC6994? This is the datasheet for the LTC6994: (http://cds.linear.com/docs/en/datasheet/699412fb.pdf)
Comment: or... use a crystal.
Answer: A 555 is about 1/10 the price, but accuracy will likely be less. It also has a plethora of 2nd sources.
The LTC6994 may be lower power, and has most likely higher accuracy.
Of course you could use a microcontroller and do better than either of the above in everything but cost, where the 555 still wins.
Comment: Maybe. It's not really a good way to make a soft power switch if that's what you're thinking, especially for battery power.
Comment: it's probably possible to convince a 555 to do that, but it's probably not the best choice maybe CD4047
Comment: I haven't used a 555 Timer in a long time and I'm actually not sure if it even fits my application. I don't want to delay just a single pulse. When I press a power on/off switch, I want the power to be connected to my circuit after a one second delay, and to remain applied to my circuit. Can a 555 Timer do this?
Comment: Do you think the LTC6994 is a good option for that application? ...I was looking at 555 timer delay circuits and they're all about delaying pulses.
Answer: I doubt that either the 555 or LTC6994 are really great solutions. It may help if you just list the requirements you need to do for your application:

Sense a button press (are there any further limitations here such as button bounce or if you hold the button down for over 30 seconds?)
Start a 30 second timer (how accurate? Will you have to adjust it?)
Set the power on signal (is this an RS flipflop or some other latching logic signal)
Is there a power off? (button? Timer? Do you press the same button again? Or hold it down for a time period like a PC power button? Or press a second button? etc)

The 555 is certainly cheap but you'll end up paying more for the components around it, especially if you need a potentiometer to adjust the time and a logic chip to hold power on state. Total cost will probably run out to $1.50 if you have an RS latch.
The LTC6994 is a great chip but not really designed for such a simple application. You'd probably end up in the $4+ range.
As Sphero so correctly pointed out you may be better considering a 6-8pin MCU like an ATTiny10 SMT (really nice because they do QTouch cap switch sense, and don't require a crystal) for < $0.90.
Once you have the skills to use the minimal MCU solutions you may hardly ever touch Logic chips again, so it's skills worth having.

555 Timer delay vs. Delay IC


SQL 2012 Standard - AlwaysOn FCI - Single point of contact?

Question: I am looking at HA options for SQL 2012 Standard.
I like the look of AlwaysOn FCI. I am using a SAN, so I think I can meet all of the requirements, but one of the applications I am looking at cannot have an alternative DB configured, only a single database location.
With FCI, is there any way to create a single name (ie SQLCluster01.domain.com) which will respond whichever node is up?
If not, is there any other way of creating a high availability access point for the databases?
Comment: High availability and load balancing are different things. Which are you trying to accomplish?
Comment: I have clarified the point. I am trying to accomplish HA
Answer: When you setup AlwaysOn, it is backed by Windows Clustering. As part of the setup you'll create a Cluster IP Address and host name and that is how you will connect to the active instance. The IP will move depending on multiple factors in Windows Clustering and AlwaysOn.
This is only for fail over, if you want load balancing you'll have to look at AlwaysOn AGs and your options there.
Comment: I am using Windows 2008 R2 Standard so do not have Windows Clustering. Are there any other options? Any third party tools that can achieve a similar result?
Answer: With an FCI, there is only one SQL instance (as opposed to an Availability Group in which you have multiple instances participating in a primary/secondary relationship). You connect to it via the cluster name that does the right thing (i.e. routes the request to whichever node in the cluster currently owns the instance).


Ordered pairs in a power set

Question: The exercise 48 of Chapter 3 in Enderton's Axiomatic Set Theory says:
Let $T$ be the set $$\{\varnothing, \{\varnothing\}\}.$$
Find all of the ordered pairs, if any, in
$$\mathcal{P}T=\{\varnothing, \{\varnothing\}, \{\{\varnothing\}\}, T\}.$$
The set $T$ does not seem anything like the Kuratowski's definition.
I think Enderton is trying to say "There is an ordered pair."
I just can't see how there could be an ordered pair since $\mathcal{P}T$ is not a function or relation.
Could you please help me see?
Comment: Just a quick note, my solution to this particular problem was wrong. I'm going to get around to editing soon.
Comment: The book is probably titled *Elements of Set Theory*.
Comment: If you are going through Enderton's book, this file might be of interest: https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B-baZt4ODPD3ZjgwM2M4NWQtOTNmMC00MmIzLTgxNWMtYTI1YWFkNWM0ZWEx&hl=en&authkey=COntjZAK It was wrttien by yunone http://math.stackexchange.com/users/1583/yunone
Answer: The set-theoretic ordered pair $(a,b)$ is $\{\{a\},\{a,b\}\}$. Note that this is $$\{\{a\},\{a,a\}\}=\{\{a\},\{a\}\}=\{\{a\}\}$$ if $a=b$. So you have at least one pair in ${\mathcal P}(T)$, namely $(\emptyset,\emptyset)=\{\{\emptyset\}\}$. Since the empty set is not an ordered pair, and no element of an ordered pair is empty, this is the only ordered pair in ${\mathcal P}(T)$.

Ordered pairs in a power set


Download not working on homepage

Question: I just tried to download elementary OS after making a contribution and I am getting a page not found error when I click the download button in the popup.
Answer: There was a temporary download issue on the website that has since been resolved. You can always re-visit the website and enter $0 to re-try the download.

Download not working on homepage


How to install CodeIgniter?

Question: Please give me a step by step process on how to install CodeIgniter on Ubuntu. I'm still a newbie. Thank you!
Answer: Assuming you have Apache2 installed and running...
Create a home for CI in the /opt directory. (Another place we could use is /usr/local, but Ubuntu likes to reserve /opt as the safe place for locally-installed software, so let's use that.)
Become root; make a directory; download CI. (The switch with wget is not zero; it's  capital O.)
sudo su -
mkdir -p /opt/share/php
cd /opt/share/php
wget http://codeigniter.com/download.php -O CodeIgniter_2.0.0.zip

Unzip the archive. The files were archived from a Windows machine, so they all have the executable bit set. We do not want that, so we change them to 0644. The CI framework version will change from time to time, but I only want to refer to it as "ci" (and not "CodeIgniter_2.0.0"). If it changes to CodeIgniter_2.0.1 tomorrow, I can change the symbolic link to point to a new version without editing any other files...
unzip CodeIgniter_2.0.0.zip && rm CodeIgniter_2.0.0.zip
find /opt/share/php -type f -exec chmod 0644 {} \;
ln -s CodeIgniter_2.0.0 ci

Let's add CI to PHP include_path. Use a different text editor than vim, maybe gedit, if you like...
vim /etc/php5/apache2/php.ini

And the relevant portion of php.ini to change:
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
include_path = ".:/opt/share/php/ci/system:/usr/share/php"

Save. Assuming we have nothing we want right now in /var/www, remove whatever is already in the /var/www directory; make directories for CI logging and caching; and, copy the application directory.
cd /var/www
rm -rf *
mkdir public logs cache
cp -rp /opt/share/php/ci/application .
cp /opt/share/php/ci/index.php public/

Let's set some CI variables. Use a different text editor than vim, maybe gedit, if you like...
vim public/index.php

And the relevant variables to change:
$system_folder = "/opt/share/php/ci/system";
$application_folder = "../application";

Save. Now let's set up Apache, using your favorite text editor over vim if you like:
vim /etc/apache2/sites-enabled/000-default

And as an example, the file contents (change ServerAdmin and ServerName):
<VirtualHost *:80>
    ServerAdmin firstname.lastname@example.com
    ServerName www.hostname.com
    DocumentRoot /var/www/public
    ErrorLog ${APACHE_LOG_DIR}/error.log
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>

    <Directory /var/www/public/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        <IfModule mod_rewrite.c>
            RewriteEngine On
            RewriteBase /
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ index.php?/$1 [L]
        </IfModule>
        Order allow,deny
        allow from all
    </Directory>

    Alias /user_guide/ "/opt/share/php/ci/user_guide/"
    <Directory "/opt/share/php/ci/user_guide/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
        Allow from 192.168.0.0/255.0.0.0 ::1/128
        Allow from 10.0.0.0/255.0.0.0 ::1/128
    </Directory>
</VirtualHost>

Save. Now let's do what CI needs us to do in order to remove "index.php" from the URL,
while also defining "base_url" to the value of the SERVER_NAME.
vim /var/www/application/config/config.php

And the relevant portion of that file:
$config['base_url'] = 'http://' . $_SERVER['SERVER_NAME'] . '/';
$config['index_page'] = '';

Save. Now let's set up ACL, so that permissions are very nice. First mount the file systems with the acl option in /etc/fstab.
vim /etc/fstab

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx / ext4 defaults,acl 0 1
mount -o remount,acl /

Then make a group to which a user may belong for this purpose (your user).
groupadd developers
usermod -a -G developers $username

The user needs to log out and in again to become a member of the developers group. Here we'll let members of the developers group do what they wish within the public and application directory, while the Apache user can read. However, the logs and cache directories are for root and apache only. (Done as an example.)
chown -R root.developers /var/www/public
chmod 0775 /var/www/public
chmod g+s /var/www/public
setfacl -d -m u::rwx,g::rwx,o::r-x /var/www/public
chown -R root.developers /var/www/application
chmod 0775 /var/www/application
chmod g+s /var/www/application
setfacl -d -m u::rwx,g::rwx,o::r-x /var/www/application
find /var/www/application -type d -exec setfacl -d -m u::rwx,g::rwx,o::r-x {} \;
find /var/www/application -type f -exec setfacl -m u::rw-,g::rw-,o::r-- {} \;
chgrp www-data /var/www/logs
chgrp www-data /var/www/cache
chmod 0770 /var/www/logs
chmod 0770 /var/www/cache

Restart Apache.
service apache2 restart

Install an IDE. (Komodo Edit is also a very nice IDE.) Netbeans uses php-doc.
apt-get install netbeans php-doc

I have trouble with fonts in NetBeans unless I use the Sun JDK.
apt-get install sun-java6-jdk
exit

Open NetBeans. Go to:
Tools->Plugins->Available Plugins

Find PHP and install it. Make a new project:
File->New Project->PHP with existing sources...

Existing sources are located in /var/www. Use PHP 5.3.
If you follow this, you'll get:

A common location for CI, so that it will be easy and efficient to build many sites
An easy way to upgrade CI
A safe place for CI to survive a distribution upgrade
Correct CI file permissions
Correct PATH and CI variables
Flexible permissions within /var/www
Correctly functioning mod_rewrite settings
Documentation available locally at /user_guide/
A nice IDE with code completion - even CI code completion (not just PHP)
Answer: Assuming you have  Apache up and running, just follow the Installation Instruction from the official documentation:

CodeIgniter is installed in four steps:

Unzip the package.
Upload the CodeIgniter folders and files to your server. Normally the index.php file will be at your root.
Open the application/config/config.php file with a text editor and set your base URL.  If you intend to use encryption or sessions, set your encryption key.
If you intend to use a database, open the application/config/database.php file with a text editor and set your database settings.

(further instructions)
Comment: i tried copying the codeigniter files in my /var/www but i cant even paste my files there, it says i dont have permission,, what do i do?i installed apache2, mysql and php5,
Comment: This is not an uncommon issue. See [this answer](http://askubuntu.com/questions/20106/easy-way-to-change-apache-www-location) on how to make apache use a directory *you own* (that is, a directory you have write access to). Alternatively, hit Alt+F2 and type `gksu nautilus` to access the directory with superuser privileges (_not recommended_). We have a bunch of questions about permissions here, try finding one that solves your problem, or ask a new one if you can't find any. If you do, make sure to explain your situation in detail.

How to install CodeIgniter?