What is the Spanish word for cheek?

Question: Is it mejilla or cachete? Are there dialectical differences? If yes, what are they and which word is used in what context?
Answer: In general, mejilla is the anatomic term for cheek, cachete is rather informal. Cachete can also refer to a smack on the cheek as well as to the buttock. So, without context cachete would be ambiguous.
The actual usage of the words differs between countries. When referring to the cheeks, I guess mejilla is more common in Spain, while cachete is more likely to be heard in countries in South- and Central America. I don't think there's a great difference between those countries when referring to a smack or to the buttock (i.e. they use cachete with equal frequency).
Comment: `Cachete` is the smack on the butt and most used, it can also be `bofetada`(only on the face) or `galleta` (slang). For me all three are more or less coloquial when used on slaps on the cheek, the action by himself it is always informal... Butt can be called `nalgas, culo, trasero, pompis`. On anatomy would be `glúteo`.
Comment: Also a slap, usually translated as 'cachetada' may be said as 'cachete', specially for childs.
Comment: Can cachete also be used as a slang for butt cheeks?
Answer: Cachete as buttocks is mostly seen in Central and South America; in the Caribbean and Spain, cachete can mean cheek or having something for free. Like, "llevatelo de cachete", which means, for free. Take into account languages grow over time and become sort of territorial and dialects, that's where the differences come from. For example, in Dominican Republic and Puerto Rico, due to the continuous contact with the US, there are many anglicisms that have been accepted. Like "elevator" is properly translated to Spanish as "ascensor", while "elevador" is nowadays accepted and used in proper Spanish. Same with many other words. Then, Central and South America are so close to Portugal they sometimes get mixed words from Portuguese as well and beautifully keep many native words which have become part of their Spanish. All languages go through this. If we go to Italy, there's one proper Italian language known by all and one dialect every block different than the last block and so on. Is just human development I think.
Answer: Mejilla is in Spaniard's Spanish (castellan), while Cachete is Native Caribbean Taino. Been Cuba, Dominican Republic, Puerto Rico (then San Juan Bautista) where the gates of the western Spanish empire influence in Taino words grew spreading with conquistadores all over The Americas ,potatoes comes from patata in castellan where its started from the Taino word batata or sweet potato (which funny, isn't a potato its a yam) but words like hurricane, Taino huracan, Tabaco/tabaco, Hummock/Hamaca, canoe/canoa, BBQ/barbacoa. This the legacy of the Taino people to the Americas and the world.

What is the Spanish word for cheek?


Why was this character banished from Tomorrowland?

Question: What was the exact reason Frank was banished from Tomorrowland?
Answer: We are never told:

We're never explicitly told, but it likely has something to do with Frank's tachyon machine, called the Monitor. After predicting with 100% certainty that the people on Earth would destroy themselves, it seems that Governor Nix (the leader of Plus Ultra at the time) took a hardline approach to +U isolating themselves.
The film only tells us that he was exiled after completing work on the Monitor. The feeling I got was that Nix's isolationist policies caused a lot of friction in the ranks of the organization, leading to the banishment of people like Frank. Source

Some details at the wiki:

Nix appears to greet them, and takes them to a building linked to a tachyon machine designed by Frank that can show images from the past and future, from which Casey learns that a worldwide catastrophe will happen in the near future. Because of this discovery, Frank lost all hope and was banished from Tomorrowland.


Which series has the protagonist expanding the metal in a bullet to jam guns?

Question: I'm not sure if this was a movie, book, or TV show. The basic scene was a standoff where the protagonist (or possibly their mentor) vibrates the metal in the chambered bullets to jam the enemy's guns and make a quick escape. All of the details are hazy except for the bullets being ever so slightly expanded to jam the guns.
Answer: In Doctor Who: The Sontaran Strategem, the Sontarans use a "cordolane signal" to cause the bullets to jam in the guns of their enemies.

The figure reveals that the room is contained within a cordolane
  signal that excites the copper surface of the bullet and causes
  expansion in the barrel, rendering their guns useless, as well as
  blocking their radio signals (during which time Gray tries using his
  pistol but finds that is also useless).
Comment: Bingo. This has got to be it, I was wavering about whether I should mention the keyword "copper" or whether it was a figment of my imagination.
Comment: The copper is actually key.  Despite what the Doctor occasionally thinks, UNIT soldiers aren't actually stupid, and once he explains to them how the cordolane signal works...


How do I in-system program LPC17XX?

Question: I plan to buy an mbed module to get started with NXP LPC17XX. Developing and downloading code seem the easiest possible. What are my options for in-system programming this code in non-mbed devices? I understand the bootloader only requires a UART connection to my host PC.
What tools are available for Windows PCs? Can they directly work with the object code I created on the mbed site?
Can I use code for the LPC1759 directly on other LPC17XX devices?
Answer: You can use the lpc21isp programmer which was originally written for the LPC21xx series but  recent versions also support the LPC17xx series. It requires only a serial port but it is helpful to connect the RESET and ISP pins because they will have to be manipulated to force the chip into the bootloader.
There are binaries for Windows and the code compiles without problems on both Linux and OS X.
PS. There is also JTAG but who would want to use that. :)
Answer: The mbed forum  is the best place for questions like that, it's been answered there. However, mbed binaries can be executed on any target using the same device. Here are the details from the mbed Notebook.
Comment: Leon, thanks for the link, but I'm not sure the question belongs on the mbed forum; it's about programming a device when I _move away_ from mbed.
Comment: this is the place to ask all technical questions. We should not turn people away because their are other options.
Comment: I did point him to the correct answer, though, on the mbed web site. I found it by searching the mbed forum, which he could have done in a few seconds.
Comment: you make it sound as if I'm too lazy too look it up on mbed. I didn't because I didn't expect to find it there, as it doesn't have anything to do with the mbed module; that you program over USB.
Comment: @stevenv: mbed is posed as a prototype module. Naturally they'd want you to use it as a base for production units, and tell exactly how to do it.
Answer: Looks like the LPC17XX series is all the same core, just different peripherals, memory size and clock speeds.  So the code should work, as long as you don't run out of memory, try to use a peripheral that isn't there or have timing dependent code.
You can program the chip via JTAG or its built-in bootloader which allows programming via UART0 which could be attached to a RS232 port, a UART to USB chip, or whatever you want.  There is a pin that needs to be held low at during reset to get into the on chip bootloader.  See the user manual for more details.

How do I in-system program LPC17XX?


How does gumbo spoil while still cooking?

Question: I'm new to new to New Orleans style of cooking. I heard that gumbo spoils while still cooking. Is this true. I'm confused. Any answer would help.
Comment: Do they really mean "spoil" as in "go rotten" or do they mean something else? Can you cite a source for this statement? Lots of the stuff people "hear" isn't true.
Answer: I believe in this context, spoil is not referring to food safety issues such as dangerous pathogens, but rather that the dish does not fulfill its culinary promise.
For example, any soup or stew that is cooked on too high a heat will become burnt on the bottom. You won't get sick from eating it, but from a flavor aspect, it's spoiled.
Not being an expert in cooking gumbo, I can't cite all the specifics, but there surely is an optimum heat and time that it should be cooked. Stray too far from the base recipe and technique, and you may spoil the gumbo.
From your comments, it sounds like the recipe calls for cooking the gumbo to a point of "doneness", and then turning down the heat so that it stays below the boiling point. In other words, if the fully cooked gumbo continues cooking at a full boil, the recipe will be spoiled.
Answer: "Spoiled" is a common term used for judging whether food is fit to eat. It is supposed to apply to food which is full of potentially pathogenic bacterial colonies, but of course, it is impossible to see bacteria.
However, there is one quite sure sign of bacteria: slime. Bacterial colonies tend to produce slime on usually-dry food items. So, people have learned to associate slime with bacteria. If somebody is not very discriminating, he or she may decide that every slimy food must be spoiled.
Gumbo frequently contains okra, one of the rare foods which releases slime when cooked. This has nothing to do with bacteria, the compounds which create the slime are produced by the vegetable itself. But as a result, you can have slimy gumbo.
Now, if you have a person for whom "slimy" is equivalent to "spoiled", either because they think that "spoiled" is the same as "dangerous" and that "slimy" is always "dangerous", or because they know the difference, but dislike the texture and feel that any slimy food is unfit for eating, it is very probable that this person will call a slimy gumbo "spoiled". Is this correct or not? For some definitions of "spoiled", it is correct, for others, it isn't.
In any case, gumbo does not become infested with dangerous levels of pathogenic microorganisms while cooked.
Comment: It sounds more like the recipe calls for cooking the gumbo to a point of "doneness", and then turning down the heat so that it stays below the boiling point. In other words, if the fully cooked gumbo continues cooking at a full boil, the recipe will be spoiled.
Comment: "starts to boil after it's done cooking" sounds very differently from "spoils while cooking". Could that person have meant that they are leaving their gumbo on the counter, and if they see bubbles (a sign of fermentation) a few hours later, that it's spoiled then? In that case, it's not "spoil" which is used with an uncommon definition, but "boil".
Comment: Perhaps it might be recommended to use the term "ruined" instead.
Comment: I was told that from someone from new Orleans that when it starts to boil after it's done cooking, that it is starting to spoil. I thought this was something that someone said that didn't make any sense. Thank you for clearing that up for me!!!
Comment: At this point, it is really impossible to say what exactly that person meant. A misunderstanding could have occurred at one of many points. I still stand by the "does not become infested with bacteria while it cooks" part. Anything else is more of a conjecture.
Answer: To answer the question in the purest sense of the possibility of it happening, I can say that gumbo will indeed be legitimately spoiled when the pot is turned off if: a) you may have used stock that was already spoiled or b) one of your seafood ingredients may have already been spoiled. By spoiled I mean stock that had been prepared ahead of time but left out over night and refrigerated 16 hours after the time it was prepared or seafood that was stored in the fridge after it had spoiled. Both have happened to me at different times unfortunately. Very expensive lessons learned.


Files with 644 permissions and owner apache:apache are still failing Security Review module

Question: I am using Drupal 7 and just installed Security Review. According to this page, the files should be 644. I tried that but I am still failing Security Review (I'm getting hundreds of files under the section "The following files and directories appear to be writeable by your web server." I assume this is because the files are owned by apache:apache. What are the correct file ownership and file group membership settings for these files so I can pass the Security Review?
Answer: The important thing is to make sure your web server user cannot write to the document root, except for public/private file folders.
There are many, many different configurations that can allow for that (e.g. you might leave the perms at 644 and change user ownership; or you might not change ownership but change perms to 444, or any number of other things).
Ultimately, you should ask your server admin to recommend an appropriate configuration for your OS and the software/accounts that are installed and enabled on it. Crowdsourcing an answer to a question which affects the fundamental security of your website, and potentially server, isn't guaranteed to end well.
Answer: As long as the user and the group ownership aren't the ones used to run the web server, any value is fine, for the Security Review module. Even the values set when the files have been created would be fine, as long as they aren't the same used to run the web server.
Those files are already owned by apache:apache, which means that either the web server (or PHP) created them, or the user and the group ownership have been changed after the files were created. In both the cases, changing user and the group ownership won't probably resolve the real issue.


As a US citizen living in Europe, must I use a trust as the owner of an N-reg aircraft?

Question: I have found lots of information online about European pilots owning and flying N-reg aircraft using trusts set up in the US. I live in Europe, but I'm a US citizen, so must I also set up a trust because I don't live in the US? I cannot seem to find a definitive answer on this with references to supporting regulation.
Answer: As a US citizen you can own an N-reg aircraft directly, regardless of where you live. The regulations on aircraft registration are in 14 CFR Part 47. They say who can register an N-reg aircraft, but they don't say anything about where that person must be. 47.3(a)(1) simply says:

§47.3   Registration required.
(a) An aircraft may be registered under 49 U.S.C. 44103 only when the
aircraft is not registered under the laws of a foreign country and is—
(1) Owned by a citizen of the United States;

The regulations are summarized in a more readable way on this FAA site. A trust allows a non-US citizen (or non-resident alien) to own an N-reg aircraft provided they have no more than 25% of the voting rights in the trust, per 47.7(c)(2)(iii).
Answer: No, as a US citizen you do not need to jump through any hoops to register an N-reg aircraft in your name, anywhere in the world. It doesn't matter where you live. I used to own an N-reg aircraft when I lived in Germany. It was registered to my German address. When I moved back to the US and brought it with me I submitted a change of address, and that was the end of that.
Answer: According to NBAA, trusts are used by non-US citizens to register aircraft with the FAA. Because you are a US citizen, it looks like you don't need a trust to maintain the FAA registration. Here's the article with references to the FARs: https://nbaa.org/flight-department-administration/aircraft-registration-transactions/owner-trusts/ . Here's an aviation trust company: https://aviationtrust.com/ . I have no financial interest in that company. They appeared higher up in my search.


fastest backup for large files

Question: what is the fastest way to duplicate a folder contain few files with few hundred megs size and other few megs small files? (say, /var/lib/mysql)
cp or tar or rsync or...??
Comment: When you say duplicate, do are you trying to just copy the data to another directory, partition , disk or across a network ?
Comment: the fastest one first (perhaps another directory/partition/disk). then the result will be backup again using other better method accross network.
Answer: rsync in general will be faster than cp or tar, because rsync only transfers those files which have changed, and with --partial it will only transfer the parts of a file that changed.
Having said that, rsync works much better if you know what you're backupping and can arrange things so that rsync doesn't have to do as much work.  For example, rotated log files in /var/log work much better if you rotate them to a filename with a date in it, instead of .0, .1, .2, etc..
One more note:  In your question you mention /var/lib/mysql.  Using rsync to backup that is a pretty bad idea, use mysqldump to get a reliable backup.  If that backup is too large to transfer frequently, use mysql replication and backup from a slave.  (You still should do a full backup on the master periodically though, replication can fail too).
Comment: rom man rsync: "--partial   keep partially transferred files".  It does not transfer only what changed in a file. If a file changed, the entire file gets transfered.
Comment: Yes, this is slightly inaccurate. --partial keeps partially copied files on the sender if the transfer is aborted. It has nothing to do with the rsync algorithm that transfers only parts of partially changed files, which is on by default (although can be turned off with --whole-file).
Answer: Depends on a few factors.  For a large number of small files it is generally better to do tar.  If it is a small number of large files, cp is ok in most instances.
If you have a list of files but only a small portion of them change, rsync is more efficient.
Comment: If you're planning on backup up mysql files, be sure to have a look at the mysql docs.  There are a few traps to watch out for http://dev.mysql.com/doc/refman/5.0/en/backup-strategy-summary.html
Comment: example is /var/lib/mysql which contain not much files and most of them relative big
Answer: It depends on what you are backing up. You can't just backup live database with rsync, you'll end you with a corrupted file. For databases, like mysql, you need to set cron, for example, to run 'mysqldump' and then rsync that file. Also, make sure you append 'date' with the file name so, you know when this file was backed up and have several backup copies just in case.
Answer: Ah, the magic word backup
I can't say much about relative speeds of the methods you mention, but I think rsync's ability to backup only files which have changed, makes it the best method.
Especially if most of the files don't need to be copied.
Answer: If you have quite a few small files, running a tar over them will increase the transfer speed considerably.
If the files are mostly text (which isn't the case of mysql binaries or databases), consider zipping the tar (bzip2 and the like). Otherwise you won't get anything from the compression so just leave the tar alone.
Answer: Assuming that you already have an older copy of the files and you only need to refresh the copy, then rsync is much faster than cp or tar because it only transfers the bytes that have changed. A 100MB file with a few changed records will update in a few seconds. I have found it to be perfect for database files but I have had less success with binary files.
But if the purpose of the copy is for off-site backup, nothing comes near to rdiff-backup. rdiff-backup, like rsync, only transfers changes within files, but it also maintains the incremental changes so that you can restore any file from any earlier backup date.
And, as for the SQL databases, rdiff-backup checks for changes made during the backup and fixes them automatically, so IMHO it should be safe. Unless, of course the SQL server holds data in memory without writing it to disk - then it will not be safe.
Answer: SAN Snapshot is the fastest way, but probably not the answer you were looking for.

fastest backup for large files


Extract All Pixel Values for each band in a Multi Band Raster

Question: I have a few multi band rasters I'm working with, and I need to perform statistical analysis (in another program) on the data. My mentor told me to determine the value for each pixel in each band, and from there move to the other program. But I'm not sure how to go about this. I've tried a lot of things, including pixel inspector and zonal statistics, but I don't think either of these give me exactly what I'm looking for. Does anyone have any other ideas?
Answer: If I understand correctly you can accomplish this manually by using a tool such as Composite Bands:
http://help.arcgis.com/EN/ARCGISDESKTOP/10.0/HELP/index.html#//00170000009p000000
Go into ArcCatalog and expand the multi band raster dataset (clicking the "plus" icon) and drag a single band into the input dialog for Composite Bands.  Make sure the one band is the only input.  Once run you will get a new single band raster dataset.
Then just repeat with the other bands.
Once you have all of the bands separated use raster to raster conversion tools to convert them to whatever format the other software you are using can consume (probably GeoTiff or ASCII).  What software is it?  Perhaps we could assist further in determining format.
You may find these discussion helpful:

https://geonet.esri.com/thread/31007
Extracting one band from three band raster in ArcMap?


Is my PSU compatible with my motherboard and processor?

Question: I have an ASUS TUF z370 plus motherboard, with an i7 8700k CPU, and a Chieftec-iARENA GPB-500S PSU. I have trouble connecting power to the motherboard ATX 12V slot. The motherboard has an 8 pinhole slot, while my PSU has an outlet that has only a 4 pin thingie. Is it okay to plug this in? I can provide pictures if needed. The 4 pin outlet fits nicely into the motherboard.
Comment: Images are always helpful.  Add a link to them at a public sharing site, like imgur.com, and someone will add them to your question for you.
Comment: added pictures of the pins and the slot
Answer: Of course it will just fit in (thanks to ATX-standards), because the 8-Pin EPS-variant on your motherboard is just 2x 4-Pin (but mirrored).
Using only one 4-Pin connector halves the amount of +12V and GND pins to two (Instead four)
Despite your PSU featuring only single rail +12V, it really won't make that much difference if you use the 4-Pin connector only. The Core i7 8700k has a TDP of 95W (according to Intel) which the two +12V cables a 4-Pin connector features can handle. If you take a total of ~4 Amps per line (95W / (12V x 2)), that should work.
Suggest to just test if the PC will boot at all and than do a stress test of > 30 Min while you watch for smoke etc.

4 pin cpu power on AnandTech
PSU connectors --> scroll to shortly above 8Pin EPS
Image of 4-Pin and 8-Pin (EPS) connector pin out
Answer: It will fit because ATX is standardized, but do you want it to is the question.
The CPU should post with only one of these in (as the connector socket is actually looking for two of these, side-by-side, often with one connected plug), but you're not providing the by-design amount of power that the processor and motherboard will use. This can have unpredictable side-effects and as another answer on here lists, could have you "watching for smoke" which is a thing you don't want to do with your brand-new 8th-gen processor.
Look for a second one of these cords hanging off of your PSU (not uncommon) to plug in with it.  You can also sometimes find adapters which allow you to plug in molex connectors to this spot, but that's not as stable and definitely not something for overclocking with.  Finally, if your PSU is modular (EVGA, ANTEC, other high-end brands) then you may have another one of these as a second cable you can plug into the PSU that is specifically meant to solve your problem.
I just looked up your PSU and that....personal note, don't use that.  You got a K-series processor which means it's unlocked for overclocking, and I can tell you from having the same processor, it very easily overclocks to 5.0+Ghz on air.  You're not going to achieve that with only one 12V rail powering the CPU, and only 450W output with a 500W max load, you're going to feel the hurt if you try.


How to obtain trigger words from a LoRA file?

Question: LoRAs are smaller models that can be used to add new concepts such as styles or objects to an existing stable diffusion model. These LoRAs often have specific trigger words that need to be added to the prompt to make them work.
The trigger words are commonly found on platforms like Civitai.com alongside the respective LoRA, however, such information might get lost (e.g. if the model is deleted from the site).
Is there a method to directly retrieve these trigger words from the LoRA files (usually in .pt or .safetensor format) themselves?
Answer: idk if there is an easier way, but I just did the following:
I used https://github.com/butaixianran/Stable-Diffusion-Webui-Civitai-Helper to write .info files and made a simple script to extract the file name, recommended weight, and trained words in a format like so:
<lora:{model_name}:{weight}>,{trained_words}
feel free to modify it as you'd like.
the  code:
import json
import os

def load_config():
    # Load configuration from config.json file
    with open("config.json", "r") as f:
        config = json.load(f)
    return config

def extract_data(file_path, default_weight):
    # Extract data from a JSON file located at file_path
    with open(file_path, "r", encoding="utf-8") as f:
        data = json.load(f)
    trained_words = ",".join(data.get("trainedWords", []))
    weight = default_weight
    images = data.get("images", [])
    for image in images:
        meta = image.get("meta", {})
        if meta:
            resources = meta.get("resources", [])
            for resource in resources:
                if resource.get("type") == "lora":
                    weight = resource.get("weight", default_weight)
                    return trained_words, weight  # Exit early if weight is found
    return trained_words, weight

def main():
    config = load_config()
    input_path = config["input_path"]
    output_path = config["output_path"]
    output_format = config["output_format"]
    default_weight = config["default_weight"]
    with open(output_path, "w", encoding="utf-8") as f:
        if output_format == "json":
            f.write("[")  # Start JSON array
        file_names = (file_name for file_name in os.listdir(input_path) if file_name.endswith(".civitai.info"))
        for i, file_name in enumerate(file_names):
            file_path = os.path.join(input_path, file_name)
            trained_words, weight = extract_data(file_path, default_weight)
            file_name_without_ext = os.path.splitext(file_name)[0]
            model_name = file_name_without_ext.replace(".civitai", "")
            result = f"<lora:{model_name}:{weight}>,{trained_words}"
            if output_format == "json":
                json.dump(result, f, ensure_ascii=False)
                if i != len(file_names) - 1:
                    f.write(",")
            else:
                f.write(result)
                f.write("\n")
        if output_format == "json":
            f.write("]")  # End JSON array

if __name__ == "__main__":
    main()

config file should contain, if unmodified:
{
    "input_path": "Path/to/InFolder",
    "output_path": "Path/to/OutFolder/Output.txt",
    "output_format": "txt",
    "default_weight": 0.6
}

Comment: This depends on the LoRA being available on Civitai.com, where it can be deleted at any time. I want to know if it is possible to obtain trigger words directly from the LoRA without using external resources.
Comment: ah, missed the point entirely.
seems like https://github.com/by321/safetensors_util has what you need.
never once messed with safetensors, but this can print out the metadata of the file, which contains the words used for training the model.

the shortcomings' that it prints every word used for training, not just 1 word. It's also printing the entirety of the metadata, which in our case, is largely irrelevant.

you'll need to modify the code so it can:
1. only prints/outputs the most used words/tags.
2. process all files in a directory. currently, it's one command per file.
Answer: I was searching for a simple solution to the same problem.
I finally created a bash pipeline which does exactly what I want:
Listing all keywords by weight.
Here it is:
tail -c +9 your_lora.swafetensors | jq -r .__metadata__.ss_tag_frequency 2>/dev/null | jq -rM .| grep ': [1-9]' | awk -F ':' '{print $2, $1}' | sort -nr
Breakdown:
tail -c +9 your_lora.swafetensors - metadata dictionary starts at character 9
jq -r .__metadata__.ss_tag_frequency 2>/dev/null - get keyword dictionary, ignore errors
jq -rM - print each keyword in one line
grep ': [1-9]' - filter out unnecessary stuff
awk -F ':' '{print $2, $1}' - switch keyword and weight to facilitate sorting
sort -nr - sort numerically descending
Example:
tail -c +9 /data/bernd/StableDiffusion/models/Lora/landscape/waves_v3.safetensors | jq -r .__metadata__.ss_tag_frequency | jq -rM .| grep ': [1-9]' | awk -F ':' '{print $2, $1}' | sort -nr
Output (shortened):
 63,     "lighthouse"
 49,     " stormy"
 49,     " storm"
 49,     " seas"
 49,     " ocean"
 38     "ships"
 15,     " calm sea"
 15,     " calm ocean"
 8,     " tidal wave"

Answer: LoRA model files actually contain a meta data part, which includes training info like epoch/learning rate/batch size/dataset size, and many others, also includes the tags used in the training dataset, from which you can identify the trigger word (the most used tag):
You can view or edit that meta data using this tool:
Lora info editor


Ensure a PHP script is only ever run as a cron job?

Question: How can I ensure a user can not run a PHP script and that it is only ever run as part of a cron job?
Answer: You can set an environment variable in your crontab.  A line like IS_CRON=1 can be placed at the beginning of your crontab, then check in your php program for get_env("IS_CRON") == 1.
Of course, you should also use file permissions as they're not so easily bypassed.  If this is run as part of root's cron, chown root:root yourscript.php and chown 700 yourscript.php.

As ircmaxell says, it'd be better to run as a user other than root assuming you don't need root permissions for what you're doing.  I was just taking a guess about your setup.
Comment: This looks like a perfect solution... I am bit new to cron jobs... how would I set the IS_CRON=1 part?
Comment: @Starlin, just put that line at the beginning of your crontab file
Comment: A user can set environment variables too.
Comment: @Wooble that why I mentioned file permissions as well.  With those file permissions, only root can run it.  The environment variable will prevent accidentally running it.  If someone else with root access wants to run it intentially it's a moot point, because they could always modify the code themselves.
Comment: True, but you could also set it as any other user that you wish (so it's not a security concern)...  Then the only people who could access it are those with that user's password or root...  Running it as root lets any compromise (or malevolent coder) have full run over your server...  Don't hand away root access, make them work for it...
Answer: How about having your PHP script check if $_SERVER['REMOTE_ADDR'] is empty, and if it is not, then have the script exit without doing anything further.
Answer: There are probably a number of ways to do this. Off the top of my head, I would say that placing it in a directory owned by root, and only readable by root might get close to achieving the effect you are looking for.
Are there any processes you are looking specifically to restrict it from? If so, using permissions, make it not readable to any of those processes.
Answer: I would suggest setting an environment variable within your crontab and then checking for this within your PHP script
Comment: Wasn't mine, but I'd say "for security by obscurity". While your suggestion would prevent *accidental* execution, one peek into the script will tell anyone which environment variable needs to be set (similar to a sign "please don't run manually"). The answers with "set up a separate user for cronjobs and only allow that user access and execution of the script" address the root of the problem (similar to a lock which can only be unlocked by the specific user).
Answer: Create a user for cron jobs, and set permissions of the script so it can only be run as this user. Of course you then need to put the script in that user's crontab, which you can do by logging in as that user and running crontab. Just don't give that user's password to just any other user...
At first I was also thinking of setting an environment variable which would prevent running this script from the web... But just not putting the script in the space where the web server looks for pages for websites, would do the same.
And nothing is stopping a random user from first setting the environment variable and then running the script.


What are some ways to control a device through an IP address?

Question: I want to get some ideas on how I might control a video camera through an IP address.  I have an API to control pan and tilt from a local machine.  The code is going to be in C/C++ on Windows.  I am still designing if I want multiple cameras controlled from one application or have a one camera to one application.  Would SOA be a useful architecture to structure my messaging?
Answer: I think you could be well served by something like REST for a task like this. Executing a command towards a REST server is really intuitive and simple, which sounds just like what you need. I'd probably make some kind of application that would be running inside a web-server, since this would handle most of the infrastructure, including authentication if needed. I'm sure both apache and IIS could do this for you quite easily. Even though your API is coded in C you could also consider using some higher-level scripting language as a client to the API (inside the web server).
SOA sounds a little overkill for a task like this.
Answer: I did something similar for aproject in my university. What we had was the cameras connected to a LAN and with message passing was very easy to communicate with them, is the same that communicate with any PC. We had the same application to communicate them. You can use SOA or any architecture you consider convinient, that depens on your application.
For our case was just an ad hoc architecture, it was not a complex thing.
Comment: hi, I'm trying to connect to a dvr which is connected to several cameras for iphone. Can you please tell me how you did it? Any guidance will be appreciated. thanks
Answer: Hessian is nice. It is basically REST, but has a binary protocol which is more efficient than XML and it also lets you make calls from other languages quite easily. So, you could develop the client GUI applciation in C# and the server in C. There are free libraries for a few different languages available.
http://hessian.caucho.com/


nothing to say in daily scrum stand up

Question: My work is pending because I need a permission from someone outside the scrum team. The scrum master knows about this issue because I said that yesterday and today in the stand up. What I'm thinking about is shall I say "There is no update from my side" is that good to say? Or mention the same issue tomorrow (which everyone in the team already knows about)
Comment: There is always an update. Even if you are blocked, you should be doing **something**. You need to indicate the block, identify your assistance points and then call out what other things you plan to do while blocked.
Comment: @DJClayworth IMO this is a legitimate workplace question. Being asked to give a report is a fairly common workplace occurrence, albeit more common in some workplaces than others.
Comment: we have a daily scrum stand up mean (at our workplace) daily short meeting to update the team of what you have done , and what you are about to do. but I have no update to say tomorrow, so what shall I say then , cause I'm not familiar with all aspects of scrum and this is the first time that I faced this issue
Comment: I'm voting to close this question because it's about project management.
Comment: Are there no other Tickets you could be working on?
Comment: we are at the end of this sprint, so most of the work are done still this issue is pending
Comment: This is a general workplace site. Olease explain terms like scrum, otherwise people who are not familiar will  be turned away feom the site.
Comment: This would be better on the [pm.se] site. It's not really a "workplace" issue.
Comment: But the ask is about what to do in a Scrum standup.
Answer: If your task is blocked, it sounds like you should have a lot to say during the Daily Scrum.
You and your team need to talk about what's going to happen now.
I mean, I'm going to assume that your task wasn't placed on the backlog to keep you occupied. Generally speaking, tasks on the backlog are important. And they are important soon. But the task is not being done, because of an outside issue.
Is your task not getting done threatening your Sprint Goal? If so, you need to talk with your Product Owner and what to do now. You might need to escalate the whole "waiting for permission". Who are you waiting for? How aware are they that this pending permission is blocking your sprint and might cause you not to hit the goal? Is there anyone around who can put some pressure on this person to do their job?
Is your task not getting done not threatening your Sprint Goal? Then mark it as blocked, send the occasional status update to this person and then talk with your team about you'll be doing now. Is there anyone you can lend a hand? Is there any new work that you can pick up? Can you do some admin while you wait? Refine some stories with the PO?
"My work is blocked and I'm not doing anything" should be the furthest from "nothing to say" you can get. In a daily scrum the only reason you might have for having "nothing to say" is "Everything is on schedule, nothing is blocked, we'll meet the goal on time." Any other message is what the Daily Scrum is for.
Comment: Love the answer! Another option instead of "I'm not doing anything" is to offer to swarm. Swarming is stepping in to help other team members on their task. Some tasks lend themselves to swarming and others don't but this tactic can help move the team toward their sprint goals.
Answer: If you're doing standups the way we do then the status would be 'blocked'.
You report that you are blocked.  The scrum master (are they also the project manager?) can work on resolving the block.
Comment: While it is not solely the Scrum Master's job to clear impediments (you can too or others can), it is a core part of the role. The scrum master can reach out to the person, explain the issue and the impact it's having, look for alternatives, etc.
Comment: the scrum master is another software developer not the project manager. He can't work to resolving that. our solution now is waiting.
Answer: You need to move from the idea of "my work" to "our work".
In Scrum, individuals do not have work. The team forecasts and plans work in support of a goal. If you took a piece of work as far as you can and are now dependent on someone outside of the Scrum Team, you should work to get that unblocked. This could mean letting the Scrum Master know since one of their responsibilities is to help in removing impediments. It could mean following up with the person or people you are dependent on. Once you've done that, the next step is to help the rest of the team with other work. It could mean starting a new task or helping someone else finish what they are working on.
You shouldn't be waiting until the Daily Scrum to raise impediments or seek out something else to do to help your team. The Daily Scrum does provide a good opportunity to let your teammates know that you may be blocked on progress and you may be able to help them with other things. If you have nothing to say about offering help or making progress, you need to start there.
Answer: Ask your boss, or whoever is responsible for running the meeting. Different bosses will have different expectations.
In general it is usually a good idea to say something brief such as:

"I'm waiting for permission from team X, as discussed yesterday.
In the meantime I've taken the opportunity to do Y."

Y could be anything. Helping a colleague, sorting out your emails, catching up on mandatory training, online learning, cleaning out the loos.... whatever. You just need to indicate that your primary objective was blocked but you still tried to achieve something, ideally without boring anyone with too many details.

nothing to say in daily scrum stand up


Rendered view different than camera view in Viewport

Question: I am new to blender and I have been learning from Andrew Price's youtube beginner tutorial series. So I am making a donut and coffee and I have enabled Lock Camera to View but my final render is different than the camera view in Viewport.
Answer: it seems that you have a keyframe on the timeline on frame 2, maybe on that keyframe you staged the camera in a different way than frame 0 or 1. Try to remove all keyframes from the timeline, then go to frame 1 adjust the camera in the way you want and render (be sure you are at frame 1)
Comment: Thanks a lot, man. Worked like a charm !!!
Comment: I tried this, but did not work.  I had 8 keyframes and cleared all of it.  I also deleted the current camera and added a new camera.  Then, added one keyframe at frame 1.  on rendering, the view was still different from the viewport's view.


What is this white-ish buildup on my fish filter?

Question:
What is this white-ish buildup on my fish filter? Should I be cleaning more often?
Comment: It looks like hard water scale to me.
Comment: Does a similar build-up appear anywhere else in the aquarium, or only in the filter? Is it soft and slimy to the touch, or more like a powder? Also, could you please maybe measure GH and KH of your aquarium water? That might help identifying the cause of this.
Comment: @lila, yes - only on the filer.  I'd classify it a slimy
Comment: you need to give a lot more information about your setup,size of your tank-type of fish living in your tank-how often do you do water changes-and most important what readings are your latest water test,PH-GH-KH.
Comment: @trond hansen  Hi, I have a 10 gal tank with 3-GloFish Tetra, 2-cardinal tetras,1 algea eater and two  ball type plants.
Answer: I have never had an external filter like this and I have never experienced such a buildup in the filter - I have always been using internal, fully submerged filters - but based on your photo and description of the material being slimy I would say it is a bacterial biofilm that is attached to the precipitated limescale underneath.
I do not think it is a definitive sign that the filter is dirty nor that it needs immediate cleaning; after all, it is a natural and even desired for the filter to build up the beneficial bacterial flora and the porous structure of precipitated limescale is an attractive place for them to colonize. Limescale buildup itself may be an unsightly nuisance, but is more or less unavoidable in most cases. I do not think that the flora inhabiting this limescale precipitation is large enough to contribute in any significant way to the overall flora of beneficial bacteria in your aquarium, especially that nitrifying bacteria are photosensitive and this material is placed outside where it is exposed to light - but nonetheless, it theoretically increases the efficiency of your filtration a little.
However, it definitely should be cleaned once you notice that it starts to block water flow, as that would decrease the efficiency of your filter. As long as it doesn't, I'd say that it is harmless or even mildly beneficial.
Other than that, I think it is reasonable to assume that this precipitated material is harmless because its mineral content comes from what was originally dissolved in the aquarium water itself.
Nonetheless, please consider that my reasoning above in regards to the nature of biofilm might be wrong and its nature - as suggested by Trond Hansen in the comment - is not bacterial, but fungal. If this is indeed fungal growth, then it should be definitely removed because some fungi are known for releasing potent toxins.
It will be helpful for determining the nature of this growth if you provide results of pH, GH and KH for the aquarium water. In general, slightly acidic environment favors fungal growth, whereas neutral to slightly alkaline conditions favor bacterial growth; there are exceptions, though.
Comment: i have had simmilar growth on the liner of my gardenpond where the outlets from my filters enters the pond,in my pond it was fungi growing(most likely some type of yeast)the cause was low PH and an buildup of nutrients.
Comment: @trondhansen Thank you for the comment and suggestion, I updated my answer.


Individual column searching in Pentaho CDE BI server

Question: Table component in CDE Pentaho is based on datables, I wanted to implement this functionality in my tables https://datatables.net/examples/api/multi_filter.html
<code>$(document).ready(function() {
    // Setup - add a text input to each footer cell
    $('#example tfoot th').each( function () {
        var title = $('#example thead th').eq( $(this).index() ).text();
        $(this).html( '<input type="text" placeholder="Search '+title+'" />' );
    } );

    // DataTable
    var table = $('#example').DataTable();

    // Apply the search
    table.columns().eq( 0 ).each( function ( colIdx ) {
        $( 'input', table.column( colIdx ).footer() ).on( 'keyup change', function () {
            table
                .column( colIdx )
                .search( this.value )
                .draw();
        } );
    } );
} );
</code>
I can't get it to work, I got Error processing component message,  I tried including it as js snippet, as an external source, in post fetch and in post execution function, I thought that the lack of indexes for every column was causing the problem, I included the indexes in output options, it didn't work either,
I also found this alternative http://jsfiddle.net/CmMfJ/2/#collaborate
<code>var table = $('#example').DataTable();

$("#example tfoot th").each( function ( i ) {
  var select = $('<select><option value="">All</option></select>')
    .appendTo( $(this).empty() )
    .on( 'change', function () {
       var term =  $(this).val()!=='' ?   '^'+$(this).val()+'$' : '';
       table.column( i )
          .search(term, true, false )
          .draw();
       } );

  table.column( i ).data().unique().sort().each( function ( d, j ) {
    select.append( '<option value="'+d+'">'+d+'</option>' )
  });
});
</code>
I didn't get any errors with that code but it doesn't work, the table doesn't change, in both cases In Post Execution function I did this: function f(){ code }, I also changed the variable #example for the name of my table, nothing worked, any help would be really appreciated, thanks.
Comment: I'm having this exact problem. Did you ever figure out an answer?
Comment: @SeanBranchaw Sorry Shane, I didn't :/
Answer: your postExecution approach might be the right one but you can't create a new DataTable over that div. It has already been created.
If you inspect the this object during the postExecution execution, one of the fields (can't remember which) gives you access to your DataTable object (the var table on your example).


Is Haku a man or a woman?

Question: In Naruto, Haku is a rogue Ninja that fights along Zabuza. He has a sad history of death and mistreatment that I won't treat here.
In any case, the Haku's peculiarity is that although he looks/behaves/dresses like a woman, he is a man. But not all sources agree with this, so... Is Haku a man or a woman?
Is there a reason for the first part in my spoiler? Or is it just a plot device?
If your answer contains something that appears or is explained after the Bridge battle with Team 7 (as far as Haku is concerned), please use a spoiler.
Comment: @Sai Until the Manga is completed and finished, we don't really know 100%. What if by the end of the Manga they reveal the opposite? :D
Comment: why this question? it's a guy! no doubt!
Comment: Yes, at the last chapter of the series, after the world peace has been confirmed, Haku's ghost comes to Naruto and explains that he's a in fact a she. That'd be brilliant.
Comment: haha .. no Kishi should spare that much mercy on his Fans .. I am sure he does ..
Comment: surprise with false identity characters are fine not with gender! :P
Comment: Didn't Naruto at one point say: "That's a guy? He's prettier than Sakura!" or something like that?
Comment: Obviously, Haku is a girl pretending to be a boy pretending to be a girl :P https://www.fanfiction.net/s/5491961/1/Needless-Gender-Confusion
Answer: I do not think that Haku was considered as a woman is considered a spoiler.
After all, they discover that only 1 episode after Team 7 met him. I can guarantee for sure that Haku is a man. Despite what other sources probably say, there are plenty of men in real life who look like women (Justin Bieber is good example). What I cannot tell you is what was the perspective of Zabuza for him (if he was just a Friend or something "Else").
I say this only because the one who told Naruto that significant detail was Haku himself, so there isn't a lot of room for mistakes.
Comment: +1 for "there are plenty of men in real life who look like women (Justin Bieber is good example),"
Comment: Justin Bieber *is* a good example.
Comment: Justin Bieber is a guy -SPOILER :P
Comment: Anime.SE: Where two mortal enemies can comment on each others' answers regarding the gender of a person.
Comment: It is. Not a major one, but still a spoiler. :)
Comment: but what if she is lying?
Answer: Haku is a boy. It's stated in the First Databook, page 91.
Answer: I think Haku is actually a woman.
However, she tells Naruto she is a man (I think in chapter 21).
Whichever may be the case, I believe she does not care. What she cares most about is being able to serve Zabuza (if she can serve him, she is wanted in this world). For this, she sees herself as a tool, her only purpose being to see that Zabuza accomplishes his objectives (I believe it is in chapter 29 that she explains this to Naruto). She also tells Naruto that if she fails Zabuza she'd rather be dead, because she's lost her purpose.
To sum up, I believe that whichever may be the case, it is ultimately irrelevant to her/him, since:
Tools do not have genders.
As such, Haku does not have a gender.
Comment: Your question also made the *actual question* hard (if not impossible) to find, @Alenanno. Which sorta defeats the point of not just deleting it now that you have an answer. If something's worth keeping around, it's worth making it clear enough for others with the same question to find and utilize.
Comment: "Haku is a woman" --> Spoiler. "She does not care" --> no spoiler. :D
Comment: Do you have references for that?
Comment: @looper My question is hidden so no-one knows that's an important point but now you're making it public. :)
Answer: Haku is a man.
There are lot of manga that have in-common like that. One good example is the Zoldyck Family in Hunter X Hunter.
All of Killua's siblings are boys. Yet you can see them wearing Kimono's with make up and long hair. Attractable beauty but stated as boys.
Comment: As far as I know, the 'pillow' is just a particular way of folding the obi, although that does tend to be limited to women at this point. Keep in mind that what a westerner might interpret as intentionally feminine, a Japanese viewer might interpret as simply old. By modern standards, male dress from the Heian era was fairly feminine. (Similarly, when a westerner sees a painting of a horseman from the high middle ages, the high-heels don't make said horseman look feminine)
Comment: To take slight issue with your example, I would argue that of the Zoldyeck brothers, only Kalluto and Alluka look feminine. There's also nothing particularly feminine about a kimono or even long hair. Kalluto's distinct appearance as a traditional Japanese doll DOES make him look feminine, though (in spite of a lack of particularly long hair).
Comment: Do Japanese boys wear kimono with pillows on their back also?
Answer: I agree that there are few characters in Naruto/Shippuden who look male in the manga but female in the anime.
example: Katsuyu
But Haku is a guy in both the anime and the manga. No doubt about it. Though just based on looks, Naruto (and even viewers) mistake him for a girl, he clarifies he is a guy! :)
Comment: Katsuyu is a snail. Snails are Hermaphrodite: https://en.wikipedia.org/wiki/Hermaphrodite
Comment: Yeah, it was more fun than an important point :D.
Comment: @looper, agreed! if I consider only the convention it is different in manga and anime.. I wanted to point it out :)
Comment: hahaha.. kill me ..
Answer: I agree with JNat's answer based on the premise that I thought that Haku was a girl from day one.
Firstly, Haku portrays the physical and emotional traits of a female even though she tries hard to be a male (Zabuza's tool). Secondly, Naruto called her sir, keep in mind that they also call Tsunade sir so that does not really indicate gender. My third reason is that as JNat also says, she does not care, when Zabuza found her, she was weak, being referred to as a boy or behaving like one no doubt made her seem stronger in his eyes.
Answer: Haku is a girl. She sees her self as a guy or boy but she is a girl. At episode 17 in the anime haku's mother says "sorry my daughter". After slapping her around for ussing her powers.
Comment: There are numerous official sources which heavily contradict this answer.

Is Haku a man or a woman?


Add rule to shoppingcart

Question: Just like price rules, I want to apply a 'rule' but more as comment/notification that applies to certain products if they are added to the shoppingcart.
Answer: Hey, hope you are doing well!
Magento 2 provides you with the possibility to create shopping cart price rules and offer your customers a discount. Let's consider how to set up a new rule. Say, you need a rule that will give 10% off with the coupon SECRET_DISCOUNT for everyone who has this coupon or you can use it as for specific product as you want.
Step 1. Log in to your Admin panel and navigate to Marketing > Promotions > Cart Price Rule.
Step 2. Click on the Add New Rule button. On the opened page, you need to fill in 4 blocks: Rule Information, Conditions, Actions, and Label.
Step 3. In the Rule Information tab, set the Name, activate the rule, assign the rule to the Website, and choose the Customer Group who can use it. For our example, you need to choose the Specific Coupon in the dropdown. Limit the number of the Uses per Customer and Coupon rule. Set the Priority, if you have multiple Magento 2 cart price rules active at the same time.

Step 4. In the Condition tab, you can configure specific product attribute combinations, product subselection, conditions combination, or cart attributes that are needed for this rule. Or you can leave it blank to make the rule available for all products.
Step 5. Next is the Actions tab. There you can choose one of the available actions that should be applied to the cart:
Percent of product price discount
Fixed amount discount
Fixed amount discount for the whole cart
Buy X get Y free
Here is how it looks in our example of Magento shopping cart rule:

Set the Discount Amount and move to the last step.
Step 6. The last what you need to configure is the Labels tab. Enter the text for the Default Rule Label for All Store Views and Store View Specific Labels. You can create different labels for each store view.
Step 7. When you are ready, click on the Save button to apply the rule. Don't forget to test the work of your shopping cart price rules on the Magento frontend.

Add rule to shoppingcart


Does the earth has any electric field as the earth's magnetic field is changing over time?

Question:
Earth's magnetic field changes over time because it is generated by a geodynamo
  -Wikipedia

A time-varying magnetic field can produce electric field. So does the earth has electric field due to changing magnetic field?
Answer: There are various ways to relate the electric and magnetic fields. Semoi gives one example, but in this context perhaps it is simpler to use an alternative relation:
$$ \mathbf E = -\nabla\phi - \frac{\partial\mathbf A}{\partial t} $$
This expresses the electric field $\mathbf E$ as the sum of two contributions. The first term:
$$ \mathbf E = -\nabla\phi $$
is the contribution to the field from any charges present. The quantity $\phi$ is simply the electrical potential. As it happens the Earth has a net negative charge due to charge separation between the ground and the atmosphere, so it has an electric field regardless of what its magnetic field does.
The second term:
$$ \mathbf E = - \frac{\partial\mathbf A}{\partial t} $$
gives the contribution to the electric field from the changing magnetic field. The quantity $\mathbf A$ is a type of magnetic potential energy called the magnetic vector potential.
And you are quite correct that any changes in the magnetic field of the Earth will indeed result in a contribution to the total electric field. However the sorts of changes that Wikipedia is describing happen on very long timescales and the rate of change $\partial\mathbf A/\partial t$ is so small that any contribution it makes to the electric field is negligable.
On the other hand the Earth's magnetic field changes on much shorter timescales due to changes in the solar wind. Indeed a very large solar flare can cause large and rapid changes in the magnetic field that produce large electric fields. These fields are large enough to cause large currents to flow in electrical transmission lines and can cause power outages as a result.
Answer:
A time-varying magnetic field can produce electric field.

I think this statement is unclear. Rather: A time-varying magnetic field does produce an electric field. This is one of Maxwell's equation (maybe with some prefactors)
$$\nabla \times E = - \frac{dB}{dt}$$
If the right-hand-side does not vanish, the left-hand side does not vanish.
Therefore, the change in the earth's B-field will produce an E-field.


Is it ok to make mozzarella from pasteurised milk?

Question: Hi Is it ok to make mozzarella from milk bought at Spar or any other supermarkets? If not, how could I buy 5l non-pasteurised milk? I live in Hermanus, Western Cape. Thanks Ian le Chéf
Comment: homogenization is more likely to cause problems than pasteurization, I suspect.
Comment: Ok meaning possible?
Comment: Similar to: https://cooking.stackexchange.com/questions/14724/can-you-make-cheese-curds-with-pasteurized-milk
Answer: Yes, you can make mozzarella from pasteurized milk. You will want to avoid the so-called "ultra-pasteurized" milk if at all possible.
The reason the ultra-pasteurized milk should be avoided for cheese-making is because the extreme heat denatures the proteins and they will not solidify into curd.
This is US based, but is informative:

"The minimum legally required temperature for pasteurization [145°F], basically has no effect on the protein," explains Metzger. "But when you get to the 170, 175°F point, the casein and the whey proteins actually start to interact with each other." Those whey proteins, he elaborates, "are similar to the proteins in eggs—when they get too hot, they start to aggregate, and they take the casein proteins with them. What you're left with are proteins that won't coagulate into the kind of curds needed to stretch mozzarella cheese." (Source)


How to write Fourteen in Roman numerals? (Unicode)

Question: Preferably after ⅻⅰ/13? So it goes in "alphabetical" order.
Comment: Don't use ⅻⅰ (SMALL ROMAN NUMERAL TWELVE + SMALL ROMAN NUMERAL ONE), use ⅹⅲ (SMALL ROMAN NUMERAL TEN + SMALL ROMAN NUMERAL THREE), and ⅹⅳ (SMALL ROMAN NUMERAL TEN + SMALL ROMAN NUMERAL FOUR) will sort correctly after it. ⅺ and ⅻ as single characters are (I would guess) just for clocks.
Comment: @Cairnarvon That would make a good answer!
Answer: I think what you're asking is more of an IT question than an actual Roman numeral question (that is, you don't need me to tell you 14 is XIV); let me know if I'm wrong.
Unicode does include codepoints for upper- and lowercase Roman numerals, but you very likely don't want to use them—they're included for compatibility with East Asian standards (i.e. so that VII, for example, can appear as a single character in vertical text) and for certain niche applications. This is also why U+216A ROMAN NUMERAL ELEVEN and U+216B ROMAN NUMERAL TWELVE (and the lowercase equivalents) exist as separate codepoints: some date formats use Roman numerals for the months, but may expect single characters for that.In general, best practice is to use normal Latin letters to compose Roman numerals—VI (U+0056 LATIN CAPITAL LETTER V, U+0049 LATIN CAPITAL LETTER I) instead of Ⅵ (U+2165 ROMAN NUMERAL SIX), &c.
If you definitely do want to write composite Roman numerals using the Roman numeral codepoints, the sensible way to write numbers in the teens would be to ignore that single-character XI and XII exist altogether: if you write xiii as ⅹⅲ (U+2179 SMALL ROMAN NUMERAL TEN, U+2172 SMALL ROMAN NUMERAL THREE) and not, as you did, ⅻⅰ (U+217B SMALL ROMAN NUMERAL TWELVE, U+2170 SMALL ROMAN NUMERAL ONE), it will automatically sort correctly between ⅹⅱ (U+2179 SMALL ROMAN NUMERAL TEN, U+2171 SMALL ROMAN NUMERAL TWO) and ⅹⅳ (U+2179 SMALL ROMAN NUMERAL TEN, U+2173 SMALL ROMAN NUMERAL FOUR).
Note, however, that this system will still break down past 49: ⅹⅽ (U+2179 SMALL ROMAN NUMERAL TEN, U+217D SMALL ROMAN NUMERAL ONE HUNDRED; i.e. 90) through ⅹⅽⅸ (99) will sort before ⅼ (U+217C SMALL ROMAN NUMERAL FIFTY), and likewise ⅽⅿ (900) before ⅾ (500) and so on.
There is no trivial way around this. You'll have to store a separate numerical index with your Roman numerals and use that for sorting instead, or use regular integers internally and only convert to Roman numerals when it's time to display them, or sort by something else entirely (if this is for file names, maybe sort by modification time instead)—what, if anything, is possible will depend on your specific application.


How can I remove "Ubuntu Netbook Edition" option from the GDM session menu?

Question: I was trying out Unity and then I uninstalled it but there is still an Ubuntu Netbook Edition option in the GDM session list. Accidentally clicking on that causes the user to log in to a broken desktop. How can I remove it from the list?
Answer: Go to the Ubuntu Software Center and use the search box in the upper right corner. Search for ubuntu-netbook and remove the packages ubuntu-netbook and ubuntu-netbook-default-settings.
Comment: To which I'll add be sure to check which session manager your login screen is using. I followed this advice and was greeted with a live but empty X display. It was only after seeing hhlp's answer that I noticed that GDM was still selecting Netbook session which - of course - couldn't run since it wasn't installed. Thanks to all three of you for helping me out of a white screen with cursor.
Comment: Correction: removing `ubuntu-netbook-default-settings` does the trick, but I'll leave my prior comment in case someone else only does the removal half-way and sees the same as I did.
Answer: The list is populated by looking at the contents of the /usr/share/xsessions directory. In here you'll find files with the .desktop extension (extension hidden in some file managers, press CTRL+H). As these files are in a system folder, you will need root privileges to change or delete them.
Answer: After upgrading from Ubuntu 10.10 Lucid Lynx (10.10) Netbook Edition to Ubuntu 11.04 Natty Narwhal, the upgrade process does not remove the ubuntu-netbook and ubuntu-netbook-default-settings packages. Subsequent login attempts result in a broken desktop being displayed with background but no panels whatsoever.
In order to fix this problem, press CTRL+ALT+DEL and select the Restart option. When logging in after restart, after selecting a username, select Ubuntu session option from the drop-down box in the bottom bar. This will start the Natty's default session with Unity.
Next, run the following command in a Terminal window in order to remove the non-working option from the session list.

sudo apt-get remove ubuntu-netbook ubuntu-netbook-default-settings


accessing app service from domain object

Question: Can a domain entity can call or app service layer, through service layer interface ? Please tell me way also ?
Answer: In short, no.
Domain entities should not know about the application service layer.  The application service layer's job is to coordinate actions between domain objects, across bounded contexts if necessary.
In my experience, this is a pretty strict rule so if you feel you need to break it you've probably got a design problem further up the chain.


The probability of having a perfect matching in a bipartite graph

Question: Say we have a bipartite graph $G$ with two sets, $\{x_1,\dotsc,x_n\}$ and $\{y_1,\dotsc,y_n\}$. For each pair $xy$, there is an edge with probability $p$.
Then, what is the probability of having a perfect matching in $G$?
Comment: you need the exact probability?
Comment: i am doing some reading on this and i think i can be shown that if n is large enough, G has a perfect matching with probability 1-1/n. But i don't know how to get there.
Comment: I don't think it is possible if you didn't fix $p$, say $p$ can be $0$.
Comment: true, but what if we fix p=constant * (ln n /n)
Answer: For too-small $p$, there will be isolated vertices, and in particular there will be no perfect matching.
The key range of $p$ to consider for isolated vertices, as we'll see shortly, is $p = \frac{c + \log n}{n}$, for $c$ constant. Here, the probability that a vertex is isolated is $(1-p)^n \sim e^{-pn} = \frac{e^{-c}}{n}$. Moreover, if we fix $k$ vertices (on either side), for $k$ constant, then the probability that all $k$ are isolated is between $(1-p)^{kn}$ and $(1-p)^{kn - (k/2)^2}$, which are both $\sim (e^{-pn})^k = \frac{e^{-ck}}{n^k}$. So the expected number of $k$-sets of vertices that are isolated - the $k^{\text{th}}$ factorial moment of the number of isolated vertices - is $$\binom{2n}{k} \cdot \frac{e^{-ck}}{n^k} \sim \frac{(2 e^{-c})^k}{k!}.$$
By the method of moments, this proves that as $n \to \infty$, the number of isolated vertices is asymptotically Poisson with mean $2 e^{-c}$, which means in particular that the probabiltiy of having no isolated vertices is $e^{-2e^{-c}}$ in the limit.
I claim that actually, this is also the probability (in the limit) of having a perfect matching in the graph. To do this, we check Hall's condition.
We want to see if there is a set $S \subseteq X$ with $|N(S)| \le |S|$. We may assume $S$ is minimal with this property, which means that $|N(S)| = |S|-1$ (otherwise we could delete any vertex in $S$) and that every vertex in $N(S)$ has at least two neighbors in $S$ (otherwise we could delete that vertex and its only neighbor in $S$). Separately, at the cost of a factor of $2$, we may assume $|S| \le \frac n2$, otherwise we could pass to the set $T = Y \setminus N(S)$ and check Hall's condition for (a minimal subset of) $T$. Finally, we may assume $|S|\ge 2$, since we've already checked the isolated vertices case.
The expected number of such sets is bounded by
$$\sum_{k=2}^{n/2} \binom nk \binom n{k-1} \binom{k(k-1)}{2k-2} p^{2k-2} (1-p)^{k(n-k)}.$$
(From the condition that every vertex in $N(S)$ has at least two neighbors in $S$, we can conclude that there are at least $2k-2$ edges between $S$ and $N(S)$, which is worth it for the decrease in probability.)
This sum is going to go to $0$ as $n \to \infty$, though that's tedious to check. Essentially, for small $k$, we lose a factor of $n$ (up to logarithmic factors) with every increase of $k$; we've already seen that $k=1$ is constant, so $k=2$ contributes $\tilde{O}(n^{-1})$ and further $k$ contribute even less. For large $k$, factors like the binomial coefficient in $k$ begin to contribute a lot, but by then we're so far in the "asymptotically irrelevant" hole that we never do catch up.
Therefore cases of Hall's conditition with $|S|\ge 2$ don't asymptotically affect the probability of having a perfect matching. That wraps up the analysis for $p = \frac{c + \log n}{n}$.
For other values of $p$, it's enough to observe that the property of having a perfect matching is monotone increasing, so the probability increases with $p$. Write $p = \frac{f(n) + \log n}{n}$ for an arbitrary function $f(n)$. Then
$$\lim_{n\to\infty} \Pr[\text{there is a perfect matching}] =\lim_{n\to\infty} e^{-e^{-f(n)}} = \begin{cases}
0 & f(n) \to -\infty, \\
e^{-2e^{-c}} & f(n) \to c, \\
1 & f(n) \to \infty.
\end{cases}$$
Comment: Yes, it does. (And this is also the limiting probability that there are no isolated vertices.)
Comment: Dear Misha, do you know if there is a textbook or journal reference for this beautiful solution? I've found this one https://www.math.cmu.edu/~af1p/Texfiles/matchplusbip.pdf
Comment: Probably https://www.math.cmu.edu/~af1p/BOOK.pdf should cover it.
Comment: Thanks. Does this result implies that when $p=log n/n$, i.e. $c=0$, the probability converges to e^{-2}=.14?


is there any difference between social constructs and social norms?

Question: is there any difference between social constructs and social norms? what would we call it when a society expects you to have a good job etc. or doing the same that is accepted to be the good by society.
Answer: The terms are definitely similar but I believe they mean different things.
A social norm is an expectation that a person will do something because everyone else does it, or often does it. These norms can vary based on family, friend group, work environment, country, continent, etc. For example, among one group it might be a social norm that families always eat dinner together every day, while other people might emphasize the breakfast meal. In some societies young people are expected to go to college (post-secondary education), while in other places they may not be expected to. In some cultures the word of an elder is highly respected and their authority may not be challenged, while in other cultures younger people speak their mind without restraint.
A social construct is a way of looking at the world that is not defined by the laws of nature or physics but by mutual agreement among people in a society. For example: time exists everywhere, and people on earth experience the passage of time in the same way, but time zones are a social construct. There is little inherent value in pieces of paper, but we say that paper money has great worth; that is a social construct. A person's external genitalia are (mostly!!) objective and physical, and a person's sex is (mostly but not always!!) closely related to their chromosomes and external genitalia, but gender is a social construct.
Comment: We can say that social norms *include* the habit of pretending that social constructs are real, but there are other norms besides.
Answer: Norms are expectations for how people should act.
Some sources define norms as being a type of social construct. Alternatively, some social constructs can be defined as being a collection of social norms (and maybe more than just that), such as the social construct of "gender" being composed of norms like "only women can be emotional" (at least in some cultures). Gender itself isn't a behavior.
However, not all social constructs are social norms. For example, Europe and Asia being considered different continents is a social construct but it has nothing to do with social norms as it doesn't set an expectation for how people act.
Answer: These really are different things.  Social norms are the rules of a society while a social construct is an idea that is accepted by the society.
For example, the concept of money is a social construct while the acceptable use of money is the social norm.


Battery showing 100% charged with ''Consider changing your battery''

Question: Is it normal to have a laptop have the warning ''Consider changing your battery'' but whilst also showing 100% charged. I've got the red cross on the charge symbol showing with Windows 7 on my Acer Aspire One D270. Any things for me to try? Should i let the battery completely discharge or keep the charger plugged in? Thanks
Comment: Unplug the machine, use it until there is a noticeable drop in power on the battery. Then plug it in and see if that help. I suspect the battery is failing but .....
Answer: Discharge your battery until your laptop gets shut down after that charge your battery full then turn on your laptop. The problem will be sorted out. If problem still persists check your battery.
Check your battery status by using powercfg -Energy command with administrator privilege.
Answer: Modern battery systems recalibrate themselves so that 100% should always be 100% of what your battery is capable of storing given its age and wear. So if you see 100% but also a "consider changing your battery" message, it could mean that your battery is near the end of its life, and is only capable of storing, say, half the energy it was able to store when it was new.
Lithium-Ion (Li-ion) batteries, including Lithium-Polymer (LiPo), tend to lose a significant amount of their capacity after 300 to 400 charge-discharge cycles. So if you fully discharge your laptop every day, and fully charge it back up every night, your battery might only last 1 year before you notice enough performance degradation that you'd prefer to buy a new battery. If you only halfway drain it and charge it each day, it might only last 2 years.
Of course, as with all things high-tech, you could be hitting a bug. If your battery is well under a year old, and it still seems to last just as long on a charge as it ever did, then you're probably hitting a bug. Many battery systems don't fully recalibrate themselves unless you fully charge the battery then fully discharge it (without partially recharging it along the way), and then fully charge it again (without partially draining it along the way). So you could try doing that. However, that recalibration cycle is usually what's needed if the battery never shows 100%; it's the way for the battery monitoring system to learn just how warn-out your battery is, so it can readjust what level it considers "100%". I doubt this recalibration cycle with help in your case. You may very well just be due for a new battery.


Can anybody recommend any gems for checking security vulnerabilities?

Question: I want to check one of my RoR projects for security vulnerabilities.
So can anybody recommend any gems for my needs?
Comment: A subtlety to avoid close votes for seeking product recommendation; ask "are there such things as gems that check for vulnerabilities, and if so, how do they compare to an actual penetration test?"
Answer: Yes.  You want Brakeman, a tool that scans your RoR code for security vulnerabilities
I recommend reading the OWASP Ruby on Rails Security Guide.
You could also try any web pen-testing tool; they are not language-specific.  There are many of them.  They only find low-hanging fruit, not all security problems, but it can't hurt to use them just in case they find anything your other methods missed.  Search on this forum to find more information, e.g.,
What tools are available to assess the security of a web application?.
Answer: Disclaimer: I'm the gem author.
I wrote Codesake::Dawn, a security source code scanner for ruby code. I'm close to release version 1.1.0 with 171 security checks (CVE bulletins and Owasp ROR cheatsheet) included. It works with Sinatra, Padrino and Rails web application out of the box.
It doesn't detect xss introduced in your code... yet :-)


Do totally Chlorine free (TCF) toilet papers exist?

Question: Many online resources suggest that processed Chlorine free (PCF) and TCF toilet papers are more environmentally friendly than elemental Chlorine free (ECF) toilet papers. Although I can find a lot of actually existing PCF products, I couldn't find any actual TCF toilet papers. Do they really exist in reality?
Comment: Welcome to Sustainable Living! PCF = TCF + recycled content, so any product classified as PCF is also TCF. Or are you looking for TCF paper which isn't PCF?
Comment: @THelper Thanks for your answer. Can you give a source for the information? I wasn't aware of that fact. And yes, it's also good to know whether pure TCF exists.
Answer: The table on this Conservatree.org webpage explains that Processed Chlorine Free (PCF) means it's Totally Chlorine Free (TCF) plus it has recycled content. So all the PCF papers you found are also TCF.
Conservatree.org also has listings for recycled and PCF paper products, including this relatively large list of toilet paper for consumer usage (US and Canada oriented). I'm not aware of any toilet paper that is TCF and not PCF.


Convexity of product of two convex functions

Question: I hope to prove convexity of a product of two (specific) convex functions when only one of them is monotonic. The problem can be written as $F(x) = f(x) g(x)$, where $f:\mathbb{R^n} \rightarrow \mathbb{R}$, $g:\mathbb{R^n} \rightarrow \mathbb{R}$,
$$f(x) = (1 - k \cdot 1^T x )^{-\alpha}, \quad 0 < k < 1, \quad \alpha > 1,$$
$\textbf{dom } f = \left\{ x | x \geq 0, 1^T x < \frac{1}{k} \right\} $, and $$g(x) = a + b^T x + x^T C x,$$ where $C$ is positive-semidefinite, $g > 0$, and $\textbf{dom } g = \textbf{dom } f$. So, $f$ is strictly increasing, but $g$ is not monotonic. I'm solving an optimization problem of the type
$$ \underset{x \geq 0}{\min} F(x), $$
that behaves well numerically but I would really also like to prove convexity.
Comment: You're not going to find any general principles that deal with the product itself, I doubt. I suspect you're going to have to prove this sui generis (i.e., on its own). A derivative test, say along a line $x=x_0+tv$, is likely to be your best bet.
Comment: This might help http://math.stackexchange.com/a/27575/168758
Comment: Wait, $f$ is multivariate... what do you mean by "$f$ is strictly increasing"? Also, what is $k$ in your definition of $f$'s domain?
Answer: I do not have a solution to your problem, but still like to note the following but it's too long for a comment. The problem you want to solve is a fractional optimization problem:
$$\min_x \frac{a+b^Tx+x^TCx}{(1-k\cdot 1^Tx)^{\alpha}}$$
with $\alpha>1$. Two different solution approaches are described in http://pubsonline.informs.org/doi/pdf/10.1287/mnsc.13.7.492 and in http://link.springer.com/article/10.1007%2FBF02026600
For both solution approaches, the numerator needs to be convex (which it is),while the denominator needs to be concave and nonnegative. Unfortunately, the denominator is convex, so you cannot solve it as a fractional optimization problem.
Update a little late, but here is how you can solve the problem: consider the biobjective problem with objectives $\min_x \{ a+b^Tx+x^TCx \}$ and $\max_x \{ (1-k\cdot 1^Tx)^{\alpha} \}$, create the Pareto frontier, and derive the optimal solution from there. To find a point on the Pareto curve, you can optimize one objective while constraining the other, nothing that for maximizing or constraining the second objective you can get rid of the power $\alpha$.


Would Time Stop stop a clock in the possession of the caster?

Question: A player's character is in possession of a bomb wired up to a clock. If that character cast time stop, would the bomb keep running while time stop is in effect or would the timer stop? Or does the clock only stop after the bomb is no longer in the character's possession?
Answer: The rules are unclear. The only thing time stop has to say on the subject of carried items is

You cannot move or harm items held, carried, or worn by a creature stuck in normal time, but you can affect any item that is not in another creature's possession.

(emphasis mine)
"Can" implies ability but not requirement. It implies that you can also choose not to. But "affect" in this context is about your actions during the time stop effect, whether you can pick up, move, or cast spells on those objects, not whether or not time stop itself affects them. And it doesn't address items carried by the caster at all.
In fact, the initial description of time stop is

This spell seems to make time cease to flow for everyone but you. In fact, you speed up so greatly that all other creatures seem frozen, though they are actually still moving at their normal speeds.

(emphasis mine)
The use of "everyone" and "creatures" seems to imply that non-creature objects are not affected. But in reality, the spell affects you, not any creature or object. It makes no sense for you to be moving super-fast, but somehow everything that doesn't count as a creature does too.
Certainly, your possessions seem to be moving as fast as you—the spell doesn't mention them pinning you in place, nor you damaging them by moving them far faster than their structural integrity will allow. Therefore, I would rule that time stop does affect the bomb—that is, it speeds the bomb up just as it speeds the caster up. At best, I would allow the caster to choose not to affect it, but then it would be impossible to move or otherwise affect, so the caster would be pinned in place by it and depending on how it was strapped to them, their ability to manipulate their limbs (e.g. for somatic components) might be restricted as well.
There is, however, another advantage of time stop here: with the right timing, if the caster puts the bomb down and moves away, or otherwise protects themselves (immunity to fire damage is trivial at levels where time stop can be cast; immunity to the concussive forces produced by a bomb is not so much trivial, but probably possible), and continues to affect the bomb (that is, it continues to move as fast as the caster), the bomb could explode while under the effects of time stop. While it's a bit removed from the case described in the spell, where it is you who are trying to affect things, I would rule the bomb as limited by this rule:

While the time stop is in effect, other creatures are invulnerable to your attacks and spells; you cannot target such creatures with any attack or spell.

Therefore, the bomb could explode, but affect nothing (except perhaps the caster, though taking cover behind literally-immovable-and-invulnerable objects should probably work).
Comment: @Marader For people other than the caster of *time stop*, yes, the timer would appear to jump forward 6-24 seconds (1-4 rounds) as the caster and the timer go forward in time faster than they do. If *time stop* is cast with, say, 5 seconds left, then they would (I would argue) just see the bomb disappear and the area suddenly covered in debris from the bomb itself, without actually experiencing any explosion.
Comment: So in this case would the timer on the bomb accelerate too? What about difference in time flow between everyone else and PC who'd used *time stop*?
Comment: @Marader Yes, my ruling would be that the timer would accelerate too. I don't think the caster could choose not to affect the timer without freezing it in place, pinning him or her and leaving them unable to do anything about it while it remains frozen (though they could perhaps cast spells that will help once the bomb is unfrozen). As for the difference in time flow, what *about* it? I don't understand the question.
Comment: *" As for the difference in time flow, what about it?"*  For example, timer on the bomb would be one minute, for the *time stop* PC and everyone else this one minute would be different time, i'm right? PS. probably i somehow misunderstood you and this sentece *"timer would accelerate too."* misguid me. Do you mean the timer keep his normal run unaffected by *time stop* OR it's accelerated many times and when PC cast *time stop* it's going straight to 0:00 and then *BOOM*
Answer: One thing about Time Stop that a lot of people forget is that you don't actually stop time with it. You just accelerate yourself to the point where everything else appears frozen. Any timekeeping devices would be unaffected unless you also rule that spells like Haste also accelerate them.
Comment: Welcome to RPG.SE! Take the [tour] if you haven't already, and check out the [help] for more guidance. Can you support your answer by citing evidence? (KRyan's answer seems to include a quote that supports this.)


Does it matter if my planar quads are convex or concave?

Question: I'm modeling static buildings for use in Unity. My quads are all planar (within one degree). With respect to efficiency and later material application, does it matter if they are convex or concave?
Comment: https://blender.stackexchange.com/questions/56755/flat-quads-or-why-is-my-mesh-so-funky
Answer: If you worry about how your mesh might be triangularized when exporting to Unity, the best option remains to triangularize yourself.

Add a Triangulate modifier
Check if your surface is preserved as you wanted
In the places where it isn't:

switch to edit mode and select a faulty quad
press Ctrl T to destructively triangularize it
use the menu Edge > Rotate Edge if needed

Export with the Apply Modifiers option enabled

You are doing this for static meshes, but for anyone else wanting to do this for animated meshes: do this only on parts that do not bend. Otherwise, either you can predict all possible bends and put the triangles manually as they need to be, or you need to change the topology in that area to avoid the wrong triangles.
Do understand that meshes get triangularized at the end of the day for rendering, so don't stress about avoiding triangles and putting quads everywhere, think instead about having the right edge flow and placing poles and triangles where needed.


Is it possible to receive a Schengen visa as an unemployed person if I have a sponsor?

Question: I met someone I really like on the net. He asked me to visit him in Norway where he is a citizen. He will be going on pension in July and wants to use the time to show me around. I am unemployed and can only stay for a few weeks. Will his pension be enough as proof of income? I am South African.
Comment: Strictly speaking, having a job is not a requirement for a schengen visa.
Answer: If you are unemployed and the premise of your visit is romantic and you have no real acquaintance with your friend, they will refuse unless your application is really high quality and his invitation is massively convincing.
You didn't tell us his pension, but they will look at his standing also.  They will also check his sponsorship history.


Define Pressure at A point. Why is it a Scalar?

Question: I have a final exam tomorrow for fluid mechanics and I was just looking over the practice exam questions. They do not provide solutions. But pretty much I have to define pressure at a point and also say why pressure is scalar instead of a vector.
I am thinking pressure at a point is $P=\lim_{\delta A \to 0} \frac{\delta F}{\delta A}$. Please let me know if I am wrong.
But I do not know at all why pressure is a scalar instead of a vector. I know it has something to do with $d \mathbf{F}=-Pd \mathbf{A}$
Comment: I don't why there are long answers. Its simply always true by definition. And yes, you are correct. $\delta F$ is the force projected on the normal, and $\delta A$ is obviously a scalar, so $\frac{\delta F}{\delta A}$ is a scalar. The pressure is not the stress state.
Comment: The factors which cause pressure is vector (force and sometimes area) but pressure itself being a scalar .
Answer: The pressure is defined as the flow rate of x-momentum in the x-direction plus the flow-rate of the y-momentum in the y-direction plus the flow rate of the z-momentum in the z-direction divided by three. Each component of momentum is conserved, and flows locally from point to point in a fluid. Each component is like a charge, and has it's own current, which makes a tensor of stresses.
A fluid does not sustain shear, and this is true whether it is still or moving, by the principle of relativity. This means that if you put fluid between two plates, and squeeze, the force per-unit-area with which you squeeze (the local flow of momentum in the direction perpendicular to the plates) is equal to the force per unit area pushing outward at the edge of the plates. The flow of momentum is the same in all directions.
You can measure the pressure by putting a homogenous solid at the point in the liquid, and noting how much it compresses. You can also do it by noting the very slight change in density of the fluid with pressure.
The pressure of fluids is not an exact description of the fluid when there is viscosity, but it is close to perfect, and the viscosity and the pressure are independent ideas which can be treated separately.
For the purpose of your class, you can think of the pressure as the amount a tiny box-spring will compress if you place a scale model in the fluid, moving along with the water. This pressure is the same in all directions in the fluid, despite the answer you got earlier.
Answer: A gedanken experiment to illustrate the scalarness of pressure:

take a rubber glove over a glass container and make it hermetic so that water will not penetrate.
take the glass container under water. Measure the inward curvature of the rubber surface and take it as a rough measurement of the force that water is exerting over the surface opening of the container

Now question yourself: how does this curvature varies in function of different spatial orientations of the mouth of the glass container that is hermetically covered with a rubber surface?
it is a property of all liquids and gases that they don't care about the orientation of your container, it will exert the same pressure (eventually you might end up learning that this is because liquids and gases are phases with rotational symmetry).
pressure in liquids and gases is a scalar because of this rotational invariance. If you have taken a class of linear algebra you might be familiar with matrices and how they are understood as operators over vectors. You can think of pressure in general as such linear operators that can be represented as $3 \times 3$ matrices that are a property of the material. In the case of liquids and gases, this operator multiplies vectors in the same way as a scalar would, so they can be think as the identity matrix times a scalar, called scalar pressure.
Since you are in a fluid dynamics class, which is about liquids, the above applies
Answer: When we say that the force on a little unit area is independent of orientation, we're making an approximation; that the fluid is static. More generally, the force does depend on the direction in which the small area is placed.
This orientation dependent force is called the stress tensor. The stress tensor is not a scalar. The nonscalar part of the stress is sometimes called a "shear" which is also measured in terms of force per unit area (i.e. see "shear strength"). If this seems strange, perhaps it's worthwhile to review the wikipedia entry for pressure:

"A closely related quantity is the stress tensor $\hat{\sigma}$, which
  relates the vector force $\mathbf{F}$ to the vector area $\mathbf{A}$ via
  $$\mathbf{F}=\hat{\sigma}\mathbf{A}\,$$  This tensor may be divided up into
  a scalar part (pressure) and a traceless tensor part shear. The shear
  tensor gives the force in directions parallel to the surface, usually
  due to viscous or frictional forces."

The pressure is the average of the stress tensor over all orientations, and in a fluid which isn't moving, this is the only stress that is allowed. The reason is rotational invariance, the only rotational invariant tensor is proportional to the diagonal tensor.
So pressure is the scalar part of the stress tensor, and it is the only part of the stress tensor that exists in fluids.
Comment: -1: This answer is grossly misleading, or else wrong. The leading "shear" in the case of fluids only appears as viscous drag, which is clearly negligible, and vanishes for small velocity gradient limit (as it must by Galilean invariance).
Comment: Carl:The assumption made is not that the fluid is static, but incompressible.
Comment: @Ron M; If you can buy a quart of fluid at the local supermarket it's going to have (non negligible) viscous drag, LOL. Even air has viscosity. @SAntillar; hard to see where you came up with "incompressible". Air is manifestly compressible and exhibits pressure rather well.
Comment: @Carl: The reason I was unhappy with the answer is that it claims that the pressure is not really a scalar, and introduces complications, when the simple answer is not wrong--- the pressure is the scalar trace part of the stress energy tensor, and it is a scalar. So it seems that you are saying "it's a scalar, except its more complicated than that", when it's a scalar and its not more complicated than that. I don't think the answer is wrong, but it is misleading. Student's are most confused by things that they are told are more or less true, with some nebulous confusing caveats thrown in.
Comment: @Ron; I agree that "pressure" as it's usually defined is a scalar. But the OP defined pressure in terms of the force on a small unit area (which has an orientation) and so is not generally a scalar. You have 13K reputation points, so modify my answer already if you can improve it.
Comment: @Carl: This definition is the stress tensor, and I agree that the stress tensor is a tensor, not a scalar. But the pressure is the scalar part of the stress tensor, and it is a scalar! I clarified and removed the downvote. I made major changes, as you can see.
Comment: @Ron, Thanks, I've been way over-subscribed this semester.
Answer: Because it doesn't behave like a vector -- for example, the standard vector norm of the pressure doesn't mean anything, but the sum of pressure components does. Just because something has a bunch of components doesn't mean it's a vector. Pressure refers to the diagonal components of the stress tensor (actually their sum, the trace) -- this arises naturally in terms of momentum fluxes.
As an analogy, consider the fact that the divergence of a vector field is not a vector. Analogously, divergence is just the diagonal components of the tensor derivative. One level further, the dot product is not a vector, for the same reason.