Do you need to ask permission to use video from a video game in your research?

Question: For my PhD experiment, I am using a video game for my control condition, do I need permission from the video game developer?
Comment: The fact that it's research is not relevant.  The details of what you are doing probably are relevant.
Comment: Actually, not every "license" is binding. Courts have held that some companies overstep legal bounds with stated restrictions. Even some book publishers do such things.
Comment: You can only answer this question by reading the license on the game.
Comment: Perhaps you could clarify a bit about what you want to use from the game? Images, rules, something else? **Use** how, exactly?
Answer: If you are using, say, timings of people playing a video game as data in an experiment, as long as you don't use images from the game or pictures of people playing the game without appropriate permissions, then you're probably OK, but I'd ask your university's legal department for advice before starting such experiments. It's their job to protect the university from ignorant (of the law) researchers like us. If y'all have a law school, go see if there's a legal clinic that's there to a specific case like this (research on the edge of legality). Otherwise, I'd check with your grants compliance office since they try to protect you, too. I'd do this even if you're not grant funded on this project. You are also going to need to run your plans past your institution's IRB and demonstrate that you human subjects will be treated humanely and according to requirements.
Answer: As has been suggested, the license is the place to start. But not the end of the story. Not every possible thing that could be found in a license agreement is reasonable. It has happened that some things in license agreements have been voided by courts.
The details of the license regarding how many people are permitted to use a given copy probably are binding. So if a video game license says "one person" or "three people" or some such, that probably means just that. Lots of software has such limitations. Other possible phrases are "exclusive use" or "non-transferable" and so on.
Also, if you need to copy images or text from the game, the licensing conditions regarding that are probably binding.
There is another aspect to it. Suppose you make use of a video game. And suppose the owner of the copyright decides they don't like that use. You could find yourself inovled in a struggle with lawyers and trips through courts etc. Even supposing you win in the end it could be a horrible time wasting experience. It could put strain on your life, your relationship with your university, etc. If the copyright holder is particularly nasty they can make such things last years.
Far better to get permission in advance. In writing.  If you make a polite request to the video game maker and get permission then Research Time! If they say no, or they try to put on conditions that you can't live with, or they don't respond at all, there are other video games.
Comment: +1, but if you don't need pictures out of the game  or of users using the game with pictures of it in the background, see my post. There's _probably_ no copyright issue since you haven't copied anything that belongs to game developers, only reported on the use of the game. My biggest point though is that if humans are being studied, your uni, and your journal are going to need some sort of evidence that you had your ethics reviewed (IRB, typically, in the US). Not having this will stop you dead in your tracks nowadays.
Answer: That depends on what you do with the video. It is probably covered by copyright and it is conceivable that patent law also applies. If you cite things it will help, but reproducing segments of video or image captures from it requires you give thought to fair use and copyright restrictions.
But, if it is software that you have a valid license for, you can use it for its intended purpose without further permission, just as you can use word processing software to write. It is the reproduction of copyrighted content that you need to be concerned with. And, copyright law varies.
Note, especially, that images are a bit special. While you can quote from text, reproducing images has issues since an image can be construed in some cases as "a complete work" even when within another.

Don't even think about reproducing anything that Disney has copyrighted.


Is GeoCouch compatible with heroku?

Question: Is GeoCouch compatible with heroku?
If not...what could be an alternative?
Answer: GeoCouch requires a couchdb installation with source code. Heroku has an add-on called Cloudant, which claims to be couch-db compatible.
To find out if GeoCouch works you could try following the GeoCouch installation instructions to get, compile, and run GeoCouch with your database. It looks like you might have to create a buildpack, or commit the GeoCouch files to your git depo and copy them on deployment.

Is GeoCouch compatible with heroku?


How do you prevent a windows from being moved?

Question: How would i go about stopping a form from being moved. I have the form border style set as FixedSingle and would like to keep it this way because it looks good in vista :)
Comment: What do you mean by being moved? Do you mean not being able to drag it to another location on the desktop?
Comment: isn't that possible to relocate the form to it's initial place if it is moved?
Comment: What if the user has some other widget in the lower right corner, like the vista sidebar? Do you really want to dictate where your window has to stay? This is by no means userfriendly and I personally wouldn't accept such a restriction.
Answer: Take a look at this link. You might be interested in option #3. It will require you to wrap some native code, but should work. There's also a comment at the bottom of the link that shows an easier way to do it. Taken from the comment (can't take credit for it, but I'll save you some searching):
protected override void WndProc(ref Message message)
{
    const int WM_SYSCOMMAND = 0x0112;
    const int SC_MOVE = 0xF010;

    switch(message.Msg)
    {
        case WM_SYSCOMMAND:
           int command = message.WParam.ToInt32() & 0xfff0;
           if (command == SC_MOVE)
              return;
           break;
    }

    base.WndProc(ref message);
}

Comment: How can I make it movable again?
Comment: Thanks this worked perfectly. Also had a read around the site. Gotta look into the WinAPI more.
Comment: You'd have to have some sort of flag on whether or not to even run the code in the switch statement (which just checks to see whether or not the windows message was to move the window... in which case it returns and does nothing).
Answer: You can set the FormBorderStyle property of the Form to None
this.FormBorderStyle=System.Windows.Forms.FormBorderStyle.None

Answer: I found this to stop the form from moving (its in c#)
protected override void WndProc(ref Message m)
        {
            const int WM_SYSCOMMAND = 0x0112;
            const int SC_MOVE = 0xF010;

            switch (m.Msg)
            {
                case WM_SYSCOMMAND:
                    int command = m.WParam.ToInt32() & 0xfff0;
                    if (command == SC_MOVE)
                        return;
                    break;
            }
            base.WndProc(ref m);
        }

Found here
Comment: In what event should I write this ?
Comment: You have to override the WndProc for the Form you desire should not be moved. Type in override and space ,you will get a list wherein you will find the method mentioned above
Comment: @V4Vendetta maybe because your answer is exactly the same as the accepted one which was posted two years before... I don't understand it either (not my downvote)
Comment: @Knickedi This might be the case where similar question would have been merged along with the answers so you see a huge difference in the timelines.
Answer: Try to override WndProc:
protected override void WndProc(ref Message m)
{
   const int WM_NCLBUTTONDOWN = 161;
   const int WM_SYSCOMMAND = 274;
   const int HTCAPTION = 2;
   const int SC_MOVE = 61456;

   if ((m.Msg == WM_SYSCOMMAND) && (m.WParam.ToInt32() == SC_MOVE))
   {
       return;
   }

   if ((m.Msg == WM_NCLBUTTONDOWN) && (m.WParam.ToInt32() == HTCAPTION))
   {
       return;
   }

   base.WndProc(ref m);
}

Comment: how can I make it movable again?
Answer: It's not all pretty (there is some flashing going on when you try to move the form), but you can use the LocationChanged property to keep the form where you want it:
private Point _desiredLocation;
// assign the _desiredLocation variable with the form location at some
// point in the code where you know that the form is in the "correct" position

private void Form_LocationChanged(object sender, EventArgs e)
{
    if (this.Location != _desiredLocation)
    {
        this.Location = _desiredLocation;
    }
}

Out of curiousity; why would you want to do this?
Comment: Yea, i figured that it wasnt going to be easy :(
The reason i want this is because i want to make a form appear at the bottom right of the screen like a menu. So you can select files etc.
Comment: How I would do it - without looking I don't think there is a property that you can set in .NET to do this so this is your best bet.
Answer: In Windows, the WS_CAPTION style is the non-client area that allows your window to be moved with a mouse. So the easiest way to do what you want is to remove this style from your window.
However, if you need to have a caption and still achieve what you want, then the next style would be to capture the WM_NCHITTEST message and check for HTCAPTION. If the code is HTCAPTION, return NTNOWHERE instead. This will prevent the default window procedure from executing the default move window thing.
Comment: Thanks for the reply. I only started desktop programming about a month ago so i have no idea how to implement any of what you said.. sorry. I feel ignorant :(
Answer: It's not a good practice to make your form immovable. I'd think agfain about it if I were you.
Anyway, you can do this by overridding the WinProc to disable the [Move] menuitem from the system menu.
[DllImport("user32.dll")]
private static extern Int32 EnableMenuItem ( System.IntPtr hMenu , Int32uIDEnableItem, Int32 uEnable);
private const Int32 HTCAPTION = 0×00000002;
private const Int32 MF_BYCOMMAND =0×00000000;
private const Int32 MF_ENABLED =0×00000000;
private const Int32 MF_GRAYED =0×00000001;
private const Int32 MF_DISABLED =0×00000002;
private const Int32 SC_MOVE = 0xF010;
private const Int32 WM_NCLBUTTONDOWN = 0xA1;
private const Int32 WM_SYSCOMMAND = 0×112;
private const Int32 WM_INITMENUPOPUP = 0×117;

protected override void WndProc(ref System.Windows.Forms.Message m )
{
if (m.Msg == WM_INITMENUPOPUP)
{
    //handles popup of system menu
    if ((m.LParam.ToInt32() / 65536) != 0) // 'divide by 65536 to get hiword
    {
        Int32 AbleFlags = MF_ENABLED;
        if (!Moveable)
        {
            AbleFlags = MF_DISABLED | MF_GRAYED; // disable the move
        }
        EnableMenuItem(m.WParam, SC_MOVE, MF_BYCOMMAND | AbleFlags);
    }
}
if (!Moveable)
{
    if (m.Msg == WM_NCLBUTTONDOWN) //cancels the drag this is IMP
    {
        if (m.WParam.ToInt32() == HTCAPTION) return;
    }
    if (m.Msg == WM_SYSCOMMAND) // Cancels any clicks on move menu
    {
        if ((m.WParam.ToInt32() & 0xFFF0) == SC_MOVE) return;
    }
}
base.WndProc(ref m);
}

Also, you can handle OnMove event of your form. But I think this will cause some flickering:
private void Form1_Move(object sender, EventArgs e)
{
    this.Location = defaultLocation;
}

Answer: Just change the FormBorderStyle property to None.
Comment: Well, this does what I wanted. A Fullscreen UI.
Answer: change the Form property StartPostion to Manual.
Then, handle the LocationChanged event:
private void frmMain_LocationChanged(object sender, EventArgs e)
{
Location = new Point(0, 0);
}

Answer:
Go to form events-> Location changed

write the following code
Location = new Point(this.Width,this.Height);

Comment: not works for me! I think you should save values of top and left positions first, then: Location = new Point(LeftPosition,TopPosition);
Answer: I would question your need to make the form unmovable.  This doesn't sound nice.  You could of course save the location of the window when the window closes and reopen the window into that position.  That gives the user some control over where the window should be located.
Comment: Well... the whole point of the program is for it not to be moved lol.
Answer: You can try:
this.Locked = true;

Comment: There are a lot better answers than this one! If you're going to add a totally different answer, at least explain it!
Answer: You can subscribe to the Form.Move event and reposition from it.
Comment: Yes I tried that but the form starts blinking a lot when I try to move it to a new place.
Comment: @Failed_Noob - edit your question, post the code and perhaps someone can suggest a fix.
Answer: Just reset the location on formlocation_changed event to where it was i.e. set the Form.Location to a variable before it's moved and when the user tries to move it, it will go back to the variable location you set it to.
Answer: Private Sub MyFormLock()
        Me.Location = New Point(0, 0)
    End Sub
Private Sub SearchSDR_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged
    Call MyFormLock()
End Sub


Pushout in category of Stone spaces

Question: I suspect that the pushout in the category of Stone spaces and continuous maps exists and is the same as in the category of all topological spaces, but I have not found it in literature yet. I am looking for a reference.
Comment: Stone spaces are dually equivalent to boolean algebras, and the category of boolean algebras has pullbacks, hence the category of stone spaces has pushouts: existence is easy
Comment: Well pullbacks are limits and the forgetful functor to $Set$ preserves limits and we know how to describe pullbacks in $Set$ so yes, we can describe it easily. However, the description of the equivalence uses ultrafilters on the boolean algebras so the description one would get for the pushout would just be weird. But now that you know a pushout exists, you can try describing it, for instance (I don't know if that works at all) you can try to see if by any chance the pushout in $Top$ is still a Stone space
Comment: Do you know an explicit description of the pullback of Boolean algebras? Maybe that helps..
Comment: I wouldn't expect that pushout of Stone spaces, taken in $Top$, would always produce a Stone space again. At least, this is not true for compact Hausdorff spaces, with a classical example of $[-1,1]\ \hookleftarrow\ [-1,1]\setminus\{0\}\ \hookrightarrow\ [-1,1]$
Comment: @Berci But $[-1,1]\setminus\{0\}$ is not compact. The pushout of two continuous injections of compact Hausdorff spaces is still compact Hausdorff.
Answer: As mentioned in the comments, existence is immediate by Stone duality: pushouts of Stone spaces are just dual to pullbacks of Boolean algebras.  Alternatively, Stone spaces have all colimits because they are a reflective subcategory of topological spaces, so you can compute a colimit of a diagram of Stone spaces by first taking its colimit as topological spaces and then applying the reflector to Stone spaces.  Explicitly, the reflector sends a space $X$ to the closure of the image of the evaluation map $X\to \{0,1\}^I$ where $I$ is the set of all continuous maps $X\to\{0,1\}$.  (This is closely analogous to the construction of the Stone-Cech compactification, i.e. the reflector to compact Hausdorff spaces, which uses $[0,1]$ instead of $\{0,1\}$.)
Pushouts of Stone spaces do not coincide with pushouts of topological spaces in general.  For instance, in this answer to a closely related question, I gave an example of a pair of maps $$f,g:\beta\mathbb{N}\to K$$ (here $K$ is the Cantor set) whose coequalizer in the category of topological spaces is $[0,1]$.  Since $[0,1]$ is not a Stone space, the coequalizer in Stone spaces must obviously be different, and in fact is just a point (the reflection of $[0,1]$ in Stone spaces).  You can turn this into an example with pushouts instead of coequalizers by just taking the diagram $$K\stackrel{(f,1)}\leftarrow \beta\mathbb{N}\coprod K\stackrel{(g,1)}\to K$$
where $(f,1)$ is the map that is $f$ on $\beta\mathbb{N}$ and the identity on $K$, and similarly for $(g,1)$.  A pushout of this diagram is the same thing as a coequalizer of $f$ and $g$, so the pushout in topological spaces is $[0,1]$ while the pushout in Stone spaces is a point.

Pushout in category of Stone spaces


How to detect when a view inside HorizontalScrollView touches another view?

Question: So I'm trying to create iMovie like scroll view, I want to get a callback when the image inside the scroll view touch the white line (so I could change the large image). How can I do that?
Comment: is your problem resolved yet? Could you post XML or java code for the `HorizontalScrollView` and the white line. It would speed up the response as people will get some code to try, modify and work with. Cheers :)
Comment: @Jimmy If I am not wrong your white line or bottom film strip moves programmatically, so when when this white line comes on top of another film strip item you want to raise and event (which will you use to change the main/bigger image). Right? Correct me in case I am wrong about your requirement.
Answer: This solution works for me and also this is the only solution I was able to make out after a long research on options we have with HorizontalScrollView.

ImageView lineImage=(ImageView)findViewById(R.id.yourImageViewIdOfWhiteLineImage);

Then in onTouchListener of your horizontalScrollView
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
switch (event.getAction()){
    case MotionEvent.ACTION_MOVE:
     //get horizontal scroll view for images
    HorizontalScrollView parent=(HorizontalScrollView)v;
    //get linear layout for list of images
    LinearLayout wholeList=(LinearLayout)parent.getChildAt(0);
    int centerCord[] = new int[2];
    for(int idx=0;idx<wholeList.getChildCount();idx++){
        ImageView discoveredIv=(ImageView)wholeList.getChildAt(idx);
        discoveredTv.getLocationInWindow(centerCord);
        int discoveredX=centerCord[0];
        //set these (lineImage.getLeft()-20, lineImage.getLeft()+20) according to your
        //requirement, the way it best suits you. You'll have to test in runtime, how your
        //views come under the line and then set these.
        if(discoveredX >= lineImage.getLeft()-20 && discoveredX <= lineImage.getLeft()+20)
        {
            //you have a winner, take that image from imageView and set it wherever you want.
            //Your image is in discoveredIv
        }
    }
        return false;
    case MotionEvent.ACTION_UP:
        //It returns true to avoid fling effect, otherwise this method won't work.
        return true;
    }
return false;
}

This is strictly according to your requirement. But I'd suggest you use this code in ACTION_UP case, because if you do all these calculations in ACTION_MOVE then this code has tendency to make your app slow while scrolling and also, more the calculations more the app slows down.
so, i suggest to use this in ACTION_UP.
You can test your app in both cases and decide in which case you want this code.
Answer: Set OnTouchListener for imageview, then u ve to implement below callback. where event reference will give everything what u need
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
// event reference will give every co-ordinate that u need
return false;
 }

Answer: You are probably going to want to extend the parent that scrolls that reports its location on screen as it is being touched. I'm not sure from your screenshot if the while line, the image reel, or both scroll, so I am going to assume the white line is fixed and the images scroll (although your solution could be adapted accordingly).
In a custom view that scrolls the ImageViews:
/* @return True if the event was handled, false otherwise. */
public boolean onTouchEvent (MotionEvent event) {
    switch(event.getActionMasked()) {
        case MotionEvent.ACTION_MOVE: {
            x = event.getRawX();
            // This is the x-position on screen, compare to that of while line.

As the finger moves, you will intercept it's change in position. I assume all ImageViews are in a parent container that scrolls them horizontally. If you need to know which child the finger is hovering above, take a look at at the previous question:
how to get a view from an event coordinates in android?. Using these method you can know as you scroll which ImageView is overlapping with the white line, and update the large image accordingly.
Hope this helps!


How many percentage of total transistors in a CPU are used in each component?

Question: I'm learning the basics of computers, and now trying to get some oversight of complexity of a CPU. Is there a rough trend for how transistors are allocated in a CPU? Intel 8008 for example, has 3500 transistors. In this image of it, I can see the space each component occupies. The ALU as example, each ALU slice is 20 transistors, and, the ALU has 8 slices. I guess that is 20*8 = 160 transistors for the ALU? Carry lookahead looks like it occupies same amount of space, another 160? ALU registers, 200? Registers, 160? Shifter, 80? That's 600 in total. Assuming I am somewhat correct on those numbers, is the remaining 2900 just the rest of the surface that is not marked in the image? It looks like it could be 5x as large surface area as the marked components.
Comment: This might be a question for the [electrical engineering](https://electronics.stackexchange.com/) stack exchange
Comment: Computer science usually deals with abstraction level of logic gates and higher. Not transistors.
Comment: This isn't CS, this is "ancient history of technology".
Comment: Nah, it has more to do with computer science. Basically, CPU architecture in general. Understanding how transistors are allocated is basic for understanding cpu. Nothing electronics-related in question, not wondering about electronics at all, transistor distribution has to do with logical processing and memory management. Computer science.
Comment: I'm able to know where the question fits. I could ask about logical gates instead, but, the registry seems to use a lot of transistors, and, it isn't using logical gates. Since I'm interested in understanding how much of the "stuff" in cpu is dedicated to what, I ask about transistors. This is computer science. I am not interested in the electronics perspective on it, in this context. At all.
Comment: No, it's how to model the complexity of processors, and the question assumes that it might scale somewhat linearly as they get more advanced. There's nothing wrong with the question, and it fits here. It's a great question, that you choose to misunderstand.
Answer: You're looking at an ancient CPU. Back then, IC technology greatly limited the number of available transistors on each chip. As it became easier and easier to add transistors, we started seeing big shifts in the use of these transistors.
One of the most obvious shifts is the fact that a large number of CPU designs are multi-core nowadays. Also, a modern CPU may have 200 or more registers, each of which stores 64 bits. Considering it takes 6 transistors in a standard SRAM cell, the register bank alone requires around 80.000 transistors per core, way more than the entire 8008 in your example.
Another well-known feature of modern CPU's is the cache. Again, these are SRAM cells, and 4 MB takes about 200 million transistors just to store the cache content - you need about 50 million more to read and write.
Since transistors have shrunk so much, we've used them a lot more aggressively. The shifter on the 8008 could shift by one bit. If you wanted to shift by 3 bits, you'd repeat that three times. A modern CPU can shift over any number of bits in a single operation - much faster, at the expense of more transistors.
The 8008 doesn't even have a multiply operation; modern CPU's have hardware to multiply, divide, and do square roots.
Answer: Your estimation of the number of transistors allocated to each function seems way off to me.

As you can see from the schematic, the 8008 has three 8-bit registers, two pointer registers, 7x8-bit registers for accumulators and scratchpad memory and 8x14-bit address stack registers.
That adds up to 208 bits of memory, each cell requiring 3 transistors and one capacitor for a total of 832 elements. And that count has yet to include any logic required for addressing.
As for the CLA I couldn't find details about the exact implementation, but your 160 estimate would be more in agreement with something a bit more sophisticated like the Brent-Kung adder, which wouldn't be invented for another 10 years. For a run-out-the-mill PMOS 8-bit CLA I have seen estimates ranging anywhere from 80 up to 300 transistors, depending on the maximum acceptable gate delay for the application.
And either way, I am not fully convinced you bounded the CLA area correctly.


How to remove files from a botched uninstall?

Question: I installed wine and cheatengine at some point, and the software didn't work, so I went the bad route of just searching for the related files and deleting them. This has left a few wine and cheatengine related icons in the app list, and I can't figure out how to remove them. How can I fix a botched uninstall?
Answer: I managed to remove the icons by going to "~/.local/share" and finding anything related to the deleted programs, and removing the files.


Why are my deck boards of uneven width?

Question: I bought 12-foot-long 5/4 x 6 in pressure-treated pine deck board from Home Depot.  Not until I laid them down did I notice that the boards' width tapers significantly toward the ends of each board.  See the picture below.  My deck is finished (as of last night—yay!), but just so I know for next time: is this kind of variation in width something I have to expect?  Or was I just unlucky with what Home Depot had this week?  Or can I avoid this buy shopping elsewhere?
Comment: I've never seen it that long before, but it sure sounds like planer snipe.
Comment: Is the taper even along the board, or is it all in the last foot or so?  Is it on all the boards?
Comment: All boards, mostly in the last two feet or so on each end.
Comment: I live in Australia and the equivalent is Bunnings here. I'd send the lot back if that happened here.
Answer: I've never noticed that before, but Home Depot sources their lumber from different mills, so they may vary slightly from batch to batch.  It may also even out a bit as the wood dries.
One thing I did find, at least in my area, is that the 5/4 deck boards from Home Depot are significantly different than the ones at Lowes.  The Lowes ones are slightly narrower but a bit thicker and the depot ones are thinner but slightly wider.  Was very annoying when I got some boards from one place and more later from another only to find that they weren't really the same dimensions.
Comment: +1 Yeah, wait it out and see if the widths will even out when the boards dry in a couple of weeks/months.
Answer: This may come from different moisture levels in the wood. If the boards have been stacked with boards of different lengths, then the longest boards will have one end sticking out of the pile. This end will dry out more quickly than the rest of the board.
Pressure-treated are usually quite wet when you buy them, and become narrower as they dry. That is why it is also a good idea too have a very small gap between the deck boards when you lay them down, as this is likely to widen as the boards dry out.
Comment: This doesn't mean they were *stored* in lengths of exactly 12 feet. Some of the boards may have been stacked in with 8' lengths.
Comment: In this case they were sold in lengths of exactly 12 ft.
Answer: It should match perfectly. I'd send it back and get a new lot as it's not fit for purpose. The edges could catch and splinter which can be a problem with bare feet. You can mitigate it by sanding the mismatch edges and sealing it with a good decking oil if you can't be bothered.

Why are my deck boards of uneven width?


pb&j taste like soap

Question: So I got some scented dish washer soap the other day and my wife used it the first time the other day in the dish washer including by sandwich container. Today when I eat my pb&j she made it tasted like scented soap. Do you think this is from left over water/soap or from it being scented soap?
Answer: It seems likely that there was some form of residue left behind in the container; whether this was actual soap or just the scent is difficult to determine.  I have found that soap scents do tend to cling a bit more stubbornly to plastic than they do to other materials, but that's just my experience.
Next time you might try rinsing the container and drying it out with a clean towel after washing.
Alternatively, you might simply discontinue using this particular soap.  It may be particularly clingy or perhaps you're just sensitive to its scent.
Answer: Concentrated dish soap can have a strong effect even if only a tiny bit entered the peanut butter jar. This is probably what occurred. To be safe you could take a clean, dry spoon and scrape off the affected layer of peanut butter, and discard. Provided it is only on the surface.
If the entire container is affected, it may be difficult to remove from the plastic. It may be best to use glass containers in the future if you plan on reusing containers; or if you use plastic, wash it by hand instead of going through the dish washer.

pb&j taste like soap


Why didn't the Resistance use EMP weapons to destroy the Skynet machines?

Question: They are in the distant future, why didn't they use EMP weapons to destroy the Skynet machines? They could've used some sort of similar mass scale weapon to render the Skynet machines useless?
Comment: "They are in far future" The distant future. The year 2000! In the aftermath of the nuclear holocaust that Skynet caused, the surviving humans may not have had the equipment or the expertise to do so.
Comment: Related, as the answer explains why Skynet wasn't affected by the EMPs generated by the Judgement Day nukes: https://scifi.stackexchange.com/questions/32690/how-did-skynet-avoid-destroying-itself-on-judgment-day
Comment: "Underneath, it's a hyperalloy combat chassis — micro processor-controlled, fully armored. Very tough." - There's a cap you have to unscrew and about a 2 inch long plug you have to pull out before you can expose the CPU. What's your source of EMF that can penetrate ~3 inches of steel?
Answer: We're not in the world of The Matrix, where EMPs grow on trees. Based on Terminator 3, it looks like we're dealing with, more or less, the same technology we're dealing with now. Based on that, there's two reasons

The only way to make an EMP right now is with a nuclear weapon. While machines in general are not immune to the destructive effects of radiation, they're not as affected by it as humans are either. So you'd probably make the situation much worse, especially since machines could tolerate more radiation than humans.
Skynet, and its machines, are likely hardened against EMP. You might get a few knocked out, but probably not enough to make a difference and there's no guarantee it would affect all models the same way

The T-800 operates using electronics that are more advanced than what we have now, but they are electronic systems nonetheless. It would be possible to build a faraday-cage like structure around the electronics to protect them, but from what we've seen of the T-800, I doubt that is the case. A powerful enough EMP would kill it.
The T-1000, however, has no electrical circuitry. It is some form of advanced liquid metal that has the ability to manipulate itself and be controlled by an AI. Whatever technology is behind it (perhaps nanobots) is way, way beyond us. There is no indication that it has any system which would be vulnerable to an electromagnetic pulse. My vote is no.
Comment: fyi a nuke isn't the only way... Explosively pumped flux compression generator
Comment: @Naib True, but those haven't been weaponized yet. Without a practical way to deploy one at scale, I don't see how it would help here.
Comment: Well... It sort of has but it hasn't been deployed


Gods and Super Humans

Question: I read somewhere, long back, that before Humans existed, there were Super-Humans on this earth. This was after the Dinosaurs got extinct and this was a way of Nature to re-start life on earth after the mass extinction of all kinds of life.
Is it true, that the Super-humans were none other than our Gods, who also scripted there daily routine through our religious scriptures. And once the normal life was established, they left the earth gradually.
Comment: Malay, Please check the code of conduct of Hinduism Stack exchange before shooting questions. Your question is half way through.
Comment: Sure Mr Raghavan. Though I always believe Science has been the basis of Sanatan Dharma, and anything related to history has to be connected to Sanatan Dharma.
Answer:
And once the normal life was established, they left the earth
gradually.

In Vedas and other scriptures it is mentioned that once upon a time gods and humans used to live together on earth. But, then the gods left and settled in the heavens. So, this particular statement of yours is true as per scriptures:

In ancient times gods and men used to live together in  this world.
Then the gods went to heaven by performing rites, while men were left
behind.* Those among them who perform rites in the same manner get
to dwell in that world together with the gods and Brahman.
Dharmasutras of Apasthambha 2.16.1

I read somewhere, long back, that before Humans existed, there were
Super-Humans on this earth.

IMO, there is an indirect mention of "super humans", who were such powerful that they were even able to defy the Law of Karma, which even deities can't escape from.

7 Transgression of the Law and violence are seen among people of
ancient times. 8 They incurred no sin on account of their
extraordinary power. 9 A man of later times who, observing what they
did, does the same, perishes
Dharmasutras of Apasthambha 2.14.7-9

What it says is that those ancient humans were so powerful that they committed sins but were not affected by them, due to their "extraordinary power".
So, this is an indirect reference to "super humans" IMO.
Comment: Thanks a lot. This helps.
Comment: No problem .. keep participating on the site :) @MalayDwivedi

Gods and Super Humans


Stale file handle after server reboot

Question: I have an NFS server on a Pi 4 which works rather well except I'm often getting "Stale file handle" on the client after rebooting the Pi. That is while the client has the share mounted, the Pi reboots, upon it being booted the client spits out the error when trying a file operation like ls. What's causing this and how can I fix it?
Answer: The problem is that the filesystem that's exported by NFS isn't always ready when NFS starts. In this particular case, there's an external disk that is asynchronously mounted on boot and sometimes NFS starts before that happens. The result is that NFS can't export the filesystem.
One good solution is to use systemd to create a dependency between NFS and the filesystem. There are multiple ways to do this but perhaps the simplest is:

Open /etc/fstab and
Add the option x-systemd.before=nfs-server.service to the mount options for the filesystem

Once complete, nfs-server.service will only be started after the filesystem is mounted and will therefore successfully export it.

Stale file handle after server reboot


drupal - which modules for teachers and students in school

Question: I want to do something with drupal 6. Here the project
 Each teacher manages a class composed of several groups. Teachers only have access to their own groups. By connecting each teacher is directed to a page (or dashboard homebox) containing: its student groups with each group their latest posts, a link to their blogs (blog group), a place to send (create) a post (blog entry) to all groups or a specific group. Each group of students connect with the user name and password of the administrator of the group (one group member has the right to connect) and are directed to a page that contains: All posts sent by the group, members of the group, a place to send (create) a post (blog entry) only to the teacher, and a page explaining the course.
 How much do I create roles (teachers and students only?)
 which modules should I use? og, og_menu, og-audience ... or I have seen recement school administration Drupal 7 is ok?
Answer: i think its better to use moodle .. its greet in this task...
then you can integrate it with drupal... there is alot of module that support this integration ...
and i think QUIZ module for drupal is very helpful for you
UPDATE:
Drupal 6 have a set of modules that help you integrating your moodle with drupal
but unfortunately DRUPAL 7  still not supported
goodluck
Comment: i want to use drupal. is possible to integrate moodle in drupal ?


Are there any penalties for adepts or mages when they use cyberware?

Question: In the old Shadowrun there are penalties when magic users like mages, shamans or adepts use cyberware. But how is it handled in the game?
Answer: A character has an "essence" stat. This stat effects how long the cooldown on your spells is. Every piece of cyberware you install will reduce your Essence, which will increase your cooldowns. Your essence is not allowed to go below 1.
My human street samurai started with 6 essence. My jack cost me half an essence (which rounded up to 1), my leg cost me 2 essence, my eye cost me 1, and my arm cost me another 1, leaving me on 1 eassence, and I cannot buy more cyberware now.
I haven't given cyberware to a magic user yet myself, so I don't know exactly how much effect it has on your spell cooldowns.
Comment: I just realized why my CDs went up was because of this. I'm pure mage, and let me tell you, it sucks having 5-7 round CDs on your spells. Not worth getting more than one piece for a mage.


Ransomware left some files not encrypted

Question: A ransomware attack happened to my server, I've backups and all and I tracked down the reason to two elements (either unupdated Bitnami LAMP stack or unupdated Flask server) but I noticed some files aren't encrypted, any checks I should do to verify that I can use this files safely?
Comment: many ransomware whitelists the file types that it encrypts, so they encrypt only files that likely contains user data, to prevent the system from breaking. Especially encrypting binaries and scripts can cause the system to fail to boot, which would cause them to be unable to deliver the ransom message or fail to restore, which would tarnish their reputation (ransomware groups need to have a good reputation of reliably restoring anyone who pays up, otherwise people would be less likely to pay the ransom).
Comment: Do your logs give any hint if these files were changed while the encrypting process was running?
Comment: I couldn't find any logs regarding the encryption process, but the files I'm going for are not binary files, mostly Python or shell scripts
Answer: The way ransomware encrypts files is based on extensions. They add a broad range of extensions to cover the majority of crucial files for working/business/school and so on. That list is not dynamic or cloud/service based, it is usually hard coded into malware itself. At least that's what happened up until now. So if for example, ransomware didn't add .mp3 to the encryption list, it would be skipped, the files would not be affected. You can do a full scan with anti-malware and anti-virus software just to be sure, but I think the data will not be affected and you can use them safely.
Fun fact: This is why having 2 ransomware (One after another) on your computer will not do additional damage. Usually, ransomware doesn't contain other encryptions extensions.
Answer: The ransomware doesn't encrypt all the files. If you have the name of the ransomware, you can find which files will be encrypted on Internet.
To be sure that your files which aren't encrypted are not altered at all, you can write a script to calculate the hash sum of each files and compare it with you backup (if the files haven't been modify since you backup).


UITextField with PickerView: Don't allow editing

Question: I have a UITextField associated with a PickerView (the PickerView is the inputView of the textField)
Il works fine, but I would like to disallow editing in my TextField (not be able to select, copy text, to see the insertion point, ...).
I red here to implement textField shouldChangeCharactersInRange, for the delegate of the uITextField, but it doesn't work...
The method is never called, but the delegate is correctly done, because if I implement textFieldShouldBeginEditing, it is called.
Is there any (simple) way to do what I want?
Comment: That's this answer that doesn't work for me, so I posted again...
Answer: give your UITextField id and then implement textFieldShouldBeginEditing delegate. Inside those delegate, check the textField id, if it matches your desired textField, run function to called your picker view and return false in textFieldShouldBeginEditing delegate.
Answer: The following disallows pasting and cutting text unless the result is exactly the result from the picker. For example purposes I'm assuming this is a UIDatePicker.
func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool
{
    return string == formatter.stringFromDate(datePickerView.date)
}

where formatter is something like
    let formatter = NSDateFormatter()
    formatter.locale = NSLocale.currentLocale()
    formatter.dateFormat = "dd/MM/yyyy"

Additionally, if you programmatically set the textfield to a string date, you may want to synchronize the inputView picker of the textField with
func textFieldShouldBeginEditing(textField: UITextField) -> Bool
{
    if let text = textField.text {
        if let date = formatter.dateFromString(text) {
            datePickerView.setDate(date, animated: true)
        }
    }
    return true
}


2D Stokes equation Code

Question: Does anyone know where could I find a code (in Matlab or Mathematica, for example) for he Stokes equation in 2D? It has been solved numerically by so many people and referenced in so many paper that I guess someone has had the generous (and in science, appropriate) idea to share it somewhere. Thanks a lot.
Answer: In Mathematica you can do this on multiple levels. First, let's just try to solve it. We need a geometry, an equation and boundary conditions:
reg = ImplicitRegion[0 <= x <= 2 && 0 <= y <= 0.5 && ! (x >= 1 && y <= 0.1) && ! (x >= 1 && y >= 0.4), {x,y}];
rp = RegionPlot[reg, AspectRatio -> Automatic]

Next, we need the equation and boundary conditions:
stokesFlowOperator = {
Div[{{-1, 0}, {0, -1}}.Grad[u[x, y], {x, y}], {x, y}] + Derivative[1,0][w][x, y],
Div[{{-1, 0}, {0, -1}}.Grad[v[x, y], {x, y}], {x, y}] + Derivative[0,1][w][x, y],
Derivative[0, 1][v][x, y] + Derivative[1, 0][u][x, y]};

bc = {DirichletCondition[u[x, y] == 4*0.3*y*(0.5 - y)/(0.41)^2,x == 0.],
   DirichletCondition[{u[x, y] == 0., v[x, y] == 0.}, 0 < x < 2],
   DirichletCondition[w[x, y] == 0., x == 2]};

Top-level solution:
OK, this was the setup now to solve the equation we use NDSolve.
{xVel, yVel, pressure} = NDSolveValue[{stokesFlowOperator == {0, 0, 0}, bc}, {u, v, w}, {x, y} \[Element] reg, Method -> {"FiniteElement",
     "InterpolationOrder" -> {u -> 2, v -> 2, w -> 1}}];

And visualize the velocity vector field over the region:
Show[rp, StreamPlot[{xVel[x, y], yVel[x, y]}, {x, y} \[Element] reg]]

Done.
Update
An issue raised in the comments, here is an alternative way to visualize the same stream plot:
rmf = RegionMember[reg];
Show[rp, StreamPlot[{xVel[x, y], yVel[x, y]}, {x, 0, 2}, {y, 0, 0.5},
  AspectRatio -> Automatic,
  RegionFunction -> Function[{x, y}, rmf[{x, y}]]]]

which gives the same result.
Low-level access:
Now, say you want to drill in deeper, you certainly can do that and there are many ways you can do that explained here. I show one way. We use NDSolve as an equation pre-processor and extract the finite element data from it. The fact that you can do that means that you have access to every stage of the solution.
Use NDSolve as an equation pre-processor:
{ndstate} =
 NDSolve`ProcessEquations[{stokesFlowOperator == {0, 0, 0}, bc}, {u,
   v, w}, {x, y} \[Element] reg,
  Method -> {"FiniteElement",
    "InterpolationOrder" -> {u -> 2, v -> 2, w -> 1}}]

This will return you an NDSolve state object.We load the finite element package:
Needs["NDSolve`FEM`"]

And extract and inspect the finite element data:
femd = ndstate["FiniteElementData"];
sd = ndstate["SolutionData"][[1]];
femd["Properties"]
{"BoundaryConditionData", "FEMMethodData", "PDECoefficientData", \
"Properties", "Solution"}

So the equation pre-procesing created a couple of data structures. Let's extract and use them:
bcd = femd["BoundaryConditionData"];
methodData = femd["FEMMethodData"];
pded = femd["PDECoefficientData"];

These are then the key steps in this low level approach:
dpde = DiscretizePDE[pded, methodData, sd];
dbc = DiscretizeBoundaryConditions[bcd, methodData, sd];

Get the system matrices:
{load, stiffness, damping, mass} = dpde["SystemMatrices"];

You could look at them, modify them or what not.
MatrixPlot[stiffness]

To apply the boundary conditions use:
DeployBoundaryConditions[{load, stiffness, None, None}, dbc]

Solve the equations:
stationarySolution = LinearSolve[stiffness, load];

Create an interpolating function:
mesh = methodData["ElementMesh"];
offsets = methodData["IncidentOffsets"];
xVel = ElementMeshInterpolation[{mesh},
   stationarySolution[[offsets[[1]] + 1 ;; offsets[[2]]]]];

And visualize, say, the x-velocity in a contour plot:
ContourPlot[xVel[x, y], {x, y} \[Element] mesh,
 AspectRatio -> Automatic, PlotRange -> All,
 ColorFunction -> ColorData["TemperatureMap"], Contours -> 10]

For an overview of the finite element method in NDSolve have a look here.
Hope this helps.
Comment: Thanks a lot! Do you have any idea why `Show[rp, StreamPlot[{xVel[x, y], yVel[x, y]}, {x, y} \[Element] reg]]` does not work in my version? It's 10.0.0.0
Comment: If I am not mistaken this was fixed in 10.0.1.
Comment: @usumdelphini, I have a 10.0.2 where it works. So just grab the update, if for some reason you can not get the update, I put in a workaround.
Answer: You can of course implement a simple algorithm in Matlab or similar programs. Or you could use a professional implementation using modern numerical methods that is part of one of the existing finite element packages. For example, here is the Stokes tutorial program of deal.II. (Disclaimer: I wrote this program.) I'm sure there are similar programs for libMesh, FEniCS, etc.
Answer: Well, implementing the Stokes equations, as you said, is rather easy. I would suggest you to do it yourself, just by reading the first 20 pages of chapter 7 on Peyret's (1987) "Computational Methods For fluid flow" you will be able to implement such a simple model (just drop the convective term).
Comment: I thank you for your suggestion, but if I asked the question is because I do not want to spend time writing the code. Mainly not because I wouldn't be able to understand how to do it, but because I do not want to deal with debugging, logic and syntax issues at all. So my question is: isn't there a code in MatLab or Mathematica that I could use and modify?

2D Stokes equation Code


Would two Neodymium magnets stick together with twice the power?

Question: Assume I use a coil to create B-flux and put ONE Neodymium cylinder magnet (1" diameter & 0.25" thick) close to the flux, it would create 10 lbs of force. Does that mean that putting TWO cylinder magnets (1" diameter & 0.25" + 0.25" = 0.5" thick) would create 20lbs of force?
Comment: Similar to https://physics.stackexchange.com/q/18206/44126
Answer: Probably not, but it depends on the geometry of your coil.
For a couple of dollars at the hardware store you can get a big stack of those coin magnets.  If the answer to your question were yes in general, it'd be harder to break apart the big stack of magnets that to separate two of them.  That's not consistent with my experience.
In general for a dipole $\vec m$ in a field $\vec B$, the force is
$\vec F=-\nabla(\vec m \cdot \vec B)$.
If the dipole moment is a constant, and the dipoles are free to rotate, they will orient themselves so that $\vec m$ is antiparallel to $\vec B$.  In that special case, the force simplifies to
$$\vec F \approx m \vec\nabla B.
$$
In other words, the dipoles "want" to align antiparallel to the field, then to move up the gradient into the strongest part of the field.  A dipole in a uniform field feels a torque, but not a net force.
If your coil is set up to generate a uniform field, your two stacked magnets will feel the same force — but that force will be zero.  If your coil is generating a magnetic field with some dipole component, your stacked magnets will rotate to align with the field, then (since we've already assumed there is a field strength gradient) one of them will see a weaker gradient than the other.  The gradient $\vec\nabla B$ typically vary like $1/r^4$, where $r$ is the distance from the center of the coil, so the force on the two coin magnets can vary considerably over a short distance.  This is why strong magnets like to suddenly "leap" together and pinch your fingers when you are playing with them.
Now you could put your two coin magnets next to each other, symmetrically about the axis of your coil, and they would see the same $|\vec\nabla B|$ in slightly different directions.  But with the two coin magnets next to each other, they would exert torques on each other, since they prefer to be stacked pole-to-pole; you could engineer a solution like this, but there would be extra parts involved.
I actually happened to have some magnets with this shape on my desk.  In response to Carl's comment, I built a little string lifting harness to measure the force on a single magnetized paper clip:

Adding a second magnet increased, but didn't double, the weight that the harness could hold:
<code>stacked  number of clips
 magnets  that stayed up
       1  11
       2  17
       3  23
       4  24
       5  24
</code>
The dominant effect in calculating the force is the field is right at the surface of the stack of magnets; it looks like that gets saturated, an effect I didn't consider in the first part of my answer.
Comment: I'm not completely convinced: a stack of coin magnets (in the absence of energized coils, etc.) will grab loose magnets, or bits of iron, from a much greater distance than a single coin magnet.  The total field strength created by a stack is roughly the sum of the individuals.  The difficulty in separating the discs from each other is, I suspect, due as much to the mechanical difficulty in prying one loose as to the magnetic attraction.
Comment: @Carl: the fields from the coils add, but the additional force isn't linear.  Answer updated.
Comment: Awright -- an experimentalist after my own heart :-) .


NSColor: colorWithDeviceRed... is not working on second monitor

Question: In order to be able to calibrate a monitor, I must be able to drive it in device RGB values.
In order to do this I create a NSColor by:
[NSColor colorWithDeviceRed:(colorsPtr[cnt]/255.0f) green:(colorsPtr[cnt+1]/255.0f)
blue:(colorsPtr[cnt+2]/255.0f) alpha:1.0]

And then I put this Color on the View.
[colorView setColor:[colorsForMeasuring objectAtIndex:index]];

When I use the "DigitalColor meter", this device color is only applied without any conversion when the View is shown on the primary monitor. So only on the monitor that has the menu bar on it.
In case you put the view on your second monitor, it looks as if there happens a conversion from RGB of main display to RGB of the second display. You only see this if there is a big difference between gamuts of both displays. I have a MacBook Pro with an Eizo ColorEdge CG 245 for example. If you then put [0 0 1.0] you might get something like [0.2 0.1 1.0].
Anyone an idea how to get rid of this extra conversion. Up to my opinion deviceRGB should be deviceRGB. In order to make a profile for the second monitor, this is mandatory. Now I have to move the menubar to the second monitor, create the profile and move it back. But with our application customers need to be able to do a validation and this needs to be done frequently. And the same problems occurs here.
Answer: That sounds like a bug to me. I suggest reporting it.
As a workaround, you might try implementing a custom view in which you respond to drawRect: by calling CGContextSetRGBFillColor and CGContextFillRect. (You can get the CGContext from the current NSGraphicsContext.)
Comment: Same problem with CGContextSEtRGBFillColor: (100, 0, 0) -> (100, 12, 0), (0, 100, 0) -> (0, 100, 0), (0, 0, 100) -> (24, 0, 100). Only pure green remains pure.
Comment: @user850121: Sounds like a bug I reported (7542845) about using an old Apple Studio Display (LCD) as my main display. Blue made it the most obvious, painfully so; I'd attached a screenshot of Deus Ex, a blue-heavy game, looking very purple. I still suggest filing a bug of your own, noting within it your different circumstances (external display).


Bulge in infiniti q50 driver's side bridge stone

Question: So I just noticed a bulge in the tire on the driver side of my car. It is a 2015 model and it has less than 10,000 miles on it. I am wondering if I need to change this ASAP or I can drive (about a 100-120 miles) to get home and do it there.
Comment: I think I can tell where the bulge is but I'm unsure of the location and how much it bowed out.  The angle on the pic makes it hard to discern.  Can you take another an upload it?  Welcome to the site.  Cheers!
Comment: FYI - There is an airbag recall for your vehicle.  Check with your local dealer to see if you VIN is affected.    https://www.cars.com/recalls/infiniti-q50-2015/
Answer: You will run into these risks if you decide to take the car on a trip like this:

Tire may burst at highway speeds.
It may deflate over the time.
Steering may become shaky, if it is the front tire.

If you still want to take the risk, I would recommend you take the following precautions:

Drive slowly, no more than 50 mph.
Check pressure a few times during the trip.

Otherwise, if you can go to the dealer now, just do it. It does not take that much time and you will not save too much going to another dealership and the service may still be covered under warranty.
Answer: It's a run-flat tire, so not as bad as a normal tire, but I'd drive to nearest dealership to get their advice. I wouldn't try 100 miles on it.
Comment: Thanks for all the comments people. Went and got me a new tire. Really appreciate the responses.


What is the difference between cofactors and coenzymes?

Question: I've just been wondering what are the differences between the two and I can't seem to find a formal delineation.
Answer: Enzyme cofactors are a collective name of all the chemical compunds or elements associated with the enzyme to increase its efficiency. There are mainly two types- inorganic ions and organic compounds. Inorganic ions are also known as enzyme activators (Cl ion in salivary amylase). Organic compunds are again divided into two- co-enzymes and prosthetic groups. Co-enzymes are loosely associated with the enzyme. They can be removed from the enzyme and undergo cyclic reactions to again combine with enzyme (EX: NAD, NADP). But prosthetic groups are tightly associated with enzyme molecules(EX : FAD). Hope this helps.
Answer: A  cofactor is a non-protein chemical compound. It is bound to the protein
Coenzymes are cofactors that are bound to an enzyme loosely.
Coenzymes are a special case of cofactors. (With Prosthetic groups)
Answer: These terms, according to this paper, have not been defined consistently in textbooks. The same paper suggests the following definitions:

Prosthetic group, coenzyme and cofactor are all generally defined. Whilst a cofactor is any factor essentially required for enzyme activity or protein function, a coenzyme is the cofactor which is directly involved in enzyme catalysed reaction. A cofactor which is not directly involved in enzyme catalysis, or is associated with the function of a non-catalytic protein is not a coenzyme. A prosthetic group (covalently associated non-protein constituent required for a particular function), on the other hand, may also be termed a coenzyme if it is directly involved in catalytic reaction. A prosthetic group which is not involved in enzyme catalysed reaction but functionally essential to the enzyme or a non-catalytic protein is also called a cofactor. Coenzyme and cofactor weakly bound to enzyme or protein are however, not classified as prosthetic group.

So the prosthetic group is defined via its binding properties, the coenzyme is defined via its reaction, and a cofactor is defined via its chemical makeup. This results in lots of overlap and gray areas. A three-dimensional Venn diagram might be necessary to decide in a specific case which term or terms are applicable.
It does not help that hemoglobin, often the first example of a protein with a prosthetic group presented to students, binds to a metal via an organic molecule and is sometimes called an enzyme (but it is just an honorary enzyme).
Answer: Cofactor is a non protein chemical compound that bound to the protein while a coenzyme is a Cofactor that bound to the enzyme
Comment: Your answer adds nothing new to previous answers.


Is there an online calendar site that will let me have two completely separate calendars on a single account?

Question: I've been using Google Calendar, but it displays events from both of my calendars together, just with different label colors for the events. I'm looking for a way (not necessarily with Google) to have a single account that will let me create any number of completely separate calendars, with events that do not commingle. I also need the ability to display one of the calendars in a European time zone, so U.S.-only solutions will not work.
Answer: Google Calendar enables you to have different calendars in a single account, not sure as to what time zone display options there are though
Answer: Google Calendar can have different clanedars with different time zones. In the left menu where it says "My Calendars" click the little dropwdown arrow and click "Calendar settings". You'll be taken to a page dedicated to settings for that calendar and near the middle of the page is "Calendar Time Zone."
There you can change the time zone for that one particular calendar, and it will stay separate from other calendars.
:)
¨

To display ONLY that calendar, click the little dropdown arrow and click "Display only this calendar."
I just tested it and it worked perfectly :)
Comment: This is a response to both answers - as I said in the OP, Google Calendar displays events from both calendars together, even if they are set up on different time zones. I need to be able to log into an account and choose which calendar to display, and only see that calendar. I want everything to display COMPLETELY separately.
Comment: Updated to include how to display only a selected calendar.
Comment: Thanks. Not exactly what I was looking for, but apparently it's the closest I'm going to get.


What is mp4v and mp4a?

Question: When playing a MP4 file VLC tells me the video and audio codecs are mp4v and mp4a. The quality is good at low bitrates. However, the MP4 Streaming Faq tells me that mp4v means raw MPEG4 streams. What does this mean? It clearly isn't unencoded video.
Answer: VLC is telling you the truth - it looks to me (without actually seeing the file) that your MP4 file is a MPEG-4 container with MPEG-4 codecs being used for the audio and video.
MPEG-4 is both a container and a codec:

MPEG-4 is a form of MPEG encoding. It
is a flexible audio and video
compression format. The format
describes audio and video compression,
with a container format for streaming
across networks and saving to disk. It
also contains optional extra features,
including DRM and subtitles. These
extra features are only included in
software if needed. MPEG-4 can provide
better quality than MPEG-2 at low
bitrates.
MPEG-4 audio is an advanced, complicated audio format. It includes AAC for high bitrates, multilingual tracks, text-to-speech modes for very low bitrates, the ability to synthesize instrumental sounds (similar to MIDI), and more.

Video:

mp4v
This is a video codec.
This codec can be
used inside the MPEG-4 containers.
This codec is from the ffmpeg module.

Audio:

mp4a
This is an audio codec.This codec can
be used inside the MPEG-4 containers.
This codec is from the ffmpeg module.

If we were talking about the MP4 container, you could see these types of codecs in them:

Accepted video codecsmp4v, including
all the codecs described above mpgv
MJPG mjpb SVQ1 SVQ3 H263 h264Accepted
audio codecs mp4a (is aac) mpga samr
sawb Accepted subtitle codec subt
Comment: So is mp4a just another name for the aac codec?
Answer: MP4V and MP4A stand for Mpeg 4 Video and Audio.
From Wikipedia:

MPEG-4 is a patented collection of
  methods defining compression of audio
  and visual (AV) digital data

From VideoLan:

MPEG-4 specifies a range of codecs
The fourccs of MPEG-4 codecs are:
<code>o DivX Codecs
      o DIV1, div1, DIVX, divx, DX50, dx50, XVID, XviD, xvid
o FFMPEG MPEG-4
      o FMP4, fmp4
o 3IV2, 3iv2
o BLZ0
o DXGM
o HDX4, hdx4
o M4S2, m4s2
o MP4S, mp4s
o MP4V, mp4v
o RMP4
o SEDG
o SMP4
o UMP4
o WV1F
o XVIX
</code>

For better clarification of actual codecs used try:
MediaInfo
or
GraphEdit
Comment: So mp4v indicates that something is an MPEG4 video stream without disclosing the actual codec used? Or is mp4v a codec itself?
Comment: it would appear that your first statement is correct. Open the file in MediaInfo to confirm.
Comment: This isn't entirely correct - MP4 is both a container AND a codec (see my answer for the gory details). VLC is telling you about the codecs being used.
Comment: Well, I learnt something today then! ;)

What is mp4v and mp4a?


OpenCV GPU FaceDetector Example crashing on random frames

Question: I'm trying out the Haarcascade based FaceDetection using the GPU module in OpenCV 2.3.1.
My code is compiling and sometimes it shows the initial frame with one or more ROI-rectangles drawn onto the output frame to highlight detected objects.
But after the 2nd or 3rd repeated call of this detector method it just crashes. The compiler says SIGABRT. Any suggestions on this?
Here's the code:
<code>cv::Mat ProcessorWidget::detectGPU(Mat &img) {

    cv::gpu::CascadeClassifier_GPU cascade_gpu(QFileDialog::getOpenFileName(this).toStdString());

    img.copyTo(image_cpu);
    gpu::GpuMat image_gpu(image_cpu);

    gpu::GpuMat objbuf;
    int detections_number = cascade_gpu.detectMultiScale( image_gpu,
              objbuf, 1.2);

    Mat obj_host;
    // download only detected number of rectangles
    objbuf.colRange(0, detections_number).download(obj_host);

    Rect* faces = obj_host.ptr<Rect>();
    for(int i = 0; i < detections_number; ++i)
       cv::rectangle(image_cpu, faces[i], Scalar(255));
    return image_cpu;
}
</code>
Another point is that some of the Haarcascade Classifiers coming with OpenCV will always crash my application when i use them. But some other classifiers always work on the first frame and then crash a few frames later.
BTW I initialize the classifier from within this method just for testing purposes. Inititalizing it just once when constructing the ProcessorObject didn't help either ...
Could the classifier-XML's be incompatible somehow?
Thanks in Advance!
Answer: directly from the docs:
Only the old haar classifier (trained by the haar training application) and NVIDIA's nvbin are supported.
Comment: My program is still crashing. I am using cascadeclassifier provided with OpenCV from 2010


Creating A Website

Question: ok so, I have everything correct I think for port forwarding but the issue is that my pi (Raspberry pi 2B running RetroPie add-on on top of the regular Debian OS) is not opening the port that I have described on my router. the port taht I am having troubles to open is port 801 which I don't understand why it would have problems opening this port, I have no software that is installed to open this port and what not and when I try and do my public-ip-address:801 it keeps on loading and then it says "The connection has timed out" (I am on the newest version of FireFox when posting this post). I thought maybe its just my browser, so I tried a free domain name that I have and it has no luck connecting to it the message says the same thing. I have surfaced around the internet trying to see what I can do but no luck. Any help is appreciated also have a screen shot of what I am dealing with. (Sorry with the cringy editing)
Comment: source zone needs to be WAN, not LAN
Answer: The "source zone" needs to be WAN and the destination zone needs to be LAN if you want to port forward from WAN to LAN
From the image, it's clear that the "source zone" is set to LAN, which is why it's not working

Creating A Website


In Psalm 74:12, why use the expression "is from of old"?

Question: In Psalm 74:12 (ESV) we read "Yet God my King is from of old, ...".
While I understand that to mean something like "Yet God my King is from ancient times", why would translators use the phrase "is from of old". The more I look at that phrase, the less it seems to make sense. The phrase also appears in Micah 5:2.
Comment: ["This somewhat archaic idiom dates from about 1400."](https://idioms.thefreedictionary.com/of+old)
Comment: The more of the ESV you read, the less like English it will seem ;)
Comment: Do you have a suggestion about how this should have been translated?
Comment: "of old" is somewhat archaic English but to my ears faithfully represents the intended meaning of the original. What is the objection? Greek "palin" maps very well to the Hebrew words.
Answer: Job 29:2
English Standard Version

"Oh, that I were as in the months of old [H6924], as in the days when God watched over me,

Psalm 74:12 English Standard Version

Yet God my King is from of old [H6924], working salvation in the midst of the earth.

Why would translators use the phrase "is from of old"?
ESV did it to be consistent with the usage in Job 29:2.
NIV's translation philosophy is different.
Job 29:2
New International Version

"How I long for the months gone by, for the days when God watched over me,

Psalm 74:12
New International Version

But God is my King from long ago; he brings salvation on the earth.

For the same Hebrew word, NIV uses different English phrases for these two passages. In addition to the formal process of translation, they interpreted the contexts of the respective passages.
ESV leans toward formal equivalence. NIV leans toward dynamic equivalence. These are different translation philosophies.
Both have their advantages and disadvantages. Given any reading difficulties, it is best to consult a variety of versions.
Answer: The hebrew word is קדמ and the correct translation is something like 'from the old'. It means more than anicent, this word hints towards creation. The topic of creation is then picked up in V 13-17. Furthermore קדמ is used rather frequently in the psalms of Asaph (Ps 50.73-83), like in Ps 78, where it is mentioned several times.


English translation of "wagenknecht"

Question: In a southern German church record from 1793 I found the professional designation "Wagenknecht". From the context it is clear that the person was working in the military at the time, and it seems he was responsible for the carts and carriages of an artillery regiment. How would you translate his occupation into English?
Comment: Wagenknecht translates as wagon-servant, but I don't know enough about military support functions to provide a more technically correct English equivalent.
Comment: "Wagoneer" was suggested as a translation, but, like @bgwiehle, I don't know enough about late 18th century military support personnel to judge whether the assigned duties were similar.
Answer: I think the closest translation is likely: "artillery carriage driver" or just "coachman"
Before Napoleon re-organized the artillery, the gun carriages and horses were looked after by civilian contractors. They would ride the guns into position before battle commenced and would then get well away from the action. This made it difficult to reposition guns. Or they would be obliged to stay, but would often panic in the heat of battle and run away.
Napoleon introduced the modern artillery train with soldier drivers. These were generally former cavalry men, who were somehow unfit for service otherwise. These reforms were introduced in the French army in 1800.
So your ancestor seven years before that would likely just be a civilian contractor moving artillery pieces around for the army. Since these men are almost always overlooked in statistics or strength reports, it is very hard to find a good description for them. I would hazard a guess that even at the time there were many conflicting descriptions for them.
See here for more information about artillery trains.

English translation of "wagenknecht"


"Otherwise" vs "In Case of" vs "Nonetheless" vs "Whenever"

Question:
I'm stuck with the question given by my teacher, what do you think the best answer is? Since they're all doesn't suit to put as conjunctions in this sentence.
Comment: Small enterprises can afford this small robot. They would not be able to afford _other_, more expensive robots. Now can you work out the answer?
Comment: @Kate Are you, for your sins, a teacher? (And it really encourages me when members help out people posting questions not suitable for ELU in 'comments'; an 'answer' encourages further off-topic questions).
Comment: @EdwinAshworth No, I'm not a teacher; I just thought it was more useful to try to help the OP to find the answer than to either give or refuse it.
Comment: @Kate Nevertheless, a good teaching style.
Answer: The correct answer is (A).
"otherwise", in this context, means:

In circumstances different from those present or considered; or else.

Should we apply this definition to the sentence, it would come to mean that Baxter is affordable enough for enterprises that would not have enough money to purchase any packing/sorting robot other than Baxter.
As an example, let's say NPP Packaging Company only has $500 to spend on a new packaging robot, but every single robot of this kind on the market costs $800 or more. Therefore, NPP could not afford to purchase a packaging robot due to their limited budget.
A few days later, however, Baxter the sorting/packaging robot is released to the market and is priced at $450, which fits NPP's budget of $500. This allows the company to purchase a packaging robot, in contrast to a few days earlier when they could not afford any robots of this type.
Therefore, Baxter allows companies with budget constraints (such as NPP) to buy a robot that packs and sorts - the type of robot that used to be too expensive for them.


Record bash_history to private database for all users?

Question: I want to be able to setup a MySQL database and record all commands issued on my server by username and command.  Is this possible, and if so, how would I set it up?
Comment: do you want this in real time or periodically updated - for example once a day? I would suggest regular review of users history file but it will left you with possibility of users removing specific entries from their history files. But there is a tool called script and it can log all commands to a txt file. You can add script command to users `.profile` file and restrict the editing of this file.
Answer: You could

play with PROMPT_COMMAND if you want this in real-time (each line),
this could be something like:
PROMPT_COMMAND='echo mysql -c "INSERT $(history 1|sed "s/^ *[0-9]* *//")"'

this could be stored in your $HOME/.bashrc.
play with $HOME/.bash_logout if you prefer digest at each logout.
this could let you begin your own script, try adding something like this to your .profile
if [ "$HISTFILE" ] ;then
    export OHISTFILE="$HISTFILE"
    export HISTFILE=$(mktemp $HOME/.bash_history_XXXXXXXX)
    touch $HISTFILE
    history -a
    cat >>"$OHISTFILE" "$HISTFILE"
    HISTFILE="$OHISTFILE"
    HISTFILESIZE=$HISTFILESIZE
    mysql -c "INSERT ... $(<$HISTFILE).."
    rm $HISTFILE
  fi

Comment: This is linked to [How to find out which ssh key was used](http://unix.stackexchange.com/a/59943/27653).
Answer: If you are using bash or zsh, there is a project trying to accomplish this: advanced-shell-history .. Its abhorrent build system (read the Makefile before you go all make install) might be the reason why it hasn't been included in distributions - am working on it and will push upstream, then report back :)
If you want a history for the plain mysql cli shell, rlwrap could be of use:

This package provides a small utility that uses the GNU readline
  library  to allow the editing of keyboard input for any other command.
  Input  history is remembered across invocations, separately for each
  command;  history completion and search work as in bash and completion
  word lists  can be specified on the command line.


Power supply of LOGO 12/24RC PLC from SIEMENS

Question: I bought LOGO 12/24RC PLC from SIEMENS, and I didn't try it yet because I am worry about the required voltage needed to switch it on. I tried to see the data sheet but I confused with lots of data. If any one has any idea I will be thankful.
Here is the data sheet for LOGO 12/24RC
Comment: I hate to say it, but if you can't figure out what power is needed you will probably have a hard time doing anything else. Also plc programming is only remotely on-topic here. But for us to help, we will need you to provide us with more info, like links to the datasheet.
Comment: Read Appendix A. Permissable Voltage Range.
Comment: @Kellenjb: Thanks for the respones, I put the data sheet link. Where you suggest the suitable place of my question?
Answer: In Appendix A of the data sheet you have all the information you need:

So you can run the LOGO 12/24 from anything between 10.8V and 28.8V


Why does the fill tool only color gray?

Question: I was filling in the eye  of this ghost character and even though I put the fill setting on the brightest white it couldn't get any color than a gray that was way too dark, and when I tried changing the color to something like neon green it still made no difference and gave me the exact same color. I can't find a single thing even close to answering why its doing this and I'm following along with a tutorial and haven't done anything different than the tutorial. Does anyone know what's going on and how to make the actual color I select show up when I fill?
Answer: Check your GPencil Layer, if it has its attribute "use lights" checked. If so uncheck it.
In the rendering properties, change the view transform from "filmic" to "standard" and set the look to "none".

Why does the fill tool only color gray?


How come satellites and space stations that travel through space at Earth's speed do not disintegrate?

Question: What I mean, if Earth travels through space at 1,700 km/hour, when a spaceship or other object leaves its atmosphere, should it not stay behind?  And if it is gravity that keeps it near Earth, should that speed not disintegrate them?
Comment: When you're near the equator the Earth is rotating at 1674 km/hour, or about 1700 km/hour. Rhetorical question: When you jump up into the air at the equator, does the Earth suddenly start speeding away from you at 1700 km/hour? The answer is of course no. Linear momentum is a conserved quantity.
Comment: Everything on Earth is traveling in the same direction and at the same speed as Earth. There is nothing in space that could make things stop. Space is mostly vacuum, unlike water in the ocean or road surface that make moving things stop due to friction.
Comment: The Earth orbits the Sun at about $30\,\mathrm{km/s}$, which works out to about $110\,000\,\mathrm{km/hr}$.
Comment: Can you explain why the speed of something (in empty space) should disintegrate that thing? Where do you read such a thing, can be useful too.
Comment: Incorrect figure, false fact, and..... amusing conjecture based on the interaction of those two. Where to start, to correct this person...
Comment: Scientific knowledge is how to tell that our brain was wrong in its interpretations of observations.
Answer: We've already covered that this is the speed of rotation at the equator, it goes much faster around the Sun. But anything launched from the Earth is starting on the earth and in the same state of motion as the Earth. One of the first things you learn in physics class is that a body in motion will stay in uniform motion unless acted on by an external force; in the absence of something like friction or wind resistance it will just keep going. Gravity is a force, of course, pulling inward toward the earth, and that's why the space station orbits the planet instead of flying away in a state of uniform motion. It causes every part of the space station to accelerate by the same amount and in the same direction, so there are no stresses that would cause it to disintegrate. (Footnote: there are small differences due to gravity being central and proportional to 1/r2, so the acceleration of gravity is not quite the same at every point on the space station. But that's in the microgravity regime, very small. You need some extraordinary conditions, like being close to a neutron star, for those so-called tidal forces to be a threat.)
I might add that rocketeers usually like to launch their rockets in the direction of Earth's rotation (east) because the rocket gets a boost to its speed. The rotational speed actually does matter. It matters for those involved with artillery, too; you can look up the Eötvös effect.
Answer: Short answer from someone who doesn't have a degree in physics and is bad at math.
While in space you are in a vacuum, since you are in a vacuum there is almost no resistance. When moving through the atmosphere there is air which provides resistance against the direction you are moving.
I say almost no resistance because at the height of the ISS there is still some resistance present therefore the ISS needs to boost itself once a while.
As for the leaving behind part. When in space you are almost always in orbit of something. This means that an object with an higher gravity is pulling you towards the object but since your speed is higher than the force pulling you you will stay in orbit around the object pulling.
please correct me if I'm wrong
Comment: Feel also free to add numbers to clarify things
Comment: In order to explain clearly, without disgusting someone with lots of physics and math, we do not need numbers. What we need most is to understand the reasoning the OP had to come to the issue asked. Unfortunately, the OP doesn't seem wanting to share this. Unsolvable problem, I would think.


Drupal 7 When a new user registers, where is the confirmation e-mail sent?

Question: Im using Drupal 7, when a new user registers an account I want to be able to approve/deny their membership and then allow them on the website as a registered user. When a new user registers, where is that registration e-mail sent to? And can I change where that e-mail goes?
Comment: It should be whatever you set as the "site" email address at admin » config » site information. Emails only get sent when you have configured new users to require admin approval.
Answer: Set the new user account setting to "administrator approval is required" here:
Admin > Configuration > People > Account Settings


Pseudorandom functions: how are functions stored?

Question: I am wondering about the setup for testing if a function family is pseudorandom. We step into a room, and query the black box with $x$, which yields $f(x)$, etc... We don't know if $f$ is a random function, or if it comes from some preset function family $F$. In the latter case, what assumptions are made about the functions in $F$? Is it enough for each $f$ in $F$ to be listed as a table in the black box, so that $f: \{0,1\}^n \to \{0,1\}^n$ is listed as a table with $2^n$ entries? What if $f$ is described by some function of a polynomial with coefficients that are exponential in $n$? What are the restrictions on the functions in the function family $F$, if any?
Answer: For the definition of pseudorandomness, the family $F$ of functions can be any set of functions at all. But typically we take it to be a set where each function can be described by a rather short key/seed, and where one can efficiently compute the function output given the input (and the key). This is because we want the family $F$ to represent functions that we can randomly choose from and use in real life.
For example, $F$ could be the set of functions AES$_k$, taken over all 128-bit strings $k$ (where AES$_k$ denotes the AES block cipher with key $k$).  Notice that there are "only" $2^{128}$ functions in this family, which is much less than the number of functions mapping 128 bits to 128 bits (which is $(2^{128})^{2^{128}}$).
Answer: Pseudorandom functions just have to produce 'random' values, there are no special restrictions on the functions.
There are tests to measure the quality of random functions. These tests will try to detect if the outputs of a function are somehow correlated or biased.
A well-known test battery are the Diehard Tests from George Marsaglia. Or you have more recent tests here.
PS: Often random functions will just generate a random sequence based on an initial seed value; you don't have to pass a parameter $x$ each time you call the function. While such random functions do exist, the box in your description somehow reminds me of a hash function (or a random oracle).


Question related to another question

Question: I ask a question, some guys answer, and another question comes in. Though the later question is related to previous one, the topic is different, I mean it should be tagged with some different tags
It this case what should I do? Ask in comments, editing my question and ask new question at the rest of previous one, or open another question with a link to previous one? If latter, should I link older question to newly asked one, too?
Comment: An excellently formulated problem in a perfectly separated and distilled manner. This may even make it to be a FAQ eventually. I already see myself linking here in response to [chameleon questions](http://meta.stackexchange.com/questions/43478/exit-strategies-for-chameleon-questions).
Answer: Should I change my question after I have received answers?
Changing your question after you've received answers is inappropriate, as it invalidates the answers you've received.
It can even make those answers wrong, and adversely affect the reputation of those who answered (if they now look wrong they may attract downvotes)
If you have a related or additional question to the original then create a new question. You can link back to the original for reference.
Comment: No. You shouldn't @ping people asking them to look at different questions.
Comment: "And what if want to ask that question from the guy who answered the previous one?" If you want any kind of control over this, then you are looking for a discussion forum. Stack Overflow is not one of those.
Comment: And what if want to ask that question from the guy who answered the previous one? should I comment link to the new question in a comment and ask them to visit the new question?

Question related to another question


web3.eth.contracts.myMethod().call() returns nothing

Question: I'm still new to ethereum development, and when trying to execute call() on a created contract, I'm receiving varying results. Sometimes the call works, and other times it returns the error Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.
Every time I execute the call it's with the same code. The ABI contains the function, and the contract address is returned from another contract method execution. Sometimes restarting the local Besu node makes it work and other times it doesn't.
I'm lost on what is the actual problem or how to fix it. Last time I encountered this error, there was a problem with the ABI, but that's not the case this time. Another time the address was the issue, but I can track the address being passed correctly from the contract creation to the input in the function.
ABI contains the function:
    {
      "inputs": [],
      "name": "timeLeft",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },

Solidity function:
    function timedOut() public view returns(bool) {
        return block.timestamp - creationTime >= timeoutInSeconds;
    }

    function timeLeft() public view returns(uint256) {
        if(timedOut()) {
            return 0;
        } else {
            return timeoutInSeconds - (block.timestamp - creationTime);
        }
    }

Front end JS call:
    async getTimeLeft() {
        await this.setupIfNot();
        console.log(await this.contract.methods.timeLeft());
        let time = await this.contract.methods.timeLeft().call();
        time = parseInt(time);
        console.log("dkljf: " + time);
        return time;
    }

When logging await this.contract.methods.timeLeft() it returns the transaction object that clearly shows call() as an available function. Because of the varying results with no code changes, I'm really confused and not sure what to do to fix it.
UPDATE: I've narrowed down the issue. When it breaks (which seems to be random) the call() function is not returning anything. I ran a direct JSON-RPC call using curl, and the chain is receiving the transaction (I ran it in verbose mode and verified that it was being sent), but nothing is being returned when it breaks. Not zero or null, nothing at all is being returned. I know what is wrong, but I still don't know why it's not returning anything, so if anyone can provide help I'd appreciate it.
Answer: The solution was to call a "cleanup" function on page load that did state cleanup on the contract before attempting to do other contract calls. As stated, there was no ABI issue nor a gas issue, but I guess state data was not what the JS expected, and calling the cleanup function prior to calling the other needed function made sure valid data was returned.


Do quasars exist today?

Question: Are there likely to be any quasars right now, or are all the ones we're seeing old galaxies today, like the Milky Way?
Answer: There certainly are quasars. Obviously, we can't see any as they are today because they aren't nearby. Quasars are a type of Active Galactic Nucleus(AGN), which means we won't find any within our local few million lightyears. However, as the Wikipedia page on Quasars will tell you, any time a supermassive black hole of a galactic nucleus gets a massive infusion of new matter, there's a good chance for a quasar to form. When I say massive infusion of new matter, I mean something on the scale of a galactic merger. In fact, many astrophysicists believe the Milky Way-Andromeda merger in 3-5 billion years will create a quasar.
Furthermore, the closest quasar we observe is only 600 million light years away. That means, because of expansion, the light we see from it is less than 600 million years old. To put that in perspective, trilobites first made an appearance about 520 million years ago, so this quasar was emitting light at about the same time that early arthropods were first walking on the seabed. That may seem like a long time ago to most people, but the universe has been around for billions of years. 600 million is not that long ago.
You also have to keep in mind that there are hundreds of billions of galaxies, which means substantially large chances all the time that galaxies will merge and create a quasar. We won't see most of them because they need to be pointed almost right at us. But most assuredly, there are quasars around today. With new ones being made and with ones we can see today being so recent, we can be sure they're around beyond a reasonable doubt. And let's take as a blessing the fact that the ones we do see are so far away. You wouldn't want a quasar nearby and pointed right at you. That's a recipe for bad stuff to happen.
Comment: Not that it's directly relevant to quasars, but trilobites did pretty much everything there was to do *except* crawl out of the water. Terrestrial arthropods came along later than the first trilobites.
Comment: @SteveJessop Touche. Not sure what made me think they were terrestrial.
Comment: FWIW "Terrestrial" has the primary meaning "of or related to the planet Earth". The secondary meaning relates to the land as opposed to the ocean. So in the context Jims Bond was actually correct.
Comment: @LucyMeadow No, I said they were walking on land. I was definitely wrong. But thanks for the support anyway
Answer: There is no doubt at all that quasars are much rarer in the present epoch than they were at earlier epochs.
The requirements for a quasar are that (a) you assemble a supermassive black hole and then (b) that you feed it with material (gas), such that a large amount of accretion energy is radiated.
Quasar activity peaked at moderate redshifts ($z \simeq 2.5$) due to the required feeding processes of active galactic nuclei and the competition between the merger activity of gas-rich galaxies and the quenching caused by massive star formation and negative feedback from the AGN themselves. It appears that the "sweet spot" for comparatively short-lived phases of "quasar activity" is at redshifts of 2-3 where there was significant merger activity and the transport of gas into the central regions of galaxies, but that there had been insufficient time to fully exhaust the gas in galaxies with central black holes.
In the present epoch, many galaxies have exhausted their gas, and the expansion of the universe means that mergers are infrequent. That is not to say that quasars do not exist in the present epoch, just that their spatial density is so low that we do not have one in our close vicinity.

Do quasars exist today?


What is the sampling rate for the continuous unit step signal?

Question: I would like to know how I can find the sampling rate for the continuous-time signal: u(t) - u(t-2014), where u(t) is the continuous unit step function can be uniquely recovered from its sample.
Answer: Without any prior knowledge about the signal, you can't reconstruct the signal perfectly from its samples because the signal is not band-limited.
If you have prior knowledge, e.g., you know that it is a box function, then you just need three values: the times of the two edges, in your example $t_1=0$ and $t_2=2014$, and the amplitude of the signal.
Answer: Sampling a continuous signal into discrete samples can be cast as finding an appropriate function to convert $x(t)$ ($t\in \mathbb{R}$) into $x[k]$ ($k\in \mathbb{Z}$). Finding functions $f: \mathbb{R}\mapsto \mathbb{Z}$ is easy, but they are generally not inversible, as stated by Matt (one theoretical reason could be that there is not bijection between $\mathbb{R}$ and $\mathbb{Z}$).
However, if you can restrict the subspace or subset of functions in  $\mathbb{R}$, (by prior knowledge) then there are inversible solutions, like the Nyquist-Shannon version. Essentially, band-limited functions can (theoretically) be recovered with discrete samples, with something like "two samples per period".
Other frameworks exist: for instance, FRI or finite-rate of innovation provides you with means to perfectly sample a signal made of piece-wise polynomials. They are non-bandlimited signals, hence cannot be retrieved by traditional Nyquist rate sampling. However, FRI method can recover  $K$ delta diracs with a minimum sampling rate, or sampled at the rate of innovation, of $2K$. This method extends to integrals of the above, such as a piece-wise constant signal.


WP7 using LoopingSelector in a UserControl

Question: It seems that this should be straightforward. I apologize in advance if this is an amazingly stupid, but I'm just not seeing it.
I want to have a textbox tied to a user control with 2 spinners on it. Exactly how the toolkit's DatePicker works, but with custom data. I can get the LoopingSelectors setup in a usercontrol, no problem. But for the life of me, I can't figure out how to make that pop up on click of the textbox. I thought about reverse engineering the DatePicker code, but there is a lot going on in there and I don't think all that much of it applies to what I'm trying to do... I also considered the ListPicker and LongListSelector, but my data really lends itself to the LoopingSelector format.
I have scoured the web for a couple of days and found nothing of use yet. I found some similar questions like -
Implement NumericUpDown spinner control on Windows Phone 7?
But, that doesn't really address using the LoopingSelectors in a real world scenario with a user control with show/hide ability.
Any pointers would be much appreciated!
Comment: Have you looked into the `Popup` control?
Answer: For a consistent user experience I'd go with the DatePicker implementation approach. I know that it involves way more work than feels sane, but I recently did exactly that for a duration picker (hours/minutes/seconds) and it just feels natural.


Office 365 Exchange client connection logs

Question: We use Office 365 at our company and I was wondering if it is possible to see Exchange client connection logs in the admin panel anywhere? I want to identify what IP addresses outlook clients have been connecting from.
Comment: I don't know of any tool that will show this information, but for a definitive answer you should contact Office 365 support.  Please post the response here if you do.
Answer: IP Address Logging:
You cannot see connection IP addresses, but you can see connection types with the following cmdlets:
<code>Get-ConnectionByClientTypeReport
Get-ConnectionByClientTypeDetailReport
</code>
The standard report breaks this out by protocol, and the Detail report breaks down by User, by Protocol.

Other information not available in the O365 platform:

EWS User Agent Strings.  You are flying blind with regard to what types of Exchange Web Services connections are being serviced by your O365 tenant.  This can be an issue as EWS is rather open, and there are several nefarious applications that use EWS to scrape company data.
Mailbox Locations.  Mailbox moves within the tenant are restricted from tenant admins.  Multiple copies of a given mailbox exist, including DAGs, but these are abstracted by GUIDs.

What is available for administrators:

Full message trace.  For all messages going in and out of the O365 tenant, message trace is available.  Live view is 7 days (IIRC), and historical trace can be queried and returned for up to 90 days.
Auditing.  Under Compliance Management > Auditing, a number of reports are available for reporting non-standard usage, such as: Non-owner mailbox access, Legal holds, Admin audit logs (every Add, Set, New and Remove action is logged).
Answer: @blaughw has the correct answer here for straight O365 implantation.  However, there may some options available to you.
if you are leveraging SSO with ADFS or another identity platform, you can capture the logon information which will include the IP a user is connecting from. If you are not using ADFS - you may want to consider it, as you can leverage policy controls to restrict access based on location.
If all your users are accessing via corporate LAN or VPN you can capture the outbound requests on the edge devices.
If you have control of your devices and they check in to the domain every so often, you can push a small script that records the addresses for the local computer.  You can either have it message out to you - or just keep a running TXT file that you grab when they check in.
Answer: Unfortunately, there is no way to get such information from Exchange Online directly, not even using a 3rd part tools. Only source I would look into is the Offich 365 help desk, and that it self might not an effective solution.