How do you repeat a tile texture horizontally/vertically in a UI Image?

Question: It seems Unity UI Image supports Image Type 'Tiled', but I'm not sure how to get the tiling to work both vertically and horizontally. Can someone help me understand?
Comment: What have you tried? How does the outcome differ from what you want?
Answer: Unity's UI Image components give you many options to manipulate Textures for UI purposes, as long as such Textures are Sprites. If you want to display other Texture Types, you might use the Raw Image component, which, on the other hand, offers fewer options.
Declaring Textures as Sprites
In your Assets folder, select the image(s) you want to use as UI Texture. Then, in the Inspector, set Texture Type to Sprite (2D and UI).

This way, you tell Unity to optimise usage of these resources for UI drawing.
Setting up the Image component
Select the GameObject with an Image component in it (create one if you haven't yet). Then, drag the image you set as Sprite into the Source Image property in the Inspector. Now, new options shall pop out.

You can now set the Image Type property to Tiled, but a warning message will show up:

It looks like you want to tile a sprite with no border. It would be more efficient to modify the Sprite properties, clear the Packing tag and set the Wrap mode to Repeat.

Defining a Wrap Mode
We can fix this warning by setting the Wrap Mode property of the image in the Inspector from Clamp to Repeat:

Click on Apply to save setting changes for the Sprite. Now, image tiling works, and you can tweak the new additional Pixels Per Unit Multiplier setting to get the desired result. The Sprite's Pixels Per Unit (settable in its Import Settings, where you also set the Wrap Mode to Repeat) is multiplied by this value before rendering. You can use it to make tiles bigger (using fewer tiles) or smaller (using more tiles) on a per-Component basis:

Scaling along the X and Y separately
Pixels Per Unit Multiplier applies to the source Sprite as a whole, keeping its aspect ratio as a tile when covering the Image area. If you want to scale width and height by different factors, you can either change the Image scale and size combined or use the Raw Image component:

Scaling/resizing: A Sprite whose tiling height is double its width can have an actual height of twice its width, and a Y-scale of 0.5. This solution isn't optimal, as you may incur scaling issues with child GameObjects of your Image if any. Also, non-uniform scaling isn't preferable, if other solutions exist.

Using Raw Image: The Raw Image Component exposes the UV Rect properties, that let you define the horizontal and vertical offsets of the image (X and Y), as well as the normalised UV mapping values for the Texture (W and H):

Values between 0 and 1 will draw only a portion of the Texture.
Values greater than 1 will result in the Texture being downscaled, hence more tiles along a given axis.
Negative values will make the Texture mirrored/flipped.
Comment: I updated my answer to include my previous comment and address your new question.
Comment: actually, how do you tweak the settings for image tiling once it is set to clamp: repeat?
Comment: @ina When you change the *Image Type* of an Image Component, different additional properties show up. If you set *Image Type* to Tiled, the only new option available is *Pixels Per Unit Multiplier*: the Sprite's *Pixels Per Unit* (settable in its Import Settings, where you also set the Wrap Mode to Repeat) are multiplied by this value before rendering. You can use it to make tiles bigger (using fewer tiles) or smaller (using more tiles) on a per-Component basis.
Comment: that seems to only allow the tiling to one dimension? what if you want different x and y tiling?
Comment: Ahhhh that was it! Use a raw image and not a UI Image... thank you!


Cannot reproduce what I have learned or memorised

Question: I am an Accountancy senior level student. My issue is due to lots of information in the books I tend to forget about every specific topic and heading even if I compile notes and memory aids. Reason being that in these professional studies anything can be asked in exams from anywhere. So how do I remember small details at this stage?
Comment: For memorisation, have a look into spaced repetition software (https://en.wikipedia.org/wiki/Spaced_repetition). I recommend the Anki flashcard program.
Answer: Your question reminds me of the old joke "How do I get to Carnegie Hall?" To which the response is the same, "Practice, man, practice."
You will be expected to know this stuff when you graduate. When studying any subject, there will be a wide variety of rules and formulae you must learn. Normally, when a teacher is trying to get the students to learn them, the students are given exercises to practice them, or scenarios to apply them.
Learning best works in groups, so if you can find someone with whom to study that should help. You can practice with each other reading your answers to see if you understood correctly.
If you do not have an exercises or scenarios to use, ask your teacher. But in the end, it is all about practice.
Answer: Best advice I have ever gotten from my adviser: don't consider reading as work. You can convince yourself that you've learned a lot from reading. However, if you can't close the book and re-write what you just read from memory, you didn't learn it. So only count what you do, not what you read.
So go do it. I don't know how you'd just go practice accounting, maybe get an internship? Yes, it will be hard at first, but after banging your head against a wall and re-reading your books, you'll find out how to do it. And once you do it for real, you'll never forget how to do it.
A really similar case is learning to program. People ask me which books I read to learn all the programming languages I use and all sorts of questions like that, then they "study up" on the language to remember all of its features, and months later are trying to tackle the problem. I did this at first, but I never really learned how to code until I started freelance web development. When I had a markup due the next day, I was like "how do I do _______ in Javascript?". Google and Stack Exchange helped a lot. I found ways to do things. Now my own code is my source of knowledge on how to do things. All (okay, most) of the time I sat there reading the Javascript book was a waste of time.
In total, I think the biggest thing to get over is the anxiety that you don't know how to do it. You learned enough of it to figure it out / remember it as you need it. That's all you need. Start doing it.
Answer: Read and take notes -- but don't overdo this.
You must solve many problems that force you to apply the theorems and principles of Accountancy that you have read.  Also, solving many problems quickly exposes you to what you weren't actually able to commit to memory, so this is a very efficient way of building good memory -- considerably better than reading "lots of information in the books" over and over again.


Logarithmic Mouse Movement

Question: Alright, this is probably gonna be a pretty simple question to answer. I haven't had a math class dealing with logarithms in a few years, so I apologize. So I have a USB Controller that I'm using to control the mouse on the screen with the left joystick. Now how this works right now is the controller returns a double between 0.00 and 1.00 depending on how far the push the joystick in the direction (0.00 center, 1.00 pushed all the way over). I'm using this to adjust the speed of the mouse movement by multiplying the returned value by a given speed (returned double * speed). This gives me a linear speed. But for the purpose of accuracy of the mouse and clicking things on screen, I'd like it to be more logarithmic, so as it's really slow when barely pushing, and then the speed increases logarithmically as you move the joystick farther. That way you can get good speed for moving across the screen, while also having good sensitivity when moving it slowly. So I just need help with the formula, as I'm sure it's pretty simple. Also, I'm working in Java.
Right now my formula is:
double value (value given by controller)
int speed = 25;
value += value * speed;

I then use this to move the mouse.
Thanks,
Brayden
Comment: I presume you meant exponential...
Comment: Not really? :) Exponential would imply an acceleration for higher values. I think he wants the acceleration to be at the lower en of the scale, which would mean using a logarithm function.
Comment: He says "it's really slow when barely pushing"... Doesn't *really* say anything about the log/exp difference, though.
Comment: Hmm, yeah, you might be right :)
Comment: Really good question, upvoted. Could probably use some paragraphs.
Answer: I presume you meant exponential. An exponential function looks like http://hotmath.com/images/gt/lessons/genericalg1/exponential_graph.gif: the more value is, the larger the derivative (the more speed will increase for the same change in value).
double value = ...;
int base = 25;
value = java.lang.Math.pow(base, value);

Not sure if java.lang.Math is necessary in its full form or whether you need to import java.lang.Math first. I'm not a Java programmer.
Comment: does not give a zero movement for when the joystick is centered!
Comment: Agreed, maybe that needs to be checked separately.
Comment: This was exactly what I needed actually, thank you very much. I guess I didn't even realize what I was asking for. Haha. But again thank you :).
Answer: I agree with MvanGeest, I think you want an exponential formula.  That way its small with little distance, and very big with larger distances.
I'm not sure what mouse speed values are fast or slow, but you could do something like
double value (value given by controller);
int speed (maximum speed value);
value = Math.pow(speed, value);

You could also make the value something like 2*(whatever the controller gives you) to make a wider range of speeds.
Comment: or 4*, etc. whatever number will give you a big enough range.
Comment: this causes some minor movement when value is 0 - x^0 = 1 not 0
Comment: true.  just make it
    value = Math.pow(speed, value) - 1

@cristobalito: what do you mean in your answer?  Can't Math.pow only take 2 arguments?
Comment: I also used your idea of having the value*2, gave me a good range of speeds. Thank you very much!
Comment: Not familiar with Java but essentially you can use any base.
Answer: Something like:
f(value) = value * MAXSPEED * Math.Pow (base, 1 - value)

f(0) = 0 // no movement
f(1) = MAXSPEED // maximum movement when joystick is full throttle

All values should be covered in the range. Base in this case can be any value greater than 1.

Logarithmic Mouse Movement


If an aircraft's wing blows air downwards, how is the momentum conserved in level flight?

Question: An aircraft's wing generates force of lift by directing the oncoming airflow down. How is this momentum balanced when the aircraft is not climbing, but maintains level flight?
Comment: This previous question may provide your answers: https://engineering.stackexchange.com/q/5477/33
Answer: The rate of change of momentum has units of force. By tilting down the momentum vector of the air flowing past the wing, the wing experiences an upward force. In level flight, that upward force balances the force of gravity on the plane's mass.
Answer: The angle of a typical wing in flight is slightly greater than zero. So the wing/airfoil deflects the air downwards thus creating the necessary Lift for keeping the airplane up.

Regarding the momentum, in order for the air to change direction because a force is applied on it. Due to the Newton's second law of motion, an equal and opposite force is applied by the air on the foil. That force is the aerodynamic force, which is decomposed to lift and drag.

In order for the plane to maintain height and speed, the following forces are at equilibrium:

On the horizontal axis: Thrust and Drag
On the vertical axis: Lift and Weight
Comment: again, if you're in level flight the wing is not pushed up, but merely stays at the altitude. But the air is still pushed down. Something else has to gain upward momentum
Comment: If I start with 3 units of still air, and I accelerate 1 of them to a velocity of 2 and the other 2 to a velocity of -1, I have conserved momentum, and the forces balance, but notice that I have not conserved kinetic energy. So when you conserve kinetic energy and momentum, *forces are unbalanced*. We do not need to unbalance momentum to create a force. We can redistribute energy while conserving momentum and create forces. There is downwash behind the wing between the wingtips, but there is upwash in front of the wing and outboard of the wingtips.
Comment: Both linear and angular momentum are conserved in all axes in this problem. The lift force comes from the creation of a pair of counterrotating wake flows in the transverse plane. These flows perfectly cancel each other. There is no change in momentum in the flow domain. I'll add that last bit to my answer.
Comment: @FrancisL 'Something else has to gain upward momentum'  Yes.  The solid Earth gains "upward" momentum due to the (unopposed) attractive gravitational force exerted on it by the aeroplane.  Because the mass of the solid Earth is enormous, though, the change in velocity associated with that change in momentum is tiny.
Answer: Lift and gravity are "balancing" forces, just as thrust and drag.
The engine provides energy to the system. When there is a "surplus" of energy, it is converted to lift and speed. There is a statement in the aviation world, "The throttle provides, the elevator divides." As power is increased, if one desires to maintain level flight, the elevator is deflected appropriately, and the speed will increase.
Depending on one's perspective, some of the lift is generated by a reduction of pressure above the wing surface. This also applies to the above statements. It is not necessarily all deflection downward.
Answer: TLDR:  If I stand in front of two wheels and push equally so that they counterrotate, the linear momentum starts and ends at zero, and the rotational momentum starts and ends at zero (counterrotation cancels momentum of individual wheels), but there is a force exerted on me.
In the 2D flow model
When you consider a large control boundary around the wing, all the vertical moment vanishes in the flow. Behind the foil a sufficient distance, the flow is once again perfectly horizontal - it's identical to the upstream flow. This is because the flow field is modeled as the sum of two items. The first is the farfield flow - straight, uniform flow from front to back. The second is a circulation flow. From a distance, this looks like a circular vortex centered on the wing, and the velocity trends to zero as you get further away. All the vertical momentum terms in the flow are contained in this circulation flow, and there is as much going up in front of the wing as there is going down behind the wing.
The combined fields yield a force on the wing, due to the different velocities and pressures on the top and bottom surfaces of the wing. But there is no work being done because there is no translation in the direction of the force. And there is no momentum change in the fluid mass taken as a whole. The flow far downstream is identical to the flow far upstream. This is true not just in steady state, but in startup and slowdown as well.
In the 3D flow model
Things get a bit more complicated. Here, there is a change between the upstream far field velocity and the downstream far field velocity . But just as in the 2D case, there is no energy exchange between the wing and the flow. So the transverse momentum in the wake has to have come from the fluid itself. What happens is that the wake is travelling a bit slower, on average, and this momentum deficit is manifested in the transverse flow that persists downstream of the wing.  But the momentum in the transverse plane of the wake still balances. There is as much going up as going down, and there is as much going right as going left.
So for real-world objects in a breeze, if there is a lift force

There will be a net momentum change in the downstream flow that corresponds to that force. There will be persistent downstream transverse flows.

The energy needed to produce the transverse flow in the wake comes from the only available energy source - the initial velocity of the upstream flow. So there is an inescapable stream-wise energy and momentum defect in the wake, and this produces drag on the object.

 Momentum comes in two flavors - linear and angular momentum. Both are conserved quantities when no work is done on the system, as is the case here.
In the 3D case, where the wake flow does not return to the upstream condition, both types of momentum are none the less conserved.
Viewing the transverse velocities in a transverse plane far behind the wing, there is equal linear momentum up and down, and equal linear momentum right and left. Summed over the domain, the transverse linear momentum is unchanged. Between the wingtips, there is downwash. Outboard of the wingtips, there is upwash.
The rotational momentum starts at zero in front and must remain at zero behind the wing. The wake consists of a pair of counterrotating vortexes that perfectly cancel each other's angular momentum regardless of any asymmetry of the wing. Creating these wake features requires a force. That force is mostly in the transverse plane, and we call the in-plane component lift, but that force can't ever be entirely in the transverse plane. It always has a drag component.
Comment: thank you, you seem to be the only person that has understood the question
Answer: An airplane in level flight, cruising, needs lift to fight the gravity. It lacks buoyancy as opposed to blimps.
It sometimes needs even more power when cruising in not the optimal configuration of payload and misplaced CG of the load.
So even when a plane is not climbing it needs lift. That lift is provided by changing the airflow momentum.


Find lines that have specific distance between them in QGIS

Question: I have a rather large dataset that contains duplicated lines with an offset of 1m-5m and I want to find an efficient way to solve this problem using QGIS. Is there anyway in QGIS to find the lines that have a specific distance between them?
Comment: if you are familiar with postgis
pseudo query:

select a.gid, g1.gid FROM (
SELECT gid, st_offset(-1*st_X(geom), -1*st_y(geom) geom) g from a)) g1 , a WHERE a.gid != g1.gid AND st_equals(g.geom, g1.geom) IS TRUE
AND st_dwithin(a.geom, g1,geom , 10 )

That would return all gid from table which are same when moved to  0,0 and are within 10 units from each other in original coordinates

How to do it in qgis , no idea
Comment: My first idea: if the lines are duplicates then length and number of vertices must be pairwise equal. Maybe you can identify the pairs by joining the layer with a copy of itself on fields containing the length and number of vertices, not having the same fid. If the they are not exactly equal they are completely within a buffer of say 10 m around the counterpart.
Answer: Just followed the comment by @simplexio. (by a Virtual Layer).
(1) Go to Layer | Add Layer | Add/Edit Virtual Layer
(2) [Import] line dataset (many_lines in the following example)
(3) Query: (within 5m)
SELECT * FROM many_lines a
CROSS JOIN many_lines b
ON a.id<> b.id AND st_intersects(st_buffer(a.geometry, 5), st_buffer(b.geometry, 5))=1

To test various offset (1~5m), please change 5 in the above syntax to other values.
(4) Create a buffer of 5m for the virtual layer to check visually.

And the attribute table of the Virtual Layer will look like this:

Please note duplicates like 0-1, 1-0 pair, 0-2, 2-0 pair, ...


Would it be possible to indirectly kill people?

Question: When John Zeärtö would write: Johnny Riler Accident. Tomorrow Johnny Riler will receive a piece from the death note. He writes the true name from the person who uses the alias Xavier. Would that work? (And yes Johnny knows the true name)
Answer: This scenario is totally possible. As long the 2 main factors can be reached.

This note will not take effect unless the writer has the person's face in their mind when writing his/her name. Therefore, people sharing the same name will not be affected.
The conditions for death will not be realized unless it is physically possible for that human or it is reasonably assumed to be carried out by that human.

So if he knows the real name, and can bring the face of the person to mind. And it is physically possible for that person to obtain a piece of death note and write in it. Then yes it is possible indeed.
Answer:
Whether the cause of the individual's death is either a suicide or
  accident. If the death leads to the death of more than the intended,
  the person will simply die of a heart attack. This is to ensure that
  other lives are not influenced.

I'm sorry but I don't think Dimitri is correct.  This appears to be the same as telling L's bodyguards to shoot L. This does not work. There are quite a bit more than just those two rules.
Comment: Wording is never really the point of the Deathnote.  The search for loopholes does get tiring. Saying "shoot L" and "kill L by shooting him" are both not allowed. The only way to answer this question for sure it to get ahold of the deathnote and try it.  Light used this tactic to kill the Feds. He made the director send the names.  He coerced one Fed to write them in the book.  He had to coerce him, not order him via the death note.  Again, if this obvious loophole existed, he would have used it. Unlike us, he had the opportunity and will to try it out.
Comment: I thin it could work because i only wrote, that Johnny Riler writes the name of the man who uses the alias Xavier. I didn't wrote Johnny Riler kills Xavier by writing his name on a scrap from the death note.
Comment: I do believe one of the rules indeed states that the users death may not be the intermediate cause of death. So if you were to write down somebody controlling a plane, he will die without people being injured. But I don't believe that rule also covers the fact that you can use the human to kill before making him die himeself.
Comment: The exact rule is above! I dont doubt that if you wrote both names, you could make them kill each other. If the persons name isnt in the deathnote, however, there is nothing to support the claim that he could be killed by a me5hod of death for some one else. The rule explicitly contradicts that. The question whether you can use the deathnote to make someone else write in the deathnote is debatable but not the claim you just made.


Technology behind Google Instant?

Question: Google Instant is a new search enhancement that shows results as you type. On the information page for Google Instant, it says "15 new technologies contribute to Google Instant functionality." What are they?
Comment: Those who are in a position to know are unlikely to say...
Comment: possible duplicate of [How does Google Instant work?](http://stackoverflow.com/questions/3670831/how-does-google-instant-work)
Comment: Although the 'real Google Instant' might have involved 15 cutting edge technologies and what not, as long as you have a beefy indexed superfast server to return "data-only" search results, building an "instant search" will involve jquery, javascript, html and css and webservices that return results to the client calls
Answer: Not sure about the 15 new technologies, but see this How does Google Instant work?

Technology behind Google Instant?


Term to abuse one who doesn't deserve to be called a man

Question: Say a gang of many men beat a single guy Tom. Tom is a right guy but the gang is of cheap mentality. So, Tom wants to use an abusive and demeaning word for the gang and says you all are "xxx". He wants to say them that they all don't deserve to be called a man (they are cowards). Can the term " impotent " fits the context of Tom or any other term is used in such context? What's the term that's generally used by guys in Tom's shoes to abuse the gang?
Comment: I don't know what you mean by *Tom is a right guy*, but I'd say anyone who insults a bunch of guys who've just beaten him up isn't quite right in the head. Would he think he'd "won" if he came up with a good insult, but got hospitalized in the process?
Comment: They're just **bullies.**
Comment: Impotent implies they can't **do anything** - but they can: they can beat the crap out of him.  So it's definitely not right.  There are a rich variety of abusive and demeaning words you could choose from, it's hard to say what's "right".  I think "cowards" which you mention, or "bullies" as @NVZ says, fit well if you want to keep it clean.
Comment: I was about to say something similar. Anyone who has been beaten up *knows* that he had better keep his mouth shut. He's outnumbered, he's injured, the gang are euphoric and he wants to *insult* them?!
Comment: There are lots of words that mean this, or something very similar, and different people wouold use different ones. A thesaurus would give you [a list](http://www.thesaurus.com/browse/unmanly?s=t).
Comment: @Mari-Lou yes you're right. Thanks a lot!
Answer: Impotent doesn't fit.  NVZ is right.  Bullies is the best term.  They aren't impotent because they were able to beat him up.  Even if it fits, it sounds pretentious.
Cowards, which the OP mentions, could also fit.  "It took all of you to beat up one guy, you bunch of cowards!" or using sarcasm "You guys are brave.  It only took your entire gang to beat me up."
Answer: [Pantywaist, mongrel, punk-ass bitch, worthless, dickless, fink, eunuch, wannabe pathetic, worthless, useless, nothing, sad, feeble minded,base, basic, little boys] I disagree about the "impotent." Sure,  they bested Tom physically, but they've all shown their mental impotence. I think it's a great insult if not meant to be taken literally/physically. And anyone who doesn't talk a little crap after getting their ass kicked is, indeed a pantywaist. You may have lost, but you still get the last shot in. Moreover, they truly are cowards for this action; they should be told. Tom should be the one to tell them. He's earned it.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Comment: I've certainly never heard of *pantywaist* although apparently it means [*sissy*](https://www.merriam-webster.com/dictionary/pantywaist). The other answer is now quite old, and standards have evolved over the last few years: please include corroboration for your suggestions.


How is the text adjusting inside the label when we increase the fontSize?

Question: In some of the applications, I have seen that we have an option to increase or decrease the fontSize of the text inside the label. But when we adjust it, the label automatically increases its height to contain it. How do we get the height of the label everytime we increase or decrease the fontsize?
And in some cases like news applications when it loads, there will be text only. But suddenly the image comes and the text readjusts itself to contain it. How does it do it by itself?
Someone plz help me...
Answer: <code>CGSize textSize = [@"foobar" sizeWithFont:[UIFont boldSystemFontOfSize:18]];
</code>
Checkout NSString UIKit Additions.  It has got a couple of these methods that let you ask a string how big it would be when rendered with a given font.  With that information, you should be able to adjust things however you need with a little math.
Also, in some cases, it may be a web view.  If this is the case, HTML/CSS sort of flows stuff around automatically in order to keep things tidy.


Timings for Tahajjud Prayer

Question: Salaam,
Actually I am a little confused I hope someone can assist me. I want to pray Tahajjud but I am confused about the timings. I usually pray Isha after I come home at around 12 Am and I usually go sleep at 2 or 2:30 am. Now I also have to wake up at 5 am for Fajr. So i want to ask can I pray Tahajjud at 2 am when I am about to sleep? Because if i go to sleep at 2 am then it won't be possible for me to wake up again at 3 am to pray Tahajjud. So can I pray Tahajjud at 2 am? Fajr time in my city starts at around 4:20 am.
Comment: `I usually pray Isha after I come home at around 12 Am` This is time too late for Isha. It is recommended to pray it earlier. Praying Salah in its time is one of the conditions to be accepted. If you are having difficulties with it then consider combining Maghrib and Isha.
Comment: I am at work that time :(. My shift ends at 11:00 pm. My Boss allows me to pray Asar and Magrib in the Mosque but when I asked him for Isha he didn't allowed me and told me to pray when I reach home. I know I should pray in the mosque but what can I do in this situation? Isha time in my country is 9pm. I don't think the Isha time ends at 12 am.
Answer: Timing for Tahajjud start right after Isha until Fajr. You may pray at anytime during that duration. But the best time is last third of the night which may be between 2:00 AM to 4:20 AM in you case. Allah knows best.
Comment: I have heard that Tahajjud prayer isn't valid if you pray it without sleeping. I have heard you should take a nap even if it's 10 minutes for Tahajjud Prayer. Can I pray Tahajjud while being awake and then go to sleep.
Comment: That is incorrect. You can pray tajajjud right after Isha and then go to sleep. No problem.

Timings for Tahajjud Prayer


LFT to LED 4 foot Shop Light Conversion Ampacity Change?

Question: Currently upgrading my lighting controls. Installed a Lutron Caseta Switch that is rated for 5A CFL/LED. Currently on that circuit there are 8 "LFT Shop Lights" with 2 bulbs each 4 footers. I don't have the rating of the ballasts or if they are electronic or magnetic switched. But the Switch gets VERY HOT and i'm assuming this isn't a wiring issue but more likely too much load on that switch. SO, was thinking of switching the bulbs to LED (if the ballast is compatible) to reduce the load. But was wondering if this will actually reduce the load. Meaning it's possible currently each bulb is pulling 0.5 Amps x 16=8 Amps overloading the switch. But will the ballast draw LESS current using the LED bulbs (assuming the lumens are similar and ballast is compatible)?
Comment: Use an LED that does *not* require keeping the old ballast. The ballast just wastes electricity, in this usage, due to hysteresis heating loss. It requires removing and replacing the fixture, but it will be *much* easier putting it back, since it will weigh far less.
Answer: You seem to be throwing around 3 very different things:

Traditional fluorescent tubes, commonly used as shop lights. Typically 4 feet but sometimes 2 feet or 8 feet or other sizes. These typically have ballasts and starters.
CFL - Compact fluorescent lights. These are typically in an Edison bulb form factor (i.e., screw in replacement for incandescent bulbs). They are normally not long tubes - the whole idea is that they are compact. They have integrated ballasts in the base of each bulb and a twisty tube, though often that tube is enclosed in a frosted outer bulb so that you don't see the tube.
LEDs - available in many different form factors, including tubes (designed to replace traditional fluorescent tubes), Edison base bulbs (designed to replace traditional incandescent bulbs) and integrated fixtures - where there is no replaceable bulb at all but rather a case with a circuit board (driver) and a bunch of LEDs bonded to the case.

I suspect you have traditional fluorescent bulbs (long tubes with separate ballasts) connected to a switch that is not rated for that type of fixture/bulb. A typical old-style configuration for fluorescent bulbs is 40W per 4 foot bulb. If you have that, 40W x 8 fixtures x 2 bulbs = 640W. A more recent variant is typically 32W per bulb, which would be 512W. Both of those are close to 5A (600W) and yes, the type of ballast may affect things as well.
If that's what you have, I recommend replacing the fixtures rather than just the bulbs. If you replace the bulbs then yes, you will get some power savings. I looked up one example Philips from Home Depot and it is rated at 16W, compared to the typical 32W - 40W bulb that it replaces. However, you have to watch out for issues with wiring and ballasts - it is not nearly as simple/guaranteed as replacing an Edison base bulb.
Replacing the entire fixture is more work and more cost. But you do get more choice as far as dimensions/form factor and the actual electrical installation is extremely simple - hot, neutral, ground from the old junction box to the new fixture. No confusion as far as how (or if) to rewire the ballast, single-ended vs. double-ended tubes, etc. But look for a long warranty - 5 years is typical for integrated LED fixtures, even from the "junk" companies and other indications of quality. I have not had great luck with Commercial Electric (a Home Depot low-end house brand, essentially - I won't buy their lighting any more), but Home Depot has been great with warranty returns and done much better with some more established brands.
Comment: If the fixtures are hanging from the ceiling on chains or installed in a similar fashion, replacing them completely is the best, cheapest, easiest approach.  If they are installed in the ceiling, as part of the construction, you can buy LED replacement bulbs that don't use the ballast.  You have to do a little rewiring of the fixture.  Before buying LED replacement bulbs open up one fixture to make sure the ballast can be bypassed.  On rare occasions it's molded into a plastic casing with the tombstone at one end.  Then buy LED replacement tubes "for ballast bypass".
Comment: correct. I edited my OP. They are 4 footers. I don't have a thermal gun but that electronic switch gets very hot to the touch. The metal radiating fins are at least 100+  degrees maybe 110...
Answer: The ballast is often removed from the circuit entirely when switching to LED tubes. Check the installation instructions. Personally, as a homeowner, I found it easier to swap out the whole fixture.
Answer: If you have the ancient F40T12 type fixtures with magnetic ballasts (audible hum; hard starting sometimes, observable flicker if you track your eyes across the ceiling) then your fluorescent fixtures are drawing 85-100W each or about 0.75-0.85 amps each.  Eight of them would be 6-7 amps.
If you have the more modern F32T8 type fixtures with electronic ballasts, expect 60-70 watts each or 0.5-0.6A each, and eight of them would be 4-5 amps.
LED fixtures would use typically 45W per fixture or about 0.4 amps. Or 3-4 amps for all eight.
In all cases above I would expect the dimmer to get perceptibly hot.
So yes if your fluorescents hum a tune, turn off 3 of them to be in dimmer limits.


Cosmic bubble collision

Question: I'm reading this review right now. The claim seems to be that when you have an expanding "false vacuum", finite size bubbles form due to phase transition (cause by finite action instantons) (which, in itself might then evolve, etc). My questions is, if I imagine these bubbles to be moving away from each other due to exponential expansion of the false vacuum, then how will they come near each other and collide?
Comment: I would've also liked to tag it under cosmology, multiverse and string-landscape (some might consider those tags controversial), but wasn't able to since I didn't have enough points.
Comment: May I ask why you are using a famous person's name instead of your own, given that you are a physics graduate student, and presumably interested in building a positive reputation for yourself in the international community?  It leaves a bad taste in my mouth, because it is as though you are claiming to be God's gift to physics (or at least this site).
Comment: Oh... Don't read so much into it. It was a nickname I picked up online in homage to Feynman. That was a long time ago. It stuck and a lot of my online friends know me by that nickname. If you notice, it's a single word, like a nickname and not "Dick Feynman". I don't see why it has to be an issue. I'm not claiming to be Feynman.
Answer: The size of these bubbles is growing nearly by the speed of light. So if the boundaries of two such bubbles are close enough to each other, the exponential expansion of the parent space in between them, even if this expansion exists, is negligible relatively to the shrinking distance between the bubbles due to their growth. That's why the bubbles collide after a finite time.
Of course, if the bubbles are far enough, e.g. (or i.e.) behind the horizons of each other, their growth isn't enough to overcome the exponentially growing separation and they cannot collide.
Comment: So you're saying that the linear(with near light speed) growth of the bubbles will trump the exponential expansion of the false vacuum (which is sublinear, for small distances). Is it obvious that the bubbles should expand at near light speed?
Comment: Dear @Siva, concerning the first point, one really has to be careful about the emotional meaning of words. If "something" grows exponentially, it doesn't mean that it will beat "anything" that grows linearly because we're comparing different quantities here. The shrinking of the space between the bubbles goes like $1-t$ where $t$ is time, that's the linear one because of the size growth, but it's corrected to $\exp(ct)-t$ because the distance inflates by cosmology. Still, $\exp(ct)-t$ crosses zero and goes negative for some values of $c,t$. The word "exponential" doesn't mean that it wins.
Comment: Concerning the second point, the near-luminal expansion is obvious from the maths of the bubbles. A bubble is described by an instanton localized in the Euclidean spacetime, near $x^2+y^2+z^2+t_E^2\leq a^2$ or so. By Wick rotation, you may see that the transition is concentrated near the light cone $x^2+y^2+z^2-t^2\leq a^2$, so the point where the Universe switches is expanding nearly by the speed of light. Alternatively, the huge energy released from the difference of energy densities (in the bulk, difference between the two phases) is invested to accelerate the wall between the two phases.
Comment: The energy released is $V(phase_1)-V(phase_2)$ times $volume$ while the "rest mass" of the domain wall separating the two phases only grows as the $area$ which is much smaller for large radii, $r^2<r^3$, for large volumes. So this means that the $\gamma$ factor measuring the increase of the mass by near-luminal velocities is huge and the wall is quickly approaching the speed of light. See also http://motls.blogspot.com/2011/10/bubble-of-nothing-and-other.html

Cosmic bubble collision


Four-momentum matrix dot product sigma matrix

Question: In the QFT book of Peskin and Schroeder, they introduce the notation:
\begin{align}
\sigma^{\mu}=(I,\sigma^{i})\\
\bar{\sigma^{\mu}}=(I,-\sigma^{i}).
\end{align}
On page 46 (Eq.(3.50)), They take the dot product with four-momentum
\begin{equation}
\sqrt{p \cdot \sigma}.
\end{equation}
How is the 'dot product' evaluated? is it pointwise multiplication:
\begin{equation}
\sqrt{p \cdot \sigma}=\sqrt{IE+p^{i}\sigma^{i}}?
\end{equation}
or, is it with Minkowskian signitaure:
\begin{equation}
\sqrt{p \cdot \sigma}=\sqrt{p_{\mu}\sigma^{\mu}}=\sqrt{IE-p^{i}\sigma^{i}}?
\end{equation}
The second option yields the right answer. So let's hope it's that one.
Answer: The dot product on a Minkowski manifold is defined to have indefinite signature, so the second option is correct. P.S. uses $\eta_{\mu\nu} = \text{diag}(1, -1, -1, -1)$.
Comment: Thanks, that's all I wanted to know. The confusion arises because we are strictly speaking multiplying matrix entries. But apparently, the entries multiplication is pointwise with Minkowskian signature.


Why there is charge on the elements, in the dative bonding?

Question: According to the definition of dative bonding electrons are shared which are given by one of the atoms, so if the electrons are shared so how come there is charge on the elements in the dative bonding?
Answer: To begin with, the term "dative bond" is not used anymore. It has been replaced by "coordinate bond" :
Let's have an example of this kind of bond.

As you can see, this kind of bond occurs when an atom is giving two electrons from itself to form the bond. The typical coordinate bond is the $\ce {N}$ already bonded with $\ce {3H}$ forming a bond with a proton. Since the proton has no electron, the $\ce {N}$ atom has to fully give one of his electron from his remaining doublet to form the bond. But to respect the charge equality, you had a positive charge at the begining, no electrons were added or removed from the system, so the positive charge should remains on the final molecular edifice.
The question is, where is located this positive charge ? One could start thinking this charge is located on the $\ce {N}$ atom since it is giving an electron. But actually, the $\ce {N}$ atom has a greater electronegativity than the $\ce {H}$ atom, that's say its hability to attract electrons is greater. Therefore the positive charge remaining should be equaly distributed over all the $\ce {4H}$ since they are equivalent.
But, altogether, the net charge of the edifice will be $+1$.
Answer: It's formal charge - it often doesn't mean there are full charges like in zwitterions but dative bonds are usually strongly polarised.
Answer: Dative bond/coordinate bond is a type of covalent bond where an atom donate electron and another one does not share any but receive the electron.
Note that i bolded covalent bond. Meaning that this bond happened between 2 non-metals, not between metal and non-metal (that's Ionic bond). In ionic bond there's formal charge because there's electrostatic force occuring between the two atom, but in covalent bond there is no electrostatic attraction at all.
In order to keep track between the transfer of electron we use either formal charge or oxidation number, because covalent bond doesn't have any electrostatic attraction we use oxidation number (also known as imaginary formal charge).
So what you meant might be Oxidation Number and not Formal Charge
Hope that helps.
Comment: This is incorrect. There can be dative bonds between any type of atom, they usually have high covalent character. A partial charge results from the asymmetry of the nuclear charges and the electrons. There always is electrostatic interactions (which are certainly attractive) in bonds. Oxidation number, formal charge, actual charge are not really related concepts.


Is there a tool that provides lists of words that contain the sound denoted by an inputted phonetic symbol?

Question: For example, if I set this tool for English, then type /ʌ/ in the search box, it should return a list of English words that contain that sound.
TIA
Answer: This is basically a programming question, but there are very many such tools. What you primarily need is a phonetically-notated dictionary file, so first you have to decide on a particular phonetic alphabet (the letter "ʌ" is ubiquitous). You can use the CMU dictionary. If you specifically want IPA, you need an interface that translates user-input IPA letters to the correct CMU notation. In the case of "ʌ", that is the primary-stressed allophone of a vowel including "ə", so you would search for all instances of " AH1 ". There are many ways to do that: one that doesn't involve writing code is to use Jedit and do a regex hyper-search, which will return some 7,000 examples.
You can also try this tool, which may do what you want, which will lead you to various dictionaries (there isn't just one "English").
Answer: Geoff Lindsey (a British Phonetician) maintains CUBE, a pronunciation dictionary of Standard Southern British English, and his YouTube channel has a video explaining its use, with instructions on how to search for specific pronunciations starting around 6:55 (note this search field only allows standard ASCII characters as input, but uses an idiosyncratic mapping, rather than e.g. X-SAMPA). In the case of words containing /ʌ/ you would search for "y".
Note that words here are by default transcribed according to his transcription of contemporary SSBE, although if you tick "trad" under systems it will also give the more traditional Received Pronunciation.
Answer: Cambridge English Pronouncing Dictionary and Longman Pronunciation Dictionary, which are considered authoritative reference works on the topic, each come with a CD-ROM containing an application with a "Sound Search" feature, which allows you to search in the dictionary by phonemes and wildcards.


Griffon mvcGroupInit invocation

Question: I'm learning Griffon framework and I have the following problem:
mvcGroupInit isn't invoked when I call buildMVCGroup(...) - should I explicitly invoke it after this method call? (What about model and view injection then?)
My app:
in view ('main app' mvc):
widget(buildMVCGroup([base:new MyClass(), queue:model.queue],
                            "button", "1").view.buttonView)

in ButtonController (never invoked):
void mvcGroupInit(Map args) {
    println "############MVCGroupInit Button"
    // this method is called after model and view are injected
    model.base = args.base
    model.queue = args.queue
}

Or please suggest how I should build and init MVC groups?
EDIT: Griffon 0.9.4
Answer: That method should be called whenever a group is instantiated. If it's not happening then that's likely a bug introduced in 0.9.4. Have you tried the latest 0.9.5-rc1 release?
Answer: Actually I had to reinstall my whole system, and when I run my code now - it works (though println isn't printing to the console in eclipse from mvcGroupInit).
Maybe it was caching problem.

Griffon mvcGroupInit invocation


Will a 18-140 lens be good for basketball stadium photographs?

Question: I am absolutely new to photography and have just started learning the basics. I have got a Nikon D-610 with a 18-140 lens for now.
I just want to know if I can take this to a basketball game and get some good shots, or this lens is not able to do that.
And if this is not a good starter lens for this purpose (it was $200.00 from BestBuy that I got it so I got this!), what should I look for instead?
Comment: Call the stadium. Everyone's got different rules.
Comment: This question appears to be off-topic because it is about rules of a particular venue. It is very specific to your exact venue(and even event at the venue) and likely will not be of use to any other users.
Comment: @dpollitt I meant to ask if it is able to take good pictures in a basketball size of a stadium
Comment: @user4894 no! I meant if it is able to produce decent pictures in such an environment! Well now you can debate it depends on where do I seat! LOL
Comment: are you asking if they'll allow the camera+lens into the stadium, or just if it will produce decent images?
Comment: @MikeW I meant to ask if it is able to take good pictures.
Comment: @Blake - that's pretty much what my answer is saying. You should have enough zoom for most basketball-size places. Baseball and football size places may require more zoom, which is why I posted the example. I needed 300mm for that, and the photo is cropped.
Answer: I'm going to disagree with Jasmine here: this is the wrong lens for your camera. The 18-140 is a perfectly good beginner lens - but you haven't bought a beginner's camera, you've bought something designed for more experienced users.
By using a lens designed for the lower end of Nikon's range (a "DX" lens like the 18-140), you are literally throwing away half your camera's sensor - the lens is designed for a smaller sensor (called either DX, crop or APS-C) than the sensor in your camera (which is called either FX or full-frame). You'd be much better off either using an FX lens on your camera, or getting a cheaper body which would be better matched to your lens. If it's at all possible, I'd recommend the latter - trade your body in for a cheaper body like the D5300 and keep the cash for now. As a general rule of thumb, you should be spending at least as much on your lenses as you do on the body - but you've spend $1600 on the body and $200 on the lens.
Comment: You keep lenses, not bodies. My advice remains to return the body.
Comment: I didn't say it was the best beginner lense. I meant, since you have it, use it, and that it wouldn't really hurt you. And yeah, in general I'm following your rule with my kit. I've got $2500 of lenses but they fit a lot of bodies, I'm using a $1000 body ATM.'
Comment: wow, interesting information. Ok can you please recommend a more general purpose and yet affordable lens for that my camera? (Not more than $500.00 please!)  I can return the lens until two weeks I think to BestBuy...but I would like to keep the camera and use it for the years to come, before this I first bought a Pentax K50 and regretted getting a more entry level camera...returned that to Amazon and got this one.
Answer: The sports teams and venues set the rules for photography. Some events don't allow any photography at all. Best to check before you go, otherwise you will have to leave your camera in the car in the parking lot, setting you up for theft.
Generally in the USA anyway, professional Baseball allows photography, Football and Basketball do not. As for how that lens would perform at a basketball game, it would be fine. It's not too big that it would be an inconvenience for other spectators, and it's not so short that your photos will be "too small" for basketball anyway. For other sports, you'll need a lot more zoom than that, and it depends entirely on where your seats are. In the front row, you won't need more than 50mm for basketball. Your aperture range will work fine.
This was taken from the nosebleed seats at Coors Field at 300mm. So, in a smaller arena at 140mm you would probably be ok in terms of image size anyway.

Yes, in general I think that is a fine lense for a beginner to start with. It's got some "wide angle" capability, and some zoom in case you get too far from the action. Switching lenses is a real pain when you're new, and you risk damaging them if you're in a hurry. So, I think a zoom lense is great for beginners, particularly when there's action happening. You can "compose with zoom" and that way you can learn about light and color without worrying about angle so much.
Comment: Great answer, thanks... just left this part: " then do you suggest a better general purpose lens to have?"
Comment: I added an opinion on that, but I'm not an instructor or anything.
Answer: I'm just going to answer the 'is it allowed' question.  Yes, and in certain circumstances, they have various restrictions.  I know of a couple that restrict the physical length of a lens, regardless of focal length (no kidding).   One baseball team that I visit periodically says I can't bring in a lens longer than 8".  Check the team's / stadium's website or call the ticket office.
Also, on a separate note, I hope you are in the Southern Hemisphere because there isn't much baseball in the northern hemisphere during this time of the year - it's hard to see the ball when it's snowing.
Comment: Zikes! - I need to read the large, bold, title words more slowly ... I wonder why I misread this as baseball - probably the sample photo ...
Comment: Sorry about the baseball photo, I'm not a basketball fan :)
Comment: @Jasmine - no need to be sorry - I was the complete knucklehead on this.


Does putting an iOS device into single app mode prevent iOS upgrades?

Question: If I set an iOS device into single app mode via MDM, will the iOS update dialog still pop up? Is there a chance that the update can be launched while in single app mode?
Answer: We block iOS updates via different ways on our iDevices:

Via our Firewall, you can block these URLs on your WiFi network : mesu.apple.com, appldnld.apple.com.
Or you can block WiFi network on your devices via restrictions in a profile pushed by your MDM. So devices will be not able to download iOS updates, but you need to use only 3G/4G.
Answer: If you setup single app mode on your iOS device, only those foreground processes are restricted from being showing up. All background processes, including the device downloading the device update, still works. I don't think there'll be pop-ups. If they do, then there is no point setting a device as single app mode because everyone has access to device update feature which might turn an app (set up in single app mode) incompatible with new version of iOS. Also consider, if single app mode is managed using an MDM software and remote access is not available (just in case) due to incompatibility issue of the MDM, which might be a huge problem.
Anyway, I haven't checked this. I'll keep the answer updated when I do.


What exactly does a default port scan look like? I am trying to run a default port scan without setting off the ids on my test network

Question: What is the best option to use for a default port scan of a server on my test network without setting off the ids using nmap. -f is not a switch i am wanting to use.
Answer: You may not want to attempt a "default" scan at all if you attempting to evade IDS detection. A single connection attempt to a closed port could even be enough to trigger an alert; 100 or 1000 such attempts certainly will be detected.
To limit your chances of detection, focus on a small set of ports you are interested in, and specify them with the -p flag. Additionally, you can adjust the aggressiveness of nmap's timing. It may be possible to fly under the radar of the IDS with a slow enough scan. Use -Tn, where n is 1-5; 1 being least aggressive and 5 being most aggressive.
The nmap manual also contains some advice about IDS evasion, such as using fragmentation, decoys, spoofing, and host randomization.
Answer: nmap by default scans 1000 top ports. By providing -F option you are telling nmap to scan only top 100 ports. These ports are the most common ports used for services such as ftp, ssh, telnet, etc. If you still want to scan few ports which are most common then you can use option --top-ports <n>. The option will scan top TCP and UDP ports. You can use it as following:
nmap --top-ports 1000 IP_ADDRESS
Source: https://nmap.org/book/man-port-specification.html


Explanation for Why Logistic Regression can be so Accurate in Sentiment Classification?

Question: My question is about how a logistic regression model performs so accurately. In some exploratory experimentation, I compared a logistic regression model against a long short term memory recurrent neural network for binary classification of consumer reviews (Positive or Negative)(25,000 reviews). The Logistic Regression model performed better with an accuracy of 88.0% and a recall, precision, and f-score of 0.88. The Recurrent Neural Net performed with an accuracy of 81.1%, a recall of 0.83, a precision of 0.80, and an f-score of 0.81. Perhaps my building of the network was flawed but I was still surprised to see that the Logistic Regression had such a high accuracy.
Answer: Some people have this preconceived notion that logistic regression shouldn't perform well because it is too simple. While that might be true for certain types of complex problems, the reality is that logistic regression performs relatively well in many different scenarios.
It's difficult to give a definitive answer as to why a model performs well without actually seeing the data and the model you've constructed.
That being said, it could be that the problem you're trying to solve is not very difficult so even a simple logistic regression model yields good results. Another thing to consider is that while 88% accuracy sounds good, it might actually only be OK for this type of problem (and dataset) - it would be informative to try other non-neural-network based classifiers and see how well they perform.


Outlook 2010 does not use the local pst file to send/receive mail

Question: My company use Exchange Server with Outlook. Before, it works well with the Outlook 2007. But recently, I've been forced to move to Outlook 2010. Although I've configured all in the Control Panel/ Mail/ Data Files to use my local .PST file as default, the Outlook 2010 does not work as I want. It still store every mail on the 100MB .OST file that represent my folder on the mail server. Then every day I must move the mail from the .ost to the .pst manually.
Please help me to check what wrong with my Outlook 2010 ?
Many thanks!
Comment: Have you [turned off Cached Exchange Mode](http://office.microsoft.com/en-001/outlook-help/turn-on-or-off-cached-exchange-mode-HP010355560.aspx) ?
Comment: @harrymc sure I don't.
Answer: To set the default delivery location for an Exchange account to a PST file in Outlook 2007 or 2010, you must start with changing your default storage location to PST file, just as in Outlook 2003:
Outlook 2010
File-> Account Settings-> Account Settings…-> tab Data Files

Accept the warning about changing the default Outlook Data File and restart Outlook. (You probably did this step already.)
You are not done yet!
Once you've restarted Outlook, go back to your account settings but this time select the E-mail tab. Here, select your Exchange account and press the "Change Folder" button at the bottom. Accept the warning and select the root folder of the PST file as the new storage location.
Restart Outlook again to complete the process.
http://www.msoutlook.info/question/591
Answer: Outlook 2010 in an Exchange environment stores messages and settings on the server, the local cache is the .OST file.
 Outlook OST File:

The .ost file is synchronized with the items on the server that runs
  Exchange. Because your data remains on the Exchange server, you can
  re-create this .ost file on your new computer without having to back
  up the .ost file.
Windows 7 and Windows Vista
  drive:\Users\user\AppData\Local\Microsoft\Outlook
Windows XP     drive:\Documents and Settings\user\Local
  Settings\Application Data\Microsoft\Outlook

So, your email is working as designed currently.
It sounds like what you want is to setup an auto-archive for 2010. This will move your Exchange data to an offline .pst file.
How to edit Auto-Archive:

Click the File tab.
Click Options.
Click Advanced.
Under AutoArchive, click AutoArchive Settings.
Select the Run AutoArchive every n days check box, and then specify how often to run AutoArchive.
Select any other options that you want. You can choose to have old items deleted automatically at AutoArchive.

Just remember the limitations of the .pst format. Files should not exceed 2GB, and make sure you have a backup if your email is important.


Fixing window counter-balance cord

Question: I'm wondering if anyone is familiar with the style of window counter-balance cords that just run straight from frame around the window pane into the frame at the very top, with no clear pull-outs, notches, screws, etc. (i.e., no visible way of accessing/adjusting the cord). I have some that need adjustment/replacement, but they don't seem to resemble the other styles I've seen on the internet. Perhaps I pry the top section off? It is not clear and I don't want to damage anything.
Answer: If the window is an Andersen window, the ballast will be under the vinyl cover at the top of the window. The edge of the cover is covered by the trim at the top, where the cover makes a corner to wrap around and go under the trim. Sometimes the edge can be coaxed out from under the trim, it does not go under far at all. Here is a tutorial on Youtube that will fill in the rest.
Youtube link
Comment: Thank you! As far as I can tell, these are Andersen® 200 Series Perma-Shield® Narroline® double-hung windows. I will see what I can do as far as repairs, but this seems to give me all the info I need. Thank you again!
Comment: I had Andersens in my home. It is easy to trash the side tracks on the way out, or on the way back in. And do be careful when you pull the ends of the cord out the sash, there is a lot of pull.
Answer: In the traditional wooden windows I've worked with, if you removed the trim and stops you could then remove the windows sashes, which gave you access to a panel at the bottom that could be removed to access the weight chamber. In those, assuming the rope came free of the weight: Work a new rope through, tie the weight to its end, adjust the attachment to the sash so the weight is at or near the top of the chamber when the sash is at the bottom of its travel, reassemble everything by reversing the disassembly.
There may be other designs.

Fixing window counter-balance cord


How to install Ralink RT5390 wireless adaptor driver in ubuntu 16.04

Question: My version of ubuntu mate is 16.04.
Wireless adaptor : Ralink RT5390
The Wifi suddenly stopped working one fine day and the network panel would say "device not ready". I tried solutions given online, but nothing worked for me. Instead the wifi row from network panel is gone.
Output of lshw -class network:
WARNING: you should run this program as super-user.
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:07:00.0
       logical name: eno1
       version: 06
       serial: 10:1f:74:0a:39:f2
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168e-3_0.0.4 03/27/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:34 ioport:4000(size=256) memory:c0404000-c0404fff memory:c0400000-c0403fff
  *-network UNCLAIMED
       description: Network controller
       product: RT5390 [802.11 b/g/n 1T1R G-band PCI Express Single Chip]
       vendor: Ralink corp.
       physical id: 0
       bus info: pci@0000:0d:00.0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: bus_master cap_list
       configuration: latency=0
       resources: memory:c4500000-c450ffff
  *-network
       description: Ethernet interface
       physical id: 2
       logical name: enp25s0u1
       serial: ca:3c:02:e3:3a:7b
       capabilities: ethernet physical
       configuration: broadcast=yes driver=rndis_host driverversion=22-Aug-2005 firmware=RNDIS device ip=192.168.42.136 link=yes multicast=yes
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

Answer: See section " PCI (internal) wireless adapter "
in
https://help.ubuntu.com/stable/ubuntu-help/net-wireless-troubleshooting-hardware-check.html#pci
#
https://help.ubuntu.com/stable/ubuntu-help/net-wireless.html


how to determine the number of units for dense layer for transfer learning?

Question: I'm using MobileNetV2 for classification, and I want to add dense layers(i remove the last layer of the MobileNetV2 model). How do I choose the number of units for the dense layer after obtaining the feature vector (1280)? Is there a formula to determine the units for each dense layer I add?
Answer: Not only the units but also the number of layers... you can reason over something like "how complex is your task", but usually we resort to grid search over some educated guesses (like 2/3 layer of 128/256 neurons, but depends)
Answer: In adition to @Alberto answer,
Start by the same number of layer and units you removed from original model.
If the problem is the same, this will be probably the best solution.
After that, if the results is good enough, try reducing until results start fading, if result is not good, build up progressively.
Rule of the thumb,
More layer for more complicated task, more units for bigger number of inputs task.


How can raging song be activated in less than a standard action before level 7?

Question: At levels 1 through 7 the skald's supernatural ability raging song  normally takes a standard action to start. Is there a way to start a raging song in less than a standard action before level 7, like with a feat or magic item?
Comment: I was actually looking for an answer to exactly this question earlier today, and have not found anything. I've found a few items that raise your effective bard level for bardic performance (which raging song counts as), but they all specify what they increase, rather than just being general increases, and none of them will do what we're looking for here.
Comment: Welcome to the site! Take the [tour]. While the site generally frowns on expansive list questions, short lists—like I'm almost certain this one will be—are totally allowed. I edited the question to add the links and did a little tuning; I hope that's okay, and the question can be edited further or rolled back if the changes are too much. Anyway, have fun and enjoy the site.
Comment: Thanks. I'll try to make sure to add links and be more precise in the future.
Answer: Singing Steel special material
The new Adventurer's Armory 2 includes a new special material called Singing Steel. This new material includes this ability:

When wielding a singing steel weapon, shield, or item
  weighing at least 5 pounds, or wearing medium or heavy singing
  steel armor, the wielder or wearer can strike the singing steel
  as part of beginning a bardic performance. If the wielder can
  normally start a bardic performance as a standard action, he
  can do so as a move action instead. If the wielder can normally
  start a bardic performance as a move action, he can do so as a
  swift action instead. This ability does not function in the area
  of a silence spell or similar effect. After using the singing steel in
  this fashion, the steel must be carefully brushed to remove any
  lingering vibrations, a process that takes 10 minutes.

This works because of this line, making Raging Song count as Bardic Performance:

A raging song counts as the bard's bardic performance special ability for any effect that affects bardic performances.

Singing Steel also increases the maximum Dexterity bonus by 1, reduces the arcane spell failure by 5%, and reduces the Armor Check Penalty by 1 if used to make armor, or counts as alchemical silver for a weapon.

Light armor: +750gp  Note: Light armor does not qualify for the action reduction
Medium armor: +9000gp
Heavy armor: +12000gp
Shield: +7000gp
Weapon: +6000gp
Other items: +600gp/lb Note: Must be at least 5lbs to qualify for the action reduction

This is the only way I can find to reduce the action required to start a bardic performance/raging song.

I've come across another item that technically allows you to reduce the action needed to start a bardic performance/raging song.
Perfect Tuning Fork is a one time use 600gp item that allows you to reduce the action.

When holding a perfect tuning fork in the hand, the wielder can strike the fork as part of the action of beginning a bardic performance. If the wielder can start a bardic performance as a standard action, she can do so as a move action instead. If the wielder can start a bardic performance as a move action, she can do so as a swift action instead. A perfect tuning fork loses its magic after one use, but it can be used as an ordinary tuning fork thereafter.
Answer: Rage powers, Savage Intuition.
https://www.d20pfsrd.com/classes/core-classes/barbarian/rage-powers/paizo-rage-powers/savage-intuition/

Benefit: Your bestial senses allow you to sense danger and become enraged before you even have time to consciously react to danger. When combat begins, if you have rounds of rage remaining, you may automatically enter a rage without using an action at the start of the first round of combat (or at the start of the surprise round, if there is one), even if you are not otherwise aware that combat has begun.

Seems legit to me.
Comment: Welcome! Please take the [tour] as an introduction and check the [help] for further guidance. This answer as is effectively just pointing at a feature. Could you complete the answer by explaining how this feature can be used to solve the problem posed in the question? Good luck and happy gaming!


How can I harden the centre of a partly cooked christmas cake

Question: My christmas cake has been baked for the correct time as per recipe but the centre has remained soft whilst the outside is hard. Would a period in a microwave finish the centre without ruining the remainder?
Comment: Not answering so much as probing the problem: have you cooked this cake before?  In the same pan, and same oven?  Once, using foil to stop the top browning (when I was younger) I covered the hole in the bunt-style pan.  That is crucial for air convection...
Comment: I have made 3 cakes to the same recipe and in the same oven and tin for the last 2 years with no problems.
Answer: I have never tried cooking a partially-done cake in a microwave to finish, but I don't expect it to turn out a desirable result.  You may be out of luck for the current batch.
In future, I recommend going by internal temperature, rather than total cooking time.  Depending on the recipe, cakes using wheat flour tend to set around 200F (93C), so aim for 205F; you may need to do a batch or two as an experiment before you find out the perfect "done" temperature for your cake.  Get yourself an instant-read thermometer or probe thermometer; make sure the tip of the probe is in the very middle of your cake when you take your readings.  Also, keep in mind that the cooking process continues even after you pull the cake out of the oven -- as the cake sits "cooling", the residual heat on the surface slowly penetrates to the middle.  Be sure to give your cake time to finish this resting process before you cut into it or stick it in the refrigerator/freezer.
As for hard-on-the-outside, there could be several reasons for this, but the one that comes to mind as likely is that the sides of the cake set too quickly for the recipe.  This could easily happen if the material of the pan you are using is too conductive.  Glass and ceramic bakeware heats slower than metal, and among metal cake pans, dark surfaces heat faster than dull or shiny ones.  If you are already using glass/ceramic bakeware, then get an oven thermometer to make sure your oven is heating to the correct temperature.  Even top quality oven thermostats rarely stay accurate over time.  If that doesn't reveal any problems, try dropping the oven temperature a little and extending the bake time.
Answer: If you are making largish cakes, say 8" diameter or above and are deep like Christmas cakes, and you're doing it in (metal) cake tins, you might consider using flower nails.
Flower nails look like big metal drawing pins,  The base of the flower goes in the bottom of the cake tin and must be in contact with the tin, so if you are lining the tin with greaseproof paper, use must pierce the paper so that the base of the flower is between the tin and the paper and the point is in the cake mixture. The base of the flower nail absorbs heat from the base of the tin and transfers it into the centre of the cake evening out the temperature within the cake.
I use the Wilton No 7 flower nail but there are others out there that you can use.


Consulting gigs for quantitative sociologist

Question: I am a university professor (quantitative sociology) and I am interested in finding consulting gigs, especially for the summer since I'm on 9-month, but possibly year round if just for a few hours/week. Any advice how to find gigs?
Answer: What you need to do is establish visibility, especially with those who might benefit from your services. Having an extensive and helpful web site can help, especially if it is, itself, visible, such as one hosted by the university. Perhaps a professional blog or such will give some people an idea of what you can offer. But make it helpful to readers, not just an ad for your services.
But that isn't enough.
One possibility is to make contacts through adult students (MS, and doctoral level). Some of them may be employed by firms that would be interested. But you need to meet the people responsible.
One way to meet people is to do a bit of research on the interests and expertise of people with some authority at local companies/agencies and invite them as guest speakers, either in your own classes or generally.
If you want to cast a wider net, you can use professional meetings to make contacts with others of similar skills and desires and find a way to share contacts. Not a quick process, but it can build visibility.
Another way, not especially lucrative, but possibly rewarding, is to volunteer your expertise to local non-profit or government agencies. I suspect a number of them would be interested in knowing more about their clients. You can also get some of your students involved in this work, to their advantage, perhaps. But this sort of thing will also raise your visibility once it becomes known what you can do.
You can also, of course, form a formal group with colleagues and advertise your services.
Comment: Thank you VERY MUCH for the thorough reply. Those suggestions are extremely helpful. At the same time, this suggests that those gig jobs find you, not you find them


Transistor switch: How to commutate 4-6V rail with 0-3.3V signal?

Question: I want my gate (fet) or base (BJT) to turn on at 3.3 v, I then want to have 4 - 6 volts on my collector or drain, and the same voltage as the C or D to be present on the emitter or source,how should my circuit look like? this is to turn a buzzer on or off, I am controlling it with a microcontroller
Comment: possible duplicate of [making a switch](http://electronics.stackexchange.com/questions/15049/making-a-switch)
Comment: Is this really any different then your previous question? I realize there are some minor changes and a lot more detail added, but you should have just edited your previous question.
Comment: @Kellenjb - This looks like a different question to me. [The other one](http://electronics.stackexchange.com/questions/15049/making-a-switch) was about a two-way switch, while this is on/off. @Fouad - can you make this more clear?
Comment: @Stevenvh could be homework that has minor variations like this. That would explain it. However I don't look too highly on people who ask new questions before addressing the issues that people brought up on a previous question.
Comment: @Kellenjb - agreed!
Answer: What you are describing is called the "emitter follower" or "source follower" configuration.  That's not what you want here since you want to drive the buzzer with a higher voltage than the 3.3V the microcontroller puts out.
What you want is to use the transistor in common emitter (BJT) or common source (FET) configuration.
For a FET, connect the source to ground, the gate to the microcontroller output, the drain to the low side of the buzzer, and the 4-6V supply to the high side of the buzzer.  In this case the FET needs to turn on well with only 3.3V gate drive.  Those are called "logic level" FETs.  I often use IRLML2502 in such applications.
For a BJT use a NPN with emitter, base, and collector the way the FET source, gate, and drain were hooked up.  Except there needs to be a resistor between the base and the microcontroller output.  Let's say the buzzer draws 100mA and the transistor has a minimum gain of 50 in this case.  That means you need at least 2mA base drive.  Figure the B-E drop is 700mV, so that leaves 2.6V accross the resistor.  2.6V / 2mA = 1.3KOhms.  So 1KOhms would be reasonable to leave some margin for the example values I used.
In either case, make sure to put a reverse diode accross the buzzer.  It will be at least partially inductive, so will produce a large voltage spike when turned off unless you give it a path to flow.  Without the diode the transistor will get fried, and bad voltages could feed back to the microcontroller.
Comment: thank you very much, I used a 2n3904 BJT and it works like a charm
Answer: This is often done in common source mode: you connect your FET's source to ground, and the buzzer between the drain and the 4-6 V supply. The FDN359AN is a suitable MOSFET to be controlled by your microcontroller: \$I_{D}\$ = 2 A @ \$V_{GS}\$ = 2.5 V.


1950s short story with people recruited to fight in far future war

Question: I'm trying to recall a short story from the late 1940s or 1950s about ex-soldiers being recruited by a shadowy agency who then end up fighting in a far-future conflict. The chief recruiter employs a human woman to act as office staff and she stumbles on the truth.
Comment: Just like The Big Time by Fritz Leiber? It is from 1958: https://en.wikipedia.org/wiki/The_Big_Time_(novel)
Comment: There are a couple of other references (on the link): The Corridors of Time by Poul Anderson and Leiber's short story "Try and change the past"
Answer: That's almost certainly "Recruiting Station" by A. E. van Vogt, first published in ASF in March 1942.  It's a point-for-point match with your description.  Norma is the secretary who discovers what's really behind the recruiting station she works at -- and she ends up as a double (or maybe triple) agent in an intergalactic/time travel war.
It can be found in a number of anthologies and collections: https://www.isfdb.org/cgi-bin/title.cgi?68329
Incidentally, if you enjoyed that story, Michael Swanwick "Legions in Time" wrote a sort-of sequel, sort-of other view which is excellent.
Comment: The general theme is also central in "Old Man's War" by John Scalzi, though this is much more recent and focuses on sourcing talent from the elderly, not just former soldiers.
Comment: I guess some part of Perry Rhodan (Masters of Andromeda - Arc) was also inspired by this.


In high-altitude piston aircraft, what type of forced induction (boost) is used?

Question: In high-altitude piston aircraft, what type of forced induction (boost) is used? Turbocharger or supercharger?
Comment: Maybe you should rephrase your question using commonly understood terms, like supercharging for a compressor which is directly driven by the engine and turbocharging where the exhaust stream drives a turbine which in turn drives a compressor.
Comment: @PeterKämpf edit my edit of the question, or the original user who posted the question?
Answer: You can have either (turbo- or super-) or both (superturbo-), there is also the turbo-compound engine.

Most WWII aircraft engines had mechanically driven superchargers, and the turbosuperchargers (with intercoolers) were added to achieve desired altitude performance.
Modern aviation piston engines designed to run at high altitudes typically include a turbocharger rather than a supercharger. The change in thinking is largely due to economics. Aviation gasoline was once plentiful and cheap, favoring the simple, but fuel-hungry supercharger. As the cost of fuel has increased, the supercharger has fallen out of favor.
— Wikipedia [edited for context; citations missing from main article]

During WWII, two-speed two-stage intercooled superturbocharged engines were common.
(Frames from YouTube)
Compressed air via the exhaust-driven-turbine is channeled to a geared mechanically-driven supercharger. (The jet-engine must have had a laugh.)

You get the super part, which is a mechanically-driven compressor boost.

The turbo part, which is a turbine-driven compressor boost.

Intercooler for cooling the air.

The two speeds and stages are for low- and high-altitude operations. Otherwise the engine could blow at low-altitude.

A good example is the Wright R-3350 Duplex-Cyclone used on the Boeing B-29 Superfortress and other aircraft. Delivering up to 3,800 shp (2,830 kW).

Above is an example of having both, however as noted in the comments, superturbocharger as a term is nowadays used to describe a turbocharger.

Here's a declassified training film—from which the above frames were taken: Turbosupercharger: Master of the Skies (1943)
Comment: to be clear, they used to use the term *turbosupercharger* for what we would now call a *turbocharger*, and it doesn't necessarily mean that the engine was equipped with both types of forced injection.
Comment: looks great! I read the wikipedia article, and it wasn't really clear what the setup was (whether it was a 2-stage supercharger, turbo-only, or turbo-compound) - they really did a lot of experimenting in WW2 with those aircraft engines
Answer: Initially, all supercharging was done with, well, superchargers. Read NACA Technical Note 48 for a nice summary of German work on superchargers during WW I which reached the point of almost being ready for operational use when the war ended.
From Notes on WW I German superchargers:

All of these projects failed in the sense that the war ended before
  the technology could yield military advantage. While we have nothing
  by way of the detailed reporting on German wartime research accorded
  to British and American efforts, it appears that Germany came closest
  to producing combat-ready supercharged engines. Certainly they had a
  denser supplier network than the Allies, more consistent research
  goals, and accumulated far more hours of test flying.

Turbochargers were investigated soon after but were used much less frequently for two reasons:

Due to the higher inertia a turbocharger reacts only slowly to speed changes, which limits the pilot's options especially in fighters.
To avoid overstressing the engine, turbochargers need a wastegate. Before automatic wastegates were developed, the risk of manual mishandling of the wastegate setting was all too real.

From Wikipedia:

Turbochargers were first used in production aircraft engines such as
  the Napier Lioness in the 1920s, although they were less common than
  engine-driven centrifugal superchargers.

Only when bombers and airliners needed to maximise their range did the advantage of turbochargers, their higher efficiency, take effect. In many cases a supercharged engine had a turbocharger added because the high energy content of the exhaust gases offered easy gains in efficiency. Note that most early examples of turbocharged aircraft were types in which the engines are run at a constant power setting over many hours. What also helped was the development of jet engines which spurred both the research into high-temperature alloys and turbine aerodynamics. This was a mutually reinforcing development, because the first turbojet designs were based on then-existing turbochargers.
With automatic wastegates, little requirement to frequently adjust engine power, much experience in high-temperature materials and high fuel prices, today the turbocharger is the obvious choice for boosting engine pressure. The most recent piston-powered high altitude platforms, the Boeing Condor and the Grob Strato 2C, used turbochargers. In case of the Condor this was a two-stage turbocharger with intercooling, however, flight test revealed synchronisation problems between both stages. The Strato 2C had two turbochargers and one supercharger, all with intercooling.
Answer: WWII bombers needed forced induction to achieve performance at ALTITUDE - NO other reason!
Numerous WWII fighter aircraft relied  on supercharging and turbo charging to improve overall performance especially at higher altitudes…. Such as the P-47 and the P-51….
Comment: This is really a comment, not an answer to the question that was asked.  You'll need to build reputation points with quality answers before you are able to comment.  This one probably won't get you there...


Which Data Science book gives complete guideline to data science?

Question: There are many books in the stores on data science. Is there any book that gives complete guideline to data science? Like separately talks about python (not R), statistics, math, data Visualization software etc. Overall, I need to have a book that talks about complete guideline to data science in any field, or important fields like business, commerce etc.
Comment: It's important to realize that **there cannot be a single book which is "complete" about data science**, especially practical aspects such as software libraries and tools. The domain is too vast and evolves too fast: even if this was somehow possible, it would already be incomplete by the time the author is finished writing it. Additionally a data science book which would cover any application in any field would require expertise in literally everything from medicine to astrophysics, it's totally impossible.
Comment: Yes, I can understand. I do not want details about all the topics, I want a full roadmap that mention every topic in very short.
Comment: I'm afraid that even this is not realistic, there might be books which go quickly through many topics but then there wouldn't be enough detail to understand things well (for example would you expect to learn everything about medicine from just one book?). Also be careful that data science is not something which can be learned only from a book, it requires a lot of practice too. If you want to seriously learn it, in my opinion the best way is to follow a proper course.
Comment: I agree with you totally. Can you suggest me a proper course that is not paid( having some financial crisis right now, not gonna lie)?
Comment: I don't have any recommendation myself, maybe you'll find an answer in [this question](https://datascience.stackexchange.com/q/32438/64377) or [that one](https://datascience.stackexchange.com/q/14313/64377).
Comment: Ahh got it. I am following the same guideline, so feeling a bit more relaxed.
Answer: As you say, there are loads of options.
Two that I would recommend to anyone:

Data Science for Business - Provost & Fawcett - Bigger picture

Data Science From Scratch - Joel Grus - Finer details
Comment: Please do explain why you recommend these two.


What does graphological deviation mean in stylistics analysis?

Question: If I have a poem, that is a sonnet, with an octave and a sestet - can you then say that this gap between them is a graphological deviation?
Answer: The use of octaves and sextets refers to rhyme scheme and  poetic metre  :

In poetry, metre (meter in American spelling) is the basic rhythmic structure of a verse or lines in verse. Many traditional verse forms prescribe a specific verse metre, or a certain set of metres alternating in a particular order.
  (Wikipedia)

while Graphological Deviation:

is the deviation in which poets disregard the rules of writing. They write the words in such a way without any boundaries in lines, space, or rhymes. Sutardji's 'Tragedi Winka dan Sihka' and J.E. Tatengkeng's 'Kuncup' are good example for this.

(doeniadevi.wordpress.com)
Comment: Then can you please explain this article "Owen`s poem Anthem for Doomed Youth is also graphologically deviant. There is a gap
between the octave and sestet of the sonnet. This graphological deviation foregrounds two
different discourses used by the poet; army discourse in the octave, church discourse in the
sestet." in http://www.novitasroyal.org/Vol_4_2/timucin.pdf
Comment: I think that referring to  octaves and sextets  , graphological deviation should be written using inverted commas.
Comment: @lomlfoml If you look at the poem - visually look at it - you can directly *see* where the meter is octave and where it is sestet, without needing to *read* it at all. There is a group of short lines and a different group of long lines. There is a visual distinction created on the page, which is of course mirrored by the meter when you read the poem. So if you know the "discourse of war" is written in an octave meter and the "discourse of church" in sestet, you can see which discourse is being employed simply by he length of the line, without having to actually read the line or understand it.
Comment: @DanBron But that cannot be possible - you cannot know the war discourse is explored in the octave, for example, without the foresight that the longest line is the one used for the war discourse. OR is this foresight part of the graphological deviation, or am I missing a crucial element here?
Comment: @Iomlfoml No, *given the information*, provided by Timuçin, that the work is divided into two different discourses mapping to two different meters, *then*, you can detect, visually, which is which. Absent that information, in advance, all you can say is that there *is* a graphological deviation (separating the work into two broad parts), but not what it signifies.


What is the relationship between a theme, child theme, and framework?

Question: I understand how parent and child themes work. But my question is how do frameworks fit into it? Are they just technically parent themes you create different child themes from?
Answer: You're absolutely right. Frameworks like Thesis, Genesis, and Ultimatum (among others) are essentially barebones themes that allow for modular customization with child themes and skins (in terms of Thesis, though it's been years since I used it, so that may have changed).
I use Ultimatum as a framework for features, for instance, and have child themes to add in all the customization.
"Framework" is just jargon for what is essentially a skeleton for you to build off of. If you're familiar with Ruby on Rails, I think of them almost likerails g scaffold.


If empty space has energy, and space is expanding, is this energy equally distributed as space expands?

Question: The cosmological constant (dark energy) is often described in terms of empty space having a non 0 energy value and this energy being the source of the accelerated expansion of the universe. If space is expanding, what does this imply for energy conservation? Is this energy conserved by being more thinly distributed as space expands? Does this question make any sense or am I just crazy?
Answer: The cosmological constant is a constant energy density per unit volume of space, so as the universe expands this does indeed create energy as it creates new space. In this sense conservation of energy is violated.
Actually this is less surprising than you might think. Conservation of energy is linked to a symmery called time shift symmetry by Noether's theorem. However this symmetry is violated by the expanding universe so there's no reason why energy should be conserved (though you should note that the symmetry is strongly broken only on vast scales and conservation of energy is an excellent approximation locally).
But, but, but ...
There is a long and sometimes heated debate about whether energy really is or isn't conserved in an expanding universe. See for example this article by a member of this site. Basically the argument comes down to how you define the total energy - in General Relativity this is not a trivial question.
Comment: "though you should note that the symmetry is strongly broken only on vast scales and conservation of energy still applies locally". That's simply impossible (also mathematically).
Comment: **But, but, but:** *[ insert rant about Noether's 2nd theorem, general covariance and the gravitational stress-energy pseudo-tensor ]*
Comment: @Christoph: indeed :-)
Comment: Yeah, I fully agree - the more stuff there is the less it's obvious there is nothing behind ... (except there is more energy although there isn't)
Answer: Actually, energy is often not Conserved in general Relativity. For are more in deep explanation see:
http://math.ucr.edu/home/baez/physics/Relativity/GR/energy_gr.html
But just notice that Dark Energy might not necessarily end up being the cosmological constant, but a new force field, so its behavior might differ from that of an actual cosmological constant (which would increase total energy as you suggest in your question)
Answer: Dark energy due to a cosmological constant does not get diluted by metric expansion of space. However, this does not violate energy conservation as the increase in energy will be cancelled by gravitational potential energy. The problem with general relativity is (some would say arguably) not energy conservation, but energy localization:
In a rotating frame of reference, energy conservation only holds if you include the contribution of the centrifugal potential. Analogously, in general relativity, energy conservation only holds if you include the contribution of the gravitational potential. In both cases, you cannot associate a meaningful energy density with these contributions. General relativity just comes with the additional complication that you cannot transform away gravitational energy by going to a globally inertial frame of reference.
Note that there are ways to separate gravity from inertia if you go beyond general relativity (eg the teleparallel approach or bimetric theories) and get a gravitational energy density this way, but energy conservation will only hold if you include inertial effects.
Comment: "However, this does not violate energy conservation as the increase in energy will be cancelled by gravitational potential energy." I do not quite understand. Could you explain?
Comment: @brightmagus: Noether's second theorem applies to general relativity and yields a 'trivial' law of energy conservation, where the contribution due to the cosmological constant gets cancelled by the negative potential energy of the gravitational field; this law of conservation of energy can be expressed in terms of a gravitational stress-energy pseudo-tensor, but there's no tensorial expression for gravitational stress-energy as general relativity does not differentiate between gravity and inertia
Comment: You actually restated the original quote with this: "where the contribution due to the cosmological constant gets canceled by the negative potential energy of the gravitational field", again apparently not explaining what you mean. OK, I will make a wild guess. Is this to say that because universe is larger (and infinity is further away ...) then the force of gravity of a given body must extend further away, which means the potential energy near the source (assumed to be negative) must change? Or else ...
Comment: @brightmagus, it's hard to argue with forces in GR: if you think of dark energy due to a cc as some fluid, you have to wonder why gravitational attraction acts repulsively if you choose the right equation of state (negative pressure), without any gradients being present; I'm unsure what kind of explanation you're looking for beyond "that's what Noether's theorem tells us"; essentially, energy conservation boils down to the first Friedmann equation $\rho+\rho_\Lambda-3\dot a^2/8\pi Ga^2=0$, which many physicists are uncomfortable with, claiming it's not a proper conservation law
Comment: "you have to wonder why gravitational attraction acts repulsively if you choose the right equation of state (negative pressure), without any gradients being present" I don't have to - it's just bad (unphysical) maths. Anyway, I was hoping for a physical explanation, and not just mathematics. But ... forget it ...
Comment: @brightmagus: the gravitational potential fixes conservation of energy in curved space-time in a similar way to how the centrifugal potential fixes energy conservation in rotating frames of reference; in the latter case, it all works out because there's a globally inertial frame in which energy conservation holds, in the former case, it works out because energy conservation holds trivially in any generally covariant theory; sorry, but that's the best *I* can do...
Comment: " it works out because energy conservation holds trivially in any generally covariant theory;". Unless one reads John Rennie's answer. OK Christoph, thanks for your effort.


Find conformal mapping from open strip onto open quarter disk.

Question: I'm trying to find a conformal mapping $f:A \rightarrow B$ from the open strip $$A = \{z \in \mathbb{C}| Re(z) < 0,0<Im(z)<1\}$$ onto the open quarter disk in the first quadrant given by $$B=\{z \in \mathbb{C}| Re(z) > 0,Im(z)>0\} \cap\{z \in \mathbb{C}| |z|<1\} $$. First of all, am I right in assuming that $e^{\frac{\pi}{2}z}$ will map the $A$ onto the upper half plane from which I can map onto the unit disk using the Möbius transform? Also, how can I restrict the Möbius transform in a way that I will end up with a quarter disk? Thanks for any answers.
Comment: $z^2/i$ maps the open quarter disc to the open half-disc in the right half-plane, then one maps the unit circle to the upper half-plane so that half-disc becomes a quadrant, so by another squaring we get the full half-plane, so reversing that plus your map from the strip to the upper half plane gives the required $f$
Comment: No, $e^{\pi z/2}$ maps $A$ to something much more convenient :). Consider the absolute value and the argument of $e^{\pi (x + i y)/2}$ on $A$.
Answer: $e^{\pi z/2}$ does not map $A$ to the upper half-plane, but to $B$. It is already the answer.
$z\to\pi z/2$ only changes the strip's height to $\pi/2$; it remains infinite to the left. Then the exponential map turns the strip into the region between radii of $e^{-\infty}=0$ and $e^0=1$, and between angles of $0$ and $\pi/2$ – in other words, $B$ itself.


jQuery Address Remove Last Url From History

Question: We are utilizing the jQuery Address plugin in our ASP.NET MVC ajax application to handle deep linking and the preservation of history.  Whenever you want to navigate to a new page, you simply make the following call:
<code>$.address.value([some url])
</code>
Our app has a very detailed user management system that allows our users to define which users have access to which functions in the app.  We decorate each action method with a customized Authorize attribute that determines whether or not the user has permission to use the function supplied by that action method.  The authorization works great but the problem is that if the user doesn't have permission to utilize the given action method, the browser url still reflects as if they are on the page of the link they clicked.
For instance, if the url /SomeController/UnpermittedAction represents an action method that the user should not be able to utilize, when they click on the link to that method, we execute the following
<code>$.address.value('/SomeController/UnpermittedAction')
</code>
Then, the action returns an Unauthorized response and we display to the user that they are not permitted to utilize that function.  But, understandably, the user's browser window now shows:
<code>somedomain.com/#/SomeController/UnpermittedAction
</code>
That in of itself isn't really a problem, the problem is that if the user goes to some other page and then clicks the back browser button, they see the unauthorized message again and it appears somewhat confusing as they aren't sure why they are seeing that message.  Ideally, if they click the back button, we would want to return the user back to the last page they were authorized to use.
My question is, is there any way to remove the unpermitted action url from the browser history and/or the jQuery address history?
Answer: In javascript try
<code>        $.address.history(false);
        $.address.value(newurl);
        $.address.history(true);
</code>
This will replace the last history entry with the new url