Where does light go after it enters a black hole?

Question: Nothing passes through a black hole.
Where do things go then? If light enters a black hole, what happens to it?
Do things go to a white hole and resume in another universe?
Comment: "What actually transpires beneath the veil of an event horizon? Decent people shouldn't think too much about that." --  Academician Prokhor Zakharov, *For I Have Tasted The Fruit*
Comment: It just sticks to the black hole, or goes in it.
Comment: @MasonWheeler What fruit was this *Academician* tasting at the time?
Answer: In 1974 Stephen Hawking published a paper that provides a theoretical basis for the thesis that black holes eventually may radiate away all the mass, light, and other energy they accumulate.
Evaporation of black holes has been called Hawking radiation.  It takes place so slowly (at least until the black hole shrinks to a small size) that none has been measured to date, but researchers are searching for evidence of it.  If they find any, then it's conceivable that all the matter, light, and other energy Hoovered up by a black hole may eventually find its way back into the universe as higher-entropy Hawking radiation.
Here's a link to an excellent discussion of Hawking radiation by mathematical physicist John Baez: http://math.ucr.edu/home/baez/physics/Relativity/BlackHoles/hawking.html
Answer: It is believed, according to our most tested theory of gravity (General Relativity), that objects, such as material from other stars, particles such as electrons and also photons of light, may actually pass through the Event Horizon of a black hole.
For a large enough black hole, a person in a spaceship passing through the event horizon may not notice any difference from "normal" space travel.  The mass of the black hole is very important in producing the effects you may encounter passing through it.
What happens to these objects mentioned above, after the passage through the event horzon, is currently unknown, as we cannot test or perform experments on or near black holes.

The above picture shows an artists impression of an accretion disc, that is a disc of matter moving around the black hole at very high speeds, that may eventually fall into the black hole. The large luminosity of Quasars, which we can detect on Earth, is believed to be a result of gas being accreted by supermassive black holes.
If you read this wikipedia article, Black Holes, you will find a lot more information on the various ideas regarding black holes and what effects they can have.
Comment: When you say "may actually pass through the Event Horizon", you make the event horizon sound like some kind of magic barrier, when it's not locally any different from normal space, other than its proximity to a singularity.
Comment: @Nick2253 Yup, a perfectly normal space, except that it's only ever one sided. Getting in is easy... when you're inside, there is no longer any path out (except back in time, of course :P). Thinking in terms of usual terrestrial topology, this is quite mind boggling :D Most people seem to have trouble wrapping their minds around this whole "time is just another part of spacetime and it distorts" thing (past me included).
Comment: a good analogy to the event horizon is a ship  in a whirlpool (or bathtub drain!) (or an even closer analogy, an object in decaying orbit). Its moving along its happy way, not knowing that it could never produce enough thrust to make it out of the spiral.
Comment: @JasonCoyne An important difference between this analogy and reality is that the reason escape is impossible is very different. In the analogy, it is simply because the ship does not have enough thrust to escape. However, in a black hole, the amount of thrust is entirely irrelevant. You cannot escape because, physically, **every direction is down** (assuming you move forward in time), which is due to counterintuitive warping of spacetime in such a strong gravity field.
Comment: @Nick2253 It is magic:) (sort of), but your point is perfectly valid and I have edited the post.  Thanks very much for your comment, I hope it it does clarify the answer for the OP and I should have included it.
Comment: @Nick2253: I don't think that's necessarily a problem. We drive across national borders all the time.
Comment: The drawing makes it look like a black whole is flat, but it should be a sphere.
Comment: @Nick2253 See Arthur C. Clarke's three laws: "Any sufficiently advanced technology is indistinguishable from magic." ;)
Answer: A short answer is that frames themselves are moving towards the black hole and light moves relative to a frame and hence it can be stuck.

Nothing passes through a black hole.

Things can enter a black hole, they can't can't exit without going faster than light.

Where do things go then?

The important part of that question is the word "where" you have to learn what that means.  In general, and in general relativity, not just in the everyday situations when the word is quite intuitive.
The first thing to know is that your spatial coordinates can be relative, if you think something is at rest in your coordinate system and some else has a coordinate system that is moving relative to you then they might think the thing is moving.
An example is a train, you might describe things with a coordinate system based on the front of the train, and someone sitting in the train would be at rest, but to someone on the ground, the front of the train is moving and so is the person sitting on the train.  You might think the person on the ground is right and the person on the train is wrong, but to someone sitting near the sun, the earth itself is moving around the sun so the person on the ground says things are at rest when they are going around the sun.  And someone in a different part of the galaxy thinks the sun is going around the center of galaxy so things at rest to the sun are not at rest to the galactic center.  And even the galactic center is not the end of the story, someone in the Andromeda galaxy sees the whole Milky Way galaxy rushing towards it (on a collision course in fact).
So you can do two things.  You can describe things locally, such as how far object A is from object B or you can pick a local frame and describe the coordinates in that local frame and learn how to get distances from those points.
There are lots of possible frames. In some of them the laws of physics hold, these are called inertial frames, and they cover very very very small regions of spacetime, so they only work for a small interval of times and a small range of positions, if you move a ways or persist a ways then you have to switch to a new frame every so often.
Outside a black hole, there is a surface called the event horizon. The inertial frames themselves pass through the event horizon (or alternatively the event horizon is an invisible surface that moves across the frame, motion is relative so there is no real difference).  There are still many different inertial frames, for any particle there is an inertial frame that is momentarily moving at the same velocity as the particle (or alternatively, the particle is at rest in that frame, motion is relative so there is no real difference).  Since there are many different velocities, there are many different inertial frames.  But in each frame that has the event horizon surface at its origin, the surface in that frame that represents the event horizon is expanding outwards. And it expands outwards at speed c.
Since light moves at sped c relative to the frame and the event horizon moves outwards at speed c, if the event horizon has a head start you never catch up, so you can cross it one way (it is rushing towards you at the speed of light) but not the other way (it is rushing away from you at the speed of light).
If this wasn't general relativity and I told you there was as surface expanding at the speed of light and the two sides of the surface are the outside and inside of some region you might think that region is simply getting larger.  That's understandable.  But how would you know if something is getting larger.  Time itself is affected by gravity, what if time slowed down inside the region so things in there though thousands of years were passing, they might think light was traveling thousands of lightyears but to you it wouldn't look like it went very far.  It is a much more subtle question when distance and time can be related to coordinates in different ways in different places.
It is possible that the area of the surface stays the same even if it is expanding radially outwards in every inertial frame.  This requires spacetime to be curved, and the time part too, not just space.  And the word curvature is a technical word, it doesn't for instance say the surface of a cylinder is curved, it is not talking about bending in some larger space it is talking about the geometry of curve one the surface.  For instance the surface of the earth is curved and we can tell that because if you travel south from the north pole you end up at the south pole no mater which path you take, the curves heading away from teh north pole simply don't get as far away from each other as they would on a flat plane, when you send a bunch of people along a path traveling 1m away from the north pole, they form a circle that is not $2\pi (1m)$ in circumference, but instead form one that is smaller.  A similar thing happens outside a black hole, a surface could expand outwards but the circumference of the surface can be smaller than you'd expect.  The event horizon is such a surface, it can expand in any local frame, but the whole surface area never gets larger.
Since we call the region on one side "the outside", and that surface is expanding in your frame at the speed of light, you simply stay on the "inside".

If light enters a black hole, what happens to it? Do things go to a white hole and resume in another universe?

If the light is heading in and then if it bounces off of something or scatters around the insides of the black hole or somehow get near the event horizon surface again, in any inertial frame that event horizon is expanding at the speed of light and has a head start. You won't cross because you just never get to it. If you were heading in and immediately bounced back you could stay on it. That surface is actually the cutoff: if you scatter before you get to it you can stay out and if you go through it then you will never be able to catch up and right at it is your last chance to stay right on it.
There are models of black holes that have white holes "inside" the event horizon too, but that is because they have two universe that have always had event horizons and the two outside universes are joined together the the event horizon.  Even then light that goes through an event horizon merely meets light coming in from the other universe (remember light that just came in is moving one way, the light moving the other way is either from the other universe or it entered much earlier and turned around nearby and now just got here). And light from both universes are equally stuck in the sense that they are equally getting farther away from the event horizon.  the way they are connected is the incoming light from one side of the event horizon is outgoing light for the other side of the event horizon, so imagine two event horizons, one for each universe, incoming on one being outgoing on the other.
Now rightly the event horizon for one universe has a head start against any actual light coming in from the other universe.
So what about the white hole?  The white hole is in some sense in the distant past.  Anything that comes in through either event horizon arrives too late to affect the white hole.  No matter how early they came through.  The white hole had the ability to affect the outsides but already did so earlier than any event on the outside.  Basically when you specified the conditions of the the outside of the black hole at a certain time, that time is too far from the white hole and too late to affect it.
The white hole is singularity, the theory is actually broken there, and you shouldn't treat it too seriously.  Yes it looks like it is in the past of everything outside, but it doesn't have a past itself and it is completely broken there.
But you most definitely do not end up in the white hole, nothing that is outside ever ends up in the white hole.  So what does the white hole do?  You can think of it as something that kept the outsides of the two universes apart.  Since the event horizons is eternal, you can think of the white whole as where the event horizons themselves came from (but that is farther away ago then any outside time).
I don't expect this answer to be fully satisfying, but there is a lot to learn and hopefully this is the rough bones of the theory.
Comment: Using the words "never", "eternal", "earlier", "before" means the reader must understand that even these descriptions are tethered to frames of reference (understanding) that must change when one crosses the event horizon.
Comment: You answered this in a much more comprehensive manner than I did. I did not address each of the points raised by the OP. Rereading my answer,  I can't say I am happy simply referring the OP on to Wikipedia, but I do wish there was a system for asking the OP what level of textbook or study  they are at.
Comment: @AcidJazz It's OK to have many answers at different levels because the answers aren't just for the OP. Sometimes my answers really only spell out the breadth of issues involved more like a map than an education. But that can happen if the question was a bigger question than the OP realized it was.
Answer: No one knows what happens inside the black hole (I mean inside the event horizon). But inside the event horizon space becomes unidirectional (like time in real world) and therefore whatever enters into it must hit the singularity inside (at least according to classical general relativity). But again no one knows what happens at that singularity. By definition (classical) theory breaks down there. Till date, only "science fictions" work there, as far as I know!
Comment: Well, the theory doesn't *quite* break down; it just gets kind of wibley-wobley, timey-wimey...
Answer: Nothing special is happening!
Think of a black hole as the accumulation of mass which is exceeding a certain limit. The same laws of gravity are applying before and after exceeding the limit. That means: Mass particles keep on being attracted. They are becoming part of the mass of the black hole. Electromagnetic waves will equally be attracted by the mass of the black hole, and the light will be absorbed by the mass, in the same way as light is absorbed by any mass particle. At my knowledge mass will not stop absorbing light when it is part of a black hole.
The particularity is that everything is happening behind the event horizon. So we will never be able to observe what is going on inside.
Comment: "Nothing special is happening!" Its amazing how science zaps people's sense of wonder.
Comment: @developerwjk That's a good point and as scientists we need to be careful that we don't convey an interjection like "Nothing special is happening!" in a belittling or trivializing way. But do be aware that when people in physics make that interjection, it's not needfully trivializing the subject. Very often (and this is how I heard Moonraker's statement as I read it) it's an exclamation that conveys *excitement*: I've heard it said many times when the speaker is brimming with enthusiasm and is about to tell you, "hey, this is subtle and hard, but if you look at it this way, you suddenly ...
Comment: @developerwjk ".... understand that the question you've been asking is too complicated - let me show you a simpler question, answer it and prove it amounts to the same thing!". And that is the opposite of trivializing something. Listen to [Brian Cox](https://www.youtube.com/watch?v=E43-CfukEgs) and his summary at the end of Einstein grasping the equivalence principle, that ultimately leads to GTR: what Einstein described as the happiest moment of his life was understanding "nothing special is happennning. To fall is natural. To fall is to be in the simplest motion state possible". That's ...
Comment: @developerwjk a "trivialization" that shook physics to its very foundations.


Pymatching Toric Code vs Surface Code

Question: I am looking the example of toric code in Pymatching.
Here is the code:
 import numpy as np
import matplotlib.pyplot as plt
from scipy.sparse import hstack, kron, eye, csr_matrix, block_diag

def repetition_code(n):

    row_ind, col_ind = zip(*((i, j) for i in range(n) for j in (i, (i+1)%n)))
    data = np.ones(2*n, dtype=np.uint8)
    return csr_matrix((data, (row_ind, col_ind)))

def toric_code_x_stabilisers(L):
    Hr = repetition_code(L)
    H = hstack(
            [kron(Hr, eye(Hr.shape[1])), kron(eye(Hr.shape[0]), Hr.T)],
            dtype=np.uint8
        )
    H.data = H.data % 2
    H.eliminate_zeros()
    return csr_matrix(H)

def toric_code_x_logicals(L):

    H1 = csr_matrix(([1], ([0],[0])), shape=(1,L), dtype=np.uint8)
    H0 = csr_matrix(np.ones((1, L), dtype=np.uint8))
    x_logicals = block_diag([kron(H1, H0), kron(H0, H1)])
    x_logicals.data = x_logicals.data % 2
    x_logicals.eliminate_zeros()
    return csr_matrix(x_logicals)

I want to test minumum weight perfect matching in Pymatching. I want to run this code in the absence of noise and I want to see what will be the result of pymatching.
To do that, I use the following :
H=toric_code_x_stabilisers(4)
matching = pymatching.Matching(H)
matching.draw()

Is that correct? I see nothing, is it because I have no error in the system or is it because there is some issue with matching.draw() function? Then I tried the following code scripts:
 H=toric_code_x_stabilisers(4)
noise = np.array([0,0,0,0]) #no error
z = H@noise % 2
m=Matching(H)
print(m)
m.draw()
c = m.decode(z)

And I got the dimension mismatch error..

I want to simulate surface code in the absence of error. It is simply I will initialize my data qubits in zero states and I will use x and z stabilizer. I will measure the stabilizers and I will see the result. For example, when I measure the X stabilizer, they will commute with Z stabilizer etc.. In that case, I am not sure what should change in toric code to make it surface code. It seemed to me that, toric_code_x_stabilisers can stay same. Do we have a small example for surface code?
Answer: Here is the working code example:
H=toric_code_x_stabilisers(3)
noise = np.array([0,0,0,0]) #no error
z = H@noise % 2
m=Matching(H)
print(m)
m.draw()
#c = m.decode(z)#since there is no error, no decoding too. I simply closed the line

Pymatching Toric Code vs Surface Code


Use attribute selector to change panels in a panel stack (Microstrategy)

Question: So I have an attribute selector that currently changes the view of a grid based on the attribute passed to that grid.  I also have a panel stack directly below the grid, with panels that hold iframes, which needs to be changed as the user selects an attribute in the selector.  In other words, as the user selects an attribute from the selector, the panels would changes and show the new iframe. Is there a way I can somehow control the panel stack from an attribute selector?
The panel stack contains iframes , and each panel has an iframe with a specific URL source.  What would be great is if I could somehow pass the attribute to the URL so that the iframe in a SINGLE panel could change based on the selection made in the attribute selector.   For example, if I set the URL source of the iframe to "/servername/microstrategy/asp/{&attribute}.html" and had my html files stored in the correct folder.  But there doesnt seem to be a way to pass the selected attribute to the source URL of the iframe.
The only thing I can think of is to somehow access the "code-behind" for the click event so that it BOTH changes the grid as usual, AND causes the panel stack to change panels.
Is there something in the Web Editor or SDK/Eclipse IDE that would allow me to access such logic?  Or is there some cool work-around that would allow an attribute selector to change the panels shown in a panel stack.
Thank you for your help,
Answer: Kind of old question, but AFAIK there is no way to do it. You should probably go with text-boxes and use them as selectors. Maybe with view filters you could achieve something similar...


Declaring global helper functions and understand the namespace when using laravel-mix / webpack

Question: I am totally new to webpack (i previously built my apps by including tons of css / js files by "hand") and am now trying to understand how namespaces work when working with the named tools.
i have an app.js
require('./bootstrap');

require('./helperFunctions');

/* ... more, unrelated stuff */

webpack.mix.js is untouched from the original file delivered with the laravel 5.5 sample project
let mix = require('laravel-mix');

mix.js('resources/assets/js/app.js', 'public/js')
    .sass('resources/assets/sass/app.scss', 'public/css');

my helperFunctions.js is a simple js file with some helpful functions i want to use throughout my project:
function foo_bar(A, B) {
    return A - B;
}

/* more functions, following the same structure... */

but everytime i try to use one of the functions defined in the helperFunctions file i find that they are "undefined", even in the app.js file directly after the 'require' happens.
after inspecting the generated app.js file i found that my functions are encapsulated in an anonymous function function(module, exports) { /* my File contents go here */ }, resulting in them being unavailable to the rest of the scripts.
while i understand that this is propably there to reduce polluting the global namespace, i dont understand how i am supposed to define global objects (such as data Storage objects for vue) or functions such as helper functions.
can anybody explain how this is supposed to work, or link me to a ressource explaining this for someone who never worked with an asset compiler (if this is even the right terminus).
cheers
// Edit: i think i found a solution, after stumbling over this:
https://nodejs.org/api/modules.html#modules_modules
I editted the helper functions file to something like this:
module.exports = {
    foo_bar(A, B) {
        return (A - B);
    },

    /* ... more functions ... */
}

And imported it wherever i need it like this:
import HelperFunctions from './helperFunctions'

var result = HelperFunctions.foo_bar(5, 8);

However, this only works in files which are pre packed using webpack. is registering the component under window.HelperFunctions the only way to make them available in dynamically generated  tags throughout the website?
Comment: This answer can help you, is the same scenario https://stackoverflow.com/a/50485278/2071578
Answer: Registering your helper methods on the window object, as you kind of suggested, is a simple and easy to understand approach, so that's what I would choose to do if I wanted these methods to be available globally.
window.myHelperMethod = function () { console.log('ayo, this works!') }


How to fix serial correlation in a cross sectional data set

Question: I am doing my thesis at the moment and I needed to check the BLUE assumptions for my data set. I am doing my thesis on trying to explain IPO underpricing and my data set consists of 100 companies who did an IPO.  I have found second order correlation via the Breusch- Godfrey test in stata and I was wondering if anyone here knows how to fix this. The research I have done so far tells me that is it extremely rare for a data set like this to have serial correlation, but it happened. As newey-west standard errors only work for time series and I don't have that I have absolutely no clue on how to fix this.
Answer: Do you have the time points when the IPO was conducted included in your dataset? Otherwise how did you apply the Breusch-Godfrey test since it is a test for time-series data? It would strongly depend on the ordering of your data, which should be i.i.d. in your cross-sectional data set.
But it is thinkable that the volume of the IPOs depend somehow on the overall development of the stock market. You could control for that if you include an appropriate stock market index, or in your case of cross-sectional data you rather have to "deflate" your data to some basis year.
Just some thoughts, good luck with your thesis.


Can the bytes that make a word be handled individually?

Question: In word-addressable machines, fixed point numbers are naturally handled word-wise by the CPU. This means that any integer is stored in word-sized memory cells and that you have to access a whole word to read or write a single integer. But how about smaller data units as characters, commonly encoded as 8-bits data pieces? Since a word is made of multiple bytes, is the CPU capable of storing multiple characters in a single word while handling them as individual data pieces? For instance, if I store 4 characters (encoded with an 8-bits scheme) in a 32-bits long word, can the CPU understand them as a set with 4 elements? Or it is necessary to store a single character into a whole word? Is there a standard or different architectures deal with this matter differently?
Comment: I'm voting to close this question as off-topic because not about electronics design.
Comment: From the help center: "If you ask a vague question, you'll get a vague answer. But if you give us details and context, we can provide a useful answer." The SE moderation system is geared to shut down broad questions, if you take it to another site the same result may happen, if you do feel the need to post on another site, do not cross post. Please be specific, edit your question and try again. Since this is not a discussion site questions are kept to a Q&A format
Comment: Is there a specific chip/architecture in mind? Otherwise, this doesn't seem to be on-topic here.
Comment: Brian, I posted this question here because I referred to microprocessors in general. It's a question about computers architecture; i.e., hardware. Should I move the question to the CS site?
Comment: @Humberto Fioravante Ferro, yes, this is mostly a CS question. However I think the answers below answer your question. Please just accept one.
Answer: Yes you can. For example, the Texas Instruments MSP430 line are 16 bit processors, and have 16 bit words. A variety of registers are 16 bits long but can be addressed as 8 bit registers as well. It's memory bus is 16 bits wide though. You could add 8 bit bytes to memory without issue. And use both bytes of a memory location independently or together if you want.
Comment: Now that you have mentioned that, I remembered that the multimedia extensions for the x86 processors (MMX and SSE) treat entire words as sets of smaller units. You made me also remember that the first Intel's 16 bits microprocessor allowed to treat a single 16-bits register (say, AX) as two 8-bits pieces (e.g., AH and AL). Therefore, even if the data bus is 16 bits wide (or wider), some CPUs allows you to handle each byte separately. The catch is that you can not do that directly in the main memory, you need first load the word into a CPU's register. Doubt solved. Thank you, @Passerby!
Answer: If you're programming in C, a character is normally the same size as the smallest addressable unit of memory. If the smallest thing you can address is a 16-bit or 32-bit word, then that's what a char will be. In most modern architectures, chars are 8 bits and can be packed into a 32-bit word in memory. But in a few (some DSPs) larger bytes are used.
It's always possible to work on a piece of a word that's smaller than a byte using AND, OR, and shift operations. In that way, you could pack ASCII values into 8 bits regardless of how the addressing works. That wouldn't be very portable or easy to work with, though.
Answer: Sounds a lot like you're talking about c style unions. Combined with some struct magic, this lets you interpret the same collection of bytes in different ways while maintaining the types. The compiler does the magic of bitshifting/bitmasking for you.
<code>union data{
     struct{
         uint8_t byte1;
         uint8_t byte2;
         uint8_t byte3;
         uint8_t byte4;
     } bytes_individual;

     uint32_t bytes_all;
}

union storage;
storage.bytes_all = 0x04030201;
storage.bytes_individual.byte1 == 0x04; // true
storage.bytes_individual.byte2 == 0x03; // true
                                        // etc
</code>
I assumed a little-endian cpu here, so the least significant address is stored first, or "LSB first".
I referenced this link if you want to research a bit more: https://www.tutorialspoint.com/cprogramming/c_unions.htm
Answer: If you are looking to compress data like this, that is up to you. The Micro will do what you tell it to do. It may even have instructions for manipulating 8 bit slices of data. There may already be libraries out there for doing so. It may be that if you are using a C compiler/lib that is written to do such with char size data and you don't even have to handle it with low level routines.
But if you are working with a Cortex, you probably have enough RAM that this is not a concern.


Icon for iWeb published site?

Question: How can I use a favicon for my website that is published using iWeb?
Answer: Unfortunately, there appears to be no way to create a favicon via the gui elements of iWeb. However, you are able to pretty simply add the html to the published version of your site.
I recommend following this guide from All About iWeb. It walks you through how to first create the favicon using one of a variety of free online tools and then informs you where it needs be stored in your site's structure as well as the necessary html you need to add to your pages.
Answer: Can you define what you mean by a "personal icon"?
Are you referring to the image shown next to the URL in the address bar? That's called a favicon.
Or do you mean an image on the web page itself that represents you/your site, such as the apple on the left-hand side of the menubar at the top of apple.com? That can be called any number of things (header graphic, home button, etc.), but it's just a normal graphic in png, jpg, or gif format.
Answer: This article should be just the thing.
Comment: Yes, *if* he happens to have Photoshop lying around. Oh, and it doesn't say what to do in iWeb with it when he's done, either.
Comment: *The article* says to use Ps, but it doesn't take much imagination to see that use can use GIMP (free), and many other editors. And, I assume that OP has some experience with inserting code snippets. If so, he's good to go.
Comment: *I assume that OP has some experience with inserting code snippets* —actually, given that iWeb doesn't let you insert code snippets, it's not a terribly good assumption to make (and yes, iWeb is retarded, but that's another issue entirely).
Comment: TextEdit does. So does Smultron (also free). To use TextEdit to edit Web code: File-> Open. Check the Ignore Rich Text Commands box at the bottom, and you've got your web code. The article shows exactly what and where to paste in.
Comment: And so does [TextWrangler](http://www.barebones.com/products/textwrangler/) (also free). But the article does *not* mention that the next time he opens the page with iWeb, he'll lose those text edits—kinda important, imo. Maybe it's just me, but I think that a novice would find that terribly confusing.

Icon for iWeb published site?


How to copy web page text and images to MS Word

Question: From time to time I want to copy and paste a portion of a web document (viewed in both IE Explorer 7 and 8) into MS Word 2007.  The selected text copies and pastes fine, but I am left with only place holders for the images (png).  Right clicking the image and clicking copy, then pasting into MS Word doesn't work either.  If I paste the image into MS Paint and copy it from there, I can paste it into the Word document.  What gives?
Comment: Have you tried with another browser?
Comment: I should try Firefox - I already have it installed.
I also tried pasting into Openoffice Writer.  It has the same problem.
Answer: In Word 2007 I always had a problem when copying webpages into it. The page would not fit, and go outside the columns, etc. until I found this:

Copy
Paste,
Then select: Page layout
Select: Web layout
Answer: If the selected images are behind some sort of web-based authentication, Word will send another request for the image which fails. Word will follow IE's setting for this.
I'm not sure on the exact location of it in IE8, but in earlier versions it was under Tools -> Internet Options -> General tab -> "Settings" button under the Temporary Internet Files section. You'd get an interface similar to this:

Where it says Check for newer versions of stored pages, set it to Automatically.
Comment: My setting was already at 'Automatically', and copy/paste works from this web page, but not from the pages that have been causing problems.
Comment: @Les, since it works with some pages and not others, perhaps give some example urls where it does and doesn't work for you.
Answer: Right click and Copy might not work in all cases as described by John that they maybe behind some web-based authentication.
Try selecting them by dragin the pointer around them, just like you select text and then press CTRL+C.. Go to Word, and Paste.. Should work.
Answer: There are some options in Word 2007 that you should check.  For instance: Advanced > Show Document Content > Show Picture Placeholders.
Another factor is the view you're using in Word.  Some views, like Draft, don't show images normally.  Try switching to Print Layout view.
Answer: Save the web page as mht file from Internet Explorer. Edit the file in MS Word. Now you can also copy past from one file to another MS Word file.
Answer: There are two things that you want to do:

Copy the text and the pictures together
Copy the text first and then right click->Save Picture As..., choose a .jpeg file. Then after that, go to Microsoft Word, select Insert->Picture->From File..., then select the file from your C: drive or wherever it was saved
Answer: To make it:
1) From the browser, first export the page with document to be copied (as complete html: secondary mouse button "Save as complete web page").
2) Open word, Open file: that exported html. That result can be selected total or partially, copied and pasted to any MS Word, with all the images visible.
Answer: Do you have the Drag and drop or copy and paste files option set to Enable?
You can customize IE security settings for internet zone :
Tools | Internet Options | Security

Answer: The ability to copy text and pictures into Word from a web page depends on the browsers layout engine.  Today there only seems to be a choice between Trident, Webkit and Gecko and only Trident will enable you to do this.  I found that an earlier version of Word enabled pictures to be copied at the same time as text.  I think it was Word 2002.  Otherwise only the placeholders for pictures are copied and each picture has to be copied and pasted into it's respective placeholder. I found that other word processors like Open Office scramble the formatting of the original web page during the pasting operation.
Answer: Bring the web image and/or text in the web page to the center of the screen.  Press PrtSc.  Open Paint in Accessories and paste with Ctrl+v.  Select the required area and copy by either Ctrl+c or by right clicking.  Then go to your word document page and paste with Ctrl+v.  Your job's done.  That's it!!
Ash.
Comment: 2 problems with that. There are a few dozen pages of text. The text would not be searchable.
Answer: Do not paste directly. Copy the picture from the browser and then do the following steps:

In the Home tab in the Clipboard group, click on the arrow below Paste.
Click on Paste Special
Select the Bitmap option.


Routing issue while using high_voltage for static pages

Question: I am trying to use high_voltage to serve up static pages.  It seems to be working in that if I put .../pages/PAGE_NAME in the browser window it will bring up the correct page.  The problem that I am having is that the default root doesn't appear to be working properly. When I go to http://localhost:3000 I get the home.html.erb page that I put in the view/pages directory inside of my application.html.haml layout.  Basically, a page inside of a layout which is not what I expected.
I am following the instructions in that I have the following entries in my routes.rb file:
resources :pages
root :to => 'high_voltage/pages#show', :id => 'home'

I also have a PagesController with the following code:
class PagesController < HighVoltage::PagesController
  layout nil
end

It appears that my root route does not actually hit the PagesController (with layout nil) that I have in my code. How can I resolve this issue?
Answer: have you tried this ?
root :module=> :high_voltage, :controller => :pages, :action => :show, :id => 'home'

see root and match (used internally by root) for more info.
Comment: That worked.  Thanks a bunch.  I need to digest why that works and why the first version didn't work.


Does a Bangladeshi need a visa for Northern Ireland?

Question: I hold Bangladeshi national Passport. But I have Permanent residence permit in Denmark. Should I need Visa for visit in  Northern Ireland?
Answer: You will need a visa to visit Northern Ireland. You can verify this at the UK government website: https://www.gov.uk/check-uk-visa
Note that the UK, including Northern Ireland, is not part of the Schengen area and your Denmark residency is not relevant.
Comment: You will also need a separate visa for Ireland if you cross the border into the Republic of Ireland... I know OP doesn't state that, but it's sometimes easily done.
Comment: Agreed. If you get stopped by the gardai and don't have a visa for the republic, they'll stick you on a flight and deport you back home. You don't get sent back up north. This happened to a colleague of mine who'd only gone down south on a day trip and had a hell of an ordeal, as well as having to pay for a flight back to the UK.
Comment: You'll definatily get away with it if your driving, but there are regular checks for bus and train services. But just get yourself the visa


Considering distance in network analysis (Gephi)

Question: I have created a set of nodes (archaeological sites) and ties (connected via certain geographical distances), exported from QGIS. I now have an edge list with weights (distances). Gephi, however, sees larger numbers as stronger weights, when in reality they represent weaker weights as they are distances. Will the network math work properly if I use the inverse of the distances as weight numbers?
Answer: No one offered an answer, so I will add some information that might be useful to others in the future.
I put my data into Gephi in three forms: weighted, with inverse weights, and with no weights.
All the standard node measures were the same in all three graphs.
The difference came in assessing Modularity. The weighted and no weights produced similar results (33 and 34), but inverse produced 25. So there is clearly a difference in assessing the overall coherence of the graph. I need to check the resulting modules in QGIS to see which makes more sense.


Mobile Layout Not Rendering Width: 100%

Question: My first attempt using bootstrap on a webapp - this is how it renders on my iPhone.
Why is everything showing up under 100% width?
Example: The top of the page is called dark container, a wrapper with an image embedded, this is the css
<code>#darkcontainer {
 height:200px;
 width:100%;
 border: none;
 background-color:whitesmoke;
 text-align:center;
}
</code>
My guess is that the image beneath(part of a slider) is pushing everything under 100% because it is much larger?  That slider has the following css
<code>#slides {
   height:500px;
   width:1065px;
   margin: 0 auto;
      ul.pagination {
          width:100%;
          text-align: center;
            li {
            display:inline-block;
            }
      }
}

        .slides_container {
            width:1065px;
            height:500px;

        }
        .slides_container div {
            width:1065px;
            height:500px;
            display:block;

        }
</code>
The mailing list looks like it would be different, because there is more of the background color there before it turns white, but that's just... a 100% width wrapper centering the child
<code>#autoheightwrap {
   height:auto;
   width:100%;
   background-color:whitesmoke;
}
#mailform {
   height:100%;
   width:600px;
   margin: 0 auto;
   background-color: whitesmoke;
        padding: 6px 12px;

 ...
</code>

Feel free to look at the website in your browser here.
Any ideas why it is being rendered this way?
Answer: #slides is set at a width of 1065px. This is the culprit that is breaking your site. You'll have to restyle it with a media query targeting mobile.
For a more responsive friendly slideshow, might I suggest cycle2?

Mobile Layout Not Rendering Width: 100%


Is is possible to make a federal state with only one federated state to resolve cohabitation inherent to semi-presidential systems?

Question: Is there a way to mitigate cohabitation that is inherent to semi-presidential system by making the unitary state look like a federal one that have only one federated state! I mean is it possible to split power between the president and the prime minister in the same way we do it between a the federal state and the federated one?
Comment: Given that they would cover exactly the same territory, how would the powers be split, and what would be the rationale for that split?
Comment: Well ... the same rationale that stands for federalism!
Answer: All in all, if it's your country, it's your constitution, you can define what you want.
In practice, I cannot see an arrangement of one higher entity (the federal state) and one lower one (the federated state) with exactly the same borders last long. In Germany, a federal republic, there are three city-states of which two (Hamburg and Berlin) are composed of exactly one city. In these city-states, the elected parliament functions as both a state parliament (like in the states of Brandenburg or Schleswig-Holstein) and a city council (like for the cities of Potsdam or Lübeck – all examples chosen for proximity to Berlin or Hamburg). The chief elected official is termed ruling mayor (Regierender Bürgermeister), the title of which puts him on par with other mayors but at the same time he is also on the same level as the minister presidents of the other states. Depending on which conference he is in he will be either or the other. The parliaments of Hamburg and Berlin enact legislation equivalent to other cities and to other states depending on the subject at hand.
I would strongly assume that any one-state-federation would reduce itself to such a structure—which essentially is just a sovereign state without subdivisions—sooner or later if only for saving money.
As for the balance of powers between a prime minister and a president: there are numerous ways to achieve that without the need to introduce a pseudo-federation.
Comment: Well those numerous ways all derived to either a fully parliamentary or a fully presidential system with the time. I think your german example was at the opposite of what I am thinking about since It's not really about two levels governed by one authority. I am thinking of a strict separation of powers between the Head of State  and the Head of Government as strict as the one that characterize the presidential system. Like say : the HoS (the president) will be like the US president and the HoG (the prime minister) should act like say the governor of California!
Answer: Technically I don't see any contradiction in such a system, but this would require a very clear definition of the area of competence for these two representatives of the executive branch. For example one would be responsible for foreign affairs, defense and security while the other would take care of healthcare, education and agriculture. It would probably require two independent budgets and resources, otherwise the one which holds the financial power has a lot of leverage on the other.


Does a Facebook application's access token expire?

Question: This is the access token associated with my Facebook application -- the thing that comes back from https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=APP_ID&client_secret=APP_SECRET. Can I get this once from FB and save it away somewhere for future use, or do I need to refresh it on a regular basis?
Answer: Access Token Tool - Facebook Developers

App tokens do not expire and should be kept secret as they are related to your app secret.
Answer: I don't know for sure, but since the documentation does not state that you get back an expiration time for the access token, I guess that it's an educated guess that it does not expire.
But why does it matter? the application authentication process is much simpler than the one with users, so just save the token somewhere (db, memory) and then try an api call, if it fails just issue one call to obtain a new token, save that, and continue as usual.
Comment: @KimGysen I haven't been doing any facebook api work for a few years now (the answer is 4+ years old), but looking at the documentation of [Debugging and Error Handling > Expired or invalid access tokens](https://developers.facebook.com/docs/facebook-login/access-tokens/debugging-and-error-handling#expiredtokens) it seems that the code is **`190`** and the type is **`OAuthException`**.
Comment: How would you check for the error code + message for the access_token, since it doesn't appear to expire currently? How would you know that the error from the call is related to the app access_token specifically?
Answer: If you want a token to manage a page, never-expiring token can be obtained by

Get user token
Exchange user token to long-living token (Valid for 30days)
Obtain a page token with this user token (This page token is not going to expire)

When you check the token you've got, check it on Debugger. You will now see 'Expires Never'.
Documentation is on Facebook Developers ,Scenario 5: Page Access Tokens
Answer: My app access token does not seem to have changed for just under a month. I do not know if it changes. For fun I just changed my app secret...
My app access token then immediately changed and when I try to use the old one I get a
HTTP 400 error with a message body...
{"error":{"message":"Invalid OAuth access token signature.","type":"OAuthException","code":190}}
My advice is save the access token and use it. Unless you get the message above in which case obtain a new one and use that. One thing that I have not checked yet is if you get the same result if the user access token (that you may be querying) has expired instead.
Answer: For each and every user token (which is what you're getting from your link), there is an expiration date.  Take one of those tokens to https://developers.facebook.com/tools/debug and debug it.  You will see that generally they expire within 60 minutes or so.
To extend that user token, call the exchange command (https://developers.facebook.com/docs/offline-access-deprecation/) to get it to become a 60 day token.  That user token has to be still valid (not expired) to do this.
Comment: Not a user token, an application token, it says [here](http://developers.facebook.com/docs/authentication/#applogin): *"In addition to User Login, Facebook Platform support App Login using the OAuth 2.0 Client Credential flow. App Login allows you to take various administrative actions for your app, such as retrieving Insights data or approving Requests."*
Comment: Did you lint the app access token using the debug tool?  What did it say for expiration?
Comment: If I try I get this message: "*Facebook URLs aren't scrapable by this Debugger. Try your own.*", however the [Access Token Debugger](https://developers.facebook.com/tools/debug/access_token/) does have info about the app access token and it does have an expiration date, but when I curl for that url I get only an access token, with no expire.
Comment: /tools/debug gives me a single line: "App ID: [my app id] : [my app name]" -- nothing about expiration.  I've also done the oauth/access_token call in the original question twice with curl, over two hours apart, and have gotten the same result both times.  So far, I'm not seeing any evidence of expiration.
Comment: Is the token just a concatenation of your app id, a pipe, and then some random looking characters? If so, then there's no expiry of that app access token.  user access tokens do expire.  Very sorry for any confusion I've made.
Comment: Yes, that's what the app access token looks like.  The thing I'm getting back from the curl call has stayed the same for over 4 hours;  I'll keep an eye on it, but I'm becoming convinced that they don't expire.  Thanks (to all) for the help.


What is the cause for Crystal Field Splitting Parameter?

Question: Taking the example of octahedral complexes, the theory says that since the $d_{z^2}$ and $d_{x^2-y^2}$ orbitals are closer to the ligands than the $d_{xy}$ ,$d_{yz}$ and $d_{xz}$ orbitals, they reach a higher energy level than the $d_{xy}$ ,$d_{yz}$ and $d_{xz}$ orbitals.(due to greater interaction with the ligands) I can't understand why the $d_{z^2}$ and $d_{x^2-y^2}$ orbitals are closer to the ligands. I agree that they are along the bonding axes, but with some rotation in space I can have other d-orbitals along the bonding axes. For example, if I rotated the octahedral arrangement of ligands about the z-axis, then the $d_{xy}$ orbital could be along the bonding axis instead of the $d_{x^2-y^2}$ orbital.So why can't other combination of d-orbitals (like the $d_{xy}$ and $d_{z^2}$ ) reach a higher energy level instead of the $d_{z^2}$ and $d_{x^2-y^2}$ during splitiing?
Comment: You choose the x y z however you want. If the x y z is chosen as the direction of the ligands, then you have the regular splitting scheme. If you choose different names, differently orbitals will be the high and low energy ones. This is only a naming problem
Answer: According to this theory ligands are considered point charges. These points acquire positions as those you've presented above. This leads to some d orbitals being closer to the ligands. That means that a higher amount of energy is needed for an eletron to be placed there, because it would be closer to the negative charged ligand.
However, which orbital is going to be more affected, is a matter of an "agreement" you may say. In order to be easier to explain situations, structures etc it is inclined to use a conformation such as the one you've shown. It would be much more difficult to discuss matters if everyone considered different naming and configurations.


My stepdaughter expressed she wants to kill her little sister and her father Im terrified!

Question: I have a 10yr old stepdaughter from my husband previous relationship and I have a 13yr old daughter from previous. Me and husband now have a 3 yr old daughter. Recently I was tidying up the older girls room and when I was putting socks into my SD drawer I saw a book might be her diary open and in highlighted capital letters said FU to her little sister and her dad also stating how much she f*cking hates then. So I was concerned and read the rest it stated that she wants to kill them and that she hurt my daughter by throwing a box at her lip bruising it but lied to her dad about and that she did not care that it hurt her. My SD is very quiet, shy, very isolated to herself I always have to ask her if she's ok I always thought that there is something going on with her, a gut feeling something is wrong but I just always ignored it and thought just the way she is maybe which makes this situation very scary to me. We are going to get her help but I am now so angry because my 13 yr old warned me and I ignored it and it's about her stepsister always picking at the little one and sometimes hurting her for no reason. It's like all the other times when my SD and her little sister are alone and her little sister ends up crying all the time and we always wondered why and now it all adds up. My 13yr old has also expressed to me that she doesn't want to be around my SD lately cause of her weird behavior but I didn't believe her. Cause my SD played the part so good of being a sweetheart and being such a good girl. I am scared and angry that she has been doing this playing the part. Her dad gives her so much love and attention my husband is obsessed with his kids and loves them so much and including me and her sisters too we treat her with love so I don't know why or where this behavior is coming from. We are going to talk to her when she comes back from her mom and made an appointment to see if she needs therapy but I just feel sick to my stomach and I don't want her near my kids. I feel like I got played I don't know what to do?
Comment: I wouldn't just make an appointment to "see if she needs therapy", but would boldly (and gently) commit to therapy. You can even do group therapy to show her that you're on her side in the healing, but she does have to know that the game is up in a big way, imo. As a random internet stranger.
Comment: You say you don't know where "this" is coming from, but you're going to have to find out. I'm not condoning what she wrote, but maybe it has to do with the fact that she lives in a home where people don't respect her privacy?
Answer: You were played by a 10yo.  Your anger is justified, and your fears are realistic.  This is not a situation that anyone wants in their family, and it is tough, but you are not to blame, you didn't cause this.
You didn't want to believe that your SD was doing anything wrong, and, yes, your inaction caused this situation to go on longer, but that's water under the bridge, and you're awake to the issue now, and now you and your husband can help all of your children recover.
Your 10yo SD is angry and taking it out on your 3yo.  This is not ok, never ok, but it is something that a hurt and angry 10yo child will do.
Your SD has gotten away with completely unacceptable behavior, and she needs to know that you now know the truth about her hurting your 3yo, and she needs to know that it will stop  either because she stops or you will make changes that will stop her from hurting her sister  or anyone else in the family.
At the same time your 10yo is herself an hurt child.  This is what her behavior is telling you.  While it's hard to overcome your very justified anger, your 10yo SD desperatly needs you and your support.
Support does not mean your tell her is OK, because it's not.  What you tell her is that it's not OK, and you will not allow this situation to continue.
You have every right to tell the 10yo the truth of how you feel.   You have a right to tell her how sick it makes you feel, and that you don't trust her.
Your 13yo needs you to rebuild her trust in you.  She did tell you there was a problem, and she needs you to tell her that she did the right thing by speaking up.  She needs to know that you couldn't hear her then, but you're listening now, and then let her talk.
You need eyes on supervision of your 3yo, which means your 3yo is in sight of an adult 24/7 with the adult watching over her.  The 3yo is vulnerable  and this is how you keep her safe.
To actually keep your 3yo safe, you must have eyes on her every minute of every day from now on, until a future time when your 10yo has recovered and regained your trust.  There are no quick fixes for this, so eyes on supervision may need to continue for a while.
If you really cannot make your home safe for everyone living together, then you'll have to make some tough choices.  For example, maybe you and your husband have to live apart for a while, where the 13yo and 3yo live with you, and the 10yo lives with him.
A home has to be safe for everyone, and when a home is not, then something has to change.


Command for finding users who are not logged in

Question: Is there any command that can find the number of users that are not logged into the system ?
I am trying to write a shell script that counts the number of users who are logged in and number of users that are not logged in.
Answer: Listing out groups of users
You can get a list of all your local users with this command:
$ getent passwd | awk -F: '{print $1}'

NOTE: getent will return local users assuming you do not have sssd (or some similar service running which pulls LDAP users in too) and your /etc/nsswitch.conf is restricted to files, i.e. it's not including things like NIS or NIS+. For pure local user's only you can resort to awk -F: '{print $1}' /etc/passwd.
A list of who's currently logged in:
$ who

A list of user's that are currently not loggd in:
$ grep -Fxvf <(who | awk '{print $1}' | sort -u) \
    <(getent passwd | awk -F: '{print $1}')

This last one takes the list of users who are logged in and shows the list of all user's minus the logged in users, using grep -vf.
Getting counts
To get counts, simply take a wc -l on to the end of commands.
not logged in
$ grep -Fxvf <(who | awk '{print $1}' | sort -u) \
    <(getent passwd | awk -F: '{print $1}') | wc -l
53

logged in
$ who | awk '{print $1}' | sort -u | wc -l
1

grep flags
-F, --fixed-strings
        Interpret PATTERN as a list of fixed strings, separated by newlines,
        any of which is to be matched.

-x, --line-regexp
        Select only those matches that exactly match the whole line.

-v, --invert-match
        Invert the sense of matching, to select non-matching lines.

-f FILE, --file=FILE
        Obtain patterns from FILE, one per line.  The empty file contains
        zero patterns, and therefore matches nothing.

Using join instead of grep
You could also forgo using grep and use join instead, since this type of problem is more in join's wheelhouse. We'll need to use join -v 2 which means that we want to exclude matches and only show the uniques from our second argument, getent ....
join man page
-a FILENUM
        also print unpairable lines from file FILENUM, where FILENUM is
        1 or 2, corresponding to FILE1 or FILE2

-v FILENUM
        like -a FILENUM, but suppress joined output lines

$ join -v 2 <(who | awk '{print $1}' | sort -u) \
    <(getent passwd | awk -F: '{print $1}' | sort) | wc -l
53

NOTE: The only caveat with using join is that both lists need to be sorted, so we have to add on a | sort to getent ....
Comment: @muru - I also added a pure `/etc/passwd` only option to show it. I hate to add that since it's generally discouraged to work against those files directly 8-)
Comment: `getent` will also list entries from LDAP, etc. Do those count as local?
Comment: @muru - thanks for the feedback. I'm not sure that's true. I think that's the case only if sssd is running. In addition, by using `getent`, you need to make sure that `/etc/nsswitch.conf` is also only restricted to files, if you truly want local files. I'll add this as a  note in my A, thanks again.
Comment: @muru - yeah I used that one as an example, but I'm aware of there being others.
Comment: @muru - I find it a bit annoying that `getent` does not provide some switch for this. I searched but did not find one.
Comment: I do too. Makes it difficult to deal separately with local users.
Answer: You may want to write a script that will store the number of users currently logged in a file and the total users in another file and do a comm over them.
For example:
#!/bin/bash

w | awk 'NR > 2 {print $1}' | sort > logged.txt #sorted list of logged users
awk -F':' '{ print $1}' /etc/passwd | sort > allusers.txt #sorted list of all users
comm -23 allusers.txt logged.txt #find lines unique to allusers.txt

Answer: This one-liner will work:
grep -Ev $(users | sed 's/ /|/g') /etc/passwd | awk -F: {'print $1'}

How it works:
The output of users | sed 's/ /|/g' will give you a | separated list of logged in users.
The -E option with grep will allow us to use more than one string (in OR condition) to match. The -v option will print out what does not match given strings/pattern. Combining -E and -v together will list all the lines that does not contain the pipe-separated strings from the output of users | sed 's/ /|/g'. At the end use awk to filter out only the usernames.


Can I replace a complementary N&P channel MOSFET with two separate MOSFETS?

Question: I'm wondering if a complementary enhancement mode N&P channel MOSFET like this one http://micric.ru/data/documents/P2503NPG.pdf
which is used as an inverter driver for the LCD display, could be replaced with two separate MOSFETs one N type one P type with similar characteristics?
If not why not? What is unique in having those two transistors in the same package? Also if yes but with drawbacks(parasitic effects?), then I'm also wondering what could be added to the circuit to compensate for that.
Comment: Usually when using transitor pair like an audio amplifier in AB class it is important that copmlementary transitors came from the same batch. If you will use them like on/off switches (PWM...) then this has no importance.
Comment: These devices are *very tightly* matched for some very key parameters of LCD inverter drivers, in particular Crss, Qg and Vgs. If you replaced this with something not as well matched, the operation of the inverter could become very 'interesting'.
Comment: What do you mean by "inverter driver?" Is it a digital output? Or power? Are the two transistors connected drain-to-drain? Where does the output go?
Answer: Can you replace it with two discrete mosfets? Yes.
Should you? Much more difficult to answer. The pre-packaged duo has been matched so that the turn on and turn off times are similar for each. That SMD package would suffer less parasitic inductance than a discrete pair of mosfets. So far that has two things going way for it, as matching devices is difficult and not guaranteed to happen in the same batch of discrete transistors you buy (There are also fewer discrete mosfets that are made to be compliments to each other than there are BJT's, not quite sure why, but that's what I've seen.). The parasitic inductance really can't be overcome as it's a product of the packaging. Pretty much the only reason I'd ever not replace a part with it's identical or equivalent competitor's is if the product no longer existed. If you choose to go the discrete route, then please ask for help in selecting mosfets that meet your LCD's criteria in a new question, as that is a whole can of worms on it's own.


How to dynamically simulate physics with python?

Question: I try to simulate dynamic behavior in blender using physics for rigid bodies.
Some objects should fall down onto a moving plane.
(there is a previous question related to that:
animation locations with python
but the positions seems just to scratch the surface of the problem).
I would like to animate the plane depending on the falling objects positions, so that they interact with the falling objects (e.g. do rotations of the plane).
But I would like to set coordinates dynamically while running the simulation
(running the animation here means: counting scene.current_frame manually).
One aspect of the simulation works fine: if I increment the current_frame,
the objects with rigid_body = active do fall down.
But changes in rotations of the plane seem to be not recognized.
A bpy.ops.transform.rotate(value=2,orient_axis = "X")
seems not to be recognized during the animation.
Is there a way to consistently implement dynamical changes
of the environment while stepping through the frames
(without adding keyframes for the dynmaically changing rotation and position of the plane, ) so that they dynamically interact with the rigid_bodies?
The planes physics property is set to passive rigid_body.
To demonstrate the issue, here is the blend-file:

Please run the script, which starts a frame_handler.
Then start the animation (from frame 1 to 100).
In frame 10 the cup is turned upside down from the script.
this is visible in the viewport, but the sphere still seems to
falls into the original (unrotated) cup. So the physics calculation
does not seem to recognize the rotation, althought the
viewport does.
So how can I inform/adapt the environment, on which the physics calculations rely about/to the changes in the cup rotation?
-> edit: one additional thought after experimenting with the
physics parameters:
if I also set the cup as an active rigid boy (and place
it onto an additional plane, which is passive then),
the rotation will be integrated into the physics simulation.
but this unfortunatley has the side effect, that the dynamics
of the system is compelelty differnt. To fix this, might
be more complicated than to understand the structural
way blender python interacts with the physics environment.

edit:
I found some interesting information here:
https://www.youtube.com/watch?v=YpUyGJ-do4o

So following the ideas in the video one approximation to the combination between external control and integration into physics calculation could
be to set the rigid body settings to "animated" in e.g. each odd
frame, and then to "dynamic" in each even frame.
This allows a possibilty to set positions and rotations via a python script and let the changed values be incorporated into the
physics calculations.
Anyway: even better would be a bpy way to set positions
directly into the physics world in arbitrary frames,
to get a fluid frame by frame simulation with external control
of some objects.
Answer: I tried this:
<code>      frm = scn.frame_current
      if (frm % 2) == 0:
          cup.rigid_body.kinematic = False
      else:
          cup.rigid_body.kinematic = True
      cup.rotation_euler.rotate_axis('X',math.radians(rotVal  ))
</code>
and it surprisingly works.
Here is the blend file:

Of course this is only an approximation. Even better would be to
directly change the data, which are actually taking for the physics calculations to  have more control about the simulation.
Answer: Meanwhile I found out, that usage of drivers (using an empty as driver to control the rotation) also solves the problem,
so that circumstancial resetting the kinematic-variable is
not necessary with  this driver-approach.


What is the CFT dual of the stress tensor in the bulk?

Question: I am new to AdS/CFT. I know that the dual of the bulk metric is the CFT stress tensor but what about the dual of the bulk stress tensor? I mean in principle one can extrapolate whatever bulk fields to the boundary and then compute the stress tensor's dual on the boundary, but is there a simple form of the dual or some general properties that is independent of the type of matter fields.
Answer: A short answer is that the boundary limit of the bulk stress tensor is simply the boundary stress tensor. But we could say a bit more in addition, coming from the 1999 paper by Balasubramanian and Kraus.
As usual, the stress tensor of the theory is $T^{\mu\nu} = \frac{2}{\sqrt{-\gamma}} \frac{\delta S}{\delta \gamma_{\mu \nu}}$ where $\gamma$ is the boundary metric (which is the boundary limit of the bulk metric $g$). To relate this to the bulk theory, we'd need to use the AdS/CFT dictionary facts that $S = S_{CFT} = S_{bulk}$ and that by the dictionary, $S_{bulk}$ is sourced by fields on the boundary. The sources include bulk fields and the boundary metric $\gamma$. So we can write $S_{bulk}(\gamma_{\mu\nu},fields)$. This lets us write $T^{\mu\nu} = \frac{2}{\sqrt{-\gamma}} \frac{\delta S_{bulk}(\gamma_{\mu\nu},fields)}{\delta \gamma_{\mu \nu}}$ as a functional of the bulk action.
But this isn't the entire story. In the Kraus paper, they argue that bulk action has to be regularized by additional counterterms that also depend on the bulk metric, leading to an action $S_{eff}$ which is $S_{bulk}$ + additional counterterms. These counterterms lead to a lot of consistencies with AdS/CFT, including an accounting of the trace anomaly and the identification of the boundary central charge $c$ with the AdS length scale $l$, as $c = \frac{3 l}{2G}$
Comment: so what is the boundary dual of the bulk stress tensor?
Comment: The boundary limit of the bulk stress tensor is the boundary stress tensor. Is this what you're asking?
Comment: I am asking the boundary dual not the boundary limit.
Comment: A bulk field will in general be some smeared combination of boundary operators, and will be rather nonlocal. Are you familiar with the HKLL reconstruction? There would be a similar idea for the stress tensor. To obtain the bulk stress tensor from the boundary, you'd need to solve the equations of gravity given the boundary data, and it'd be a messy combination of boundary fields.
Comment: so there is no simple dual then.
Comment: Even for a scalar field or something simple, this general principle of a bulk field being smeared over the boundary will be the case. I'd recommend looking at this paper (https://arxiv.org/abs/1604.03110) and looking at the HKLL reconstruction formula to better visualize these things.
Answer: From our understanding of AdS/CFT, Stress Tensor at the boundary acts as the source of gravity deformation in the bulk. It is in the same spirit as Scalar operator, current as a source for Scalar and vector field respectively.
Coming back to the question, Stress Tensor of the bulk fields (Scalar, Vector) will deform the geometry. But to the leading order, It looks like Scalar field in the Pure AdS. This is the usual story with AdS/CFT correspondence.
There is one instance what I can think of where Bulk Stress Tensor gives more information in the context of Fluid/Gravity Correspondance. I am going to write directly from this paper "Nonlinear Fluid Dynamics from Gravity(arXiv:0712.2456)".
I will start from a boosted black brane solution in Eddington- Finkelstein coordinates so that Horizon is a smooth surface. These are $AdS_5$ solution.
\begin{equation}
  \begin{split}
  ds^{2} = &-2u_{\mu} dx^{\mu} dr +[-r^2 f(br)u_{\mu} u_{\nu} +r^2 P_{\mu\nu}]
  \end{split}
  \end{equation}
\begin{equation}
f(r)=1-\frac{1}{r^4}
\end{equation}
And $u_{\mu}$ are the usual boost velocity normalised to one, $T=1/\pi b$ and $P^{\mu\nu}=\eta^{\mu\nu}+u^{\mu}u^{\nu}$. So the non-trivial part is to make these velocity and Temperataure to be the local field of $x$ (Which is $v,x,y,z$ as coordinates at fixed $r$ surface). Then our metric becomes
\begin{equation}
  \begin{split}
  ds^{2} = &-2u_{\mu}(x) dx^{\mu} dr +[-r^2 f(b(x)r)u_{\mu}(x) u_{\nu}(x) +r^2 P_{\mu\nu}(x)]
  \end{split}
  \end{equation}
So This solution is obviously not going to satisfy Einstein equation. So what these authors have done is to solve the Einstein equation order by order in the derivative expansion of these Fluid velocity varibales.
\begin{equation}
g=g^0(\beta^i,b)+ \epsilon g^1(\beta^i,b)+\epsilon^2 g^1(\beta^i,b)\\
\beta_i=\beta^0_i+\epsilon \beta^1_i\\
b=b^o+\epsilon b^1
\end{equation}
And all the $\beta_i$ and $b$ are the functions of $x$. So Put these ansatz back in to the Einstein equation. The Einstein constraint equations at first order require that the zero order velocity and
temperature fields obey the equations of perfect fluid dynamics
$$\partial_{\mu}T^{\mu\nu}_0=0$$
By solving Constraint and dynamical equation, We can find the metric in the derivative expansion and these constriant equations are just Fluid dynmaics equation.
$\partial_vb^0=1/3\partial_i \beta_i^0$ and $\partial_i b^0= \partial_v \beta_i^0$. Of course these results are of the first order for metric and zeroth order for velocities. But can be generalised to second order.
The relevance of this is to your question is basically the conservation of Stress Tensor in the bulk(ar fixed r hypersurface) is the constraint Einstein equation. These are inturn related to Fluid dynmaics equation written above. The validity of using fluid variables is related to the fact that in large wavelength limit any quantum field theory looks like a fluid. We are taking Bulk Einstein equation and solve it at any fixed $r$ hypersurface. This is universal behaviour and worked out in many of the cases like Charged case, Non relativistic case etc. Look at the that paper for explicit calculation or result.
Comment: so in short what is the boundary dual to a bulk stress tensor, which can be the stress tensor of any matter field not necessarily scalar matter?


How would you translate these cabbage plants to German?

Question: I know the words "Blattkohl" and "Grünkohl", but I don't know how to associate with these English words for plants.
I know "kale", "collards", and "cabbage" but I don't how they translate to German. Especially confused about kale vs. collard greens.
Comment: Did you try the corresponding Wikipedia articles and their foreign-language links?
Comment: @TomAu Since Wikipedia articles typically cover one topic at a time, it is often helpful to look up one technical term and see what the article name of the foreign language is. By that method, I finally noticed that I had mapped *rabbit* and *hare* incorrectly to the German counterparts *Karnickel* and *Hase.*
Comment: @Jan: The OP appears to have learned the "raw" words in both English and German and is confused about how to combine them.
Comment: @TomAu Jan Yes. When you go wikipedia it seems like collars greens are a family of cabbages, but you usually associate a specific plant with collards
Comment: I think I've answered your question. At least I hope I did.
Answer: "Kohl" (Brassica) is a plant species with further subspecies like  "Gemüsekohl" (Brassica oleracea) and Rübsen (Brassica rapa). The subspecies themself include different types of plants.
Types of "Gemüsekohl" are (I selected all types that are common on German menus):

Blumenkohl = cauliflower
Romanesco  = romanesco
Weißkohl = (white) cabbage, green cabbage
Spitzkohl = pointed cabbage
Rotkohl = red cabbage
Wirsing = savoy (cabbage)
Rosenkohl = brussels sprouts
Kohlrabi = kohlrabi, turnip cabbage
Broccoli = broccoli
Grünkohl = kale or leaf cabagge

Blattkohl/Staudenkohl (= collards) is also a type of Gemüsekohl, but as far as I know and according to wikipedia, it is not cultivated in Germany.
Types of "Rübsen" are (I selected all types that are common on German menus):

Herbstrübe (Mairübe) = no english name
Chinakohl = napa cabbage

In the south of Germany people often say "Kraut" instead of "Kohl", e.g., Rotkraut or Blaukraut (= both means red cabbage), Kraut (= white cabbage)
Answer: "Cabbage" is just "Kohl" in German. Absent other context, it can also be referred to as "Weißkohl" (white cabbage). Here are some other variations formed by compound words:

Cauliflower, Blumenkohl (literally flower cabbage).
Brussels sprouts, Rosenkohl (literally rose cabbage).
Collard greens, Blattkohl (literally leaf cabbage).
Kale, Grünkohl (literally green cabbage).
Comment: Maybe it should be noted here that "Kohl" is not commonly used as a general term for the compound words. At least, when someone tells me "Heute esse ich Kohl.", I would rather not consider the possibility that they are going to have Blumenkohl or Rosenkohl.
Comment: And most cabbage types are formed with *-kraut* in the South: *Grünkraut, Blaukraut, …*
Comment: @O.R.Mapper: Kohl is a "standalone" word for cabbage. Only when it is compounded with the others does it vary.
Comment: If you look up Cabbage on Wiki and switch to the German site, you find Weißkohl. Some dictionaries list this translation, too. Other refer to Kopfkohl. The corresponding English site to Kohl, as a standalone term, is Brassica, which seems to be the technical term.
Comment: @TomAu *Kohl* defaults to *Weißkohl*, if it is not specified or discernable from the context. *Cabbage* behaves similarly in English, however.


What is the "harvest" in Mark 4:29?

Question: Mark 4:29 (NASB):

But when the crop permits, he immediately puts in the sickle, because the harvest has come.

What does putting in the sickle mean (spiritually), and what is the "harvest"?
Answer: In spiritual context, what does the "putting in the sickle" symbolize in Mark 4:29 along with the "harvest"?
 Mark 4:29 [NASB]
"But when the crop permits, he immediately puts in the sickle, because the harvest has come."
Regarding the Harvest ( θερισμός ) in the greek Gospel account of [Mark 4:29] :
 θερισμός, "harvest" : equivalent to the act of reaping, John 4:35; figuratively, of the gathering of men into the kingdom of God, ibid. equivalent to the time of reaping, i. e. figuratively, the time of final judgment, when the righteous are gathered into the kingdom of God and the wicked are delivered up to destruction, Matthew 13:30, 39; Mark 4:29
[ https://biblehub.com/greek/2326.htm ]

In agricultural context : Harvest is the process of gathering a ripe crop from the fields. Reaping is the cutting of grain for harvest, typically using a scythe, sickle, or reaper. [ https://en.m.wikipedia.org/wiki/Harvest ]

Spiritually - the Harvest is the Messianic age, illustrated by the Parable of the Sower :
 Matthew 13:19-23 [NASB]
"When anyone hears the word of the kingdom and does not understand it, the evil one comes and snatches away what has been sown in his heart. This is the one on whom seed was sown beside the road.
The one on whom seed was sown on the rocky places, this is the man who hears the word and immediately receives it with joy;
yet he has no firm root in himself, but is only temporary, and when affliction or persecution arises because of the word, immediately he falls away.
And the one on whom seed was sown among the thorns, this is the man who hears the word, and the worry of the world and the deceitfulness of wealth choke the word, and it becomes unfruitful.
And the one on whom seed was sown on the good soil, this is the man who hears the word and understands it; who indeed bears fruit and brings forth, some a hundredfold, some sixty, and some thirty."
The phrase "Putting in the Sickle" in Mark 4:29 [NASB] relates to the Angels of YHVH who will be "reaping souls" (His elect) to build the New Jerusalem.
 Mark 13:27 [NASB]
"And then He will send forth the angels, and will gather together His elect from the four winds, from the farthest end of the earth to the farthest end of heaven."
Answer: What is the "harvest" in Mark 4:29?
Mark 4:29 (NASB):

But when the crop permits, he immediately puts in the sickle, because
the harvest has come.

What does putting in the sickle mean (spiritually), and what is the "harvest"?
The Harvest.
Jesus referred to the "end of the age"( Matt.  Vs 13:39 NASB, end of the world KJB) meaning the  consummation of the wicked world, as the harvest, at which time the angels, acting in the capacity of reapers, would gather out all weedlike ones will be thrown   into the fiery furnace, whereas the wheatlike ones would "shine as brightly as the sun in the kingdom of their Father."  Recommend reading "The Parable of the  Weeds"(Mt 13:24-30 )
https://classic.biblegateway.com/passage/?search=Matthew%2013%3A24-30&version=NASB;NET;TLB
Matthew 13:36-43  (NASB)
The Tares Explained

36 Then He left the crowds and went into the house. And His disciples
came to Him and said, "Explain to us the parable of the [a]tares of
the field." 37 And He said, "The one who sows the good seed is the Son
of Man, 38 and the field is the world; and as for the good seed, these
are the sons of the kingdom; and the tares are the sons of the evil
one; 39 and the enemy who sowed them is the devil, and the harvest is
the [b]end of the age; and the reapers are angels.
40 So just as the tares are gathered up and burned with fire, so shall
it be at the [c]end of the age. 41 The Son of Man will send forth His
angels, and they will gather out of His kingdom [d]all stumbling
blocks, and those who commit lawlessness, 42 and will throw them into
the furnace of fire; in that place there will be weeping and gnashing
of teeth. 43 Then the righteous will shine forth as the sun in the
kingdom of their Father. He who has ears, [e]let him hear.

The sickle and the harvesting.
The reapers are  "angels" who under the direction of the Son of Man "Jesus"  depicted with a sharp sickle carry out the harvesting. (Read also Rev.14:17-20)
Revelation 14:14-16 (NASB)
The Reapers

14 Then I looked, and behold, a white cloud, and sitting on the cloud
was one like a son of man, having a golden crown on His head and a
sharp sickle in His hand. 15 And another angel came out of the temple,
crying out with a loud voice to Him who sat on the cloud, Put in your
sickle and reap, for the hour to reap has come, because the harvest of
the earth is ripe." 16 Then He who sat on the cloud swung His sickle
over the earth, and the earth was reaped
Answer: Jesus spoke in parables to explain complex concepts in familiar terms using common experiences. Everyone in his audience was familiar with planting, growing, reaping and harvest. They were not familiar with the many facets of the kingdom of God.
This parable in Mark 4:26-29 has a great deal of similarity to Jesus' parable given for us in Matt 13:24-30. The advantage of the parable in Matthew is that Jesus explains exactly what it means in Matt 13:36-43. It is always best to have the artist (author) explain the symbolism he is using. Then I don't have to try to guess what he is saying!
Mat 13:24 Another parable put he forth unto them, saying, The kingdom of heaven is likened unto a man which sowed good seed in his field:
Mat 13:25  But while men slept, his enemy came and sowed tares among the wheat, and went his way.
Mat 13:26  But when the blade was sprung up, and brought forth fruit, then appeared the tares also.
Mat 13:27  So the servants of the householder came and said unto him, Sir, didst not thou sow good seed in thy field? from whence then hath it tares?
Mat 13:28  He said unto them, An enemy hath done this. The servants said unto him, Wilt thou then that we go and gather them up?
Mat 13:29  But he said, Nay; lest while ye gather up the tares, ye root up also the wheat with them.
Mat 13:30  Let both grow together until the harvest: and in the time of harvest I will say to the reapers, Gather ye together first the tares, and bind them in bundles to burn them: but gather the wheat into my barn.
Mat 13:36  Then Jesus sent the multitude away, and went into the house: and his disciples came unto him, saying, Declare unto us the parable of the tares of the field.
Mat 13:37  He answered and said unto them, He that soweth the good seed is the Son of man;
Mat 13:38  The field is the world; the good seed are the children of the kingdom; but the tares are the children of the wicked one;
Mat 13:39  The enemy that sowed them is the devil; the harvest is the end of the world; and the reapers are the angels.
Mat 13:40  As therefore the tares are gathered and burned in the fire; so shall it be in the end of this world.
Mat 13:41  The Son of man shall send forth his angels, and they shall gather out of his kingdom all things that offend, and them which do iniquity;
Mat 13:42  And shall cast them into a furnace of fire: there shall be wailing and gnashing of teeth.
Mat 13:43  Then shall the righteous shine forth as the sun in the kingdom of their Father. Who hath ears to hear, let him hear.
Answer: The sower is God. Well, sort of. The sower is God by his proxy, the Messiah, at least from the NT perspective reflected in Mark. Or one might say, the Sower is God by his proxy, the Messiah and the Messiah by proxy by his servants: prophets (including John the baptizer) and the Johanine and Messianic disciples:

[Hos 2:23 NASB] (23) "I will sow her for Myself in the land. I will also have compassion on her who had not obtained compassion, And I will say to those who were not My people, 'You are My people!' And they will say, '[You are] my God!'"

The idea is that the ones to whom he had said "Not my People!" (the Northern tribes of Israel) aka "The lost sheep of the house of Israel":

[Mat 10:5-7 NASB] (5) These twelve Jesus sent out after instructing them: "Do not go in [the] way of [the] Gentiles, and do not enter [any] city of the Samaritans; (6) but rather go to the lost sheep of the house of Israel. (7) "And as you go, preach, saying, 'The kingdom of heaven is at hand.'

[Mat 15:21-28 NASB] (21) Jesus went away from there, and withdrew into the district of Tyre and Sidon. (22) And a Canaanite woman from that region came out and [began] to cry out, saying, "Have mercy on me, Lord, Son of David; my daughter is cruelly demon-possessed." (23) But He did not answer her a word. And His disciples came and implored Him, saying, "Send her away, because she keeps shouting at us." (24) But He answered and said, "I was sent only to the lost sheep of the house of Israel." (25) But she came and [began] to bow down before Him, saying, "Lord, help me!" (26) And He answered and said, "It is not good to take the children's bread and throw it to the dogs." (27) But she said, "Yes, Lord; but even the dogs feed on the crumbs which fall from their masters' table." (28) Then Jesus said to her, "O woman, your faith is great; it shall be done for you as you wish." And her daughter was healed at once.

The harvest is the 144,000 selected as first fruits to participate in the first resurrection so that they could accompany the Messiah when he returned Circa 70 AD to judge the living and dead of his People:

[Jde 1:12-19 CSB] (12) These people are dangerous reefs at your love feasts as they eat with you without reverence. They are shepherds who only look after themselves. They are waterless clouds carried along by winds; trees in late autumn -- fruitless, twice dead and uprooted. (13) They are wild waves of the sea, foaming up their shameful deeds; wandering stars for whom the blackness of darkness is reserved forever.  (14) It was about these that Enoch, in the seventh generation from Adam, prophesied: "Look! The Lord comes with tens of thousands of his holy ones (15) "to execute judgment on all and to convict all the ungodly concerning all the ungodly acts that they have done in an ungodly way, and concerning all the harsh things ungodly sinners have said against him." (16) These people are discontented grumblers, living according to their desires; their mouths utter arrogant words, flattering people for their own advantage.  (17) But you, dear friends, remember what was predicted by the apostles of our Lord Jesus Christ. (18) They told you, "In the end time there will be scoffers living according to their own ungodly desires." (19) These people create divisions and are worldly, not having the Spirit.

[Eze 34:17 NLT] (17) "And as for you, my flock, this is what the Sovereign LORD says to his people: I will judge between one animal of the flock and another, separating the sheep from the goats.
[Heb 10:30 NLT] (30) For we know the one who said, "I will take revenge. I will pay them back." He also said, "The LORD will judge his own people."

[Amo 3:2 NKJV] (2) "You only have I known of all the families of the earth; Therefore I will punish you for all your iniquities."

The gentiles came in because of those who were invited from the lost sheep, few responded. So that opened spots for gentiles:

[Act 13:46 NLT] (46) Then Paul and Barnabas spoke out boldly and declared, "It was necessary that we first preach the word of God to you Jews. But since you have rejected it and judged yourselves unworthy of eternal life, we will offer it to the Gentiles.

[Rom 11:12 NLT] (12) Now if the Gentiles were enriched because the people of Israel turned down God's offer of salvation, think how much greater a blessing the world will share when they finally accept it.

[Luk 14:16-24 NLT] (16) Jesus replied with this story: "A man prepared a great feast and sent out many invitations. (17) When the banquet was ready, he sent his servant to tell the guests, 'Come, the banquet is ready.' (18) But they all began making excuses. One said, 'I have just bought a field and must inspect it. Please excuse me.' (19) Another said, 'I have just bought five pairs of oxen, and I want to try them out. Please excuse me.' (20) Another said, 'I now have a wife, so I can't come.' (21) "The servant returned and told his master what they had said. His master was furious and said, 'Go quickly into the streets and alleys of the town and invite the poor, the crippled, the blind, and the lame.' (22) After the servant had done this, he reported, 'There is still room for more.' (23) So his master said, 'Go out into the country lanes and behind the hedges and urge anyone you find to come, so that the house will be full. (24) For none of those I first invited will get even the smallest taste of my banquet.'"

The "full house" was the 144,000 that were to appear with Christ when he came to "close out" the Jewish Jerusalem temple-based and Sinai covenant based theocracy and introduce the Kingdom of God aka the Body and Bride of Christ aka the New Jerusalem aka the New Creation aka the New Man aka the True Vine aka the City on a Hill aka the Israel of God aka... well, you get the idea...
No? Okay, well, aka the Building Not Made With Hands aka the New Lump aka the Nation that Brings the Fruit aka... the Harvest!
Which is the answer to the question. It is the first fruits of the New Creation.

What is the “harvest” in Mark 4:29?