How to bound the size of Boolean circuits?

Question: Every function $f\colon \{ 0, 1 \}^n \to \{ 0, 1 \}$ can be computed by a circuit over the standard unbounded fan-in basis $\mathcal{B}_1 = \{ \neg, (\vee^n)_{n \in \mathbb{N}}, (\wedge^n)_{n \in \mathbb{N}} \}$ of depth $3$ and size $\mathcal{O}(2^n)$ via the disjunctive or conjunctive normal form. Now, we can transform each circuit over $\mathcal{B}_1$ into a circuit over the standard bounded fan-in basis $\mathcal{B}_0 = \{ \neg, \vee, \wedge \}$ by substituting a gate of fan-in $k$ by a circuit of depth $\mathcal{O}(\log k)$ and size $\mathcal{O}(k)$ and, since each gate of the original circuit has a fan-in smaller than $\mathcal{O}(2^n)$, we get a circuit of depth $\mathcal{O}(n)$ and size $\mathcal{O}(2^{2n})$. How does http://www.cs.umd.edu/~jkatz/complexity/f05/lecture4.pdf obtain a size bounded by $\mathcal{O}(n \cdot 2^n)$?
Answer: Every function can be computed by a CNF (or a DNF). A CNF is the conjunction of up to $2^n$ clauses. Each clause involves up to $n$ variables. You can express each clause using a circuit of size $O(n)$, and the entire CNF using a circuit of size $O(n 2^n)$. In fact, this constructs a formula of size $O(n2^n)$.
The conversion from $\mathcal{B}_1$ to $\mathcal{B}_0$ doesn't increase the number of leaves in the circuit, and only increases the number of wires by a constant factor. It could increase the number of gates by an unbounded amount: for example, a fan-in $k$ AND gates translates to $k-1$ fan-in $2$ AND gates.
Lupanov improved the above bound to $O(2^n/n)$, which is tight due to a counting argument; see for example lecture notes of Jayalal Sarma. In the case of formulas, the tight bound is $O(2^n/\log n)$.


How to replace marshmallows in rice krispies cakes?

Question: I'm making rice krispies cakes, but I just realized I'm out of gelatin and marshmallows. My mate suggested mixing normal granulated sugar with some water and it will give me the stickiness I need. Is he right? If not sugared water, what else could I use here?
Answer: There are plenty of recipes for rice krispie cakes without marshmallows in them. Rather than trying to substitute in your recipe, you'd be better off making something slightly different but that's been tested.
Here's an example from tesco. The recipe we use is based on golden syrup, but isn't online. A search for "rice Krispie cake -marshmallow", possibly with the addition of "-chocolate" will find you a decent selection.
Answer: A version without marshmallows would be those that bind rice krispies (or cornflakes) with chocolate.
See for example bbcgoodfoods (using cornflakes) or a site for kids.
The base procedure is to melt chocolate, optionally thin it a bit with butter and/or syrup and fold in your cereals. If you want light rice krispie treats, use white chocolate instead of dark or milk chocolate. Adjust the chocolate : cereal ratio to your liking, but use enough to bind the individual grains together.
Pouring sugar water - even with a very high sugar: water ratio - over the rice crispies will have basically the same effect as pouring milk over them in your breakfast bowl: A soggy mess within minutes.
Answer: Sugar water will just make your Krispies soggy. Anything but gelatin and marshmallows will make them taste funny, but sufficient peanut (or other nut) butter, to make the stuff stick together, plus an egg might give you something tasty and edible after baking.
Comment: Yes, sugar water is equivalent to pouring milk on your cereal, but if you cook it into sugar _syrup_, it'll be a different picture entirely.
Comment: What's up with the downvote after 3+ years?
Answer: If you had some chocolate chips on hand, you could technically make Crunch bars. I would melt 1.5 of chips per 3/4 cups of krispies. Other than that, a good basic recipe is to melt 1/2 cup nut butter and 1/2 cup honey(or maple/glucose/sticky syrup) together in a pot, then mix that into 3 cups of Rice Krispies. I personally like tahini (sesame seed) butter and maple syrup. A good basic one is honey and peanut butter, though.
Answer: Sugar water will indeed make your rice krispies soggy - however with the magic of cooking, you can apply heat to the sugar water and turn it into a toffee/caramel, which will not only bind your rice krispies well, but will set nicely so that you have a crunchy slice.
A version of this is common in NZ/Australia and is normally made with honey, butter and sugar to make the toffee
I have also had great success with a date mixture, which I find is best refridgerated, but works well at room temp too.


SQL Server Merge Replication bulk delete leaves subscriber databases large

Question: We have SQL Server 2017 merge replication set up with three subscribers (running SQL Server 2017 Express).
We need to clear data from the server database occasionally to reduce the database size at the subscribers before it hits the 10GB limit.
We run a script at the server to delete from various tables, and these deletions are replicated to the subscriber tables.
The size of the subscriber databases hardly reduces though. Any advice?
Comment: You're using SQL Server Express Edition?
Comment: Only on the subscribers
Answer: Here's a couple of things to be aware of on how SQL Server works:

Your entire database is generally stored in a single MDF file (unless you use file groups, then it can be split up across multiple NDF files).

That file starts out pre-allocating a certain amount of Disk space based on whatever you set it to when you create the database.

As you put more data into your database, once that pre-allocated amount of space fills up, that database file grows to pre-allocate more space (based on whatever you set the Growth settings to).

In either case, this pre-allocated space is managed by SQL Server and is empty internally, despite showing as being consumed on the Disk in the OS, outside of the SQL Server instance.

File growth operations on Disk are expensive.

When you remove data from your database, SQL Server just flips a bunch of bits (for lack of a better description) inside the file to signify that this part of the file can be overwritten. It doesn't actually shrink the file on disk.

This is to minimize the number of expensive file growth operations it needs to do, to improve performance of your database.

This is why when you DELETE or TRUNCATE  data from a table, it doesn't reduce the file size on Disk. But it does internally mark that part of the database file as applicable for re-use so it can be overwritten when new data comes in.
If you needed to free up space on the Disk and actually reduce the file size, then you can run a SHRINK operation but typically this is not recommended because it's wasteful I/O and the file will likely grow again as you add more data to your database.
If you're using SQL Server Express edition, where there's a limit to 10 GB per database, that shouldn't be hit until your database file internally reaches 10 GB of consumption, despite the file size on Disk.
Comment: Thanks for your reply J.D.
Comment: We have run a shrink on the subscriber databases but that did not free up much physical disk space
Is there a query we can run to report the used database size (as opposed to the physical space)?
Comment: Ok so I used EXEC sp_spaceused @updateusage = N'TRUE'; on one of the subscriber's database.  This gives me (can't post the result image)
database_name    database_size    unallocated_space
xxxxxxxxxxxxxxx    8967.63 MB       47.23 MB
reserved               data                    index_size            unused
8085904 KB          4519640 KB        3226576 KB         339688 KB

The delete script we run has removed roughly 75% of the data but this is not being reflected above
We would in the past have disconnected replication, run delete script, then rebuild replication.
Comment: That would give us a database size as expected.  In this case we had to run the script while replication is active.
Comment: @SteveColley Yes, `sp_spaceused` is a handy tool. If it says you're using ~9 GB of data, then you're really using 9 GB of data internally to the database file (the `Reserved`, `Data`, and `Index` sections). You can run it passing in a table name as a parameter to find which tables are using the most space.


ext sd card is not working at all and not appearing

Question: all other sd cards are working but my card is not showing....neither on mobile or laptop.what to do my all data is in the card.the data card being inserted in my GT-S7562 mobile phone and laptop is not being recognized and neither the data
Answer: The SD card may be damaged. If not, try to mount the SD card, because it may be unmounted by the system itself. To do this, go to Settings, to Storage, navigate to the bottom, and then press Mount SD Card.


Why does Donal Noye have a surname?

Question: There is no mention of a House Noye on AWOIAF, and besides the fact that Donal Noye served at Storm's End, no indication that he is of noble birth. Does anyone know why he has a surname?
Comment: Cotter Pyke is a bastard, and is given a [bastard name](http://awoiaf.westeros.org/index.php/Bastardy#Surnames) as a result. "Pyke" designates a bastard from the Iron Islands.
Comment: Perhaps its actually just a second part of his first name? Something like Sue Ellen or Mary Lou in our language? Also, this is pure guesswork, but if he were from the free cities originally then maybe their naming conventions are different there.
Comment: Don't all nightswatchmen with senior roles get to give themselves surnames if they don't already have one? The head of Eastwatch was a commoner and an iron islander with the sort of history where no-one noble was going to knight him, and he had a surname ("Cotter Pyke", if I remember right?). I've got a feeling there was some mention of it being necessary else the ex-lords and knights with lowly roles wouldn't take their no-surname superiors seriously.
Answer: This is pure guesswork, but on  A Storm of Swords, Chapter 76 (Jon) we learn that he used to work as a blacksmith at Storm's End. There he forged Robert Baratheon's warhammer, which was used to crash Rhaegar at the Rebellion, which led to victory.
So, maybe Robert rewarded him, raising him in the society, by giving him a last name or allowing him to choose one.
I haven't seen any official source explaining why Donal has a last name, so unless Martin tells us, it's just guessing.
Answer: Reasons Donald Noye had a surname in Game of Thrones(theories)

Want

Noye helped the king. Maybe the king offered him knighthood, but he turned it down and instead asked for a name. He did show bravery and other knightly qualities, so I think it can be said he was offered the knighthood. But something stopped him from achieving it.

Repute

Noye did "great" things and he was rewarded for those things by being given a name.
This quote was supplied by westeros.org, but is apparently from Chapter 19, A Game of Thrones:

Noye made my first sword for me, and Robert's warhammer as well. Had
the god seen fit to spare him, he would have made a better Lord
Commander for your order than any of these fools who are squabbling
  over it now.

This is sort of connected to my above theory. And it was said by Stannis so that sort of talks about a godly interaction or that it just wasn't meant for him. I mean being a lord commander or being a knight.

He couldn't be knighted

According to the wikia:

He was minorly injured in battle, but the wound festered, and he lost
  the arm and came to the Wall.

So what would be the use of knighting a armless "knight", its not like he could do anything. So instead he was given a name. This theory, however, has some flaws.

Is it in the timeline that he was given a name?

Who can knight you so that the knighting would stick? A SFF.SE question.
Westeros.org
Alternately(from the westeros.org link) the user RumHam supplies:

haha oops. I guess I should have read more than the title. I still
  stand the the answer is in that thread somewhere among the following
  points

Being knighted is far from a given just because you fought for the winning side in a war.
Being a knight costs money, you have to be able to afford your own armor, warhorse, and sword.
There's not really any indication that Stannis, Robert, or Renly especially liked Noye.
He didn't have an arm, and thus had lost his value even as a non-combatant (he used to be a smith, and was not from an important
  family) so there was no political reason to Knight him.

Valid reasons?
Comment: Excellent answer, well informed speculation. I'll hold for a day or so to see if anyone can come up with a definite answer, else I'll accept this one.
Comment: Stannis liked Noye as much as it was Stannisly possible to like someone. Quoting Stannis, **"Noye made my first sword for me, and Robert's warhammer as well. Had the god seen fit to spare him, he would have made a better Lord Commander for your order than any of these fools who are squabbling over it now."**
Answer: Previous answers discuss only one possibility that Donal may have been raised up to nobility by Robert Baratheon. One angle of Donal's name hasn't been discussed yet. That is, he could be a descendant of some minor impoverished knightly house. Westerosi are an old people and it has been 12,000 years since the First Men came to Westeros, followed afterwards by Andals and Rhoynar.
Many a great houses, noble and royal, rose in those 12,000 years. Similarly many a great houses fell in the same years. I would not discount this factor that Donal Noye might be descended from some landless, impoverished noble family. We do not know anything about Donal's family background nor do we know about any House Noye so no one can answer this for certainty. For all we know, House Noye may have been some part of ancient Stormlander nobility which, in current timeline, is diminished.
Examples of Low born people who shared same family name as some knightly/noble family are following:

Masha Heddle - Masha Heddle is a low-born woman who owns an inn named the Crossroads inn. That's the inn where Catelyn Stark captured Tyrion. She has the name "Heddle" because her father was Ser Jon Heddle. Now you may say that Jon must have formed House Heddle after being knighted, but you would be wrong. House Heddle goes centuries back all the way to days of King Aerys I Targaryen. From Dunk & Egg: The Mystery Knight, we know of a reputed knight Ser Tommard Heddle. He was married to Eldest daughter of Lord Ambrose Butterwell who was Lord of Whitewalls. That means House Heddle must be prestigious enough back then to be considered a fit match for eldest daughter of a former Hand of the King. How did House Heddle fall so low that all they now own is an inn? We do not know for sure but it might be because they were supporters of House Blackfyre during Blackfyre rebellions. As explained by Prince (Later King) Aegon to Ser Duncan the Tall the fate of another noble House which lost most of its possessions as a result of supporting the Blackfyres:

"That's down in the Reach, isn't it? Does he really have three
  castles?" "Only on his shield, ser. House Peake did hold three castles
  once, but two of them were lost." "How do you lose two castles?" "You
  fight for the Black Dragon, ser."Dunk & Egg: The Mystery
  Knight

Lothor Brune - He is low born and poor but he is identified as a distant cousin to Landed Knight Ser Brune of Brownhollow. Ser Brune however denies any such connection.
Maynard Plumm - He was a low born Hedge Knight who claimed to be a distant cousin of Lord Viserys Plumm even though he doubted that Lord Viserys would admit that. (There is a theory that he was actually a disguise worn by Brynden Rivers)

Some Lords usually kick out their useless relatives out of their castles. It may have been that Donal Noye is descended from a junior branch of House Noye which was kicked out of their seat by the senior branch. Eventually, Senior Branch lost the seat (Because we don't know of any landed House Noye) and now members of the family are no different than low-born commonfolk. We have seen this trend in Merett Frey's account in Epilogue of ASOS:

It was like to be every son for himself when the old man died, and
  every daughter as well. The new Lord of the Crossing would doubtless
  keep on some of his uncles, nephews, and cousins at the Twins, the
  ones he happened to like or trust, or more likely the ones he thought
  would prove useful to him. The rest of us he'll shove out to fend
  for ourselves.

So it is very likely that in two or three generations, Lords of Twins would start denying any kinship to their impoverished cousins from younger branches of House Frey. Eventually, these exiles would resign to live like smallfolk. Some may even become ironsmiths and swear service to some Lordly house. Some may find their way to Night's Watch. You never know.

Why does Donal Noye have a surname?


Mac Terminal NetStat

Question: How can I use NetStat on my mac to view all connected IPs of a gaming server? I wonder if theres a way to see how many ms they have.
Answer: netstat(1) only tells you about the connections local to the machine you are running it on. So if you can run netstat on the gaming server, then you can find out the IP's of the clients. Look for connections to the game servers port.
If you are looking to find out the ping time or lag for each of the clients I'm not sure there is a good way unless you are running on the game server, and then you may get an idea of the lag by getting the IP addresses of the clients and then running ping(8) on each of the addresses.

Mac Terminal NetStat


Using FME Stringpadder

Question: Trying to use this in a workbench and not getting the output i'd expect, i.e. no apparaent padding in the output.
The SAFE documention seems inadequate:
https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Transformers/Transformers/stringpadder.htm
Original value: "hello"
Pad Width: 10
Side to Pad: Left
Resulting value: "     hello"
As the parameters exposed in the Stringpadder transformer are more numerous and differently named:
Attributes = I specified the field i'd like padded
Desired String Length = "8"
Side to pad = "Left"
Pad Character = "8" but no idea what this does!
Pad Empty String = "yes" because if it's empty, i still want it padded, right...?
But the output has two spaces, which I believe are the spaces i have specified in the .csv as the delimiter.
I don't understand how this is supposed to work, and google/youtube haven't rendered any working examples.
Answer: In the simple workspace the text (hello) is padded by the character %
as hello (5 digits) by the Stringpadder is told to pad by 7 digits.
the Stringpadder adds two extra %% (percentage characters).
hello%% is the result

Using FME Stringpadder


How do I register global system keyboard hotkeys on Mac OS X in wxPython/Python 2.7?

Question: I'm writing a GUI-based app in Python 2.7 using wxPython 2.8.  I'm trying to run everything on a Mac, and unfortunately it seems that wxPython's wx.Window.RegisterHotKey() method only works on Windows.  I would like to be able to set a global hotkey or key combination while the application is running, and have that key combination get passed on to the application itself, even when it doesn't have focus.  How can I allow my application to be notified when a (user-defined) global hotkey/combination is pressed on Mac OS X, even when the app doesn't have focus?
Answer: When the app has focus, you should be able to use wxPython's AcceleratorTable:
http://www.blog.pythonlibrary.org/2008/07/02/wxpython-working-with-menus-toolbars-and-accelerators/
http://www.blog.pythonlibrary.org/2010/12/02/wxpython-keyboard-shortcuts-accelerators/
I don't have a Mac, so for you'll have to try asking on the wxPython mailing list or the wx-mac mailing list for help about registering a hotkey outside of wx.
Answer: This is currently not available on platforms other than Win32.  I have an open ticket for it on the WX tracker:
http://trac.wxwidgets.org/ticket/12354
You'll find a link to how to accomplish this with Objective C, and you should be able to do it with PyObjC, but both WXPython and the outlined method for capturing hotkeys on OSX require running in an event loop in the main thread.


Who has the rights this patent?

Question: My grandfather is the inventor. My late father and his son told me my grandfather sold the patent, but I don't see that someone else holds it. Could you tell me more about it?
Answer: Lee John B is listed as inventor and original assignee of the patent. The inventor is the person who made the invention. The assignee is the person or organization that owns the economic rights to the patent — primarily the right to demand money if someone uses the invention. Assigneeship can be sold and is very often conferred to the employer by contract when the invention was made as part of a job.
Economic rights last about 20 years, depending on the country and exact circumstances. This is called the term of a patent. For this patent, the term expired in 1984, 20 years after filing. Therefore the invention has been in the public domain for 30 years. At this point, there are no rights to be had.

Who has the rights this patent?


Entity Framework code-first, one-to-zero-to-one and one-to-many relationship to same entity

Question: I'm creating a code-first database with v6.0 of the Entity Framework. I have an Organisation class and a related Location class defined in c# as follows:
public class Organisation
{
    public int Id { get; set; }
    public string Name { get; set; }

    public virtual ICollection<Location> Locations { get; set; }

    public int? HQLocationId { get; set; }
    public Location HQLocation { get; set; }
}

public class Location
{
    public int Id { get; set; }
    public string Name { get; set; }

    public int OrganisationId { get; set; }
    public Organisation Organisation { get; set; }
}

As can be inferred from the classes, an Organisation can have multiple Locations, however it can only have one Head Quarters Location.
I'm using the Fluent API to configure the relationships between these classes.  The "multiple locations" aspect is simple enough and works with the following:
   HasMany(o => o.Locations)
      .WithRequired(o => o.Organisation)
      .HasForeignKey(l => l.OrganisationId);

I cannot however seem to find the correct syntax to define the relationship that allows the HQ location to be defined.  If there a flaw in the approach I'm taking, or am I simply missing the right syntax?
UPDATE
If I add the following to the Organisation configuration:
   HasOptional(o => o.HQLocation)
      .WithMany()
      .HasForeignKey(o => o.HQLocationId)
      .WillCascadeOnDelete(true);

Then Entity Framework no longer errors and my data loads in a shape that suits my needs.
However this allows a Location to be the HQ for more than one Organisation; which ideally I do not want possible.
Comment: No, the "Update" I added to the original post was the compromise I was left with when time ran out.
Comment: Did you solve it in the end?
Answer: In one-to-one or one-to-zero or one relationships Id should be same on both entities. This means that Organisation.Id must be same as Location.Id for HQLocation. And of course, it is not good design choice. What I recommend is to add property to Location to indicate whether it is a HQLocation or not:
public class Organisation
{
    public int Id { get; set; }
    public string Name { get; set; }

    public virtual ICollection<Location> Locations { get; set; }
}

public class Location
{
    public int Id { get; set; }
    public string Name { get; set; }
    public bool IsHqLocation { get; set; }

    public int OrganisationId { get; set; }
    public Organisation Organisation { get; set; }
}

Comment: This solution is something I will consider if no other options present.  However it allows any number of Locations to be tagged as the HQ.  My design requirements are for only one HQ per organisation. This is therefore proposing a different design as opposed to answering the question. That said....it wasn't me that down-voted; I appreciate your suggestion.


Server configurations for hosting MySQL database

Question: I have a web application which uses a MySQL database hosted on a virtual server. I've been using this server when I started the application and when the database was really small. Now it has grown and the server is not able to handle the db, causing frequent db errors. I'm planning to get a server and I need suggestions for that.
Like I said, the db is now 9 GB, and is growing considerably fast. There are a number of tables with millions of rows, which are frequently updated and queried. The most frequent error the db shows is Lock wait timeout exceeded. Previously there used to be "The total number of locks exceeds the lock table size" errors too, but I could avoid it by increasing Innodb buffer pool size.
Please suggest what configurations should I look for in the server I should buy. I read somewhere that the db should ideally have a buffer pool size greater than the size of its data, so in my case I guess I'd need memory gt 9 GB. What other things should I look for in the server?
Just tell me if I should give you more info about the
Answer: You could use the perl script named MySQLTuner to get some ideas of variables to tweak, and thus hardware to upgrade if necessary.
However you should understand the settings before modifying them or you risk aggravating the problem.
The script himself contains a very insightful tip:

*WARNING
      It is extremely important for you to fully understand each change
      you make to a MySQL database server.  If you don't understand portions
      of the script's output, or if you don't understand the recommendations,
      you should consult a knowledgeable DBA or even a system administrator
      that you trust.  Always test your changes on staging environments, and
      always keep in mind that improvements in one area can negatively affect
      MySQL in other areas.
  *WARNING

You'll find great articles on the subject on Percona's MySQL Performance blog, a list of books dealing with that subject and even screencast on their percona.tv website.
Answer: Have you examined the Lock wait?
You can do so by activating the InnoDB lock monitor:
CREATE TABLE innodb_lock_monitor(a int) ENGINE=INNODB;
Then tail your MySQL error log.
To disable the monitor drop the table.
HTH


With GIMP, how to crop a layer to the size of a different layer?

Question: I have multiple layers in my project. I need to crop one (call it layer A) to the size of another (layer B). Neither has the full size of the image.
I thought I would switch to B, Select All, switch to A and Crop to Selection. However, when I switch to layer A, the selection changes to match all of layer A so that Crop to Selection does nothing. What am I missing?
Answer: It seems that there is no native way to do this, as the "Select All" feature makes a selection over the whole image area, resulting in an layer sized selection whenever you change the active layer.
Anyway, there are some possible ways:

Workaround: If the layers does not contain transparency you can right-click on the layer in the layers dialog ([Ctrl + L]), and press 'Alpha to Selection' - On changing the active layer, the selection remains the same.
Make it native with a plugin: If there is transparency a plugin does the job. I found 2 different plugins from Pedro Gimeno Fortea and Kevin Brubeck Unhammer (I only tested the one from Kevin Brubeck Unhammer beacause it seems to be newer (2012)). To install it, put the *.scm file in your gimp scripts folder (%APPDATA%/.gimp-[versionnumber]/scripts), and restart gimp. Now there should be a button Select > Layer to selection (The one on the very bottom) which produces a selection from the layer area - On changing the active layer, the selection remains the same.
Comment: I took inspiration from your workaround. The template layer had some transparency, but I added a solid-coloured mask to it, selected the whole mask with *Fuzzy Select* and then, when I switched to the target layer, the selection remained the same.
Thinking about it, making a copy of the template layer, filling it which a solid color and doing *Fuzzy Select* would have worked the same. Hooray for workarounds! Thank you.
Comment: I thought of the _Fuzzy Select_ as well, but found it too clumsy (Without mask you would have to put the threshold to 255). For sure the best way is to install the plugin, as it adds the feature to gimp. - You're welcome
Answer: Both methods allow to crop a layer to the size of another even if they do not overlap. If they do, just skip the move steps.
If the first layer is an opaque rectangle:

Activate first layer (layer B) and Layer>Transparency>Alpha to selection. This creates a selection that exactly matches the layer.
If necessary:

Start the Move tool, and set it to Move selection (red square icon on the Move: line in the Tool options dialog
Use the Move tool to move the selection mask (ie, the "marching ants") and position it above the second layer.

Activate the second layer (Layer A) and Layer>Crop to selection

Another method (which will work even if the first layer isn't fully opaque):

Duplicate layer B
If necessary:

Position the layer B copy above layer A with the Move tool

If not fully opaque, bucket-fill with anything
Layer>Transparency>Alpha to selection
Delete the layer B copy
Activate the second layer (Layer A) and Layer>Crop to selection
Answer: Lets call the layer with the desired size and position SOURCE.
And lets call the layer we want to crop the TARGET.

Duplicate the SOURCE layer (Right click -> duplicate)
Move the duplicated SOURCE layer to be below the TARGET layer (drag to change order)
Hide all other layers except the duplicated SOURCE and the TARGET (using the eye icons)
Right click on the layers -> Merge visible layers

Select "Clipped to bottom layer"
Click "Merge"

Restore visibility of layers as it was

I also discovered that this flow can be used to export any part of the image defined by a layer. (This is was what I was after actually.)
For this you can select the "Discard invisible layers" in the layers merge dialog above.
Then you can do Canvas -> Fit canvas to layers and export from there.
Then hit Undo a couple of times to restore things to the state before the export.
Answer: I did it this way:

Select the layer in question (dotted frame appears)
Use 'select' tool, select an area just inside the layer edge
Zoom in to 800%
Manually expand the selection to pixel-match the layer
Crop to selection


How old is Mr. Mxyzptlk?

Question: Is there anything in canon (preferably referring to comics Mxyzptlk) that speaks to the age of this 5th-dimensional being?
Answer: In Superman: Whatever Happened to the Man of Tomorrow?, we learn that Mxyzptlk is 6000(ish) years old.

Mister Mxyzptlk: The big problem with being immortal is filling your time. For example, I spent the first two thousand years of my existence doing absolutely nothing.
Mister Mxyzptlk: Eventually, simple inertia became tiresome, so I spent the next two thousand years being saintly and benign, doing only good deeds. When that novelty began to fade, I decided to try being mischievous.
Mister Mxyzptlk: Now, two thousand years later, I'm bored again. I need a change. Starting with your death, I shall spend the next two millennia being evil!
Comment: Downvoted.
The OP asks quite clearly for something in canon; this story is completely out of canon, as it was written and produced for the Elsewhere line of comics which are all officially, explicitly, intentionally non canon.
Comment: @JackBNimble - Inert for 2000 years, good for 2000 years, mischievous for 2000 years.
Comment: Ah i only read what you put in quote blocks not the image, you omitted where he says he became mischievous next, so the way those blocks read he is only 4000
Comment: @JackBNimble - Blame Carrot. He added the (incomplete) block quotes. You just can't get the staff these days...
Answer: Probably impossible to state by virtue of his being a fifth dimensional imp.

The Fifth Dimension is an inter-dimensional reality that exists outside of the normally accepted space/time continuum.  - https://dc.fandom.com/wiki/Fifth_Dimension

Since he comes from a place with with different rules for time, he could be any age.
Comment: Do you have a better source for this than a fan written wiki?

How old is Mr. Mxyzptlk?


Is it possible to duplicate a UILabel so I can add it as a subview to multiple UIViews?

Question: I know that a view can only be a subview of one superview, so is it possible to duplicate the UILabel so I don't have to copy the set-up code or write a function to create it?
Answer: No, the UILabel class doesn't implement the NSCopying protocol. If you want to add the same view to all your views, maybe subclassing your custom view would be the best way to go.
Answer: As said by @starkhalo, UILabel does not conform to NSCopying. so you can not use copy method with UILabel.
Iphone docs for NSObject clearly says -
NSObject does not itself support the NSCopying protocol. Subclasses must support the protocol and implement the copyWithZone: method.
Answer: You can set up a separate XIB just for that label, and call [[NSBundle mainBundle] loadNibNamed:@"LabelNib" owner:self options:nil]; Set up the file owner of that nib to your delegate class, and make the proper connections. Now you can add the label to your view as many times as needed, and modify each one (with a for loop, for example).
Answer: The copy method is available by anything that inherits from NSObject so my first port of call would just be to try
UILabel *second = [first copy];

However, this might not work 100% as expected, some UILabel propertiesmight not get copied how you want. If not, you could try using NSCoding methods - encode the object and then decode it into a new object?
It might just be easier to do it by hand though ;)
Sam
Comment: As stated this does not work. You'll get an error like this:
`'NSInvalidArgumentException', reason: '-[UILabel copyWithZone:]: unrecognized selector sent to instance 0x7b959d0'`
Comment: Yep, lots of objects do that and it's really annoying:( My next suggestion to the OP was going to be create category that implements NSCopying and produces a new UILabel :) Unfortunately before then someone had provided a different answer that solved the problem :)


Correlation functions in cosmology

Question: I'm reading an article about Non-Gaussianity of Large-Scale Cosmic Microwave Background (link) and the authors write that the n-point correlation function of $e^{\varphi(x)}$ where $\varphi(x)$ is a random Gaussian field can be written as
\begin{equation}
\langle e^{\varphi(x_1)}\ldots e^{\varphi(x_N)}\rangle=e^{\frac{1}{2}\int dx dyJ(x)\langle\varphi(x)\varphi(y)\rangle J(y)}
\end{equation}
where $J(x)=\sum_i^N \delta(x-x_i)$.
I can't understand how to get this relation and what is its physical meaning.
Answer: It's perhaps more illuminating to check out the finite version. Let $X\in\mathbb R^N$ be a random Gaussian vector of dimension $N$, $0$ mean, and covariance matrix $C$ ie $\langle X_i X_j\rangle = C_{ij}$ with $C$ positive definite. All the statistics is captured by $C$. Let $J \in\mathbb R$, you can calculate:
$$
\langle e^{J^TX}\rangle = \int e^{J^T X}\frac{e^{-X^TC^{-1}X/2}}{\sqrt{(2\pi)^N\det(C)}}d^N X \\
= e^{\frac{1}{2}J^TCJ}\int \frac{e^{-\frac{1}{2}(X-CJ)^TC^{-1}(X-CJ)}}{\sqrt{(2\pi)^N\det(C)}}d^N X \\
= e^{\frac{1}{2}J^TCJ}
$$
(completed the square and integration variable translation)
To see the analogy better, you can rewrite:
$$
\langle e^{\phi(x_1)}...e^{\phi(x_n)} \rangle = \langle e^{\int dx J(x)\phi(x)} \rangle
$$
so you just need to formally set the dimension to the continuum and replace sums in the the dot product by integrals.
The importance of this is that generally you write $\mathcal Z(J) = \langle e^{\int dx J(x)\phi(x)} \rangle$ the generating functional as it gives you by successive differentiation at $0$ the Green's functions which correspond to correlators.
The characteristic of Gaussians is Wick's theorem, which says that higher order correlators are related to the two point correlator by a specific formula. This is how you can check whether a process is Gaussian or not.
Hope tis helps.

Correlation functions in cosmology


Ubuntu 12.10 No Wifi after updates

Question: My Wifi disappeared after 80 software updates package from Ubuntu. Im new to Ubuntu. Im using Acer Aspire 5742. The Wifi was there after the installation of Ubuntu but after I did the updates my Wifi no longer works.
Comment: what wifi card do you have? You can find out by typing the  command `lspci` into the command line and then pressing enter. In the output, look for a line with "Network controller" and include that in your post. Had a very similar problem with my "Broadcom Corporation BCM4313" today...
Answer: I had a similar problem, however I was able to solve it.  I cannot exactly remember how, but try using the code rfkill list all in the terminal.  I remember using that code, but I do not remember if I used any follow-up codes.  Hopefully that works, but if not the results you get from that might be able to help other, more experienced, ubuntu users to help solve your problem.

Ubuntu 12.10 No Wifi after updates


Mavericks - I need to be notified when a wifi network becomes available

Question: My university's wifi connection goes up at random times. It's faster, so I would want to be notified when it becomes available so that I can surf faster and I don't have to pay for mobile data that I consume while using my phone as a hotspot.
Answer: You could use Shell script in  a Applescript Application that checks the available  wifi list. And pops up a notification when the one you want is in the list.
The code is commented to explain how it works.
<code>on idle -- A on idle handler will run the code within it and then set the app to idle. Using little cpu. It will then repeat this every #n of seconds ( determined by its return number)
    set theWifi to "weehronetwork" -- the wifi SSID
    set theList to paragraphs of (do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s| awk '{print $1}'") -- get the wifi list
    if theList contains theWifi then

        display notification with title "The WIFI" subtitle (theWifi & "  IS BACK UP") sound name "Sosumi" -- display a notification.

    end if

    return 60 -- run again in #n seconds

end idle
</code>

Save the Applescript as an Application and check Stay open.

When you first run the App. and it displays a Notification, it will then be shown in the System preferences --> Notifications. From here you can determine the Notification type.

Note. I have used a sound in this code. But if you uncheck 'Play Sound for notifications' the sound will not play.
Comment: This is really something.
Comment: Thanks for this. What a great solution. Sorry for not having said Thanks earlier. :)
Answer: If the actual wifi extender is powered up at the times the connection is live & powered down otherwise, the phone ought to switch to it automatically, as soon as it's seen, same as if you just came into range after having been away.
If the wifi is on but not connected to the outside world, the only way to know if it's working is to connect to it & test whether you can 'see out'.
I'm not sure there's anything that could periodically probe to see if there's a viable connection, it's just assumed that if it's on, it's working.
If you mean the device currently connected to the phone's hotspot, rather than the phone itself, then someone smarter than me might have an answer regarding setting up the metric of each connection, but that's outside my knowledge-base
Comment: Yeah, I want to know how do do it in Mavericks on my Macbook Pro.
Answer: You can set the preferred order of wi-fi networks, but I am not completely sure if this will automatically switch you over since you're likely to have a great signal from your hotspot. Nonetheless, it's worth trying before going to a 3rd-party solution.
System Preferences > Network
Select your Wi-Fi adapter on the left
Click "Advanced…"
In the listbox on the Wi-Fi tab, you can drag and drop to reorder the networks listed. Make sure that your campus wi-fi is above your hotspot wifi network.


Is this the correct way of making a non-inverting optocoupler?

Question:
Requires to read 24 V input signal, and output to an Arduino as 1, at the same time it lights up the LED indicator. Is this circuit viable?
Answer: This way the Arduino input will float so the optocoupler needs to be pulled down through a resistor:

For other alternatives you can check: Optocouplers with non-inverting logic
Comment: Is it absolutely alright to put the load on the emitter side instead of on the collector pin? Results found from the internet were mostly on the collector side, just like NPN transistor should have the load on Collector side. Does optocoupler follow these theory that if load on the emitter side, aka common collector (or emitter follower)...the voltage on the emitter side will be 0.7Vbe dropped? (5 - 0.7 = 4.3V?)
Comment: In this case yes it is alright (otocoupler) since the transistor is optically controlled. However, for a simple bipolar transistor (not the optocoupler case) it would be difficult to saturate it when the load is at  the emitter side unless you use other components and this would be the case, for instance, of an all NPN bridge where you can use optocouplers to control the upper transistors. and for the voltage of the collector-emitter when saturated won't be a problem.
Comment: @KennyThum The reason it matters when using an NPN transistor is that what controls the transistor is the base/emitter voltage. So the emitter has to be lower than the base to make it turn on - and the collector has no such rule. With an optocoupler it's the anode/cathode voltage that controls it, so there's no such rule for the collector *or* the emitter.


How to remove files which do not end with ".c"?

Question: I have a directory which contains all the C programs. I have also compiled them at the creation time so as to check my code. There are a lot of programs nearly 100 of them. So I want a BASH script that would check whether the file ends with ".c". If it does then it does not do anything, which if it doesn't then it would remove them. Suppose one of my file name is "Hello.c" then I have named its binary during compile time as "Hello". So can anyone make this script for me?
Answer: You can use the -delete flag of find (first test with -ls)
find -not -name "*.c" -delete

If you do not want to use find, but only files in the current directory, you could do
rm !(*.c)

Make sure in bash that with shopt -s extglob the correct globbing is set. Additionally, if you have globstar set (shopt -s globstar), you can act recursively (for bash versions above 4):
rm **/!(*.c)

Comment: Can also add `-maxdepth 1` to the find to stop recursion.
Comment: `-delete` is not portable if that matters, you can use `-exec rm` instead.
Comment: even this works. clean and simple!!
Comment: If `rm !(*.c)` generates `event not found` in bash, it needs to be proceeded with `shopt -s extglob`.
Comment: As usual, recommendation to first run *without* `-delete` to make sure you didn't make any potentially disastroud mistake.
Comment: And how to combine it with another extension ?
Comment: If I remember correctly `rm **/!(*.c|*.h)` but I am not too sure
Answer: I always prefere find in such cases. You have not worry about special filenames and you may handle different filetypes. If you like to delete files only, you should add -type f to your options. So my favorite solution is:
find -not -name "*.c" -type f -delete

But be careful. Testing such commands is always a good idea.
Answer: Activate ksh extended wildcard patterns with the command shopt -s extglob (you can put this in your ~/.bashrc). Then the pattern !(*.c) matches all files in the current directory except the ones that match *.c:
rm !(*.c)

This is pretty dangerous as it deletes .txt files, .h files, etc. A less drastic command would be
rm !(*.*) *.o

This still deletes README, Makefile, etc. You should maybe only delete executable files:
find . -type d -prune -o -type f -perm -100 -exec rm {} +

Shorter, if your find supports it:
find . -maxdepth 1 -type f -perm -100 -delete


possible for all outbound smtp to run through proxy?

Question: Is it possible to setup my centos 6.5 so all outgoing port 25 is run through a proxy. I have incoming smtp/port 25 coming to my mail server through HAproxy but i would like the outgoing to do the same so the receiving mail server sees the connection coming from my load balancer IP.
i have been searching the net for last hour but can't find any examples or setups.
Answer: While it might be possible,  make sure your mail server identifies itself using the name assigned to your haproxy server.
By design SMTP is resilient to network and server failures.  I can't see a good use case for putting an email server behind haproxy.   It might make sense to put and IMAP or POP server behind haproxy.
If you have a single email server, then you can do what you wish much simpler with iptables rules.  If you have multiple email servers, each should have a unique IP address.  These addresses should have DNS entries that pass rDNS for the domain name they identify themselves as.  The mail servers can (usually)  use a domain name different from that of the host they run on.


Why not use evaluation metrics as the loss function?

Question: Most algorithms use their own loss function for optimization. But these loss functions are always different from metrics used for actual evaluation. For example, for building binary classification models, log loss is normally used as the loss function, but accuracy or F1 score is used for evaluation. loss functions and evaluation metrics are not always highly correlated. So I wonder why we don't just use evaluation metrics * -1 as the loss function.
Comment: "Most algorithms use their own loss function for optimization." It would be pretty strange if an algorithm didn't use its own loss function for optimization. // More to the point, one might wonder whether accuracy is an informative statistic to measure at all. https://stats.stackexchange.com/questions/312780/why-is-accuracy-not-the-best-measure-for-assessing-classification-models/312787#312787
Comment: [Here](https://stats.stackexchange.com/questions/534034/can-log-loss-be-an-evaluation-metric-for-classification-models?rq=1), I argue in favor of using the loss function as the evaluation metric, so you're onto something in wondering why the loss function and evaluation metric would not coincide.
Comment: "Log loss is normally used as the loss function" sounds vague and circular.  Would you mind elaborating a little?
Answer: Maximizing accuracy (percent of correctly examples) is the same as minimizing error rate (percent of incorrectly classified examples). For a single observation, the loss function for the error rate is always 1 (if the predicted class does not match the label) or 0 (if the predicted class matches the label). Accordingly, the derivative of this function is always 0 except at a negligible set of points where the derivative is infinite. This excludes any gradient-based optimizer from training a model, because the model parameters almost always have an update step size of 0, except for the countable number of times when the step size is infinite.
Giving up gradient information is not a good trade, because gradient descent, Newton-Raphson and similar are very effective at finding solutions which also have high accuracies, even though accuracy was not optimized directly. Examples include neural-networks and logistic regression.
Not all models are trained with gradient information. One prominent example is tree-induction methods such as random forest (however, not all trees are free of gradients; gradient-boosted trees use gradient information). These tree-based models search for good splits by optimizing some criterion, usually gini impurity, or information gain. While these models aren't optimized using gradient information, they also aren't optimized using accuracy. I suppose hypothetically you could use accuracy as a the split criterion.
Answer: It's because accuracy is not a proper scoring rule. You will want to consider the cost of misclassification.
Here are some more useful links:

Example when using accuracy as an outcome measure will lead to a wrong conclusion.
Use of proper scoring rule when classification is required.
The statistical part of prediction ends with outputting a distribution.

And here the excellent posts by Frank Harrel:

Classification vs. Prediction.
Damage Caused by Classification Accuracy and Other Discontinuous Improper Accuracy Scoring Rules

Here's a counter-example where using accuracy as loss function was actually better than using the Brier-score.
You'll find that this answer is not definitive, and it depends on your actual problem if using evaluation metrics is a valid choice. I suppose it depends on the answer to the question "Does using a surrogate loss that also is a proper scoring rule reflect the learning goal of the problem well?"
Comment: I think it might help to explain why training should use a proper scoring rule.  What goes wrong if we train with something that is not a proper scoring rule?  What are the benefits of training with a proper scoring rule?  Granted that accuracy is not a proper scoring rule, this answer still doesn't explain why we can't use accuracy as the loss function during training.  I think the answer might be stronger if it were [edit]ed to explain these points.
Comment: While accuracy is not a proper scoring rule, optimising a proper scoring rule does not necessarily maximise accuracy, so if accuracy is your performance measure of interest, proper scoring rules are not a panacea.  See my answer here, https://stats.stackexchange.com/questions/312780/why-is-accuracy-not-the-best-measure-for-assessing-classification-models/538524#538524 , where using a proper scoring rule makes a sub-optimal model choice.
Comment: What about penalized/regularized estimation? I suppose it rules out proper scoring rules (?), yet it often works better than unpenalized methods.


Plurisubharmonic functions on Kähler manifolds, intuition?

Question: As the question suggests, what is the intuition for working with plurisubharmonic functions on Kähler manifolds?
Answer: In fact plurisubharmonic functions are invariant under holomorphic transformation, so we can define purisubharmonic functions on any Kähler manifolds and in general on any complex manifolds.
The main intuition is in positivity theory. In fact, Lelong showed that if $u$ is a plurisubharmonic function then  $dd^cu$ is a closed positive current with coefficient as Borel measure.
Pierre Lelong, Fonctions plurisousharmoniques et formes différentielles positives. Gordon and Breach, 1965
One of the applications of Plurisubharmonic functions is in the study of degenerate complex monge-ampere operators for finding canonical metric (Kähler-Einstein metric) on singular varieties. In fact the wedge product of two currents is not well defined in general. Bedford and Taylor defined $(dd^cu)^n$ for $u\in \operatorname{PSH}(\Omega)\cap L_\text{loc}^\infty(\Omega)$. This is highly nontrivial, since one cannot in general multiply
distributions.
Answer: Another motivation for the study of plurisubharmonic functions is the following informal principle, stated in many places: plurisubharmonic functions play the role of convex functions in complex geometry.
Here is one formula to motivate this principle. If f is a smooth function on a Kähler manifold, then the Levi form of f evaluated on the pair of vectors (u,Ju) is equal to the Hessian of f (thought of as a quadratic form) evaluated on u plus the Hessian of f evaluated on Ju. Here u is a tangent vector and J the complex structure.
Hence convexity in the Riemannian sense implies plurisubharmonicity.
Another instance of this principle: the sublevel sets of a smooth psh function can be made convex locally (in a chart) by a holomorphic change of coordinates.
These ideas are well explained in Chapter 2 of Cieliebak and Eliashberg's book "From Stein to Weinstein and back". See also "Function Theory on Manifolds Which Possess a Pole" by Greene and Wu for a different viewpoint.


In iTunes Store, how can you view the full name?

Question: When I'm looking in the store (iTunes U, specifically), many of the titles are cut off, ending in "..."  I thought the standard "hold the cursor over the text" would show a little window with the whole name, but no.  The only workaround I found was making the iTunes window wider.  Any way to make the column wider, or otherwise show the whole name?  (There's no way to change the column width by dragging at the top, like you would in your iTunes library).
Answer: If you press the small 'i' button to the right of the description column, the information is shown again, in a pop-over box.  This does seem to show the full name.
Comment: If you upload the screenshot to another image hosting company then upload it here, ping me "@bassplayer7" or flag it and someone should edit it in.
Comment: Thanks @bassplayer7, much appreciated -- looks like I have the reputation to sort this out myself now, though :)


which protocol is invoked first by routers ? routing (routing table) or ARP?

Question: I have a question regarding the internet layer of the TCP/IP model: When a data frame is sent by a client to a server located on another network, we know that the routing tables and the ARP protocol are used to "find" the routing path and also route the message to the right machine using the MAC address... But in what order are these two "protocols" used by routers? ARP first then routing table? Routing table then ARP request? Or both at the same time? I don't know if I'm clear enough... Thanks for your help!
Comment: Routing protocols do not route.
Answer: The routing (or forwarding) table is not a protocol. It's a mechanism to implement the network layer function(s).
In order to route an IP packet, you first need to know which interface you will be sending the packet out of and then which gateway (next hop) to use.  That is the main purpose of the routing table (and other mechanisms): to determine which outgoing interface will be used and where to send the packet.
Once you have decided which interface to use, you can encapsulate the data in the data link layer frame with the destination MAC address.  If you don't know the destination address, you use ARP to learn it. ARP is used to find the data link layer address (MAC) for a given network layer address (IP).


voting entity reference field

Question: I have two content types, game and player. Each game can have a number of players assigned to it. I would like to have the capability to give votes to each player in a game. What are some ways to do this? Is there documentation, or blog posts with detailed examples?
Answer: It's hard to recommend something without more specifics. How are you imagining the way people can vote? Are they voting for their favorite player for that game, and can only vote for one player per game? Do they give "thumbs-up" to as many players as they want? Do they assign X out of 5 stars to a player?
The Fivestar module is very popular, and has pretty good documentation.
The Rate module is also popular, has a lot of different ways of voting, and there is a YouTube video showing how to use it.

voting entity reference field


What is the strongest weapon in Kid Icarus: Uprising?

Question: I want to know the strongest weapon is in Kid Icarus: Uprising. My guess would have to be either the Midnight Palm, the Cutter Palm, the Ninja Palm, the Samurai Blade or the Ogre Club.
Answer: There is no one strongest weapon. Different weapons are stronger in certain aspects though.
I've been working on recording statistics for each weapon in the game on Icaruspedia, so you can view specific values there.
Here are some of the highlights:

The Ogre Club has the highest melee damage
The Magnus Club has the second highest melee damage, but also has the shortest range of any weapon.
The Flintlock Staff has the highest damage at a long distance, but the weakest melee damage. It also has the fastest projectiles.
The Earthmaul Club has the longest range in the game, followed by the Laser Staff.
Claws typically have the highest rate of fire, but certain blades and palms also have rapid fire.
Cannons' charged shots can often hit multiple foes, making their total damage against multiple foes higher than single-target weapons with higher damage.
Answer: There is no solidified "best weapon" other than "Daybreak" which is only in multiplayer and is a on use OHKO weapon. The best weapon depends on your play style.

If you are good with homing, but is also good with melee,use bows. Bows gain more power the farther the shot travels to hit the target within range if that makes any sense. Some bows have a number of shots per second wise, bad continuous fire, such as the "Palutena Bow" that rely on dash, charged, and dash charged shots. On the other hand, some bows have ridiculous homing with charged shots, but sacrifice the usual homing in continuous fire for extremely fast and long periods of semi-weak shots. An example of that kind of bow is the "Phosphora Bow". The rule of distance=power still applies for these bows too.
If you are good with fast movements and dodging, along with extremely fast rapid fire, but no homing, and good melee combos, then claws are for you. Claws, while lacking the range of bows and staffs, make up for it in speed, evasiveness, and melee, and powerful range depending on what type of claw. All claws make you faster, and more lightweight and prone to knock-back. But, play with them right and you will destroy everything.
Arms are weapons that have horrible range (as in distance, their shots can potentially be extremely powerful) but make up for it in good melee attacks and combos. Arms are the jack-of-all-trades weapon, prone to being anything depending on the user and its powers and attributes.
Staffs are the sniper weapon. While most staffs are garbage in melee, some, such as the "Orb Staff" are inclined towards melee and range. Depending on if you are more of a sniping type or both melee and sniping, you might want to consider this weapon class.
Cannons are the most powerful ranged weapon. Their shots bounce off of other surfaces, and can hit multiple targets due to the fact that it can explode. You take a bit of recoil sometimes however. Cannons also have an ability for decent melee. Also, cannon make you very slow. So if you are the slow, but powerful type, this is your weapon class.
Clubs on the other hand are the exact opposite of cannons. Clubs are strictly for melee. They do not have rapid fire, only charged shots. Catch is though, the charged shots are extremely powerful when they hit. Clubs also slow you down considerably. It is tricky to use, but can be very effective.
Blades are also jack of all trades, but this time, they have equal range and melee ability. As you start out with a blade, you already know how they handle.
Palms are an almost no-weight weapon. They have good homing, and are good for melee, but usually have a shorter continuous fire range. They can be fast or slow. Depending on if you prefer melee over ranged but want to keep range in case, palms are for you.
Orbitars do not weigh anything, and is a ranged based weapon that can perform melee poorly or very well depending on the type of orbitar.

Note that all of the above may vary due to the particular weapon and it's attributes and powers.
Answer: Statistically, clubs do the most damage without modifiers. HOWEVER, almost any weapon can be stronger than Clubs if it has the right modifiers.
The "strongest" weapon depends largely on your play style. My favorite is my Palutena Bow, due to speed and range. However, if you prefer to move quickly, Claws are the way to go (the Brawler Claws provide the highest movement speed without any modifiers), and by fusing to them with weapons with higher damage output modifiers, you increase the damage output of the Claws through the passing of the modifiers.
Comment: The Magnus Club is not the strongest at long ranged or melee damage. Fists aren't a weapon type (although I'm guessing you mean Claws). You can't modify the inherent attributes of a weapon through fusion, only modifiers and damage rating. Also you can never fuse a weapon to that same type of weapon in a single fusion.
Comment: I never said that you could modify the inherent attributes. The Magnus Club does have the most potential for melee as far as I am aware, AND I never said that it would take a single fusion. I meant to say that it would take a while, but it really isn't necessary as a simple Google search would have given the fusion mechanics.
Comment: Oh ok, it sounded like that was what you were saying in the middle paragraph. I recommend editing "Fists" to "Claws" and possibly making what you meant about fusion a little clearer. The site will let me change my vote if it's edited too.
Comment: I probably do best with the palms and blades...
Answer: The Samurai Blade and the Aurum Palm are the strongest weapons due to the fact that the Samurai Blade has a quick melee combo attack rate.The Aurum Palm has the quickest charge shot which fires a charge shot per sec.
Answer: Trust me when I say this: The best weapons in Kid Icarus Uprising is the Samurai Blade and the Lancer Staff. If these weapons are too slow or whatever I suggest the following: Their are six slots for modifiers so I suggest these:
Lancer Staff: Overall Defense+8, Shot Homing+8, Stamina+8, Evasion+8, In-Peril Attack Boost+8, Speed+6
Samurai Blade: Overall Defense+8, Dash Cont Fire+8, Stamina+8, Evasion+8, In-Peril Attack Boost+8, Speed+6
*Note: Although these are hard to get they are the sure key to victory :)
Comment: Hello and welcome to Stack Exchange. Thank you for your answer; however, as it currently is the main crux of your answer seems more opinion than actual fact. Please consider editing your answer with a better explanation why those two weapons are superior to everything else in your opinion. Thanks!
Comment: Those are impossible stats.
Answer: Aurum palm is fast charged, aurum blade is pretty sweet, aurum orbitars and bow...
Yeah, I use aurum stuff a lot.
But good non-aurum gear is: wolf claws, have decent speed and set fire to enemies very commonly.
Laser staff: second best range and very powerful, not too shabby charge time, ok melee.
Beam claws: no additional effect (other then modifiers), but pretty good all around.
Stealth claws: mostly good for dark VS light, free for all is impossible to hide from all the others, and the invisible shots make it perfect for RKO out of nowhere moments.
Anyhow, have fun!
Answer: Well to be vauge the guardian oribitars have an ability only one other weapon has. It ranks 2/12 in the craft list so any 1+1 should do the trick. Guardian orbitars have charge shots that stay put rather than traveling. This makes it a great shot nullifier, even w/o the shot cancellation modifier. The back charge shot by far outranks most weapons in strength. It doesn't dicipate when hit. It's like a cannon but with more attack area. A plus 8 speed modifier would make you unstoppable. Grinding treasure and hearts in ch: 24 is a great method to buy weapons. Guardian orbitars are also well versed melee weapons. If given the right modifiers you'd be a god.
Answer: Best clubs: Magnus, Hewdraw and Capricorn
Best orbitars: Eyetrack, Arurum, Fairy and Gemini.
Best arms: Compact, Kraken and Taurus
Best palms: Ninja, Cutter, and Violet
Best bows: Aurum, Angel, and Phosphora
Best claws: Tiger, Brawler and Raptor
Best blades: Samurai, Aurum and Gaol (maybe)
Best staffs: Rose, Thanatos and Dark Pit
Best cannons: Doom and Predator


"When is the next release of inflationary tokens?"

Question: "When is the next release of inflationary tokens?"   The inflation rate is 4.73%, when do those tokens (the 4.73%) get distributed?  When is the next distribution, date and time?
Answer: Before being distributed to the bakers, rewards are frozen during 5 cycles (approximately two weeks). These distributions happen once per cycle (so approximately every 2.8 days).


Fast alternative for Adobe Reader on Windows

Question: Can anyone recommend me a good alternative for Adobe Reader ? I need a software that is fast and light which works on Windows.
Comment: Google Chrome is the fastest I can think of without having any additional bells and whistles.
Comment: check Foxit reader (http://www.foxitsoftware.com/Secure_PDF_Reader/)
Answer: I've been using SumatraPDF for a few years now. It was my replacement for Foxit reader when I became annoyed with that product for a few reasons (I won't go into it right now).
SumatraPDF supports various formats if you are looking for more than just a PDF reader. For example it supports:

PDF, eBook (ePub, Mobi), XPS, DjVu, CHM, Comic Book (CBZ and CBR)

It runs on Windows and like Adobe Reader, it is free. It is also very lightweight (just under 10 MB once installed) and has a very fast startup time (less than a second for me, and rendering ebooks usually takes less than 3 seconds).
Here is a screenshot:
Comment: I'm curious. Why did end up annoyed by Foxit Reader?
Comment: If I recall correctly, it wasn't the product itself (I was quite happy with it; much better than Adobe Reader in my eyes). However, they sneakily added the Ask Toolbar in their installer (and updater, which is where I first got caught). Basically, they word it unintuitively forcing you to opt-out rather than opt-in. And it is done on a screen with check-boxes for everything except the toolbar (for that you had to click a decline button, which looks like you are declining installing foxit reader altogether). Small nuisance, but please don't try to trick me into installing it.
Comment: This was how it was a few years ago. It could have changed sinc ethen. And yes, I'm complaining about a good product I don't have to pay for. Still, it is a bit shady how it was done and I will look for alternative products when in that scenario. Found an old post that someone else noted the same issue: http://downloadsquad.switched.com/2010/06/29/foxit-updates-free-pdf-reader-to-v4-but-watch-out-for-adware/


Producing Voltage Spikes from a bench top power supply

Question: I need to test a tantalum capacitor(check if it gets shorted for a spike higher than the rated voltage) and I'm planning for providing voltage spikes to the input connector from a bench top power supply. Is there any technique apart from switching the supply ON and OFF quickly to provide a voltage spike?
Comment: That test doesn't test short circuit capability.
Comment: Sorry, I should have been more clear. I'm trying to check if the tantalum cap gets shorted for a spike higher than the rated voltage.
Comment: You need to be able to control spike height (voltage) and spike width (duration) and shape. Also consider that in normal use the capacitor will have a standing DC voltage (say 2/3rds working voltage) with the spike voltage superimposed.  Just switching the supply on and off won't be a repeatable test
Comment: You can easily build an impulse generator circuit from a few passive components (in conjunction with your PSU) - do a Google search, particularly for 8/20us, as this is a common waveform for surge testing.  You can tweak the values to get the response you want.
Comment: Be careful with it: Tantalums can become spectacularly pyrotechnic. Far better to actually heal the device by using a higher voltage than it will see via a 1k or so resistor.
Answer: It is typical that when you devise a particular testing scheme you have to design and configure the test setup as well. That could be the use and integration of ready made lab equipment or you could be building you your own test sets. (Note that it is not uncommon to use a combination of these approaches, for example, using a pulse generator to trigger a high voltage driver circuit that you build. Another example may be a ready made MCU board like an Arduino to activate a driver/monitor circuit).
Answer:

simulate this circuit – Schematic created using CircuitLab
Values to get the results you want, by experimentation and observation, or by calculation if so inclined. It's foolish to knowingly exceed the ratings of a type of capacitor known for spectacular failures - you should concentrate on clamping/dumping any such pulse so that the capacitor does not see it - using any part beyond its ratings is a poor design choice and subject to any manufacturing change which meets the rated behavior but changes the beyond-rated behavior.
Depending on what you actually want/need you can add additional resistance in series with C1 or in parallel with Q1
Comment: Thanks for the circuit. I wanted to confirm if the voltage spike in the power supply would have damaged the cap. Hence testing it


Why does heat transfer faster when two or more modes are used?

Question: When two metals at different temperatures are allowed to attain equilibrium in vacuum through radiation, theoretically they should attain it faster as compared to when the same metals at different temperatures are in vacuum connected by a metal rod. This reasoning is obvious because the same amount of heat is being transferred. In the first case all the heat travel at speed of light but in the second case some of heat travel at c while the rest travel very very slowly (through metal rod). Even though in the second case the two process occur simultaneously it should take more time because compared to speed of light conduction is an extremely slow process.
So we cannot say it with certainty that two modes of heat transfer are better than one Or can we?
Comment: ...How are you measuring your heat transfer though?  Generally you would be measuring heat transfer in terms of watts or watts per unit area.  Both of those measure energy per unit time.  The "fastest" mechanism depends entirely on the situation.
Comment: We already measure heat transfer in terms of time for these situations.  It's not really clear what you're trying to get at here, with radiation somehow being "faster".
Comment: Radiation being faster means heat transfer occurs fastest through radiation (infrared)
Comment: I only estimated. "The "fastest" mechanism depends entirely on the situation" how so?
Comment: Most heat transfer equations are based on $Q$ (or $q$), generally measured in $W$ or $\frac {W}{m^2}$.  Both of those measure energy _per time_.  If the same amount of heat is being transferred, then there's no overall speed difference between either method, because the change in energy over an amount of time is the same for both.
Answer: Technically, your metals do radiate thermal energy at the speed of light (in a vacuum), but that doesn't mean that they transfer thermal energy rapidly.
If you shipped something by a Ferrari (compared to a truck), you'll move it faster with a Ferrari, but you'll move a lot more with the truck.
Radiation is actually a relatively slow way for objects to lose heat and is only significant for very hot objects.
The rate of transfer of heat for objects in a vacuum is
Q ∝ εδT⁴*

where ε is the emissivity (which is very small for metals because they are shiny (0.04 for copper)), δ is a very small constant (5.670367(13)×10−8 W⋅m−2⋅K−4) and T is the absolute temperature. You can see that the Q value for heat flux will be very small.
The absorption of heat is, for the same reason, very slow for metals.
Now consider conduction:
Q ∝ k∆T*

where k is the thermal conductivity (401 W⋅m−1⋅K−1 for copper) and ∆T is the difference in temperature.
The two metals will almost certainly achieve equilibrium much faster with a metal rod between them not only because conduction is much faster and much more effective but also because the metal rod does not hinder radiation significantly.
*Surface area and distance left out because there's not enough info and because they doesn't affect the conclusions.


What are the types of data that are stored on the Cardano blockchain?

Question: Is anything other than blocks which contain zero or more transactions, stored? Is e.g ledger state stored, is there anything special added at epoch boundaries?
Answer: Ledger state is not stored on the blockchain, but if you start with the correct initial ledger state and apply all blocks, in the correct sequence, from genesis to the current tip, you can recreate ledger state.
The things stored on the block chain include (may not be a complete list):

Blocks.
Transactions.
Stake pool registration certificates.
Stake pool parameter changes.
Stake address registrations certificates.
Staking delegation certificates (basically a special part of a transaction).
Proposals and voting for protocol parameters changes.

Things that are part of ledger state that is not stored on the blockchain (may also be incomplete):

The current UTxO state.
Current amount of ADA delegated to each stake pool.
Which stake address is currently delegated to each pool.
Rewards account balances for each stake address.
Current protocol parameters.

is there anything special added at epoch boundaries?

For the first Byron era there was an Epoch Boundary Block, but for all eras after that, there are no Epoch Boundary Blocks.
Comment: Unfortunately there is not a single type. The main complication is that all the types you mention are unique for each era (eg Byron, Shelley, Allegra, Mary, Alonzon, Babbage etc).  IMO this is an implementation detail that leaks out of `cardano-api`. For each era `Block` is a product type (ie a struct) with fields for transactions and all the other components. The current best way to access this is via `cardano-api` in the `cardano-node` repo.
Comment: A follow-up question: given that Cardano is written in Haskell, is there an ADT somewhere that represents the single item that goes on the chain. Something like `data Block = Txs ... | StakePoolAction ... | Proposal ...`?
Comment: I think this answer is partly wrong then: https://cardano.stackexchange.com/questions/1977/how-is-the-active-stake-of-a-stake-pool-calculated/1993#1993. It says "Data captured by the snapshot is stored *on-chain* as a part of the ledger state", for me that sentence implies that ledger state is stored on-chain as well.
Comment: Maybe its the other answer that is wrong. Some (but not all) parts of ledger state are available indirectly on chain. For instance, if you extract all the stake delegations from the chain, you can reconstruct the stake distribution for an epoch, but the stake distribution for an epoch is not directly stored on chain. The reward accounts for all stake addresses can be reconstructed by playing back the block chain, but the reward account balances are not on chain,
Comment: Also the full ledger state is **HUGE** . When stored on disk (`db-sync` actually does this) in a relatively compact form a single ledger state snapshot is about 2 gigaybtes in size. If that data was stored on chain, the chain would be significantly bigger than it is.
Answer: On the transaction you can store some (little metadata)
But a blockchain is not a distributed database.
usage of such feature is dependente on your use case.
Example:
I want to have in the blockchain all repair information of my car.
I'd attach to the transaction a hash that represents data on an "open database" so the record if changed no longer has the hash that was stored on chain.
then your car has its own wallet and anyone can see it's repair history...with confidence it's not faked


build a road network

Question: I have various number of tracks which represents different roads. Each track represent one road. I have loaded this gpx file into my postgres.
Now my problem is how am I going to build a network between all these roads, in order to be possible to find the shortest path from any track point to any other track point. Below here you can see an image of my 4 roads.

I have already installed pgrouting and postgis. I have already done something by creating a source and target column and loaded them with data using assign_vertex_id(). The thing is that the network is not being build properly, such as I can only go from a start point to an end point of the same road rather than of different roads. Any suggestions how can I build a proper network between all these roads?
Answer: This is an old question, but pgRouting now have functions to help you build the network from inside the database.
http://docs.pgrouting.org/2.0/en/src/common/doc/functions/node_network.html#pgr-node-network

build a road network


Autodesk sketchbook won't export

Question: I'm using the mobile pro edition, (cheaper than the tablet pro edition), and when I open the inbuilt gallery, I can tap on the drawings to edit them, but not select them to export, delete or duplicate them. If I long-press on a drawing it will do nothing until I let go, then it will open for editing g as if I had tapped it.
Answer: That's the usual behaviour since they changed the export feature some time ago. When you tap an image from the gallery, it opens full-screen but not in editing mode right away. In this view, click the share icon on the action bar (the three circles connected by two lines) and choose "Share as __" for whichever format you want to export as.
After a brief pause, it'll give you a share menu listing apps you can share with, and the top item on this menu is "Save to device", with an icon of an SD card. Instead of launching another app to share with, this will just save/export a file in your chosen format.
Comment: Mine doesn't open in the full-screen non-editing view when I tap it, it opens full screen but with the little circle you tap to get the brushes and things. My gallery has the thumbnails of the drawings, and then at the bottom some buttons: a plus which creates a new drawing, 6 circles with a plus which opens up a file manager to import a picture, 6 circles with an arrow going away (export i think) which tells me to "select an image", two pluses (duplicate i think) which gives me the same warning, and a trash can, again tells me to select an image.

Autodesk sketchbook won't export


How to enter a date in Google Spreadsheet without hyphens or slashes

Question: Is there any way to enter a date in a Google Spreadsheet without having to type hyphens or slashes?
Comment: Are you looking for a datepicker-type widget or do you mean you just want to enter everything in DDMMYYYY format and have the sheet parse it?  If it's the former, see http://webapps.stackexchange.com/questions/17238/adding-a-datepicker-in-google-spreadsheet
Comment: In principle, yes. If you're good in mental arithmetics, you can figure out the number of days that passed since December 30, 1899, enter that number (e.g., 42559) and format as a date. But perhaps you'd like something more practical. What practical date format, without hyphens of slashes, do you have in mind?
Comment: What signal will you use to tell Google Spreadsheets that you're typing a date?
Comment: Very good question. I also have this question. For example, if I want to enter 20231203 and it automatically be converted to 2023/12/03, then what should I do? None of the answers or comments pointed out answer to this question.
Answer: Yes, like this:
July 13 (will default to current year), or July 13 2016.
Both will register as a date value.
If your locale is not English, you might have to use a different format and/or month name.
Once you have entered something that is recognized as a date in a cell, you can double-click the cell. This will open a date picker, which allows you to select a different date.
Or, as @jonsca suggests, add data validation to the cell to get a date picker.


Having bit of Oil problem

Question: I have a 2000 Ford Mustang,the oil light came up, so I thought it's time to put some oil in it. I did that and my oil light still says on. I am feeling low as my car won't start. Any clue what could be wrong?
Answer: The oil light is not a tool to tell you when to put oil in. The oil light is a warning that something serious is wrong.
Oil is used to lubricate the engine and must circulate while running. The light indicates there is insufficient oil pressure in the system to prevent damage. If you did not shut the engine off immediately after the light came on, you likely caused serious damage to your engine.
There are a few things that will cause low oil pressure (light to turn on).

Low/no oil in the engine - If there isn't enough oil in the pan for
the pump to pick it up, you will lose pressure.
Bad oil pump - these can go bad, typically if the engine is worn or
poorly maintained.
Poorly maintained or worn engine - engines with bad bearings and/or
sludge build up can have low oil pressure.
Defective oil pressure sending unit - it is possible the device that
monitors oil pressure is bad.

If the light stays on, don't run the engine, and have it towed to a shop so a mechanic look at it.

Having bit of Oil problem


Fouls by the goalkeeper when in possession of the ball

Question: Is the ball considered to be in play or out of play when the goalkeeper has possession? What should be the restart if the goalkeeper commits a foul/misconduct when he has the ball in his hands?
Answer: The goalkeeper having the ball is just like any other player having it. The ball is in play.
The Laws clearly state when the ball is out of play:

The ball is out of play when:

it has wholly passed over the goal line or touchline on the ground or
in the air

play has been stopped by the referee

it touches a match official, remains on the field of play and:

a team starts a promising attack or

the ball goes directly into the goal or

the team in possession of the ball changes

and

The ball is in play at all other times when it touches a match
official and when it rebounds off a goalpost, crossbar or corner
flagpost and remains on the field of play.

If the goalkeeper commits a foul while holding the ball it's treated like any other foul. Depending on the offence it would likely result in a penalty or indirect freekick.


How to validate asp.net Identity from Winform

Question: I am new to ASP.NET and have created an MVC 5 ASP.Net 4.5.2 solution with a web site or web app, a MSSQL DB and a WinForm.  I used the Contoso University template as an example found > here. <
The winform can connect the DB and the Web App can create user identities.
How do I validate a user identity from the WinForm?  I can access dbo.ASPNetUsers table in MSSQL.  Perhaps I use Client Application Services or WCF or what?  Any input even on what to google would be appreciated.  The Client Application Services Walk Through found here doesn't seem to apply to VS2015/.Net 4.5+ but is the best resource I have found so far.
Comment: You can take a look at [this link](http://stackoverflow.com/a/20957898/3110834) but I think it's better to expose some authentication and authorization service and use them.
Answer: You can create a new method in WCF to validate your users if it does not exist already and can call it in the same way as you are calling it in web application. If user is valid then you can set user's identity in a static variable in window application. static variable will sustain that value throughout the application. When user logs out the make that variable to null.


Is there a difference in interpretation between $Y|X = m(X) + \epsilon$ vs. $Y = m(X) + \epsilon$?

Question: I understand that $E(Y|X)$ and $E(Y)$ are different, but difference sources, when $Y$ is a function of other random variables such as $X$, use $Y|X$ and $Y$ to describe this relationship. I'm not sure if this is a notational thing, but does something like $Y|X = m(X) + \epsilon$ and $Y = m(X) + \epsilon$ (in the context of modelling $Y$ with some function of $X$ plus random noise) have different interpretations? Assuming $X,Y,\epsilon$ are random variables.
Answer: There is actually no such object as $Y|X$ --- whenever this notation appears, it is an abuse of notation which operates as shorthand for specifying the conditional distribution of a random variable conditional on another random variable.$^\dagger$  Thus, the statement $Y|X = m(X) + \epsilon$ actually doesn't make any sense; the conditionality notation $|X$ is used only in the context of stipulating the distribution of a random variable, not its functional relationship to other random variables.  In a regression model, you would always say $Y = m(X) + \epsilon$, not $Y|X = m(X) + \epsilon$.
When you are referring to the distribution of either $Y$ or $\epsilon$, you could refer either to the marginal distribution or the conditional given $X$.  In the context of regression analysis, analysis is done conditional on the explanatory variable $X$, and so it would be usual to refer to the distribution conditional on this. The notation $Y|X$ operates as shorthand for specifying a conditional distribution.  For example, the statement:
$$Y|X \sim \text{N}(m(X), \sigma_\epsilon^2),$$
is actually shorthand for the conditional distribution:
$$p(Y=y|X=x) = \text{N}(y|m(x),\sigma_\epsilon^2).$$

$^\dagger$ Strictly speaking, it is possible to create a new object $Y|X$ which is a mapping from the range $\mathscr{X}$ to a set of random variables on different probability spaces, each conditional on the stipulated value of $X$.  In most cases we do not want to bother with this, since the notation is just used as a shorthand for stipulating a conditional distribution.
Comment: An example of $Y|X$ appears at the bottom of [page 12](https://www.stat.cmu.edu/~cshalizi/mreg/15/lectures/03/lecture-03.pdf), I assume I can ignore the "$|X$" in this case? In general, $Y|X$ should only occur in the context of referencing a conditional probability density or mass function for $Y$ given $X=x$?
Comment: Yes, I would just ignore it.
Answer: In my opinion, the use of the equality makes dependence on $X$ explicit.  The only place I have seen notation like $y \vert X$ is when the distribution of $y$ is being discussed.  You see this frequently in Bayesian models like
$$ y\vert \mu , \sigma \sim \mathcal{N}(\mu, \sigma) $$
This notation tells me that there is a prior for $\sigma$ and that the distribution of $y$ depends on whatever $\sigma$ is drawn from the data generating process.
In any case, I don't see much difference between $y = $ and $y\vert X = $.


Is there any current and/or upcoming technology that alerts Air Traffic Controllers in case of loss of aircraft separation?

Question: Currently doing an assignment and it to analyse an accident where older atc systems could have been at fault. In 1995 there was an incident where two aircraft came closer than the then current separation standard due to an air traffic controllers miscalculation. With new tech such as ADS-B, are there ways the controller can be alerted of possible loss of separations with the aircraft they are handling?
Comment: @J.Hougaard Radar is rarely more accurate than ADS-B. The accuracy of ADS-B is in the order of 10 meters, the position noise is far less than with radar. The problem is that there are quite a few rogue ADS-B installations flying around. Until they are sorted out, the integrity of ADS-B position data is not sufficient to support most safety cases.
Comment: It would help to know what research you have already done. Most ATC systems have a number of safety nets, none of which are based purely on ADS-B (since radar is much more accurate).
Answer: Most air traffic control systems nowaday have various safety net functions built into them. Short Term Conflict Alerting is one of these functions.
Short Term Conflict Alerting (STCA) works on the basis of extrapolating the current position using velocity and turn rate to predict imminent separation violations. If such a imminent separation violation is detected, the system will alert the air traffic controller.
The next level of conflict alering is Medium Term Conflict Detection (MTCD); this is not considered a safety net, but a tool that assists the Controller in detecting conflicts early on (up to 20 minutes in advance). Instead of relying on simple position extrapolation, MTCD uses more advance trajectory predictions that combine knowledge of the current aircraft position and velocity with information from aircraft performance models, flight plan, weather and given ATC instructions.
MTCD development started 20 years ago, and the tool is now being implemented in various ATC systems.
Comment: Very interesting @DeltaLima and thanks for your response. I am sure this does help alleviate the controllers workload and keep them on their toes. here is the link for the accident report if anyone is interested.
https://www.atsb.gov.au/publications/investigation_reports/1995/aair/199501346/
Comment: DeltaLima, you probably worked some of the same projects that I did! (I was ZDV's DY)
Answer: In the US, ARTCCs have had conflict detection built into the radar data processing system since the  vacuum tube era. It's a bit primitive, being based on current track and speed data (doesn't work well if the aircraft is turning), and it does not make use of route or course information.
We also have a system (URET) that uses actual route information, upper wind data, and aircraft performance characteristics (according to aircraft type) to alert controllers of possible conflictions. The system does not use real-time radar data, however, which can throw off its accuracy. It sits next to the radar position, so it's not "on the scope". It's still a great tool, although, I must admit, I prefer flight progress strips (I'm old).
The best technology I've seen is the User Preferred Routing (UPR) tool (also known as Direct-to), which was developed at the NASA Ames Research Laboratory, initially tested at Denver ARTCC, and later deployed on a test basis at Fort Worth ARTCC.
This tool uses real-time tracking data, upper wind data, aircraft characteristics, holding pattern tracking, and offers on-the-scope functionality for plotting reroutes.
Its deployment status, however is in limbo, and it was removed from field use several years ago.


Ground and neutral switched in old wiring

Question: The house I live in has old wiring I haven't ever really looked at much. I have decided to add solar so have started looking at it. We are off grid and currently the entire house comes out on a spliced together extension cord- spliced onto a formerly larger cable going to what was a gen shed far away. Looking at it closely I  notice the green ground wire is spliced onto the white neutral wire and the neutral wire is connected to a bare copper ground wire. The house is not actually grounded as far as I can tell- the ground wire just runs back to the generator. Is there a good reason they have done this? It seems odd to me. There is a circuit breaker panel that the main cable comes out of - the circuits going into it are wired normally in terms of colour convention, it's just this generator cord which has the colours reversed. Any advice?
Comment: There's lots wrong with this -- is replacing the spliced-together extension cord an option, and what gauge is the wire the cord's connected to anyway?
Comment: Pictures of the wiring at the generator, this mismatched splice and the connection to the panel would all be very helpful.
Answer: I would say the splice was done in the dark by a person that was colour blind.
That or the neutral is broken somewhere in the extension and this is an old timers hack to fix.
Do the splice right and fix the broken wire or a better idea is to replace the whole cable.


How to add .swf file in cocos2d

Question: I want to add an animation in  starting screen of my game. I did that animation in flash. how to load it in cocos2d
Answer: Don't think you're going to be able to do this.  Flash has never been able to run on the iPhone/iPod and very likely never will at least for the foreseeable future.  Someone would have to write a custom SWF file loader and player specifically for Cocos (no small task).  Even then I doubt Apple would allow such an application to be approved.  I would suggest converting your SWF to an iPhone/iPod compatible movie format.  QuickTime (mov) for sure is supported, mpg and avi may work as well.
Answer: There is and will be no Flash support on the iPhone. You'd have to to convert the animation into single images and use cocos2d's animation system.
Answer: The thing you wanted four years ago has released! It's called GAF This is library and a converter for flash animations.

How to add .swf file in cocos2d