Why did Humbaba have to die?

Question: In Tablet V of the Epic of Gilgamesh, Gilgamesh and Enkidu fight the monstrous Humbaba. After the fight is over the defeated Humbada pleads for his life, unsuccessfully:

'Now, Enkidu, [my] release lies with you:
tell Gilgamesh to spare me my life!'
Enkidu opened his mouth to speak,
saying to Gilgamesh:
'My friend, Humbaba who guards the Forest of [Cedar]
finish him, slay him, do away with his power!
Humbaba who guards the Forest [of Cedar]
finish him, slay him, do away with his power,
before Enlil the foremost hears what we do!
The [great] gods will take against us in anger,
Enlil in Nippur, Shamash in [Larsa] ... ,
Establish for ever [a fame] that endures,
how Gilgamesh [slew ferocious] Humbaba!'
Source: The Epic of Gilgamesh, translated by Andrew George, Penguin Books

Why do the two heroes risk the wrath of Enlil, a deity far superior to their protector Shamash? Gilgamesh had already added to his fame by defeating Humbada, why was slaining him necessary?
Answer: Yeah...
Now I don't like to give any answer to such an old thing, but here it is: What you cite is the Nineveh's version of the traditional Babylonian Epic of Gilgamesh. But what you have to see first is that the Epic per se comes in several versions (included partial Hittite ones, somehow different) and the Epic is borrowing from older traditions. Here is the Sumerian:
Huwawa the ogre
The Sumerians built in their time 2 great cycles/stories/matters/epics (call that as you want, I will use cycle here). The first cycle is the cycle of Aratta which detail the relationship/war between the city of Aratta and the city of Ur. One of key characters is the hero Lugalbanda (who is the father of Gilgamesh). The second cycle is precisely the cycle of Gilgamesh. And in this cycle one of the deeds of Gilgamesh is his fight with a specific ogre like creature Huwawa (the Sumerian version of the Babylonian Umbaba).
The story goes like this: Giglamesh decides to visit the forest of cedar with his friend/budy/slave Enkidu (in this story Enkidu is referred as slave). When they arrive there, they fall asleep, all except Enkidu. He manages to get Gilgamesh to wake up, and Gilgamesh is seriously pissed off. Enkidu tries to calm him, but without success, knowing what lies behind.
There they finally discover the source of the problem: The ogre Huwawa who is surrounded with no more that 7 auras of terror... And then the thing become amusing, judge:

[Gilgamesh says to Huwawa:] No one really knows where in the mountains you live; they would like to know where in the mountains you live. Here, I have brought you En-me-barage-si, my big sister, to be your wife in the mountains.

This passage does seem pretty serious. Except when you know who is the so called Enmebaragesi, which in matter of a potential Gilgamesh's cute sister is the former king of Kish, father of Ata, arch enemy of Gilgamesh! Appreciate Sumerian humouresque side and Gilgamesh's fainting of terror.
So Gilgamesh will keep mocking up the poor Huwawa by offering completely stupid gifts each time removing one of his terror until the moment Huwawa has nothing left. Then: [Gilgamesh] made as if to kiss him, but then punched him on the cheek with his fist. And thus: Ḫuwawa clutched at Gilgamesh's hand, and prostrated himself before him.
Then you have the final reversal:

Huwawa addressed Enkidu: "Enkidu, you speak such hateful words against
  me to [Gilgamesh]!" (...) As Ḫuwawa spoke thus to him, Enkidu,
  full of rage and anger, cut his throat.

So that is the original [abridged by me] story (at least in one of its versions). The important elements are:

Huwawa stripping its power (reminiscent of Inanna's stripping of power when she tried to rule the Abzu (Hell)). Notice something truly amusing, Gilgamesh stays perfectly calm in front of him and manages to abuse Huwawa pretty easily,  despite the auras of horror.
Enkidu's reversal attitude: He starts by doing his best to wisely prevent Gilgamesh to go to see Huwawa and finally is the one slaughtering the poor Huwawa
Huwawa which is presented as an horrifying monster but just seem a lonely naive creature who believed Giglamesh a little bit too fast (Once again Inanna will fall to such a trick).

There are variants both in Huwawa's story and Humbaba story of the way he is killed but that is merely details.
Huwawa's death variation
Let me show this Huwawa's death variation:

[Huwawa:] "Warrior, you lied! You have manhandled me; yet you had sworn an oath" [Gilgamesh] addressed his slave Enkidu: "Come on,
  let us set the warrior free! (...) He could be our guide who would spy
  out the pitfalls of the route for us!" [Enkidu]: "A captured warrior
  set free! A captured high priestess returned to the ĝipar! A captured
  gudug priest restored to his wig of hair! Who has ever, ever seen such
  a thing?"

In this version (the one of the Epic so) we see Enkidu this time truly pleading for Huwawa's death. We don't have the end, but it is very safe to imagine that it is like the Epic and Gilgamesh will slaughter Huwawa. But in all aspect Enkidu in both version is directly responsible of Huwawa's death.
Mesopotamian myths
Now, truly understanding Mesopotamia's time is hard (Leo Oppenheim mentioned that having a vision of Mesopotamian religion is illusory at best, while doing it in the same book anyway). Mesopotamia is full of ambivalence. Inanna (Ishtar) is probably the best example. Her interventions during the cycle of Aratta is emblematic of that. This is to the point you start to ask yourself what she does exactly, because when she finally sides with Ur, Enmershikar is almost already victorious. To the point you see she sides with you when you have so proved yourself to her that you ask yourself why you would even need her help! I give you this short insight here on Inanna just because it shows the Mesopotamian subtlety. This beautiful subtlety is all around the Huwawa story. Huwawa is truly terrifying and still it is difficult to not feel sorry for him. Gilgamesh seems totally immune to Huwawa's power, when Enkidu has proven resisting better than Gilgamesh, still you see Gilgamesh trying his best to strip Huwawa's power. At no time does the text makes Gilgamesh emphasize how he is mocking Huwawa, but a remote knowledge of Sumerian myth makes that clear (I mean... EVERY Sumerian was undoubtedly laughing when Gilgamesh propose Enmebaragesi as a wife). Enkidu at first sage, wise and scared, actually slaughters the poor Huwawa out of rage. You have lots of Sumerian themes beginning by the reversal which makes a story begin with one character (as the legendary king Enmerkar) and keep going with another character (the hero Lugalbanda). You have such a typical example here where the story lets you believe that Gilgamesh will do the job, when Enkidu actually slaughters the monster. It is reminiscent of one of Sumerian favourite stories, the dialogue/dispute: 2 things/characters fighting to know which/who is the best.
Let me finish by giving you this insight into Mesopotamian literature. We have a letter sent by a son to his mother while she is without news. The letter contains an incredibly long description of the mother in order to help the messenger to find her. 50 lines. Then comes the text of the letter, appreciate:

When thanks to the descriptions I have given you, you stand in her
  radiant presence, tell her: "Your beloved son, Lu-dignira is in good
  health".

Appreciate here the incredible beauty of Sumerian poetry "Lu-dignira is in good health"...
Epic of Gilgamesh
The Epic of Gilgamesh is a Babylonian story so one might ask why I spent so much time on the Sumerians, Sumerians being a different people, speaking a different language. Out of the 5 stories of the Sumerian cycle of Gilgamesh, 3 are core elements inside the Epic, and the Epic out of that simply borrows freely inside Sumerian lore. The key character Uta-napisthim being no more than the Sumerian Ziusudra as an example. Babylonian intellectuals, using the Sumerian cuneiform writing system, was nurture by Sumerians. To the same extend than modern occidental world is nurture by Romans and Greeks.
The Epic so built on that Huwawa story:

You find Enkidu, still alive, warning Gilgamesh non-stop about the danger of Humbaba.
The fight is presented differently, as the writers noticed Huwawa does not seem so terrible and made the episode longer and Humbaba a little bit more scary (this time Gilgamesh needs the help of his mother, he cannot simply openly mock the poor Huwawa).

But basically Humbaba being Huwawa ought to die. Huwawa received no mercy, Humbaba has the exact same fate. Enkidu, who was wisely preventing Gilgamesh to not face Huwawa, will do the same, and with same consequence he is utterly the one directly responsible of Huwawa/Humbaba's death. Gilgamesh and Enkidu will face the wrath of Enlil because in the original story they did.

Now the Epic of Gilgamesh per se is on a different level than the Sumerian cycles. For example, the cycle of Aratta is formed of 4 stories. In the first one, the dispute between Ur and Aratta is solved via diplomacy when in the other 3 it is war. In all case, Aratta's defeat is there. But those are disconnected story. The Epic is a full story.
On poetic term, Huwawa story is a short piece of 200 lines when Humbaba story is evolving around 3 chapters. In Huwawa story, Enkidu is clearly shown as the direct responsible of huwawa's death, the Epic makes that slightly less clear (very cleverly). In Huwawa's story Enlil is not very happy that Huwawa was murdered, in the Epic, Enkidu will pay deeply those constant misbehaviours because just after he will kill another innocent monster Gugalanna. And then only Giglamesh will go on a (semi) purely Babylonian part trying to vainly trick death.
I tried to show here the Sumerian root of the Epic, how the Sumerian elements has been taken, incorporated and developped for the Epic. The Epic of Gilgamesh is the very first epic ever written and on that comparing the disparate relatively shorts stories that form the core elements of the Sumerian cycles is unfair to both. But it shows how the writter(s) of the Epic took its(their) lore, built on it, and added the local faith (the totally absent Sumerian gods play a major role in Babylonian culture). It also shows how to make a proper "remake". No doubt that Homer did something similar in his time (No doubt also those who judge Homer as mere guy compulsing traditions are mere idiots).
Answer: I suspect it has to do with the function of heroes to "tame the landscape" and render locales safe for humans by slaying monsters, similar to Theseus on his journey to Athens and Heracles with many of his tasks.
Challenging the rule of heaven is a theme in the Epic of Gilgamesh--he also rejects Ishtar and is undaunted by her fury.  It's worth noting that the gods don't act against Gilgamesh directly, but punish him by slaying his mortal friend Enkidu.  Thus it is possible Gilgamesh is powerful enough to act with impunity, similar to Heracles, although unlike the Greek demi-god, he is unable to conquer death.
Hubris also seems to be a theme of the epic, if I can borrow a concept from the Greek, so perhaps the slaying is intentionally transgressive. Certainly it marks the turning point in the narrative arc and leads to the downfall of both heroes.
Peer pressure may be a factor as Enkidu also eggs Gilgamesh on when he hesitates.  Although I don't trust any translation fully due to the imprecision of the art and degree of latitude translators can take, particularly with work from this period and region, the text I quote below suggests that Enkidu chides Gilgamesh that to spare a prisoner is against the dictates of fate, and warns Gilgamesh that if they don't kill Humbaba, there will be repercussions:

And of Gilgamesh, son of Ninsun,
  Now is his heart moved to pity.
  To his servant Enkidu, he spoke these words:
  'Enkidu, a caught bird -
  Ought he not to return to the arms of his mother?'
  Enkidu interrupted him:
  'But you, should you be taken prisoner,
  You will not return to the arms of your mother.
  Who has ever seen the hands of a prisoner of war unbound?
  An imprisoned priest returned to the temple residence?
  A lukur-priestess returned to her pleasures?
  If you set him free,
  He will obstruct the way up the mountain,
  He will make the footpath impassable up the mountain.'
  Source: The Epic of Gilgamesh by Robert Temple

(Note: I grabbed an easily accessible on-line translation from 1991 and apologize if there are any inaccuracies compared to the 2003 George, which is excellent, although my personal favorite is still the Gardner. :)

Why did Humbaba have to die?


Purging SQL Tables from large DB?

Question: The site I am working on as a student will be redesigned and released in the near future and I have been assigned the task of manually searching through every table in the DB the site uses to find tables we can consider for deletion. I'm doing the search through every HTML files source code in dreamweaver but I was hoping there is an automated way to check my work. Does anyone have any suggestions as to how this is done in the business world?
Answer: If you search through the code, you may find SQL that is never used, because the users never choose those options in the application.
Instead, I would suggest that you turn on auditing on the database and log what SQL is actually used. For example in Oracle you would do it like this. Other major database servers have similar capabilities.
From the log data you can identify not only what tables are being used, but their frequency of use. If there are any tables in the schema that do not show up during a week of auditing, or show up only rarely, then you could investigate this in the code using text search tools.
Once you have candidate tables to remove from the database, and approval from your manager, then don't just drop the tables, create them again as an empty table, or put one dummy record in the table with mostly null values (or zero or blank) in the fields, except for name and descriptive fields where you can put something like "DELETED" "Report error DELE to support center", etc. That way, the application won't fail with a hard error, and you have a chance at finding out what users are doing when they end up with these unused tables.
Comment: Likewise, that will only give you what's been used since you started watching.  Better to assess the entire application & determine what will be done in the revamping.
Answer: Reverse engineer the DB (Visio, Toad, etc...), document the structure and ask designers of the new site what they need -- then refactor.
Comment: Thank you. I can't vote you up because I "don't have enough reputation", but that's the approach I was looking for. I'm a beginner level programmer and I'm still familiarizing myself with the process of things.
Answer: I would start by combing through the HTML source for keywords:

SELECT
INSERT
UPDATE
DELETE

...using grep/etc.  None of these are HTML entities, and you can't reliably use table names because you could be dealing with views (assuming any exist in the system).  Then you have to pour over the statements themselves to determine what is being used.
If [hopefully] functions and/or stored procedures were used in the system, most DBs have a reference feature to check for dependencies.
This would be a good time to create a Design Document on a screen by screen basis, listing the attributes on screen & where the value(s) come from in the database at the table.column level.
Compile your list of tables used, and compare to what's actually in the database.
Answer: If the table names are specified in the HTML source (and if that's the only place they are ever specified!), you can do a Search in Files for the name of each table in the DB.  If there are a lot of tables, consider using a tool like grep and creating a script that runs grep against the source code base (HTML files plus any others that can reference the table by name) for each table name.
Having said that, I would still follow Damir's advice and take a list of deletion candidates to the data designers for validation.
Answer: I'm guessing you don't have any tests in place around the data access or the UI, so there's no way to verify what is and isn't used.  Provided that the data access is consistent, scripting will be your best bet.  Have it search out the tables/views/stored procedures that are being called and dump those to a file to analyze further.  That will at least give you a list of everything that is actually called from some place.  As for if those pages are actually used anywhere, that's another story.
Once you have the list of the database elements that are being called, compare that with a list of the user-defined elements that are in the database.  That will give you the ones that could potentially be deleted.
All that being said, if the site is being redesigned then a fresh database schema may actually be a better approach.  It's usually less intensive to start fresh and import the old data than it is to find dead tables and fields.

Purging SQL Tables from large DB?


Export data as fixed width file from SQL Server 2005

Question: I thought it is a very simple task to export data in a view from SQL Server 2005 to a fixed width text file. But the wizard is a pain. The format is not correct. Does anybody know how to deal with it? or any better way to do that?
Answer: Use bcp with queryout option
http://msdn.microsoft.com/en-us/library/ms162802(SQL.90).aspx
bcp "SELECT * FROM AdventureWorks.Person.Contact" queryout Contacts.txt -c -T

Use a format file if you want fixed-width output
http://weblogs.sqlteam.com/brettk/archive/2006/07/06/10504.aspx
I just tried exporting in AdventureWorks, Fixed Width gave me a lot of issues too (compared to column delimiters)
I had to ignore the GUID columns, not include column names in the first row, etc.. finally exported Sales.Customer table
Without BCP, you may have to look into SSIS or SQLCMD
Answer: One option is to use OpenDataSource to write the rows out to a text file.  This requires that the text file already exists, but is relatively easy.
This article (for disclosure, I wrote it, and it focuses on reading from, but touches on writing too) explains the basics of reading and writing from text files with OpenDataSource.  :  http://www.sqlservercentral.com/articles/OpenDataSource/61552/
Answer: If the format from the wizard doesn't suit your needs, you will need to develop your own SSIS package. Are you sure you really need a fixed width file? A delimited file would probably be easier to get right as they are much more common.
Answer: I have found SQL2005/SSIS to be anything but simple to do seemingly simple tasks.  Things always take me 5x longer than they should.  I know I'm not alone on this.
BCP should work.
Don't know about sqlcmd - seems like it doesn't do fixed width, unless you did the padding in your sql statement - which would also be a pain.
usage: Sqlcmd            [-U login id]          [-P password]
  [-S server]            [-H hostname]          [-E trusted connection]
  [-d use database name] [-l login timeout]     [-t query timeout]
  [-h headers]           [-s colseparator]      [-w screen width]
  [-a packetsize]        [-e echo input]        [-I Enable Quoted Identifiers]
  [-c cmdend]            [-L[c] list servers[clean output]]
  [-q "cmdline query"]   [-Q "cmdline query" and exit]
  [-m errorlevel]        [-V severitylevel]     [-W remove trailing spaces]
  [-u unicode output]    [-r[0|1] msgs to stderr]
  [-i inputfile]         [-o outputfile]        [-z new password]
  [-f <codepage> | i:<codepage>[,o:<codepage>]] [-Z new password and exit]
  [-k[1|2] remove[replace] control characters]
  [-y variable length type display width]
  [-Y fixed length type display width]
  [-p[1] print statistics[colon format]]
  [-R use client regional setting]
  [-b On error batch abort]
  [-v var = "value"...]  [-A dedicated admin connection]
  [-X[1] disable commands, startup script, enviroment variables [and exit]]
  [-x disable variable substitution]
  [-? show syntax summary]


Can't learn the last Bend Will shout

Question: When I finished the quest The Fate of the Skaal, it asked me to "unlock your Bend Will shout." However, when I finished my quest, I didn't learn the last word I need. The only thing I can think of is that all of my spaces have been taken over with force instead of earth or wind or whatever it usually has. Does anyone know what I can do that will help me learn the last word that I require in the game?
Comment: What do you mean by "all of my spaces have been taken over with force instead of earth or wind"? Also: during the quest The Fate of the Skaal you'll only learn the first word - the other two words are learned during the The Gardener of Men questline.
Comment: Are you on PC? If so, it may be fixable at the game's console.
Answer: First, make sure it's really broken.
Here is what is supposed to happen:

You give the book to Storn.
He reads it and Hermaeus Mora kills him after a brief conversation.
Hermaeus Mora praises you for doing as you were told, tells you he is giving you the word, and then leaves.
You learn the word. It appears in your Shouts menu but is grayed out.
The Gardener of Men quest is completed. At the Summit of Apocrypha quest begins.
You spend a dragon soul to unlock the word (just like every shout except Unrelenting Force, Clear Skies and the first word of Whirlwind Sprint).
(Quest continues from here...)

It sounds like #4 never happened. Double-check that:

The Bend Will shout only has the first two words listed. If it has all three, and the third is grayed out, you will need to spend a dragon soul on it (which may require killing one or more dragons if you ran out of souls) to complete step #6 and advance the quest.
The Gardener of Men is complete in your journal. If it is not complete, you may need to go back to Skaal Village and listen to Hermaeus Mora to complete step #3.

If it's really broken, you can fix it with the console, but only if you're playing on PC.
The default key to bring up the console is `.  If your load order is the same as mine, you'll use this command:
player.teachword 040179db

The leading 04 may need to be changed if your load order is different from mine. To discover the correct digits to use, click on any object or NPC in Solstheim and note the leading two digits of the number displayed, or consult your mod manager if you use one.
If you are not playing on a PC, you may have to load a save and try again.
Unfortunately, it's not possible to manually teach words on consoles, so you'll just have to try the quest a second time.

Can't learn the last Bend Will shout


How to share a list of data in all site collection

Question: Hi i'm planning to create a client directory and wondering how will i start on this. does sharepoint has a venue where for example the term store where everyone can have an access to it? this will be used in different site collection. Thanks!
Answer: If I understand correctly you would like to have and repository of customers to be used on different site collections.
The issue here is the site collection boundry. There is no out of the box possibility of using lookup fields across site collections (there are some open source projects that enable this kind of lookup field so that could be one option for you)
Another option for you would be to use managed metadata. This is feature of Sharepoint that allows you to use managed metadata fields and reuse them across different site collections (and even different web apps) but its feature is limited you will be basically able to use only a name of the customer. Managed Metadata works best if you have only one datum you want to include (like State, or City name) and you don't need to include any additional information.
Comment: The feature that i'm creating is that the homepage will display all the clients(clients is a link so using managed metadata is not an option due to the reason that i need to have a collection of item that has url and as far as i know, managed metadata can only be access using csom/jsom and not by web api)

what im trying right now is to create a custom .Net web api that will hold all the client data and return it in the sharepoint site. im lost on how can i do that ( how to validate that the request came from sharepoint ).

if possible we try to make it client sided as much as possible


Computerized method and system for recipe presentation

Question: Aren't bunch of claims related to javascript onsubmit/onchange functionality, and normal web communication? It's just ridiculous. Also, prior art cites plain recipe search sites, but not recipes by ingredients sites, like cocktailbuilder.com. Also, using phone to interact with communication, and voice? Are these things new art???
Comment: Welcome to Ask Patents. There is no document number in your post so no one can help. It may be that you are looking at an application for a patent not a granted patent. People can apply for anything - it doesn't mean they will get it.
Comment: Yes, it still has application status as the link shows. Didn't realize this site is only for published patents, but thought it is also for preventing bad ones from being published.
Comment: This site *is* for helping bad patent applications from turning into bad patents. The publishing of an application does not indicate any level of acceptance and is automatic regardless of content as long as the formal requirements are met.
Answer: The patent-application looks like a description of an actual implementation of a cooking website. What he is trying to patent is not "..javascript onsubmit/onchange functionality.." but the functionality of the website as a whole.
The key here is that this is an "application" for a patent and it is not "granted".
Looking at the USPTO PAIR database you can see the history of the examination of the application, which shows that it was initially rejected in 2009, and then finally abandoned in 2010 when the applicant failed to follow up on the initial rejection.

Hence there is no patent grant of this application and there never will be a grant.


Free alternative to NI Real-Time Hypervisor?

Question: Is there an free alternative to National Instruments' NI Real-Time Hypervisor?  National Instruments provides both a Windows and Linux versions.
Answer: you mean like Hyper-v.  I don't see from the link that the hypervisor your link to does anything special that every type 1 hypervisor doesn't do.
Update - after reviewing it further it appears it contains support for some specialized hardware : "In addition, the Real-Time Hypervisor is specially designed to maintain the determinism of LabVIEW Real-Time programs"
Comment: From the words "real-time" in the name of the product, presumably it offers deterministic interrupt latency which is not something a general purpose OS offers.
Comment: Yes. Hard real time + hypervisor - I am surprised there even is such a product. kudos to the manufacturer.
Comment: You can run real time OSes in EVERY hypervisor AFAIK.  You simply have to adjust the scheduler to prioritize the guests
Comment: @janneb from the link "To ensure access to all Real-Time Hypervisor capabilities, use the LabVIEW 2009 Real-Time Module to program applications for the real-time side of hypervisor systems....In addition, the Real-Time Hypervisor is specially designed to maintain the determinism of LabVIEW Real-Time programs"  at best this means it has specialized drivers for access to the hardware.
Answer: I suppose that depends on what you want.
If what you need is a real-time OS to run some DAQ and/or control software, then yes, Linux with the RT patchset offers the usual real-time OS features.
If you want an alternative hypervisor for running Labview RT, then I don't know. It wouldn't surprise we if it refused to run on anything but their own hypervisor.
Answer: I'm not sure what you're looking to accomplish, but it sounds like a mix of wanting a realtime OS, CPU shielding/affinity and a standard Linux or Windows userspace for development; all on standard hardware.
On the Linux side, this can definitely be accomplished with a realtime OS like RedHat MRG Realtime (commercial), Scientific Linux Realtime (Free) or SuSE's realtime offering (commercial).
That gets you a realtime kernel and OS. If you need to run specific tasks on a specific CPU or CPUs, you can use CPU shielding techniques to perhaps, create a group of CPUs for the OS and another group reserved for your realtime application execution.
Usually realtime and virtualization don't go hand-in-hand. The operating systems listed above provide extremely granular control over processes, scheduling, priority and interrupt handling.
Comment: Consider this target: - standard multicore PC. - Run a standard app that can manage a GUI, connections to DB, & Hi level communication with other devices using reserved RS232 /ethernet resources (like PC-SCADA-supervisor).- At the same time a CPU core works in a deterministic way(1 usec. resolution), controlling sennsor, digital/analog I/O, or motors, using reserved resources. Realtime and not realtime communicates through a virtual TCP/IP channel but are indipendent
Comment: This is possible, I believe. I'll use the example from my industry (high-frequency financial trading). You have a standard OS userland like RedHat or CentOS, but maybe an FPGA or high-end 10GbE network card processing a 15Mb/sec stream of financial market data. Multiple cores are dedicated to one task. Hardware interrupts are assigned to specific CPUs. It'll take some research, but the tools are out there. I also updated my post with a link to CPU shielding resources.
Answer: VxWorks and LynuxWorks both have hypervisors based on hard-realtime schedulers, certified to go airplanes and such.  They're NOT cheap, but they do their job.


I want to watch multiple folders with fswatch on Mac

Question: I see in the documents for fswatch it has $ fswatch -0 [opts] [paths] | xargs -0 -n 1 -I {} [command] but I don't really understand how I'm supposed to add multiple paths to that - I'm watching two paths lib and test. I've tried:
fswatch -r lib,test, fswatch -r lib test, and finally fswatch -r [lib test] How do I watch multiple paths with fswatch at the same time?
Answer: Separate the paths with a space (i.e. ' ')
For example:
fswatch "path/one" "path/two" echo "whatever"

Comment: This works perfectly! But then how do you know which one changed?
Answer: The only possibility I found is to execute the fswatch command multiple times:
do_backup() {
    // what you want to do
    rsync -ahhvzPR --delete $FILE $BACKUP_DIR
}

fswatch -r lib | while read FILE; do
    do_backup
done &

fswatch -r test | while read FILE; do
    do_backup
done &

This will start the process for both directories in detached mode.
More about the detached mode can be found here.
Answer: just use "," among the multi path.


How to reduce multicollinearity between predictors

Question: I would like to run an prediction  model and have a set of continuous independent variables. They are all important but highly correlated. How can I effectively reduce collinearity and still use these variables in my prediction model?
Comment: The problem lies with your selection method, which misuses the p-value, rather than with the collinearity.
Comment: Could you share the evidence you have that collinearity will create any problems with prediction?  Are you sure you really want to focus on prediction as opposed to explanation or coefficient estimation?
Comment: It depends on the nature of the model: could you be more specific?
Comment: Outcome: 3 categories (mild, mod, severe) - model is ordered logistic regression. Predictors: continuous measurement of lab values and a few demographics. The lab values are correlated to each other.
Comment: If we have collinearity among predictors, one or both can have an inflated p-value, thus my selection method (keep all variables jointly significant at p<0.05) will be biased.
Answer: You can reduce multicollinearity using PCA.  There are lots of questions/answers about how to implement PCA.  This method allows you to group similar covariates into independent "Principal Components" which can give insight into the relative relatedness of your covariates.
Also, check into Variance Inflation Factor (VIF) protocols.  There are ways to use stepwise VIF reduction to rid yourself of highly collinear variables in the dataset.  However, if you need to keep every covariate for some reason, a clustering approach like PCA or PLS would do the trick.
Comment: It will do the trick *provided* the response doesn't depend on the components you throw away!
Comment: That is a good point.  You always run that risk when doing any sort of variable-reduction techniques.  Generally, I would stick with keeping my correlated covariates, running Principal Components Regression with an oblique transformation in my PCA routine to flex the independence criterion.
Answer: If you are solely interested in prediction, then you probably don't need to reduce the collinearity among variables. You can test this with the perturbpackage in R.
Collinearity will increase the variance of the parameter estimates, but the predictions won't be affected; this is sort of the nature of collinearity: When you have collinear variables, two (or more) different ways of combining them will give nearly identical results. That matters a lot for explanation, but not for prediction.
Also, as @whuber pointed out in a comment, selecting variables by

keep[ing] all variables jointly significant at p<0.05

is problematic, regardless of collinearity and regardless of whether you are interested in prediction, explanation or both.


For a very large rotating space ship, how deep would the 1g centripetal force effect be?

Question: Assuming some devastating event will destroy every habitable planet in the system and we have to evacuate. We build a fleet of spaceships 200 miles long and 50 miles wide. Everything from earth we don't take with us will be vaporized so we need to simulate all the interconnected layers of the oceans as well as surface life here on earth.
Assuming the cylinders are hollow in the middle, with a hydrogen ramjet principle for thrust. At less than 1/10 g acceleration, would the aforementioned 50 mile wide cylinders have the required 1g simulated gravity for 3 miles of depth for ocean life to survive on this ship?
Comment: Also, are you requiring that the cylinders (assuming you meant that the spaceships were cylindrical) have constant simulated gravity for some region of depth? Because that's impossible.
Comment: It is not necessary for the cylinders to be propelled. They will keep rotating at constant speed without any thrust.
Answer: The effective "gravity" goes by $$g_{eff}(r) = \omega^2 r \;,$$ where $\omega$ is the angular frequency with which the ship turns and $r$ is the radius at which you measure the effective acceleration.
Obviously it will only be exactly $1\,\mathrm{g}$ at one radius, and it varies linearly as you move away from that point. It is up to you do determine how much slop you are happy with, and from there figure out the necessary size of the craft.
Comment: Sorry, let me be clearer. Yes, it is a cylindrical spaceship. Make one too small and the difference from 1g would be noticeable between your head and your feet. How wide would a cylindrical spaceship have to be to go from 1.03 g at the outermost deck to .97 g on the innermost deck in the habitation decks if the total distance between them is three miles vertical? Assume acceleration forward is not an issue.
I wish I could do the math myself.  But a grade of 206 out of 600 in Calculus proved I'm not able to. Lets not mention my physics grade.
Comment: You don't need to do calculus to answer that question with the result that I gave you. I've reduced it to a algebra problem. I'm not going to work the figures for you because that would leave you believing that this is a hard problem when it simply isn't. Centrifugal pseudo-gravity varies linearly with radius. If you want a 3% change from the current value go 3% further from (or close to) the axis.
Comment: So to conclude, the thickness can range from $50 \times 1.03=51.5$ miles ,(where you would feel $1.03g$) to $50 \times 0.97=48.5$ (where you would feel $0.97g$). So total thickness of livable spaces 3 miles


Periodically invoking of c# application using job in SQL server

Question: I want to invoke a c# application based on SQL server database. I have name's column in database. I want to check if there is any name present in the database then every after 1 hr my C# application should get invoked. I am asked to use a "job" concept in SQL server. Is it possible to perform this operation?
Answer: Job schedules are designed to do maintenance staffs. They actually do something periodicall, but the things they do is about backups, running T-SQL jobs, CleanUp and etc. I don't think doing this by an SQL job agent be a good solution.
If you want to check db in a constant interval, then you could simply write an intermediate app (windows service or a console App) and check your db changes every 1 hr. If your desired changes happened then invoke your C# application.
Answer: You could call a windows application using a shell. You could do it in an SQL server job or in a trigger.
Hope I helped!


Why do I get different results with gdal_calc within the osgeo4w shell and QGIS' raster calculator?

Question: I'm just wanting to make a simple map algebra operation in the osgeo4w shell using gdal_calc but I get wrong results when I divide one raster with the other. When I use the same rasters in QGIS and perform the same map algebra operation with raster calculator, I get no problem.
Comment: Hi vascobrunes, could you clarify how the output is incorrect. Also, have you checked if you are using the cmdline syntax correctly for gdal_calc?
Comment: For example: I'm doing a simple calculation and getting this: Error! Dimensions of file  are different from other files.  Cannot proceed
while if I do it in QGIS it works fine
Answer: I think my best guess would be that you should clip one raster using the other, and save the results as a .vrt to save time.
use this vrt in your previous gdal_calc calculation. that should work.
side-note: The answer is actually in the Error message. I dug a bit deeper and looked at the code here ( http://svn.osgeo.org/gdal/trunk/gdal/swig/python/scripts/gdal_calc.py ). A comment at the tops specifies that rasters should be of the same extent.
LATER EDIT: If your problem appears to be that the values are too big for your data type this is because gdalcalc determines the data type based on the input rasters not the appropriate output data size (i believe from the link I provide you can search data type and you'll see the comment).
I am not sure of the options to change data type in the gdalcalc syntax but you could precede your calculation by translating your input raster with gdaltranslate into a larger data type;32bit-float should be fine. saving as a vrt will also save time gdal_translate -ot Float32 -of VRT old.tif new.vrt
link: http://www.gdal.org/gdal_translate.html
Still Later Edit: I actually checked gdal_calc.py on my comp and found it has a --type parameter you can enter from the command line. I think this will work for your problem
Hope that helps :)
Comment: A part of the solution is here: http://trac.osgeo.org/gdal/ticket/4064

for this: "Gdal_calc performs calculations using the native data type of the original input layers, which can be problematic if, say, you are dividing two integers and expect a float output."
Comment: I solved it by first using gdalwarp on the raster files.
Comment: Hey, if you write up your solution other people might benefit. As well, I won't think it is 'unsolved' ;) btw, glad you figured it out.
Comment: It is still unsolved: I still get different results from using gdal_calc or the qgis raster calculator. With gdal_calc, in a raster with 0 and 1, if I do raster*88 its good. but if I do raster*2012257 the result is weird. I QGIS raster calculator the result is what was expected (2012257).
Comment: seems like the value I use in gdal_calc can't be bigger than 30999
Comment: Hey vasco, I hope my latest edits fix your problem. If not, perhaps we could look at the code you are using.
Comment: good discussion, so, qgis rules =)


Difference B/w LTxxx Ics and Lmvxx Ics

Question: I have been strolling towards being a circuit designer, using eagle and ltspice and i am trying to learn about new ic's and stuff. recently the thought about how does an LTXXX module and LVXXX(or LMXX) module differ to each other if they are both based on op-amps.
Comment: Each company had its own part number structure while many companies have merged. LT is Linear Tech who also make LM devices common to many and LTC is CMOS vs Bipolar. And in logic there are 40 different common variations but each consistent for voltage range or drive impedance or speed tradeoffs just like TTL was 74xxx,74S, 74LS,74L next CMOS 74HC,... ...74HCT, etc
Comment: thanks tony and daniel. also i am just a rookie in the field of circuit designing. i have just completed circuits based on 555 timer, lmvxxx modules and some motor ic and sound amps. i want to be an ic designer and if could would love any sort of help you guys can provide in that
Comment: I'm just curious; when you say circuit designer, are you talking about PCB designer, or IC designer?
Answer: There might be a few numbers that indicated a similar IC, but otherwise they are completely independent numbers and have no relationship to each other. Early on 30+ years ago there may have been some number sharing, but if that did occur it was usually in the form of everyone having the same number (like the OP27) and sometimes a different suffix. If you want to learn about the numbers the best way to do this is through the manufacturers websites. The numbers also have very little to do with what it is, and LT1763 is an LDO an LT1867 is an OP Amp
Comment: thanks for your reply. but i am actually concerned as, in ltspice(schematic software) there's a huge collection of LTXXX module, so i was wondering if i can use them as lmvxxx modules..
Comment: Same rules apply, a part number is a part number, they are not similar in spice either

Difference B/w LTxxx Ics and Lmvxx Ics


Can a shared method be multithreaded?

Question: As the question states, can a shared method of an object be multithreaded?  I don't quite having threading down in my skillset, otherwise I would test myself.  On the other hand, I am involved in designing class that could be part of a multithreaded application in VB.Net.
Comment: If you are designing classes that could be part of a multithreaded application, it might be time to get threading into your skillset?
Comment: Yes, I will agree.  I love opportunities where you are required to learn something you interested in.  This happens to be one of those opportunities :)
Answer: If you mean "is it safe for a shared method to be called from multiple threads at once" - the answer is "it depends". A method itself isn't multi-threaded or single-threaded; threads and methods are very separate things.
If your shared method is called from multiple threads, then unless there's any synchronization to say otherwise, it will be executed concurrently on those threads. That can definitely cause a problem if your method uses shared state without appropriate safeguards. However, if the method either takes care when accessing shared resources (e.g. using locks) or it doesn't access any state which is shared between threads, that's fine.
Comment: Good to know the the shared states. In Jon Skeet we trust. ;)
Answer: Yes, it can. Any method can become a thread.
Comment: @hydroparadise: Yup. They'll be executed separately.
Answer: Yes, shared methods can be executed simultaneously by multiple threads. In fact, they often are. You do not have as much control over which threads are executing shared methods as compared to instance methods. Consider an ASP.NET application for example. Different page requests may come in on different threads. If you call a shared method in your web application then there is a high probability that it is getting executed by multiple threads.
This is an incredibly important point when designing an API. All self respecting API authors go to extremes to make sure all shared/static methods are thread-safe. Afterall, it would be ridiculously onerous to make a caller of your API synchronize access to every single shared/static method you provide. Take a look at the documentation Microsoft provides for almost all classes in the BCL.

Any public static (Shared in Visual Basic) members of this type are
  thread safe. Any instance members are not guaranteed to be thread
  safe.

I have yet to run across a static method provided by Microsoft that was not thread-safe.1 And that is good because it makes life easier for you and I.

1If you know of one let me know.

Can a shared method be multithreaded?


Geometry Nodes: allign object based on procedural geometry

Question:
Hello! I'm working on a Geometry Nodes procedural project, and I would like to improve something within the system: as simplified in the picture shown, I'm starting with a cube with some subdivision that is being displaced by some random textures. now, after the displacement, I want to "pick" the vertices that are the most far from each other, the most "opposite" vertices we could say, they could be anywhere in space after being displaced, and I want blender to "draw" a straight line between them , to use as an axis, and then I want to allign this line, this axis, with a world axis, say the world Y axis.
Basically, I want the object to be re-alligned with the world on the "longer" side is being created after being displaced.
Any ideas?

EDIT: AWESOME ANSWER by Robin Betts, that's great it works! the only issue now is that the line that is being created in order to allign the geometry is now perfectly in the center of the world axis, so the midpoint of the line become our new origin for the whole geometry, so the origin of the geometry is i little off... the result is awesome, just what I needed, but would there be a way to then "Set Origin" to the object volume, and offset the position, so that the center of volume is always alligned at world origin, while the line that we calculated remains parallel to choosen world axis?
Answer: Maybe a proper mathematician can come along and prove or refute this strategy. All I can say at the moment is that it's passing quite extreme tests, so far.

Take the convex hull. The extreme points must be in it, somewhere.
Find the furthest point from the mean of all points. (Pm)
From the remainder, find the furthest from Pm (Pm')
As requested, create a line between Pm and Pm' and transform the geometry such that its origin lies on the center of the line, and the line is oriented along an axis.

Above, makes a selection of the point(s) that are farthest from the mean position. Yes. We are hoping there's only one. But the possibility of a 'tie' is implicit in your question, not a problem with the solution.
Then the position of the point at that distance is derived:

A similar procedure follows for getting the furthest position from this one. A line is drawn between them. The whole is aligned as follows, where the incoming vectors are the ends of the line:

This is the result, on a not-very-random object:

Unless/until I think of a proof, I half expect this to get broken. Have a go, and see if you can.
Comment: Very interesting! I assumed a much more elaborate solution, but this looks really creative. ...`Convex Hull`, again :D
Comment: @quellenform   The Convex Hull is only to cut down the number of tests? Maybe that should be the median for the first test, not the mean (feels better, somehow) .. still trying to work out a proof, or break it...
Comment: Hi, @Jacopo .. thanks for the tick! I will improve this a bit..  a _Field at Index_ (0)  to  get hold of extreme positions would behave better in the event of tied-distances than the _Mean_ used here, I think.


Is there a simple word for a person born of immigrants?

Question: My friend's parents are both from Colombia, but he was born here in the U.S., and I was wondering if there was a non-offensive term for somebody born of immigrants who is a native citizen.
Comment: *First-generation American*.
Comment: I don't know what the standard is for Colombian Americans, but for Asian Americans he would definitely, unambiguously be *second generation*. His parents, who were the first in the US, would be *first generation*.
Comment: Yes, since "United Statesian" cannot be used, the born-in-the-US child of Colombians would rather ironically be called a "First-generation American".
Comment: In situations where others might be disposed to wonder, you can often just say *American born* and move on. What it lacks in specificity, it can make up for in understatedness.
Comment: It is in some ways telling that the standard way of phrasing this in the US is based on how many generations have been _naturalised_, while quite a few places in Europe would approach it instead based on how many generations ago the _immigration_ occurred; i.e., your friend would be a _second-generation immigrant_ many places in Europe.
Answer: As suggested in a comment "first-generation American" is the neutral expression you can use to refer to your friend who is born in the U.S.A. from Colombian parents. Note that the same expression can actually be used also to refer to their parents if they are resident  in the United States:

The term first-generation, as it pertains to a person's nationality or residency in a country, can imply two possible meanings, depending on context:
1) A native-born citizen or resident of a country whose parents are foreign born: e.g., "first-generation" American,
2) A foreign born citizen or resident who has immigrated to a new country of residence: e.g., "first-generation" migrant.
This ambiguity is captured and corroborated in The Oxford English Dictionary's definition of "generation":

...*designating a member of the first (or second, etc.) generation of a family to do something or live somewhere; spec. designating a naturalized immigrant or a descendant of immigrant parents, esp. in the United States.... (OED definition of "generation," section 6b., emphasis added)*
In the United States, among demographers and other social scientists, the term "first generation" is used to refer to foreign-born residents (excluding those born abroad of American parents).

Wikipedia

Also the term "second-generation American" could apply, but the ambiguity, as in the case of first-generation" remains.

AHD
Comment: At least among Asian American, *first generation* refers exclusively to the immigrant parents themselves, as they are the first generation *in America* (and, if naturalized, the first generation to be American citizens). Children born in the US to immigrant parents are therefore ***second** generation*. Individuals who immigrated as children and grew up in the US (and this are socialized primarily in the US) are often referred to as gen 1.5.
Answer: In my experience, in practice, the child of the immigrant is spoken of as "first generation," and the grandchild of the immigrant is spoken of as "second generation," and so on.
As it happens, I am a first generation American myself.
I won't provide a link to a definition, since it would just muddy the waters.  Instead, here is an example blog, one among many, which use the term the way everyone I've ever spoken with about this does: http://thoughtcatalog.com/helina-daniel/2014/06/8-things-you-experience-as-a-first-generation-american/
Answer: Japanese Americans have an especially clear set of terms for how many generations removed from the old country a particular American of Japanese descent happens to be. According to the Wikipedia article on Japanese Americans, the generational names are as follows:

Issei (一世) The generation of people born in Japan who later immigrated to another country.
Nisei (二世) The generation of people born in North America, Latin America, Hawaii, or any country outside Japan either to at least one Issei or one non-immigrant Japanese parent.
Sansei (三世) The generation of people born in North America, Latin America, Hawaii, or any country outside Japan to at least one Nisei parent.
Yonsei (四世) The generation of people born in North America, Latin America, Hawaii, or any country outside Japan to at least one Sansei parent.
Gosei (五世) The generation of people born in North America, Latin America, Hawaii, or any country outside Japan to at least one Yonsei parent.

So for purposes of your question, if your friend's parents had been from Japan, rather than Colombia, your friend, being born in America, would be a Nisei.
As far as I know, however, most nationalities and ethnicities don't have such an elaborate naming system for immigrants to the United States (or elsewhere).
A term to avoid in describing a U.S.-born child of noncitizens is the pejorative anchor baby, which implies that the noncitizen mother gave birth to the child in the United States in order to claim residency rights through the child's automatic possession of U.S. citizenship by jus soli (birthright).


Switching from Ubuntu: What is software support like for other distros?

Question: I'm about to reformat my laptop and am considering trying a new Linux distro. Ubuntu was my first Linux OS, and I chose it because it seemed to have the most support and documentation for different software. For example, when searching for instructions on installing a framework like Ruby on Rails, most tutorials focus on Ubuntu. If I were to try something like Arch, would installations be much different, aside from using a different package manager? Would I be able to use the same instructions? This has been the only thing keeping me from using different distros, so I'm curious to know how much more complex it would be.
Answer: Don't fear trying other distributions. If your PC can handle it, maybe you can try them on a virtual machine (or just download a live CD to see how a distro feels like before installing!).
Ubuntu is based on Debian, so you may find that distribution familiar. Most of the things you use/do in Ubuntu will work just as well on Debian.
Arch lets you choose a lot of things, and you may find it a bit overwhelming (but at the same time, very interesting if you like to customize your experience). One fantastic thing about Arch is its wiki, which is very complete. You may find that apt-get doesn't work here, because it uses other package manager (pacman), but you will get used to those little difference very fast.
Go ahead and try every distribution you find interesting (and a couple of those who don't too), even if after trying them you don't like them, you'll end up learning many things.
Answer: As an Arch user I'd highly reccomend it. it's not extremely beginner friendly but you'd catch on pretty fast, the Arch Wiki is really helpful.
If you're worried about installing software, don't be. It's extremely easy on Arch, and if it's not in the Offical Repos you'll find it in the AUR.
For installation I'd use the install script (https://github.com/helmuthdu/aui).
There's also plenty of youtube videos.
Comment: Do you run into problems using `.deb` packages build for Ubuntu, on arch?  Some binary-only software for Linux is distributed in `.deb` and `.rpm` formats only.


Is a linearly polarized plane wave a scalar wave?

Question: A linearly polarized plane wave, say polarized along the x-axis, in a homogeneous medium has its electric field given by $$\mathbf E(x,y,z) = (A e^{ik(ay+bz)}, \ 0 \ , \ 0)$$
where $A,a,b$ are real constants, with $a^2+b^2=1$, and $k = 2\pi/\lambda$.
Now if a vector field has only one non vanishing component, this component equals its norm, which by definition is a scalar, right? So is such a plane wave field a scalar field?
Answer: A scalar would be invariant under rotations. A non-zero vector is not, regardless of how many non-zero components it might have in any particular basis.


Monotone/ desaturated reflection material in Blender/ Cycles

Question: Does anybody know how to get desaturated reflection (monotone) made from colorful object? Blue object, white plane beneath. With standard settings the reflection is blue. I would like to have it black and white. I tried adding HUE/SATURNATION node to diffuse or glossy shader (connected into mix shader) but this doesn't seem to work… I know it's possible with compositing but it's a bit tedious…. Any idea?
Answer: You can use the Light Path node in your colored object's material.
Then, the object's reflections will be monochromatic.
Connect the Is Reflection Ray output into the FAC input of a mix shader.
Comment: Probably worth mentioning that is is done in the reflected object shaders, not in the reflective object. Wonder if there is any way to achieve the same effect only through the glossy material
Comment: The only work-around I've found so far is setting a plane as "Shadow catcher" (object/ visibility/ shadow catcher), rendering an object on transparency (separate layer), rendering the entire scene on another layer and than compositing everything together in compositor. Is works, however this "shadow catcher" option simply catches shadows (no reflection), so final result looks like "back from the 90'ties" ;). It would be nice if Blender developers consider adding simple "multiply" option - I mean physics working for multiply effect like in Adobe etc...
Comment: Thank you, that's good direction. This solution however works fine with with gray surface/ gray background etc. Is there a way to achieve good monochrome reflection with white surface and white environmental background? Something like multiply effect in Photoshop etc... With this set-up it kind of disappears… Thanks for reply once again!
Comment: @pablographix Hello :). White surfaces give just faint reflections - that's just physics. I'll check later today, if there's a way around it.
Comment: But i think the Compositor would be a good tool - you can mix layers there like in Photoshop (multiply, overlay, etc...) :).
Comment: And here I was, using the compositor with Cryptomatte and multiple render layer (because of volumetrics) to achieve the same effect … thanks!
Comment: @RomualdBrunet Glad to hear it's useful to others :). Good luck with your project.


How do governments stop hyperinflation?

Question: After reading this, I wonder "How can a government stop hyperinflation?"
What can other governments do to help?
And for completeness, How do governments keep currency stability?
Comment: you don't want to stop inflation, that creates a whole new set of problems, including economic stagnation. you want to keep inflation at "acceptable" levels, and that's why hyperinflation is a problem.
Comment: Thanks, I should clarify that I'm talking about hyperinflation.
Comment: Around bullet 2 and Venezuela then it will be very interesting if the UK will be forced to hand over the nations gold reserves. But it can go both ways even if they get the gold.
Answer: Runaway or hyperinflation occurs when there is a lot more money than there are goods at current prices.  In theory, you could fix this two ways.
First, you could flood the economy with goods, reducing the monetary pressures.  I don't know that anyone has really tried that against hyperinflation, as the amount of goods required would be tremendous.
Second and more commonly, you reduce the money supply or at least stop it from growing.  This often involves replacing the existing, near valueless, currency with a new currency.  So if it takes a thousand bills to make a reasonable purchase, you exchange one new bill for a thousand of the old.  The important part is that people and markets need to be confident that the new currency won't also be overprinted.
In practice, hyperinflation is generally triggered by a shortage of goods.  The shortage causes increasing prices.  The government attempts to overcome this by printing more currency, which is the exact wrong thing to do.  Because the shortage is still there, the government can never catch up.  They provide more bills.  People with more bills bid up prices.  Still a shortage.  The government provides more bills.  Prices increase.  Still a shortage.
The essential problem is that more money doesn't make more goods.  So printing money to fix a shortage in goods is much like a dog chasing its tail.  The faster it goes, the faster its target recedes.  Only worse, since the dog stays the same size.  Under hyperinflation, an economy shrinks.
Ideally, the first thing to fix is the shortage in goods.  Then a stable currency can be created.  If the government can't do that, then the problem gets worse before it gets better.  In the early stages of moving from hyperinflation to normal growth, already bad unemployment increases more.
The two things that external governments can do are to provide more goods to address the original shortage and to help restore confidence in the currency.  Possibly by accepting payment for the goods in the currency and then holding it.  Another alternative would be for more trusted foreign central banks to manage the money supply.  Of course, most countries don't want to surrender control of their money supply in that way.
To avoid hyperinflation from starting, countries need to limit their currency growth to match production growth.  And maintain an environment in which production is stable or growing.  If production does fall, the government has to allow a recession rather than trying to cover it up by overprinting currency.
Comment: You can't flood the economy with goods, because there is no mechanism to do that.  Also, think about what people do with tangible goods in a inflationary market.
Comment: Venezuela's situation was slightly different as far as nuances of how hyperinflation started (same large scale reasons, of course).
Comment: Hyperinflation is not caused by an oversupply of goods.  It's the reverse.  Venezuela has hyperinflation right now because of an over supply of money (as it printed to pay off debts, foreign and domestic as oil prices plunged) that's becomes more and more worthless over time.  Consumers buy tangible property right away to offset that because literally in a day or two it could be twice as much.  But the real problem is that per capita GDP is falling and has been due to inefficiencies with Socialism economies.  They never had much to begin with.
Comment: @KDog - That sounds like a basis of an answer in its own right.
Comment: "Hyperinflation occurs when there is a lot more money than there are goods **on the market**". Part of hyperinflation is that people won't sell today what they could also sell tomorrow for more money. In fact, why sell at all, instead of bartering? Of course, perishable goods are an exception, because they can go bad even quicker than the money itself, but toilet paper for instance is a classical example of a non-perishable consumer good.
Comment: Flooding the economy with goods to prevent hyperinflation is exactly how a ***normally*** operating market economy prevents hyperinflation!
Comment: "If production does fall, the government has to allow a recession rather than trying to cover it up by overprinting currency. " - ooh, you just predicted hyperinflation in the USD after coronavirus. Spicy! Is total global economic collapse coming, or will China take over? Find out in the next episode...
Answer: If governments want to control Inflation, hyper or otherwise, they need to reduce the money supply.
https://www.youtube.com/watch?v=GJ4TTNeSUdQ

How do governments stop hyperinflation?


Linking a category to a page

Question: So I have a category in the navigation section that I would like to link to the same link that is in the footer. I've tried copying the link path that I used for the footer link and putting it in the category for the one in the navigation however it isn't working. So could someone please guide me through the process?
Answer: in backend, go for Catalog > Catalog > Url rewrite management.
there is a default option in  magento to link category to cms pages.
better you go through this link : http://www.hostknox.com/tutorials/magento/url-rewriting
Comment: I see how that works but when I click the link, the url key is not the same as the link in the footer? How can I make these the same? I followed the steps in the tutorial.
Comment: is footer is a cms page. ? in cms pages, you have option to chnage the link.....
Comment: I'm not trying to change the link in the footer. I want the link in the navigation to link to the same page as the link in the footer. I've copied the url key for the link in the footer and tried to replace it with it's appropriate category in the manage categories section however it doesn't work. How can I change the url key for the link in the navigation to the same link as the one in the footer?
Comment: can you give the same url of footer to your category ?
Comment: essentially yes that is what I'm asking, I want them to link to the same page.
Comment: did you checked this : http://www.templatemonster.com/help/magento-adding-page-links-in-the-navigation-bar.html  and http://www.submitdigital.com/questions/add-categories-to-footer-using-php/

Linking a category to a page


"All of us had a good 'time' or good 'times' "?

Question: Which sentence is correct?

All of us had a good time.

or

All of us had good times.

"All" is more than one people, so I was wondering if "time" should be plural as well.
Comment: ***Have a good time*** is an idiomatic expression meaning:
*Enjoy oneself,* as in
*I hope you have a good time at the beach.* so, "All of us had a good time".
Answer: Which option is correct depends on the context, but the short answer is that it doesn't matter that we is plural, it matters whether there were multiple good times or not. There is some wiggle room with it, and in some cases you can use either interchangeably, but following this rule will give you a natural sounding sentence 99% of the time.
For example, if my friends and I all went to a concert together, I would say that we all had a good time, even though there were many of us.

We had a good time at the concert.
They went shopping, and all had a good time.
I had a good time relaxing by the pool.

Alternatively, if I was remembering the summer camp I went to every year as a child I would be more likely to say that I had good times there, even though I am only one person.

I had good times at camp.
We had good times on our road trip.
Remember rooming together at college? Those were good times.
Answer: The two sentences mean different things.
"All of us had a good time." implies a specific occasion, whether on a holiday or at a party or on a cruise.
"All of us had good times." implies a much longer period, such as: "when we were young" or "during our school days."
Thus "time" can be either singular or plural, depending on the context.
Answer: For OP's specific context, only the singular is idiomatically acceptable. Semantically it's possible to imagine that each of us had our own particular kind of good time (perhaps there was a party; some people enjoyed getting drunk, some enjoyed the food, some liked the music, etc.). But we use the singular because they all enjoyed themselves at the same place and time.
On the other hand, it's quite possible to say, for example,...

We've all had problems. But we've all had good times too.

...where the plural is perfectly natural because those good times occurred on different occasions. It's just about possible to impose that meaning on OP's example, but idiomatically almost all native speakers would probably switch to Present Perfect for that sense: All of us have had good times.


Custom System Dialog - Windows Mobile 6.5

Question: i am tryng to override system dialog (System Sound), by closing that notification and showing up mine.
Questions:
1- How to Close Notifycation Dialog from the system
2-How to cacth the key (Volume Key) that initiates the notification
3-show mine
Well i have googling this issue but i cannot get any advance:
My application is Qt based.
Answer: first of all i need a hook keyboard.
this links is what a i am tryng now:
http://www.codeproject.com/Articles/12154/Keyboard-hooks-in-WinCE
i am studyng and adapting this article to my needs.
Second:
I need to customized the system notification (Volume Control):
I wil apply this approach.
Well i will inform the result


LibreOffice doesn't have an icon

Question: In the application menu LibreOffice has no icon. How can I add it to it?
Comment: FWIW, I've notified LibreOffice Design team about this issue: https://listarchives.libreoffice.org/global/design/msg08865.html .
Comment: Good UX feedback. Send this thread to them. ;)
Comment: Do you mean: "doesn't has a *distinctive* icon"? So that you would like to add one that would suit you better?
Answer: The Icon shown is the LibreOffice icon.
Answer: What you are seeing was in fact the correct icon for the LibreOffice suite.
To make it explicit, here's the full set of the application icons of the LibreOffice suite, together with the LibreOffice icon itself on top (image taken from their website):

Notice how the top icon, the LibreOffice general icon, is the same "empty document" icon as you have on your desktop. And here's the logo from their web page:

From version 7.5 on, the main icon is redesigned to be more in line with iOS and macOS icons, hopefully reducing confusion:
Comment: What I'd expect is that they show the right icon depending on the active application - Writer, Calc, Express, etc. like it's done in Microsoft Office. Instead they show this "new file" icon, which is a bit weird.
Answer: If you would like to change the icon anyway, you can change the icon of any app in one of two ways (although there may be more ways to do this):
Manually

Find an app in the Finder, usually in your /Applications/ folder.
Click on it and press ⌘I to bring up the Information panel
Drag the icon file you want to use onto the application's current icon on the top left.

Note: step 3 will only work if you have an .icns file. If you have a .png file (most common) which you would like to use as your application's icon, perform the following steps:

Open the image you want to use with Preview
Press ⌘A to "select all" of the image in Preview
Press ⌘C to copy the image
Go back to the information panel and click on the application's current icon on the top left
Press ⌘V to paste the image.

If you would like to restore the application's original icon, simply click on the application's icon in the Info panel and press ⌘⌫. This will remove the custom icon.
Using a Program
If you want to do this for many applications, or you need to do this relatively often for a program which keeps on resetting its icon due to frequent updates or any other reason, you can save a lot of time using a free, lightweight tool called LiteIcon.
As with the manual method, to restore any application's original icon, simply click on the application's icon in the Info panel and press ⌘⌫. Alternatively you can go into LiteIcon and drag a custom icon "off" an app, which will also restore the original icon.
Answer: I concur; the generic document icon for LibreOffice on macOS is confusing to see in the Dock. What I have done is replace it with this distinctive icon. Hope this helps.  https://iconarchive.com/show/red-orb-alphabet-icons-by-iconarchive/Letter-L-icon.html

LibreOffice doesn't have an icon


How to split a line in segments of a given length in cartodb?

Question: How can I split a (poly)line in segments of a given length in cartodb?
I want to be able to visualize segments of street, each 4m long, following the road curve.
One way would have been to trace the road side with a line and then cut it in chunks of 4m.
I cannot use a simple "grid", as the 4m have to be tangent to the path, and I did not find a way to create points or lines with a given distance of each other.
It seems possible in QGIS and OpenJump (How to split a line every x meters?) but I cannot find a way to do it in cartodb.
Any suggestion?
Answer: cartodb use postgres/postgis so you can make nice sql queries. I couldn't try but this one below should help:
Split linestring to smaller lines


Remove comments from a comment box as an admin

Question: I have a facebook application in which I generate pages for each object:
www.mydomain.com/object.php?object_id=1 --> apps.facebook.com/myapp/obejct.php?object_id=1

In each one of the pages I generate a comment box with the following code:

<fb:comments href="http://www.mydomain.com/object.php?object_id=1" num_posts="10" width="380"></fb:comments>

The comments box shows properly for each object.
I also put myself as an admin in the headers of the page (inside the body tag):
<meta property="fb:admins" content="MY_FACEBOOK_ID"/>
<meta property="fb:app_id" content="MY_APP_ID"/>

When a users comments inside the comment box, it shows the comment.
If I want to delete it, it won't let me. It will only let me "report as abuse" or "spam"
Does anyone know how can I remove the comments?
Answer: Try this:  http://developers.facebook.com/tools/comments
This will help in Moderate your comments.
Answer: I found this question via Google after running into this problem with a comment box created using the Drupal "Facebook Social Plugins" module. After trying to figure out where the moderate drop down had gone on the test comment I left and that of another administrator, I realized that it wasn't showing up for me because both the commenters were administrators for the app, so Facebook assumed we didn't need to moderate admins comments.
Once a non-admin left a comment, the moderate drop down gave us the option to delete the comment as normal.
Answer: use app id
like this :


Evans-Krylov theorem

Question: Do there exist estimates for nonconcave functionals similar to Evans-Krylov theorem  in chapter 6 of  Fully nonlinear elliptic  equations  by Luis A.C affarelli and Cabre? Perhaps there is a counterexample.
Answer: In two variables, there are $C^{2,\alpha}$ estimates for fully nonlinear elliptic equations without any convexity/concavity assumptions on the nonlinearity. See, for example, section 17.3 of Gilbarg-Trudinger.
In dimensions five and higher, it's false in general. There are counterexamples such as the one constructed by Nadirashvili and Vladut, where $u$ is a viscosity solution of $F(D^2u) = 0$ (with $F$ smooth and non-concave) but $u$ is not even $C^{1,1}$. (This implies that the $C^{1,\alpha}$ regularity that follows from Krylov-Safonov is the best we can hope for in general.) As far as I know, this question--whether viscosity solutions of fully nonlinear elliptic equations are always $C^2$--is still open in dimensions three and four.
There are some interesting results that give additional hypotheses under which we can salvage $C^{2,\alpha}$ regularity even though $F$ is not concave or convex. Caffarelli and Cabre have such a result for $F(D^2u,x) = 0$ where $F(\cdot,x)$ is the minimum of a concave and a convex function for each $x$. Yuan has a $C^{2,\alpha}$ estimate for a particular non-concave $F$. Savin has a perturbative result for $F(D^2u, Du, u, x)$ saying that $u$ is $C^{2,\alpha}$ if $F$ is smooth and uniformly elliptic in a neighborhood of $(0,0,0,x)$ and $u$ is small in $L^\infty$. We should also mention Armstrong-Silvestre-Smart, who showed $u$ solving $F(D^2u) = 0$ is $C^{2,\alpha}$ outside a set of Hausdorff dimension $n-\varepsilon$, at least if $F$ is $C^1$.
Comment: Thanks  for your patient answer. I will read these papers and look forward to commuinicating more with you.

Evans-Krylov theorem


Where would my futures contracts go if the counterparty gets liquidated?

Question: What would happen to my futures contracts such as S&P500 futures if the counterparty of my contracts gets liquidated due to a heavy use of leverage? Since futures contracts are made between two parties entirely, if one party gets liquidated, the contracts should be cancelled I guess. However, I have not heard of any investor whose contracts are gone due to the liquidation of the counterparty.
Answer: The actual counterparty to an exchange-traded futures contract is a clearinghouse. The clearinghouse acts as a intermediary between buyers and sellers in a futures market. This is so that traders do not have to worry about counterparty risk (i.e. you don't have to worry about the bankruptcy of the other party). Clearinghouses have an "insurance" fund to cover losses from counterparties. Sometimes, brokers are members of the clearinghouse and have to financially contribute to a central fund, therefore brokers may also have an incentive to ensure that their clients are actually able to fulfill their end of a futures contract.

What would happen to my futures contracts such as S&P500 futures if the counterparty of my contracts gets liquidated due to a heavy use of leverage?

Nothing would happen. The actual counterparty is a clearinghouse. The clearinghouse would use its own funds to cover the other end of the futures contract.
Note that this answer is only applicable to exchange-traded futures contracts. For over-the-counter futures contracts, both parties to the contract may be subject to counterparty risk.
Comment: and what if Gamestop happens to gold and threatens to bankrupt the clearing firm?
Comment: "happens to gold"?  What...?
Comment: @user253751 I'm not familiar with the Gamestop case. Normally, when faced with increased risk, brokers and clearing firms would tighten their margin requirements to reduce risk to themselves.
Comment: @Flux There were reports from the financial industry that brokers and clearinghouses could go bankrupt over Gamestop


Handle concurrency on Sql Server to modify specific column

Question: I have table that suffers from racing condition and I don't know how to fix it. I can't solve it 100% in code, so I need the server to help me.
The scenario
Admins of a system may accept or reject an appointment.
This can be done by email (via token etc) or by logging in the system and doing it via admin panel.
The problem appears when two admin do it at the same time:
t = 0:
admin A clicks accept from the system email;
admin B clicks reject from the admin panel;
t = 1:
back-end checks was appointment already handled?
This happens at the same time for both admins, so they both
       pass the test -> appointment is waiting for approval...
t = 2:
back-end A sends query "update status to accepted"
back-end B sends query "update status to rejected"
t = 3: both sqls hit the server.
The server than changes the appointment to accepted, then proceeds to execute the second query, and changes the appointment to rejected.
This table has heavy traffic, so locking it is not an option.
What I think could solve my problem, is to:
first: have a query lock the row;
second: check the the status column to see if it is already set;
third: if not set, then set the value;
fourth: release the lock;
meanwhile, the second query would keep trying to acquire the lock. After it succeeded, it would then proceed to check whether the value was already set, and then it would find that indeed it was, and would return an error or something.
How can I go about doing something like this on Sql Server?
The flow would look something like this:
while (can't read) {

    try to acquire lock;
}

// lock acquired.
read appointment from table;
if value is null, set the value;
release lock;

I figured out my framework is using READ_COMMITTED_SNAPSHOT as default.
Answer: We had a similar requirement and so added an extra where clause to the query. E.g.
UPDATE AppointmentTable
SET STatus = [Approved/Rejected]
WHERE AppointmentID = @ID AND Status = Pending

Then afterwards, check how many rows were updated. If there were 1 rows updated then report back to the user that their action was recorded. If 0 rows were updated then report back to the user that someone else has already done the work.

Isn't there a chance the queries will be executed "at the same time"

Nope. If they execute "at the same time" one of them will still get the update lock first. The other will have to wait for the update lock. When the 2nd gets the lock it still has to check the where clause to validate it's still true. If it's no longer true then it skips that row and no update happens (@@rowcount = 0). The key is to have the old value in the where clause.
Answer: As @Kin indicated, the solution hinges on what transaction isolation level you're using.  Your DBA should be able to answer that question.  If you're using plain old out-of-the-box READ_COMMITTED (the default) and no SNAPSHOT isolation, you should be able to:

BEGIN TRANSACTION
UPDATE AppointmentTable SET AppointmentStatus = AppointmentStatus WHERE ID=@ID (This will create an update lock on the row, but you haven't altered anything yet because you're updating to the same value that's already there.  If someone else is updating this row, your transaction will wait for their update to complete)
SELECT AppointmentStatus FROM AppointmentTable (If someone else is updating this row, your transaction will wait for their update to complete.
If the AppointmentStatus IN ('Accept','Reject'), you can rollback your work, even though nothing was really updated so far.
If the AppointmentStatus NOT IN ('Accept','Reject'), UPDATE AppointmentTable SET AppointmentStatus= 'either Accept or Reject'
Commit transaction
Comment: Thanks for your input, it seems simple enough. I figured out my framework is using READ_COMMITTED_SNAPSHOT as default.


Can skill ranks be spent at level 1?

Question: Can a character put skill ranks into skills at level 1? I am brand new to Pathfinder and don't know if that's allowed. All the information I get is from Masterwork Tools, which was very vague on the subject.
Comment: Welcome to the site. Take the [tour]. I've taken the liberty of editing your question's tags and the question itself; if I've made an error, feel free to correct it. Thank you for participating, and enjoy your new experience with *Pathfinder*.
Answer: Chargen software is useful but is no substitute for learning the rules for creating a character. To learn the rules of creating a character you should read the "Generating a Character" section of the Pathfinder Roleplaying Game Core Rulebook (p. 14), or the Character Creation section of the online System Reference Document (SRD).
For skills, the answer is found in Step 4 (in the book; oddly it's Step 5 in the SRD), which instructs you to (and how to) allocate your skill ranks at 1st level.
Comment: Masterwork Tools is an app that contains everything available from the Pathfinder Open Reference SRD.
Answer: Yes.
Skill ranks are awarded at level 1, using the listed value under your class entry.  You can only assign one rank in a skill per level, so at first level any given skill can only have 1 one rank.
In addition, class skills (listed under the class entry in MWK Tools) gain a class bonus of +3 as long as you have spent at least one rank in the skill.

Can skill ranks be spent at level 1?


Hang ceiling fan grounded box but no ground wire

Question: I'm trying to hang a ceiling fan and connect the ground wire from the mounting plate but I don't have any ground wire coming from my box. I have verified that the box itself is grounded though by checking that the voltage between the black wire and the side of the box shows voltage. Where should I connect the ground wire to?
Answer: Your junction box is grounded by the flexible metal armor of the cable feeding the box. You'll need a 10-32 ground screw similar to the one pictured below. You can screw it into one of the two smaller holes on the back of the box. Fasten the ground from your fan mounting plate to the screw.
Comment: @ThreePhaseEel  Would the individual wires be labeled if it was AC/BX?  That's the reason I thought it was FMC with wires pulled in.  Have a great weekend.
Comment: Ah, you might be right that it is FMC -- feel free to revert my edit then
Answer: Looks like you are using metal conduit instead of cables.  The metal conduit will double in function to also be a ground path.
Can connect the ground wire from the fan to a screw on the box, usually there is a screw or screw hole on the box for ground wire/s.


Example of a (not quasi-linear) production function whose inputs are not perfect substitutes but are not asymptotic at the axes

Question: I'm looking for an example of a family of production functions indexed by, say, rho, where the inputs become closer and closer to perfect substitutes as rho approaches 1, and yet, the marginal product of, say, L, approaches a finite limit as L approaches 0.   Of course one can construct quasi-linear production functions that exhibit this property for one input, but their behavior is really awful. One would think that CES production functions might exhibit this property, since their limit is an affine function,  but they don't.   Indeed, clearly, any production function in which L is raised to a power < 1 is going to give me  the same problem.    Any suggestion would be very much appreciated.
Answer: You could, for example take the function $f: \mathbb{R}^2_+ \times[0,1] \to \mathbb{R}$.
$$
f(L,K, \rho) = L + K + (1-\rho) L K.
$$
For $\rho = 1$, we have $f(L, K, 0) = L + K$ which is a production function with perfect substitutes.
The marginal product (of say $L$) is given by:
$$
\frac{\partial f(L, K, \rho)}{\partial x} = 1 + (1-\rho)K,
$$
which equals $1$ if $\rho = 1$.
Comment: Thanks very much, @tdm,   I ended up working with something that's effectively the same.        $f(L,K) = L + K  + \alpha ( log(L) + log(K) )$.


Calculation, replace dot with a comma

Question: I have an order form on which I use the jQuery Calculation Plugin to sum up the total.
This summing up works fine, yet there is a problem with the produced 'sum'. In the sum I wish to replace any dot with a comma.
The basis of the code is;
function ($this) {
    var sum = $this.sum();
    $("#totaal").html("€ " + sum2);
}

Using a .replace() directly on the var sum doesn't work (referenced function not available on object). I have also tried this (but without effect);
var sum2 = sum.toString().replace(',', '.');

As I'm kind of new to jQuery I'm pretty much stuck now, could anyone point me in the right direction?
Answer: Your replace line is almost right. You need to use a regexp with the g option, which says to replace all instances instead of just the first. You also have the order swapped (first is what to find, second is what to replace it with).
var sum2 = sum.toString().replace(/\./g, ',');

Note the \ before the .: . has a special meaning in a RegExp, so it has to be escaped.
Comment: Wow, thanks for the quick reply's. The above line works perfectly!
Answer: If Sum was a number then this would work.
var sum_formatted = String( sum ).replace(/\./g,',');

Can you run typeof(sum) and tell us what the output is.
Also if you can set the project up in jsfiddle.com that would be great.
Comment: typeof(sum) returns "Number". Yet the line above doesn't seem to work (it doesn't replace the dot).
Comment: Doesn't work because the order of arguments is still incorrect.
Comment: I actually assumed that YDL wanted to change comma's to dots. Anyway i've changed it around
Answer: Your problem is that your replace function should read replace('.', ',') not the other way around (you had replace(',', '.')), Note that the first argument is what you're looking for, and the second argument is what you want there instead.  You were replacing all commas with periods.  Regex here is unnecessary.

Calculation, replace dot with a comma


Does it matter which side to turn crankshaft?

Question: When doing things like setting TDC or just random testing (of the timing chain/belt, for example), does it matter whether the crankshaft is rotated clockwise or counterclockwise?
Answer: Hardly ever. Most turning should be done clockwise. If you need to rotate it back a few degrees to get it to the specific TDC point, it's not an issue. This will not cause any damage to your engine. If using the main bolt in the end of the crankshaft, you do run the risk of it loosening when turning it CCW ... but that isn't a big deal either. Just tighten it back up by cranking it back over CW, then get the crank back to where you want it to be. Usually if done easily (no sudden jerks), the bolt in the crankshaft will not loosen and is a good place to rotate the engine from.
Answer: Not at all, in fact in some engine manuals, ignition section, they instruct to move clockwise up to TDC then counterclockwise before 10 degree mark, then again clockwise until that mark in order to effectively find where the spark should jump. The manual states that's needed in order to exclude any back play in the distributor's coupling gears to camshaft. The only thing to considerate is to be sure, if you are rotating by damper, or its bolt/nut to crankshaft, it is well secured because otherwise you would loosen these.
Answer: Even if your cams are gear driven it should be in the same direction as normal operation, but chains especially have a "slack side", and under load it is slacker than you think. When refitting timing belts and lining up the scribe marks you should be torquing the crankshaft in the normal direction of rotation. You don't want to be out by one tooth.
Be careful never to rotate the crankshaft out of the "safe zone" if the camshaft is decoupled.
For timing, and if the chain is suspect, better to test with a light while it is running (as it may be jumping around in this case) a road test may be the best method of tweaking.
Comment: Just to clsrify, some engines can run in both directions by design (2 stroke, steam).


Sun light on sour dough starter

Question: I have left my sour dough starter on the North facing window during the day.(I live in Australia)
It has been exposed to warm, direct sunlight.
Have I killed my wild yeasts?
Should I start again?
I have seen little to no activity.
The starter is 4 days old.
Answer: It's hard to say, not knowing the exact temperatures reached in your starter.  I would move so that it no longer is in the sun, and continue to feed for a couple of days to see if it has any life.

Sun light on sour dough starter