Is this Poison Hemlock?

Question: There is a lot of this growing in standing water near a drainage route and spring. It looks similar to water or poison hemlock.
Answer: This is most likely water cress (Nasturtium officinale), which is in the cabbage family (Brassicaceae).
This is a water dwelling species that has white flowers and leaves in a pinnately compound form and flowers in clusters.
In contrast, hemlock (Conium maculatum) has its flowers in distinct umbels (umbrella shape), and the leaves are also pinnate, but deeply divided and lacy in appearance as opposed to the intact and lightly toothed edges on watercress.
Here's a picture of hemlock leaf from Iowa State University, contrast it to the ones in your question:
Comment: Thanks! It looked similar but is missing distinguishing features like umbels, 5 petals, reddish stem, protruding stamen, etc.
Comment: @noshery no problem, it is certainly good to get clarification around these sorts of things. Water cress is very edible and tasty, though rather peppery when raw - tastes like radish or mustard. If you are certain that the water source is clean (i.e. not polluted or have human/animal waste in it), then harvesting and eating is a possibility, but could need cooking if in doubt as to the water.

Is this Poison Hemlock?


What is causing this giraffe patterning in my fur?

Question: What is causing this giraffe patterning in my fur? The hair particles don't have vertex groups controlling them.
Comment: here's the blend file and the image:

[](https://blend-exchange.com/b/SJ4SPqkV/)
Answer: The issue is you have too little particles (and too many children particles). The 'clump' setting makes the children particles follow the nearest parent particle direction. Since your parent particles are so few, they are far apart, and all the hairs in between are actually children particles leaning in the direction of the few 'parent' particles, and that's creating the pattern.
Increasing the amount of particles should solve the issue, also reduce the amount of children particles so the total amount of particles is still reasonable.
Increase this amount (I increased it to 20000):

And reduce this (I reduced it to 50):

Play around with the values to reach the result you want.


Pros and Cons of cream whippers?

Question: I did not know pressurized cream whippers existed until just seeing a reference to one, which led me to do a Google search.
I own a manual cream whipper, which I rarely use, because it is exceedingly difficult to remove the cream from the canister.  So I just use the whip attachment on my mixer.
I'm very interested in hearing  people's opinions on pressurized whippers, and whether they can be used for more than cream.
Answer: Cream whippers cleaning is not difficult, but rather heavy going, as what you usually fill them with are thick liquids. But you can clean the canister with a bottle brush and then follow the tips given in this answer on cleaning flasks.
You'd also have to clean the tip and the o-ring joints, but it's easy to do so with the pressure of a normal water tap.

If you are planning to get one think that you might not use it many often but it will occupy space, and they can be expensive to get (albeit this is something relative to each person/kitchen).
They are useful for making really quick whipps or mousses. But for some non conventional foods (see below) you might not find people willing to try them.

There are many recipes that use pressurized whippers, not just for sweet whipped creams. Some of them can be as innovative and surprising as the deconstructed tortilla de patatas. It's one of the utensils introduced in modernist/deconstructive cuisine, such as Ferran Adrià's espumas. You can get many recipes in this page from one manufacturer.
Answer: I am expecting my whipping siphon in the mail this afternoon. They are obviously intended for creating whip cream instantly but I find that it's best to think of this contraption as a pressurized chamber which affords you many different culinary options.
Using the pressure will allow you to make instant infusions of different liquids and oils. The general rule of thumb is to put something porous in the canister with the liquid or oil you want to infuse it with and charge it with 1 or more nitrous oxide chargers and agitate it and let it sit for a duration of 60seconds and then with it standing straight up discharge the pressure as quickly as possible to avoid the liquid from discharging and voila you have an instant infusion.
It can also be used to aerate purees or sauces. Some sauces will need some sort of emulsifier or thickening agent added to allow it to hold on to the gas when dispensed but overall it's a pretty versatile tool for experimentation in textures.
My plan this evening is to use it to pressure brew coffee which will lessen the acidity level.
Comment: BTW I bought my whipping siphon from www.creamright.com and they have fast shipping and better prices than I found on amazon really.
Comment: So how was the premier of your whipper? Did it work the coffee with less acidity?
Comment: circumstances got in the way of my testing the coffee brewing but I did make a nice infusion of candy cane vodka in 60 seconds.
Comment: As an update, I have the coffee sitting in the fridge for 12 hours, will taste test tomorrow. I did 40g coffee ground to a semi-fine grind with 500ml water and 2 N2O chargers. Shook vigorously for 2 minutes and I will strain and test tomorrow.
Comment: Tasted the coffee this morning. OMG. no acidity whatsoever, very smooth, excellent mouth feel, nuances of chocolate and sweetness, best cup of coffee i've had in a long long time.
Answer: The cream whipped by NO2 is less stable than cream whipped by a mixer, and will liquefy rather soon. If you have ever bought a cream "spray bottle", you know how the whipped product behaves.
You also have to find a supply for the gas cartridges and store them somewhere. Most people don't have a problem with that, but if you are short on shelf/storage space, or don't want to pay for the consumable cartridges, this becomes important.
The other important arguments - cleaning, modernist cuisine uses - are already explained in Brendan's and J.A.I.L.'s answers.
Comment: I'd love to see video of that argument with the TSA agent. "but sir I don't really trust the provided life vests so I brought my own nitrous cartridges for safety sake"
Comment: On cartidges: not only storage can be a problem. In the hypotetical case you want to air travel with them, but you can't carry them in airplanes... unless you really need to take them to your destination and won't be able to get them there: you can always argue [they are part of your life vest](http://www.home-barista.com/knockbox/mypressi-twist-gas-cartridges-on-aircraft-t18472.html). :-D
Comment: People often travel with the tools of their hobby such as cameras, sports equipment, and the like. I have taken a thermometer and a scale on vacation, and got ridiculed for it. But even I find packing a cream whipper with consumables a bit over the top.

Pros and Cons of cream whippers?


Getting App/Widget on Homescreen?

Question: I was wondering if it's possible to get the icon (shortcut) of your app on the home screen during installation instead of inside the standard apps folder ?
And I did find out that Android has AppWidgets but I was wondering if it supports "standard" widgets as well (javascript/html/css) ?
Comment: http://stackoverflow.com/questions/4854197/how-can-i-place-app-icon-on-launcher-home-screen

It is possible now.
Answer: At the moment it doesn't support "standard" widgets (javascript/html/css), but you should take a look at the Titanium Project
And there is no way to automatically put a shortcut on the homescreen when the application is installed. Not sure if most users would like that either.

Getting App/Widget on Homescreen?


How would calenders work on tidal locked planet with no accompanying natural satellite?

Question: Earth-like planet, same mass and distance from it's parent star, the star is Sun-like too. Suppose I have humanoid intelligent herbivores that also practiced agriculture in the stone age period, how do their calendar works?
Comment: Why would they even need calendars? Without day/night cycles or notable seasons (unless orbit is quite eccentric) a calendar would be of little value in a stone age society.
Comment: @Gary Walker: I think to tell time since they need to explore the land.
Comment: There is a question closely related to this one. And not to toot my own horn, but [toot toot toot](http://worldbuilding.stackexchange.com/questions/32657/how-would-people-tell-time-if-it-was-always-day).
Comment: Assuming native life, you will have know that their biology as well as the biology of their plants (and thus their agriculture) will differ **a lot** from what we know. Might be quite unrecognisable without a diurnal cycle, which not only govern our biology but also culture and arguably what we view as intelligence. So what else in that environment produces natural cycles? A satellite (i.e. moon) or other easily visible planets? Are there seasons due to the home planet's orbit? Do these creatures have biological cycles similar to heartbeat (seconds), digestion (days) or menstruation (months)?
Answer: There would be no calendar - only passage of time.
There's no meaningful suggestion for seasons or days or months.
Time passage could be measured by natural processes: for long times, a standard could be set for the amount of time it takes a certain plant to reach a certain height.
For short times, it could be the amount of time it takes a leaf to flow a distance from one point to another on a river that has a pretty regular flow.
These are irregular, but so was our measure of the length of a forearm in ancient days.  Soon these get standardized.  Finally, if you prefer to apply them to healthy sleep cycles or any other designation you may; and then create the calendar as you like.
I presume it would be more like a metric: One Hundred X's is a Sleep Cycle, One Hundred Sleep Cycles is a Y; One Hundred Y's is a Z.  And so on, substituting your constants and variables as you like in your story.
There is no calendar of sorts, with the exception of your later advanced astronomers.
Happy Writing!
Comment: Unless people have only four fingers. Or they decide they like the base five instead of base ten.
Comment: @XandarTheZenon - haha, exactly.  Thus the caveat, "substituting your constants and variables as you like."  :)
Answer: For a tidally locked planet settled by spacefaring humans, they would simply remain on whatever clock or time system they brought with them. If the day isn't quite "x" kiloseconds long they might add leap time to adjust but otherwise follow the time cues that their various appliances give them (we used to use watches as timekeeping appliances, but now use cell phones. You can imagine whatever sort of timekeeping appliance would be in use by an interstellar civilization).
For a native life form evolved on the planet, part of the answer would have to depend on their evolution. Are they mobile, and can they see in the visible spectrum? Some ideas about tidally locked planets include constant strong winds from the hot pole top the cold pole, which would make mobility difficult or even challenging (if you are evolved for one of the warm climactic bands on the hot side, how will you survive on the cold side?). As well, since the output of a red dwarf star is pretty dim, it might be advantageous to "see" in the infrared spectrum, which would make stargazing difficult to impossible.
But if the life forms are mobile and can see in the visible spectrum, they will be able to see the stars once they reach the twilight edge and move towards the night side. The planet will be orbiting the sun relatively quickly, so they will see the motion of the stars across the sky, and since most planets have elliptical orbits, will actually see effects like precession and the movement of constellations across the elliptic over a relatively short time span.
Just like Earthly astronomers were often priests or shaman, the alien astronomers will be able to use the movement of the stars to calculate time and (perhaps) offer predictions. If the planetary system also has other planets, then they will see them as "wandering stars", which can also help develop a rich system of timekeeping, mythological imagery and perhaps even science.
Answer: Hourglasses
Made of sand and glass. The time taken by sand to empty out completely from one chamber is one hour. Once all the sand is in the lower chamber, the hourglass is inverted.

Water Clock
Same as hourglass. But using water instead of sand.

Evaporation Clocks
These are simpler to construct accurately and much easier to manage. You simply take a tall jar and grade it. Then fill it up with water and place it in a sandbath. The sandbath is placed above a measured amount of fire (e.g. a kerosene lamp with 3 mm thick wick). You would be able to tell the time by seeing upto which point the water in the jar has evaporated. Note that you must not use a heat source that sends water boiling. You have to keep the water at 50°C temperature.


Reduction of cardiovascular mortality without affecting total mortality?

Question: Many interventional studies have found that the intervention reduced the primary end-point (a composite which includes cardiovascular mortality) without affecting total mortality. For example, the CANVAS randomized controlled clinical trial: Canagliflozin and Cardiovascular and Renal Events in Type 2 Diabetes. N Engl J Med 2017; 377:644-657. (https://www.nejm.org/doi/full/10.1056/NEJMoa1611925).
"Significantly fewer participants in the canagliflozin group than in the placebo group had a primary outcome event (the composite of death from cardiovascular causes, nonfatal myocardial infarction, or nonfatal stroke): 26.9 vs. 31.5 participants with an event per 1000 patient-years (hazard ratio, 0.86; 95% CI, 0.75 to 0.97; P<0.001 for noninferiority; P=0.02 for superiority) (Figure 2 and Figure 3)."
"Superiority was not shown for the first secondary outcome in the testing sequence (death from any cause; P=0.24), and hypothesis testing was discontinued. Therefore, estimates for the fatal secondary outcomes, including death from any cause (hazard ratio, 0.87; 95% CI, 0.74 to 1.01) and death from cardiovascular causes (hazard ratio, 0.87; 95% CI, 0.72 to 1.06), are not considered to be significant (Figure 2, Figure 3, and Figure 5)."
Does this finding imply that the intervention increased non-cardiovascular mortality? Should non-cardiovascular mortality be analyzed as a competing risk for cardiovascular mortality?
Comment: Can edit your post to add (1) a full reference t avoid link rot (2) a quote of the relevant section of the paper? Perhaps there simply wasn't a *significant* effect on total mortality, while there was one on cardiovascular mortality.
Comment: Please see the edit. Thank you.
Answer: This looks like yet another misapplication of statistical significance testing. This statement:

Many interventional studies have found that the intervention reduced
  the primary end-point (a composite which includes cardiovascular
  mortality) without affecting total mortality.

is incorrect, at least in the example shown. It is true that overall mortality was not significantly reduced while cardiovascular mortality was, but, as Andrew Gelman has written, "The difference between 'significant' and 'not significant' is not itself statistically significant". (Gelman, A, 2006, American Statistician, vol 60, p 328-333).
In this particular case, all the hazard ratios are very close.
Comment: Should non-cardiovascular mortality be used as a competing risk in the primary analysis? What will happen if we analyze non-cardiovascular mortality as a primary outcome without using cardiovascular mortality as a competing risk in survival analysis?
Comment: You can do any of those analyses - it depends on what you want to find out. What is your treatment intended to do?
Comment: This is only a general discussion. My point is that analyzing cardiovascular mortality without using non-cardiovascular mortality as a competing risk may be misleading.


Mirroring Databases in MySQL

Question: Is there a way to mirror databases in MySQL?  In SQL Server, you have the ability to link 2 databases in a master to master relationship.  One DB will accept transactions and the transactions will be committed on both DBs at the same time.  Is there a a similar concept in MySQL?
Comment: http://stackoverflow.com/questions/3402794/mysql-replication
Comment: MySQL has a "Multi-Master" replication feature in it's Cluster NDB engine. [http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-replication-multi-master.html](http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-replication-multi-master.html)
Comment: Setting up Replication in MySQL is quite easy. You can find a full guide [here](http://dev.mysql.com/doc/refman/5.0/en/replication-howto.html).
Answer: I think the other answer missed the point of the question; which is that in SQL Server mirroring, a transaction that commits to both servers A and B are committed at the same time (in atomicity).  If the transaction fails on one server, it fails on both.  It doesn't seem like there is a similar feature on MySQL
Answer: its called MySQL Replication:
Replication enables data from one MySQL database server (the master) to be replicated to one or more MySQL database servers (the slaves). Replication is asynchronous by default - slaves need not to connected permanently to receive updates from the master. This means that updates can occur over long-distance connections and even over temporary or intermittent connections such as a dial-up service. Depending on the configuration, you can replicate all databases, selected databases, or even selected tables within a database.
Answer: If you want to setup a DB Cluster using MySQL that commits DB Changes on a Master and a Slave at the same time, your best setup would have to involve PXC (Percona XtraDB Cluster).
PXC uses the WriteSet Replication package from Galera (made by CoderShip)
It works on the premise that a transaction committed on a Master is then committed on the Slave. If the Galera code detects that the Slave could not commit and rolls back, then the Master rolls back. This process repeated if there are more than two DB Servers using PXC.
Upon installation, Percona Server has Galera integrated. Don't worry about interoperability. Percona's server binaries are a complete drop-in replacement for MySQL's server binaries.
Read documentation because there are some limitations.Such limitations include

All Data should be InnoDB
No Replication of MyISAM data
Slowest Performing Node slows down Cluster

IMHO you can reasonably live with those limitations.
If you are looking for simple mirroring, PXC would be just fine because all DB writes would go to just one server and synchronous replication would take place at COMMIT time.
I have evaluated this product and it seems very sound so far...

Mirroring Databases in MySQL


Internal Diameter or External diameter measurement?

Question: I would like to know if there is a definite way to understand what kind of diameter is indicated on the dwg by just looking at a dwg. I work in a job profile where I need to add inspection points to these measurements and the device used to inspect it. Most times I get confused if its an internal diameter measurement (using a gauge pin) or an external diameter (using a micrometer). Recently there was a sectional drawing with a cylindrical figure inside and there was a diameter measurement with tolerance shown. I assumed it was an external diameter measured using micrometer. But was corrected that its an internal one to be measured by a gauge pin.
Thanks,
VRij
Comment: You should include figures to indicate the confusion.
Comment: There's also usually a centerline of the part showing what edge is towards the interior, it sounds like you're working with poor drawings
Answer: Usually internal dimensions have arrows pointing out and external dimensions with arrows pointing in.
But I find the dimensions obvious even when there are just angled lines marking the points as the figure or object makes it clear. Knowing first angle, third angle does help.


I am currently designing shirts in Photoshop. The place where i print shirts only accepts PNG, JPEG or JPG. What should i do to ensure higher quality?

Question: So the reason i'm designing in Photoshop instead of using vectors is because i am incorporating photos into the designs. The shirts will be printed using DTG Neo Pigment. What steps should i take to ensure higher print quality? Is there any specific color mode to use, or what file format should i use? Please advise and give any tips, thank you in advance.
Answer: You can well design in Illustrator if Photoshop's vector tools are not enough. Vectors can be rasterized in Illustrator or you can copy and paste them to Photoshop, which can be useful because many things have better tools there (you said you use also photos).
Best quality: The sharpness and colors are limited by the printing process. It's useless to try more than the printing machine + its software are capable. The printer asks raster images because it is the shortest way for him. It doesn't spoil the quality, because finally everything is rasterized. Plotters and cutters use vector images as the final file format.
Your printer surely tells which is the biggest useful image size in PIXELS. Stick with it. In addition the printer can tell the most useful proof color setup - no matter you work in RGB to make the PNG. Then you can get the best idea of final colors. They can also have some guidelines or examples which utilize their process to the limit. Ask!
If the quality is bad now it can be caused by you or the printer. His process can be wrong for your expectations. You should contact them and explain what's the problem (we cannot guess it). Otherwise no fix is possible.
If the printer doesn't give proper answers you are in a wrong place. Serious business wants to keep paying customers.
Comment: Thank you. Ill use this as a general guide and on what to ask for the printer.


Does Tabris iOS client development require a Mac?

Question: Does Tabris iOS client development require a Mac? For example - If the pre-built client is used, do we still need Macs for iOS clients?
Answer: You only need a Mac for development, if you want to build your own iOS App from the sources.
If you don't have a Mac, you can request a precompiled Tabris iOS App, custom built for your iOS Device, Branding and Server URL.
So, like you said - you don't need a Mac for iOS development with Tabris.


Convert a float64 to an int in Go

Question: How does one convert a float64 to an int in Go? I know the strconv package can be used to convert anything to or from a string, but not between data types where one isn't a string. I know I can use fmt.Sprintf to convert anything to a string, and then strconv it to the data type I need, but this extra conversion seems a bit clumsy - is there a better way to do this?
Comment: `int(Round(f))` to set a float64 to an int. See https://stackoverflow.com/a/62753031/12817546. `float64(i)` to set an int to a float64. See https://stackoverflow.com/a/62737936/12817546.
Answer: package main
import "fmt"
func main() {
  var x float64 = 5.7
  var y int = int(x)
  fmt.Println(y)  // outputs "5"
}

Comment: @DavidLarsen From the Go spec: "When converting a floating-point number to an integer, the fraction is discarded (truncation towards zero)". ([Go spec](http://golang.org/ref/spec#Conversions))
Comment: Such casts have a problem in Go that can be unexpected (at least if you come from Java): "In all non-constant conversions involving floating-point or complex values, if the result type cannot represent the value the conversion succeeds but the result value is implementation-dependent." (https://golang.org/ref/spec#Conversions). So if you use a very large value effectively as an infinity, and you convert it into an int, the result is undefined (unlike Java, where it is the maximal value of the integer type).
Comment: @David Grayson, So is this conversion the same as Math.Floor(x) or does it drop the .7 because of the way the float64 saves it in memory?
Comment: just an update. looks like var y = int(x) is suffice with new GO version.
Answer: Simply casting to an int truncates the float, which if your system internally represent 2.0 as 1.9999999999, you will not get what you expect.  The various printf conversions deal with this and properly round the number when converting.  So to get a more accurate value, the conversion is even more complicated than you might first expect:
package main

import (
    "fmt"
    "strconv"
)

func main() {
    floats := []float64{1.9999, 2.0001, 2.0}
    for _, f := range floats {
        t := int(f)
        s := fmt.Sprintf("%.0f", f)
        if i, err := strconv.Atoi(s); err == nil {
            fmt.Println(f, t, i)
        } else {
            fmt.Println(f, t, err)
        }
    }
}

Code on Go Playground
Comment: That is the best way now, but [`math.Round`](https://pkg.go.dev/math#Round) was introduced in go 1.10, which was released two years after the above answer was posted.
Comment: Or just use `math.Round()`
Answer: Correct rounding is likely desired.
Therefore math.Round() is your quick(!) friend.
Approaches with fmt.Sprintf and strconv.Atois() were 2 orders of magnitude slower according to my tests with a matrix of float64 values that were intended to become correctly rounded int values.
package main
import (
    "fmt"
    "math"
)
func main() {
    var x float64 = 5.51
    var y float64 = 5.50
    var z float64 = 5.49
    fmt.Println(int(math.Round(x)))  // outputs "6"
    fmt.Println(int(math.Round(y)))  // outputs "6"
    fmt.Println(int(math.Round(z)))  // outputs "5"
}

math.Round() does return a float64 value but with int() applied afterwards, I couldn't find any mismatches so far.
Answer: If its simply from float64 to int, this should work
package main

import (
    "fmt"
)

func main() {
    nf := []float64{-1.9999, -2.0001, -2.0, 0, 1.9999, 2.0001, 2.0}

    //round
    fmt.Printf("Round : ")
    for _, f := range nf {
        fmt.Printf("%d ", round(f))
    }
    fmt.Printf("\n")

    //rounddown ie. math.floor
    fmt.Printf("RoundD: ")
    for _, f := range nf {
        fmt.Printf("%d ", roundD(f))
    }
    fmt.Printf("\n")

    //roundup ie. math.ceil
    fmt.Printf("RoundU: ")
    for _, f := range nf {
        fmt.Printf("%d ", roundU(f))
    }
    fmt.Printf("\n")

}

func roundU(val float64) int {
    if val > 0 { return int(val+1.0) }
    return int(val)
}

func roundD(val float64) int {
    if val < 0 { return int(val-1.0) }
    return int(val)
}

func round(val float64) int {
    if val < 0 { return int(val-0.5) }
    return int(val+0.5)
}

Outputs:
Round : -2 -2 -2 0 2 2 2
RoundD: -2 -3 -3 0 1 2 2
RoundU: -1 -2 -2 0 2 3 3

Here's the code in the playground - https://play.golang.org/p/HmFfM6Grqh
Comment: Go has a Round function you can use that rounds to the nearest integer:
math.Round(-64.99) will output -65.
Answer: You can use int() function to convert float64 type data to an int. Similarly you can use float64()
Example:
func check(n int) bool {
    // count the number of digits
    var l int = countDigit(n)
    var dup int = n
    var sum int = 0

    // calculates the sum of digits
    // raised to power
    for dup > 0 {
        **sum += int(math.Pow(float64(dup % 10), float64(l)))**
        dup /= 10
    }

    return n == sum
}

Convert a float64 to an int in Go


QGIS 2.2 Attribute editor layout "Drag and Drop designer" field does not exist in datasource

Question: I am experimenting with a new feature available since version 2.2 "Relations" where foreign key relations from a database can be documented, so that the QGIS UI can (auto) generate its attribute editor layout in Master-Detail / Parent-Child forms. We are trying to style a layout for:

one Master/Parent Table (Properties [with geomety])
and a number of Detail/Child Tables:
Parcels [with geomety]
Rights
Actions
Documents

The relationships between these layers can be defined in Project:Project Properties:Relations. Note that all child layers/tables have a single column foreign key (called "bau_guid"), all refering to the single column primary key (also called "bau_guid").

When we select "Autogenerate" for the Attribute editor layout of the Master Table/Layer Properties, QGIS will automatically generate a UI with information of the Master (Properties) and the detail layers vertical master-detail layout which can be navigated

If you want to navigate master-detail-detail relations, space will become an issue in the layout, so you can also revert to Drag-and-Drop Layout, which will create Tab pages for all detail layers.

When a change is made to the layout (even if it concerns an attribute unrelated to relations), there is a problem with the DragAndDrop tabulated layout, an error message "Error: Field does not exist in datasource" appears in the place of the detail layer/relation.

Only when I remove all "relations" from the drag and drop definition and "drag and drop" them again and "in one go" it seems to work again, until the next time anything changes in the layout.
How can we solve / work around this error?
Answer: This looks like a bug. Please open a bug erport, consider creating a pull request or funding somebody to implement this.


LoRa and Manufacturing Technology

Question: Which manufacturing technology do the LoRa (Semtech SX1276) belong to? Is it a CMOS based chip?
Answer: Yes, this chip will be based on a CMOS process, it is the only way to make such a chip in an economic way. This chip has a transceiver working up to 1020 MHz which is perfectly possible in most common CMOS processes.
Anyway, why would you need to know this? How does it matter what manufacturing technology is used? Read the datasheet to learn how to use this chip. I do not see how the process technology that is used is relevant to anyone else than the manufacturer and maybe a competitor that wants to develop a similar chip.
Comment: Thanks for your response. It was a doubt arouse when I went through some research papers about using capacitors in low power design.

LoRa and Manufacturing Technology


How to run steamworks example on ubuntu

Question:
I downloaded the Steamworks SDK.
There is a Steamworks example inside. When I execute command make in steamworksexample folder it fails with errors:
steam/sdk/steamworksexample$ make steam/sdk/steamworksexample/../tools/linux/bin/g++ -g -DPOSIX -DSDL -I/home/steam/sdk/steamworksexample/../tools/linux/runtime/i386/usr/include/SDL2 -D_REENTRANT -DGNUC -O0 -I/home/steam/sdk/steamworksexample/../public -DDEBUG   -c Inventory.cpp -o debug/Inventory.o -MD -MF debug/Inventory.dep

Inventory.cpp: In member function 'void CSpaceWarLocalInventory::OnSteamInventoryFullUpdate(SteamInventoryFullUpdate_t*)':
  Inventory.cpp:61:61: error: 'nullptr' was not declared in this scope
  Inventory.cpp: In member function 'void CSpaceWarLocalInventory::OnSteamInventoryResult(SteamInventoryResultReady_t*)':
  Inventory.cpp:131:62: error: 'nullptr' was not declared in this scope
  Inventory.cpp: In member function 'void CSpaceWarLocalInventory::DoExchange()':
  Inventory.cpp:218:18: error: 'nullptr' was not declared in this scope
  Inventory.cpp: In member function 'void CSpaceWarLocalInventory::GrantTestItems()':
  Inventory.cpp:243:35: error: 'nullptr' was not declared in this scope
  Inventory.cpp: In member function 'const CSpaceWarItem* CSpaceWarLocalInventory::GetItem(SteamItemInstanceID_t) const':
  Inventory.cpp:254:9: error: 'nullptr' was not declared in this scope
  Inventory.cpp: In member function 'const CSpaceWarItem* CSpaceWarLocalInventory::GetInstanceOf(SteamItemDef_t) const':
  Inventory.cpp:276:9: error: 'nullptr' was not declared in this scope
  Inventory.cpp: In member function 'void CSpaceWarLocalInventory::RefreshFromServer()':
  Inventory.cpp:283:33: error: 'nullptr' was not declared in this scope
  make: *** [debug/Inventory.o] Error 1

I'm using Ubuntu 14.04.3 LTS.
Answer: I just got the steamworks example to build and run on my Ubuntu 14.04 computer. I don't have a great fix, but a few hacky solutions.
The short solution was to run (you'll need to modify the include paths here to whatever directory you have this code in):
make CFLAGS="-std=c++0x -include /home/bbales2/sdk/public/steam/steamtypes.h -I/home/bbales2/sdk/tools/linux/runtime-release/amd64/usr/include/SDL2/ -DSDL=1"

This will compile some things, but will fail to compile "glew.c". To compile this file you need to remove the steamtypes include from that make and run it again like so:
make CFLAGS="-std=c++0x -I/home/bbales2/sdk/tools/linux/runtime-release/amd64/usr/include/SDL2/ -DSDL=1"

After glew.c compiles, the make will fail again. Re-run the first make command and eventually things should finish. Run the example with "debug/SteamworksExample.sh"

In more detail, the errors I came across are listed here. We can fix them all with CFLAGS:
error: 'nullptr' was not declared in this scope

To fix this you need to tell your compiler to be C++11. This is the "-std=c++0x" flag
GameEngine.h:129:52: error: 'uint32' has not been declared
GameEngine.h:129:67: error: 'uint32' has not been declared
GameEngine.h:132:52: error: 'byte' has not been declared
GameEngine.h:132:65: error: 'uint32' has not been declared
GameEngine.h:132:80: error: 'uint32' has not been declared
GameEngine.h:135:52: error: 'DWORD' has not been declared

There is a header, sdk/public/steam/steamtypes.h that defines these. It's not getting included by default for some reason. This is the "-include /home/bbales2/sdk/public/steam/steamtypes.h" flag.
gameenginesdl.h:18:17: fatal error: SDL.h: No such file or directory

The SDL headers are missing. Valve includes them in sdk/tools/linux/runtime-release/amd64/usr/include/SDL2/ but the Makefile isn't detecting and adding them. This is the "-I/home/bbales2/sdk/tools/linux/runtime-release/amd64/usr/include/SDL2/" flag.
In file included from <command-line>:0:0:
/home/bbales2/sdk/public/steam/steamtypes.h:107:15: error: variably modified 'Salt_t' at file scope
/home/bbales2/sdk/public/steam/steamtypes.h:123:1: error: initializer element is not constant
make: *** [debug/glew.o] Error 1

We get this error because we can't include steamtypes.h while compiling this file (using the -include flag to force includes like this is not a great idea). Just removing the steamtypes include, re-running make to compile this file, and then adding the steamtypes include back (for the rest of the compile) seems to work.
And
Main.cpp:248:2: error: #error Need CreateGameEngine()
... (bunch of Warnings)
Main.cpp: In function 'int RealMain(const char*, HINSTANCE, int)':
Main.cpp:251:2: error: expected primary-expression before 'if'
Main.cpp:251:2: error: expected ',' or ';' before 'if'
make: *** [debug/Main.o] Error 1

Main.cpp seems to want us to define the SDL macro. We do that with "-DSDL=1"

How to run steamworks example on ubuntu


Can muslim soldiers have intimacy with the female prisoners of war, before it has been decided to enslave them?

Question: I am researching slavery and its roots in Islam to better understand it with context. I have a question about islamic rules on  female prisoners of war, i know that there are options when you have prisoners of war. Such as ransoming them or setting them free or taking them as slaves. While this is being decided can the muslim soldiers establish intimacy with the female prisoners of war, before it has been decided if they are to be taken as slaves?
Answer: Concubinage is only allowed when a person has ownership over a female slave.

والذين هم لفروجهم حافظون إلا على أزواجهم أو ما ملكت أيمانهم فإنهم غير ملومين فمن ابتغى وراء ذلك فأولئك هم العادون
And they who guard their private parts. Except from their wives or those their right hands possess, for indeed, they will not be blamed - But whoever seeks beyond that, then those are the transgressors.
— Quran 23:5-7

Normally ownership only exists after the distribution of the spoils of war and not before it. All the solders who were present in the battle have a joint right to the spoils, however what belongs to whom is only established after distribution.
Further, it is not permitted to have sexual relations with a female slave before a waiting period which ensures that her womb is empty:

عن أبي سعيد الخدري، ورفعه، أنه قال في سبايا أوطاس  لا توطأ حامل حتى تضع ولا غير ذات حمل حتى تحيض حيضة
Abu Sa'id Al Khudri traced to Prophet (ﷺ) regarding the captives taken at Atwas:
There must be no intercourse with pregnant woman till she gives birth to her child or with the one who is not pregnant till she has had one menstrual period.
— Abu Dawud
Comment: So would it be a impermissible a solider involved in intercourse with a prisoner of war whose status of slave hadn't been established yet and was not assigned ownership to them, for example the leader had not decided if he was going to set the prisoners free yet.
Comment: https://sunnah.com/urn/512590 this hadith in particular were the soliders ask about withdrawl method with these women saying they wish to "ransom them" so they dont want them getting pregnant, at this point are they slaves but still being ransomed for freedom or is this word used to say "selling" as in  they wish to sell them?
Comment: @Eva Yes it is forbidden to have intimacy with a woman whom one does not own in full, and also when the waiting period has not yet passed. If the leader wishes to free rather than to enslave them then typically this will happen before distribution. Distribution indicates that he has decided to enslave them.
Comment: For the second comment. This is after distribution. After distribution the slave becomes the personal property of the individual soldier so he too can decide to free her or sell her to he own people (ransom). Be that before intimacy or after intimacy. But yes ransom here is interpreted by scholars to mean general sale. If a slave becomes pregnant then it is not permitted to sell her rather she becomes free after the death of the master, and he can take personal service from her, and continue to have intimacy with her or he can free her - but he can not make her the slave of another person.
Answer: Establishing intimacy before marriage is adulatory and Quran says to not go near adulatory

Do not go near adultery. It is truly a shameful deed and an evil way.
Quran 17:32

This is case if the female captive is willing to have intimacy. If she is not willing to have intimacy and someone try to forcefully become intimate with her, then it is even more grievous sin.
You can see my answer here also
https://islam.stackexchange.com/a/20237/10491


$p$-$V$ diagram and internal energy

Question: I recently learned that if the initial state is equal to the final state in the $p$-$V$ diagram then the internal energy is equal to zero so that means $Q=W$. My question is how can you know that only from the $p$-$V$ diagram without knowing the amount of Q? ( I'm taking generally not only in the case of ideal gasses)
Answer: Because U is a state funcion of P and V. This means that U isn't influenced by how a system arrived to a particular state (to a particular P and V) but just by the P and V that the system has at the moment. Therefor, if you draw a closed curve on the Clapryron plane, you will mean that (after some changes that U doesn't care about) you will be back with the same P and V, so the same U.
Also, note that you can say that U is constant, but you can't determine its value.
Comment: To my understand, it's not possible. Even if you consider real gasses, the famous PV=nRT becomes the Van der Waals formula, but even in this formula changing T would result in a change in P and/or V.
Comment: But isn't it possible to rise the temperature of lets say solid with out changing its pressure and volume? In this case work will be zero and initial and final state will be equal but we obviously have heat transfer... Sorry if my question seems stupid but my book only show the relation between p, v and t for ideal gasses
Answer: When you say " the initial state is equal to the final state" to me that means all the properties of the substance (Pressure, volume, temperature, internal energy, entropy, etc.) are the same at the initial and final states. Heat (Q) and Work (W), are energy transfers between the system and surroundings. If the initial and final states are the same, the algebraic sum of the heat transfers (Q) and work transfers (W) between the system and surroundings in going from the initial and final states is zero, regardless of whether or not the system is an ideal gas.
Hope this helps.

$p$-$V$ diagram and internal energy


What is the name of the condition where your foot is much larger when standing than when sitting?

Question: What is the name of the condition where your foot is much larger when standing than when sitting?
Comment: Welcome to Health.SE! [For a number of reasons outlined in this meta post](https://health.meta.stackexchange.com/a/748/8212), we can not, and will not, give personal medical advice. If you have a question regarding your personal health, you should see a doctor. For further information on how this site is supposed to work, what is on-topic or not, you can take the [tour](https://health.stackexchange.com/tour), visit the [How To Ask](https://health.stackexchange.com/help/how-to-ask) page and [Health Meta](https://health.meta.stackexchange.com/).
Comment: @Chris If there is only one condition like this, I think the question is answerable and an answer wouldn't be off-topic.
Answer: Where the tissues swell when you do a lot of standing but don't when you're recumbent, or less obvious when you're sitting - is called dependent edema.

What are the causes for dependent edema?
  Although dependent edema is the most common cause for leg swelling, there is no easy explanation to why it happens. All that is known that it happens in certain conditions Here are several causes that are known to be causes of leg swelling:

Hot weather – Hot weather causes the veins to dilate. Dilated veins
will result in fluid leaving them. This is a very common cause of
ankle swelling. This is why more people complain of swollen legs
during summer.
Flight – The pressure in the passanger cabin during
flight is less than it is on the ground. That reduced pressure may
cause the ankles to swell.
Diet rich in salt – Salt is well known to
attract fluid. A diet rich in salt may result in dependent edema (editor: Hmm.  that needs a reference)
Standing for a long time – Gravity results in pooling of fluid in the
ankles after long periods of standing. This is why people who are on
their feet a lot without really moving get swollen legs. Examples of
such people are cashiers.
Lack of movement – The body uses movement
to pump fluid out of the legs and back into the body. People who do
not move much will develop edema. This may happen even in young,
healthy, people, who have a desk job and sit by their computer for
prolonged periods of time.
Medication – Such as amlodipine. (vasodilators)

http://www.angiologist.com/uniquely-vascular-medicine/dependent-edema/


New Genesis child theme or revise current Genesis child theme

Question: I've been asked to make some fairly significant changes to our web site, but the site will overall have the same feel. I'm wondering if I should modify the current customized Genesis child theme, or if I should create a new child them. Any thoughts?
Answer: It all depends on the amount of changes required, as well as whether or not you plan on keeping the theme you'll be editing 'up-to-date' with the theme author's releases. If, however, its a custom built theme, then I'd stick with the child theme you're in.
Generally it'll be quicker and easier to modify the theme you're in then create a child theme of a child theme and try to have changes passed back or run the risk of completely overwriting files like header.php.
Comment: Aaron, I'm sort of doing this already. I copied the entire child theme and activated it, but wasn't sure where I need to make edits within this theme to differentiate it from the other theme. In the discussion just below this one, it appears the style.css is the only file that needs to be edited.
Answer: I do agree with Aaron's thoughts on "It all depends on the amount of changes required".
Still. I would use a slightly different work-flow. Meaning:

Keep my original child theme (old-child) intact.
Create a new folder and copy the whole old-child content in it making an exact replica. Do NOT refresh your themes screen just yet (thinking: Let me see what happened) or you may be faced with the issue: "I did this and noticed it ended up being the active theme, which I thought was strange. ".
Turn this to a new child (new-child) theme by altering the headers in the style.css file accordingly (just a couple of lines anyway "Theme Name", "Version"). Now it is safe to refresh and take a look to your brand new Child Theme.
Play around to your hearts desire. :)

This way you get both worlds: You get to have a brand new child theme and get to keep all the useful modifications you have already so hard worked for. And the best deal? You can try it out without loosing a single visitor when combined with a plugin like Theme Test Drive or even try them out from your Appearance->Themes screen.
You can even have 2 or 3 or 5 child themes with minor modifications.

Hope that helps, marikamitsos
Comment: Thanks for the replies. This is exactly what I've started to do (marikamitsos' idea). I copied the theme and renamed the version. Is the style.css file the only file that needs to be edited to reflect the new child theme?
Comment: *"Is the style.css file the only file..."* **Yes.** That is all. Just give it a new name on the Theme Name: MyNewTheme or My New Theme or whatever and you are **good to go**. I usually also fill out the version # as well and put an extra note on the Description to help me out
Comment: Thanks. I did this and noticed it ended up being the active theme, which I thought was strange.
Comment: Aha.... You refreshed too early. :( Please see the added clarification.


Which of Below sentence is correct and Why?

Question:
What did you play?/What did you eat?
What you played ?/What you ate?

I am confused between above type of sentence, can anybody help me out.  Whit proper grammatical explanation.
Answer: The sentences in line 1 are properly formed sentences in question form. That is they each have a subject (you in both cases); an auxilliary verb in the past tense (did in both cases) and a main verb (play / eat). These sentences are questions because they both start with the same question word (what) and the order of the subject and auxilliary verb are reversed (in a statement the subject comes first and the verb second, for example "You did play football" and "You did eat a burger").
The phrases in line 2 are not sentences because they start with the question word what but the subject and verb are not reversed from the normal statement form. They could be noun phrases forming the object of the verb in longer sentences, for example "Please tell me what you ate." but they are not valid sentences on their own.
A long time ago they could have been turned into questions with the same meaning by reversing the order of the subject and the verb, for example "What played you?" but that is not used any more. "What ate you?" is still a valid sentence but does not mean "What did you eat?" it means that something (possibly a lion or a shark) ate the person or thing that you are talking to. In the majority of cases you would not expect an answer!


Were the names Matthew, Mark, Luke and John common in the time of Jesus?

Question: Were the names Matthew, Mark, Luke and John common names in the time of Jesus? If not, what were their real names and why were they changed?
Comment: See also [this post](http://christianity.stackexchange.com/q/6076/200), which addresses the general topic of names, not specifically of the four gospel authors.
Comment: Welcome to Christianity.SE. For a quick overview, please take the [Site Tour](http://christianity.stackexchange.com/tour). For more on what this site is all about, see: [How we are different than other sites](http://meta.christianity.stackexchange.com/questions/1808/how-we-are-different-than-other-sites).
Answer: The names of the authors of the Gospels have been adapted into English from the Greek of the New Testament.1 However, Hebrew and/or Aramaic were likely the mother tongue(s) of three of the evangelists (Matthew, Mark, and John), and their names reflect this background. Luke's name is Greek.
All of these are normal, common names, and there is no reason to think anyone's name was changed for the purpose of assigning him to a Gospel.
Matthew
Matthew's is a Hebrew name that comes awkwardly into Greek as Μαθθαῖος (Maththaios). When speaking Aramaic or Hebrew, his friends and family likely called him by the Semitic version, מַתִּתְיָ֫הוּ (Mattith-yahu) or several of the available shortned versions thereof (Mattaʾi, Mattiyaʾ, or Mattiyah). These are derived from the Hebrew nātan ("he gave") and mean something like "gift of God". This name and its variants were very common in Hebrew.2
Matthew appears to have also had a second name, Levi (see Mark 2:14, Luke 5:27). Levi (Λευὶ) is, of course, a Hebrew name for one of the twelve tribes: לֵוִי (lēwı̂). It is also a common male name from the OT. Why Matthew had two different Hebrew names and the nature of the relationship between them has been a matter of much scholarly discussion.
Mark (a.k.a. John Mark)
The full Greek names is Ἰοαν(ν)ες Μαρκος (Ioan(n)es Markos). This has two components. Markos is a Greek name (cf. Latin Marcus), one of the most common in both Greek and Latin speaking communities in the Hellenistic period.3
Ioannes is a Greek adaptation of the Hebrew name יוֹחָנָן (yôḥānān, "Yahweh has shown grace"). When speaking Hebrew or Aramaic, it is likely that yōhānān alone was used.4 Among the evangelists' names, only yōhānān ranks among the top six most common male names in Palestine at the time (#5).5
Luke
Luke's is a normal Greek name – Λουκας (Loukás) – by which he likely addressed. Luke was a Gentile whose command of Hebrew and/or Aramaic is unknown, but in any case we are not given a Semitic name.
John
As noted above for Mark's Semitic name, Ioannes is a Greek adaptation of the Hebrew name יוֹחָנָן yôḥānān ("Yahweh has shown grace"). Because this was a common name among Greek-speaking Jews (see above), John is often referred to with the patronymic τοῦ Ζεβεδαίου ("[son] of Zebedee").

1. Of course, the Gospels are technically anonymous. However, the traditional attributions of authorship were clearly identified with particular men who are known to us from within their pages (and Acts).

2. Anchor Yale Bible Dictionary (citation below) finds at least ten mattaniah's, in addition to one or more each: mattatha, mattathiah, mattathias, mattattah, mattenai, matthat (all derived one way or another from "gift" and "yhwh") in the Old Testament and Inter-testamental literature, s.v..

3. Paul J. Achtemeier. "Mark, Gospel of" in Anchor Yale Bible Dictionary, Ed. David Noel Freedman (Random House, 1992), 4:541.

4. Richard Bauckham Jesus and the Eyewitnesses: The Gospels as Eyewitness Testimony (Eerdmans, 2006), p 67ff. The author points out that likely many more people than we realize had both Greek and Semitic names, but because only one was generally used in a specific setting, these are often difficult to trace based on the limited texts available.

5. Richard Bauckham, ibid.

Data on Greek-Semitic equivalences are from New International Dictionary of New Testament Theology and Exegesis. Ed. Moises Silva (Zondervan, 2014).

Comment: What evidence is there that Luke was a Gentile (as opposed to a Hellenic Jew for instance)?
Comment: @bruisedreed - read colossians 4:7-14.  Verses 7 to 11 identifies all who are "of the circumcision" ie Jews. Luke is named with those who are thus _not_ of the circumcision.  Had Luke been an uncircumcised Hellenistic Jew it is likely he would have sought to be circ so as not to cause offence to circ Jews, just as Timothy was, acts 16:3.
Answer: The name john did not exist. I learned this in 1962. The first day of first grade.
Our teacher explained that the letter j symbol and sound was about 250 years old as she explained our language history.
So I have know that none of the bible or book of mormon story names with that symbol could not have existed.
So I was not going to accept any religion or person who did not understand this.
The more I studied the more I knew I would be an Atheist.
The name christ did not exist. The ch symbol and sound is about 1100 years old.
Why do Christians want to argue a case they can not win ?
Comment: Welcome to Christianity Stack Exchange.  On this site we look for evidence of research into claims made. Also, we expect that the question will be answered and discourage personal opinions.  Please take our tour to see how we operate: https://christianity.stackexchange.com/tour
Comment: So, Ghengis Khan didn't exist, Mao Tse Tung didn't exist, Xerxes didnt exist, we could go on.  Or thise writing about these names are simply unreliable.  It is an absurd opinion.  When names in one language move to another language their pronunciation usually changes.  According to the very scholarly work of Richard Bauckham "Jesus and the Eyewitnesses" mentioned in another answer the names found in the Gospels are one of the most powerful arguments for their authenticity.
Comment: Christ is not a name at all, it was the title. "Christos" in greek means "anointed one" which in turn is the same as "Chosen One". It is the Greek version of Messiah, the English translation of the Hebrew word meaning Anointed One.  The practice of anointing with oil someone who has been chosen to be king or high priest is found in the Old Testament, such as king David's anointing by Samuel the prophet when God chose him to be king. As for the Mormon beliefs, they have no archaeological support. The Bible has lots.


Is there any caselaw on when a sound recording lacks authorship because it was "captured by purely mechanical means without originality of any kind"?

Question: The Copyright Office circular 56, seemingly quoting the House report for the Copyright Act of 1976, says "Sound recordings captured by purely mechanical means without originality of any kind also lack a sufficient amount of authorship to warrant copyright protection". I'm aware of the Monkey Selfie Copyright Dispute, and so of course one could infer something from that from the visual domain. But are there any sound recording cases where a legal decision-maker is trying to actually apply that test to some concrete facts? Putting "purely mechanical means without originality of any kind" into Google Scholar brings up nix.
Answer: We are talking about the Threshold of Originality here. Let's look at what would constitute such a recording:
It needs to be made purely automatic. It needs to not care for any original choices. As a result, such a recording is utilitarian. Like security camera footage or service hotline calls.
The Copyright Office deems such material unregisterable.

"in order to be entitled to copyright registration, a work must be the product of human authorship. Works produced by mechanical processes or random selection without any contribution by a human author are not registrable."

I have found a case: the defense in Southwest Casino Hotel Corp. v. Flyingman centered around the claim that CCTV footage would not be copyrightable.
Comment: Nice find!  Unfortunately it looks like the copyright claims in that case ended up being [dismissed due to a lack of jurisdiction](https://www.courtlistener.com/docket/4739823/48/southwest-casino-and-hotel-corp-v-flyingman/) stemming from a failure to go through the process of attempting to register the copyright, so it didn't get a ruling on the merits.


Unable to receive email on Google domain

Question: I migrated to a Google App domain recently and I didn't previously have email set up for my domain. So I created an email on my new Google App domain as an administrator. I am able to send emails from this account, but unable to receive emails.
When I try to send an email to the new domain's email, I receive the following error:
<code>Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the c
</code>
I strongly believe that I don't need to change any MX Record from my external domain because I don't have this admin account created in it.
Answer: If you haven't already done so, you need to set up MX records for the domain, as described in the documentation.


Can we make an AI to fine tune other AI hyper parameters?

Question: Every time AI gurus talk about fine tuning hyper parameters, they more or less say it's trial and error. But can't we make an AI to tell AI what its hyper parameters should be?
Answer: Yes, you can make an AI for that. By AI, you mean algorithm which finds hyperparameters efficiently. There are many ways to find hyperparameters which would then come under the AI like using bandits to find hyperparameters, Bayesian methods to find hyperparameters and many other methods exist. Search for hyperparameter optimization and you will find a ton of methods which improve upon grid search and random search.
AI in the purest sense of it, if I take, then, I will assume that you are talking about reinforcement learning since that deals with taking actions and changing its behaviour (in this case, hyperparameters). You can create an AI for that.


Why has a fiber optic cable stopped functioning on one of the allowable wavelength?

Question: For a long time, a fiber cable worked on both allowable wavelengths, and now it does not.
Is this a defect of manufacturing? Maybe it's due to weather, other external factors, mechanical damage, or aging? Is it possible to fix?
Comment: It might be helpful to know which type of fiber you are referring.
Comment: And what the two wavelengths that were operating are, and which is the remaining working one. Also, what is it connected to?
Answer: The short answer is that fiber cabling is cheap enough that it is not worth your time or effort to fix a damaged cable in many instances. If you have doubts about a cable, you should just replace it if possible.
In some cases, the fiber is not able to be easily replaced (eg, undersea cables). If, say, you have a long run between buildings, then you might be better off using a OTDR to locate a possible break, and fixing/splicing the cable at that point.
Basically, you have to decide if the effort to fix the cable (if its possible) will be less than running an entire new cable. Most of the time, such as in DC or enterprise environments, it will probably be much cheaper/easier to run a new cable.
As for why the cable no longer works properly....there could be many reasons. Fiber cabling is much less robust than copper cabling. If the cladding or PVC jacket has been worn away, light may be leaking at that point, which may be interfering with the missing wavelength.
Comment: Cladding does not "wear away" - the core and cladding are one piece of glass. They are two different types of glass, but they are one fused solid piece of glass. The acrylate buffer can be removed or worn, but the buffer (and the jacket) does not directly impact light transmission in the fiber - it's just mechanical protection.
Answer: Both water intrusion and bending (literally the bend radius of parts of the cable) have detrimental effects that vary with wavelength. As such, a cable disturbance that made a bend tighter would be a classic, textbook reason for losing the longer wavelength - so would a failure of waterproofing. A multiple wavelength OTDR would be a textbook approach to finding that problem. If a section of cable has much higher attenuation at a longer wavelength than a shorter one, you look for a problem at that point in the cable.
Outside the textbook, looking at the more exposed cabling and connections at each end is a good practice, as they are more commonly disturbed, and thus more commonly the problem. Specifics of the fiber you have, the frequencies you had, which one you lost, and your available test equipment and ability to use it would be helpful. If you can relate any changes that were happening to the time that one frequency was lost, that can be helpful - if work was being done in the cable path, or if a network closet or server room had work going on at the time, that helps guide where to look first. It may not have been "network work" - cables and patch cords can be disturbed by electricians, HVAC and plumbers, or even furniture movers and custodial staff, depending on how exposed they are, or where they were routed. Even well-intentioned but ill-informed IT folks can cause a problem.
I think (having built a campus singlemode network from scratch) any decently competent network tech who wants to learn this stuff can, but there are a lot of people who do more harm than good through not understanding what they are dealing with, starting with the importance of clean connectors...and one dirty connector can damage a lot of formerly fine connectors. Depending on the type of "dirt" you won't just make the other connectors dirty - you can harm them to the point that they need to be replaced.
If you have, or can get, an OTDR and are, or can get, or can become someone who knows how to use it, it's the gold standard for finding problems. But you need a fair amount of gold to get one, or even rent one, which is why folks often use lesser tools to try and sort things out. Also, know what you are doing with respect to fibers and eye damage - most fiber lasers are invisible. Best practice is to isolate and disconnect both ends of the fiber before testing/examining, but in any case to use only optical systems that will protect your eye (either with filters, or by inserting a video step) when examining the ends of fibers to be sure they are clean.
If the two wavelengths are being used in opposite directions (as a Bi-Directional single-fiber link) you might also have something simple, like a multi-mode patch-cord on a singlemode system - that is non-blessed in either direction, but might allow reception at its end, while utterly ruining transmission from the end it is at.
Answer: I will edit this if you provide more details and I can give a better answer.  I am also going to go out on a limb and guess you have lost the lower wavelength and the upper wavelength is still working.
The upper wavelength has less attenuation as it travels through the fiber, so it will arrive at the receiving end with more power.  Starting from a point where both wavelengths are functional, if you introduce something into the environment which increases the attenuation, you can reduce the power on the lower wavelength so it is no longer functional.
You have already mentioned some of the causes that can increase attenuation, but I would look first at the fiber patch cords, dirty fiber, or fiber bends as causes.  Fiber patch cords are easily damaged and easily replaced.  You can easily take the opportunity to clean the fiber properly at this time (get a good non-alcohol based cleaning kit and a fiber scope).
A visual fault indicator (i.e. a bright light source) can also help identify problems quickly in fiber depending on the situation.  Anywhere you see the light bleed out would indicate a loss of signal strength and the brighter the light the more loss you are experiencing.
Answer: It would be helpful to know more about the fiber... type, location, environment, any recent changes, etc.
Generally speaking a quality cable should last decades if left alone.  Patch cables tend to fail due to movement, numerous plug/unplug cycles, and excessive bends.  Infrastructure cables (in walls, plenums, underground, or aerial) should last a good long time unless there were material defects in construction or deployment, but age does degrade them, slowly. I'd blamed temperature changes, but I'm not a materials scientist. (something about glass re-crystallization making it brittle and subtly changing it's characteristics.)
As Justin said, if it's an infrastructure cable (read: hard/expensive to replace) find an OTDR to see where and what the problem really is.  For all we know, there could be a dirty patch connection somewhere.


What is known about the universal aspects of the relation between intonation and emotion?

Question: Are there language-independent aspects of the expression of emotion by intonation? More specifically, are there established relations between the expression of emotion by linguistic intonation and by musical means (i.e. musical intervals/phrases/melodies)? Quick summaries of what is known and/or pointers to the literature would be appreciated.
Comment: I initially answered this: > The only thing I know is that rising tone for questions is universal, even in tonal languages. Then, seeking a yummy link to back it up [I learned even this not universal after all](http://en.wikipedia.org/wiki/Intonation_%28linguistics%29#Uses_of_intonation)! > Some languages, like Chickasaw and Kalaallisut, have the opposite pattern from English: rising for statements and falling with questions.
Comment: @hippietrail: also there is the phenomenon of [HRT](http://en.wikipedia.org/wiki/High_rising_terminal) or [uptalk](http://itre.cis.upenn.edu/~myl/languagelog/archives/002967.html) in some speakers of English, where factual statements are given a rising intonation towards the end, sounding like a question.
Comment: @Mitch: Yes I'm from Australia where uptalk seems to have spread from.
Answer: I'm not aware of any claims about universals when it comes to intonation and emotion. There are many studies (production and perception) out there that have tried to isolate the acoustic correlates of different emotions in speech in a single language. An example of one such perceptual study is "Verification of Acoustical Correlates of Emotional Speech using Formant-Synthesis" (Burkhardt and Sendlmeier 2000) for German--the researchers controlled various parameters like mean pitch, pitch range, vowel precision, and phonation type in synthesized speech and asked listeners to categorize the stimuli into a finite set of predefined emotions. As you might expect there were no absolute correlations--just tendencies (for example, a lowered mean pitch and a narrow pitch range as well as breathy or creaky voice was frequently judged to signal boredom).
I also read about one study from Emotion, "The minor third communicates sadness in speech, mirroring its use in music." (Curtis and Bharucha 2010) that recorded actors saying lines with various emotional affects and claimed that the descending minor third was a reliable cue to sadness. You can read about their study on the Scientific American website as well as hear audio samples from the study. I am dubious of their methodology and their interpretations of the results, however. Aside from their questionable methods of assessing the melodic intervals of the tokens, when I downloaded their samples and manipulated their pitch to expand and contract the pitch ranges of the utterances, my perception of the emotion being conveyed did not change.
Comment: Thanks! It sounds like this area could use some more data collection.
Comment: Probably. But I would be skeptical of any study that attempts to tie any melodic interval to a specific emotion, since other factors such as focus and sentence type (e.g. declarative statement vs. echo question) are already known to affect pitch range and melodic contours. So, if from one utterance to the next the emotion of the speaker stays constant but one of those other factors changes, the melodic intervals in the utterance would change!
Comment: I agree, one should carefully control for such factors. By the way, I just realized that the [website](http://ase.tufts.edu/psychology/music-cognition/emotion2009.html) that inspired me to ask this question (months after seeing it) is linked from the Scientific American page you linked to, suggesting there really aren't a lot of results along these lines.
Comment: More broadly, I am always suspicious of any claims about emotion. While internal states can/should obviously be part of scientific discourse, who's to say what the difference is between sadness and melancholy, between rage and anger? Is one a _kind of_ the other? Is there a universal "taxonomy" of emotion? I am not asking rhetorically! I just haven't seen any convincing arguments for emotion and so can't help but wonder if they are truly objects of scientific inquiry.
Answer: it is not an easy thing to state something is universal. However, there are trends of languages that have a phenomenon like 'final rising' to denote "Polar Questions". There are about 6000 languages around the world. We haven't gone deep on each and every language (i.e. we haven't intensively studied each portion of each component of the linguistic components of these languages.) One thing i am sure of is that, according to the theory of Iconicity "introduced by (Bolinger 1972)" -check the reference- that rising motion of anything denotes continuity, while falling movement of anything denotes finality. This is mention***ed in many papers and articles like Gussenhoven's*** Phonology of Intonation (Free online) or his book: Phonology of tone and Intonation, also a book like Suprasegmentals by Ilse Lehiste talks about prosodic features in general and describes Bolinger's Theory for unfinished business and the finality.


mobile rooting problem

Question: I am using Samsung GT-S6312. I just rooted my mobile with frama root. I haven't installed any custom firmware, nor a custom recovery. I've got some problem. If I install some apps like Whatsapp, way2sms, it's notifying me that I don't have any space, however I still have 400Mb in my internal memory.  I can install some other apps, including Facebook, Hike etc.
I have tried to unroot my phone without success. So if I reset my mobile, does it unroot my mobile successfully?
Comment: You jump pretty quick to the conclusion that rooting was the cause for the installation problems. The problem could be completely unrelated to rooting. See for example http://android.stackexchange.com/questions/27083/google-play-error-downloading-app-insufficient-space
Answer: Well, in order to unroot your device you need to flash the stock ROM again over to your device. For getting the stock ROM for your device try heading over to the sammobile/firmware section and get the appropriate stock ROM available for your Samsung GT-S6312, once you get the stock ROM use the ODIN which can be easily searched over the Google, download and use it to flash the stock ROM over your device. Once the flashing process completes your device will get unrooted.

mobile rooting problem


What happens at the interference of infrared and ultraviolet rays?

Question: This question occurred to me, and I was wondering what everybody else thought about it. Lets say that an infrared laser and an ultraviolet laser were to intersect at a right angle. What kind of things would happen from there? Would they average out and create a point of visible light? Would they pass through each other as if nothing happened at all? Would their trajectory be effected? Finally, if they did create a point of visible light, would the ray continue on past that point returning to its original wavelength, or would it be permanently altered as it continued along its path?
Thanks for the input! :)
Comment: Are you speaking about the laser beams interaction?
Answer: Assuming the medium in which they cross is linear, the beams would propagate on as if nothing happened at all. If the medium is nonlinear, and the electric fields are properly arranged (and probably the beams couldn't be exactly at right angles), then a visible light ray might arise through a process called difference-frequency generation.


If $(Y_i,X_i)$, $i=1,\ldots,n$, are iid, are $Y_i$, $i=1,\ldots,n$, iid?

Question: If $(Y_i,X_i)$, $i=1,\ldots,n$, are iid, are $Y_i$, $i=1,\ldots,n$, iid? For example, if $n=2$ then the question is: if $Z_1=(Y_1,X_1)$ and $Z_2=(Y_2,X_2)$ are independent of each other with the same joint distribution, is it true that $Y_1$ and $Y_2$ are iid?  I can find no formal counter-example and I cannot prove it either.
Answer: If $Z_1 = (X_1, Y_1)$ and $Z_2 = (X_2, Y_2)$ are equal in law as random vectors (their joint distributions are equal), then $X_1$ is equal in law to $X_2$ and $Y_1$ is equal in law to $Y_2$ (the converse is not true). Your claim follows from this.
Proof of my claim: say the random vectors $Z_i$ land in a space $\mathcal A\times \mathcal B$. Let $A$ be a measurable set of $\mathcal A$. We have to prove that $P(X_1\in A)=P(X_2\in A)$. But the set $\{X_i\in A\}$ is equal to the set $\{X_i\in A, Y_i\in\mathcal B\}$, ie to $Z_i^{-1}(A\times\mathcal B)$. The two probabilities are therefore equal by the assumption that $Z_1\sim Z_2$.
For independence, we have the more general fact that if $X$ and $Y$ are independent, then $f(X)$ and $g(Y)$ are independent for any functions $f$ and $g$. In your case we would have $f=g=\text{projection onto the first coordinate}$, so that $Y_i=f(Z_i)$.
How you would prove that might depend on precisely how you define independence of random variables, for me the definition is that for any $A\in\sigma(X)$, $B\in\sigma(Y)$, $A$ and $B$ are independent events. The claim then follows from $\sigma(f(X))\subseteq\sigma(X)$ and $\sigma(g(Y))\subseteq\sigma(Y)$.
Comment: Okay, this sounds reasonable and is in line with first thought. My question was motivated by another question: why is a regression model of $Y_i$ on $X_i$ consistent with heteroskedastic errors? Some authors seems to suggest that, but that seems inconsistent with the assumption of $(Y_i,X_i),i=1,\ldots,n,$ being iid. But that is another question, thanks for your answer!
Comment: Jack M, how can you prove that the converse is not true? I mean if $X_{1}$ is equal in law to $X_{2}$, and $Y_{1}$ is equal in law to $Y_{2}$, how can you prove that $Z_{1}$ is not equal in law to $Z_{2}$?
Comment: @Ivan That's not always the case. If $X_1\sim X_2$ and $Y_1\sim Y_2$, then $Z_1$ may either be or not be equal in law to $Z_1$, depending on the situation.


Is there a Whitney theorem type theorem for projective schemes?

Question: We know that any smooth projective curve can be embedded (closed immersion) in $\mathbb{P}^3$. By definition a projective scheme over $k$ admits an embedding into some $\mathbb{P}^n$. Can we create an upper bound for the $n$ required (perhaps by strengthening the hypotheses) necessary to create an embedding of a smooth projective dimension $k$ scheme into $\mathbb{P}^n$ much like Whitney's theorem tells us we can embed an $n$ dimensional manifold in $\mathbb{R}^{2n}$?
Comment: I wondered this myself when I taught a course on algebraic curves last year.  I think the answer is yes and that the same general strategy should work: start out in a high-dimensional projective space and show that if $N$ is large enough compared to the dimension of your variety, a general hyperplane projection will give an embedding.  Have you tried just adapting the argument given in Hartshorne?  Anyway, a true algebraic geometer will chime in soon enough, I'm sure.
Answer: The previous responses have answered the question well in the case when the ground field $k$ is algebraically closed or at least infinite, but the answer is different when $k$ is finite.  For example, a smooth projective curve $X$ over a finite field $k$ need not embed into $\mathbb{P}^3$, because of a set-theoretic obstruction: $X$ might have more $k$-points than $\mathbb{P}^3$ does!  Or $X$ might have more closed points of degree $2$ than $\mathbb{P}^3$ does, and so on.
Nghi Nguyen, in his 2005 Berkeley Ph.D. thesis, proved that these infinitely many set-theoretic obstructions give necessary and sufficient conditions for embeddability:

Let $X$ be a smooth projective scheme of dimension $m$ over a finite field $k$, and let $n \ge 2m+1$.  There exists a closed immersion $X \to \mathbb{P}^n$ if and only if for every $e \ge 1$, the number of closed points of degree $e$ on $X$ is less than or equal to the number of closed points of degree $e$ on $\mathbb{P}^n$.

For an exposition of this, see Section 8 of Sieve methods for varieties over finite fields and arithmetic schemes.
Comment: Dear Bjorn, your argument that a curve cannot be embedded in three-dimensional projective space because it has more points than the space is the funniest I have ever seen! Why isn't Mathematics always so amusing?
Answer: Over an algebraically closed field, any projective smooth variety of dimension $n$ can be embedded in $\mathbb P^{2n+1}$. This is elementary and can be found in Shafarevich's Basic Algebraic Geometry, Chapter II, §5.4 .
Of course specific varieties might be embedded in projective spaces of lower dimension.
For an abelian variety however we have a very satisfying complete description of the situation:
For $n=1$, we can embed any abelian (=elliptic) curve in $\mathbb P^{2}$.
For $n=2$, some abelian surfaces but not all of them can be embedded in $\mathbb P^{4}$.
The others can only be embedded in  $\mathbb P^{5}$. This is due to Horrocks-Mumford.
For $n\geq 3$, no abelian variety of dimension $n$ can be embedded in $\mathbb P^{2n}$. They can only be embedded in $\mathbb P^{2n+1}$. (This theorem was proved by Van de Ven.)
Summary and references (added later)  $\quad$ Over an algebraically closed field every projective smooth variety of dimension $n$ can be embedded in $\mathbb P^{2n+1}$. The embedding dimension $2n+1$ is sharp in the sense that for every $n$ there is a projective smooth variety of dimension $n$ not embeddable in $\mathbb P^{2n}$.
[For $n=1$ the sharpness is due to the fact that smooth curves do not embed in $\mathbb P^{2}$ unless their genus is of the form $(d-1)(d-2)/2$. For $n\geq 2$ the sharpness is due to the discussion of abelian varieties above]
G. Horrocks and D. Mumford.  A rank 2 vector bundle on P4 with
15,000 symmetries. Topology 12 (1973), 63-81
A. Van de Ven. On the embedding of abelian varieties in projective spaces. Ann. Mat. Pura Appl. (4), 103:127–129, 1975.
Comment: Dear Pete, does your comment also apply to The Horrocks-Mumford construction and to Van de Ven's result? Anyway, I'd love to see your documents (if available) on the subject.
Comment: It seems to be an interesting coincidence that the dimension of the ambient space is $2n+1$, which matches up with the $2n$ or $2n+1$ of the Whitney embedding theorems.
Comment: I believe that "algebraically closed field" can be replaced by "infinite field", with essentially the same proof.  (I presented the result in this form in the case of smooth curves in a class I taught last year.)  If anyone has any questions about this, please let me know.
Answer: There is an obvious obstacle: the nonreduced scheme $k[x_1, x_2, \ldots, x_n]/\langle x_1, x_2, \ldots, x_n \rangle^2$ is $0$-dimensional, but can't be embedded in any space of dimension less than $n$. More generally, if there is a point whose Zariski tangent space has dimension $n$, then we need $n$ coordinates to embed the scheme. So, for example, if $A$ is the subring of $k[t]$ generated by the monomials $t^n$, $t^{n+1}$, $t^{n+2}$, ..., then $\mathrm{Spec} \ A$ is a reduced one dimensional scheme which can't be embedded in less than $n$ dimensions.
Replace "dimension" by "maximal dimension of any Zariski tangent space" and I think there should be a result like this.

The poster clarifies below that he means smooth varieties. In this case, the answer is yes. If $X$ is a smooth projective variety of dimension $d$ over an infinite field then it can be embedded in dimension $2d+1$. The idea of the proof is to embed in $\mathbb{P}^{N-1}$ and consider the Grassmannian of projections $\mathbb{P}^{N-1} \to \mathbb{P}^{2d+1}$. This has dimension $(2d+2)(N-2d-2)$; one shows that the conditions that the projection is not defined on $X$, identifies two points of $X$, or is not injective somewhere on the Zariski tangent space of $X$ all have lower dimension.
Comment: @Liu: We try to avoid the "s word" here on MO, even applied to oneself.  :)
Comment: @DS: OK.  I was thinking about the case of a smooth variety (Ryan said "smooth projective curve"; I didn't notice that he didn't repeat "smooth" after that).
Comment: Sorry--I did mean smooth. It was in the curve case but as Pete said and you noticed I forgot to explicitly include it in the hypothesis of my question.
Comment: David:regarding the embedding dimension of singular varieties, the local embedding dimensions are not enough. Take a chain of n+1 projective lines, then the tangent spaces have dimension at most 2, but any ample divisor D on this curve has degree at least n, and L(D) has dimension at least n+2 (up to $\epsilon$, I didn't check carefully), so the curve can not be embedded in $\mathbb P^{n+1}$. Maybe you mean irreducible varieties.
Comment: I didn't make any specific claim about the embedding dimension of singular
varieties. I said "I think there should be a result like this" and then explained the
smooth case. That said, I don't buy your example. There is no reason I have to
embed by a complete linear system. It looks to me like your example embeds in
P^3: just take a generic n+1 points in P^3 and join them up by lines.
Comment: Yes you are right. My remark is stupid.
Comment: Yes, you are right. My remark is stupid.
Answer: This is a reply to a question posed in Georges' answer.  It started as a comment, but I was worried about space limitations.  Upon reflection, it's better to have it as an answer, because -- unlike the comment I posted to Georges' answer -- I will be automatically notified of any responses to it.
Since Georges asked for it, the [rough!] lecture notes where I discuss the facts that any smooth curve over an infinite field can be embedded in $\mathbb{P}^3$ and "immersed" in $\mathbb{P}^2$ with only ordinary double point singularities are available here (see Section 5):
http://alpha.math.uga.edu/~pete/8320notes6.pdf
As you will see, I am merely repeating the argument in Hartshorne -- omitting the trickier details of the immersion result -- and explaining why the ground field need not be algebraically closed but does need to be infinite.
Concerning Horrocks-Mumford and Van de Ven: I was not familiar with these results until Georges' post.  But all the non-embeddability statements carry over immediately: if you have an embedding into $\mathbb{P}^n$ over the ground field, then the base change to the algebraic closure is still an embedding, of course.
This leaves the question of the positive part of the Horrocks-Mumford result.  In strongest form, the question is: is it true that for any field $k$, there is an abelian surface over $k$ that can be embedded in $\mathbb{P}^4$?  [I can certainly do it with $\mathbb{P}^2 \times \mathbb{P}^2$ -- take a product of two elliptic curves -- and it is conceivable to me that one might be able to get from this an embedding into $\mathbb{P}^4$ by composing with a well-chosen birational isomorphism, but I haven't even tried to decide whether this would work.]
I would have to see the proof of H-M to see whether it can be adapted to answer this question.  Can you post a link to the paper?  Or, if you need to know ASAP, ask Bjorn Poonen -- he eats questions like this for breakfast.
Finally, let me remark that over a non-algebraically closed field, a principal homogeneous space under an abelian variety may have higher embedding dimension than the (Albanese) abelian variety itself.  The easy example of this is that if a smooth curve of genus one can be emedded in $\mathbb{P}^2$, then for geometric reasons it must embed as a cubic and therefore has a rational point of degree at most $3$.  [Actually, it is possible that this is the only example.  By the same theorems Georges quoted above, the only other possibility is a phs which does not embed in $\mathbb{P}^4$ while its Albanese abelian surface does.]
Comment: Thanks for your interesting reply and your lecture notes, Pete. I hope your students appreciate their luck! I have added  the references to the two articles I mentioned in my post. I should have done that immediately, of course (as you are too polite to mention!)
Answer: To contradict what I said on embedding of singular varieties, here is a theorem of Kleiman and Altman "Bertini theorems for hypersurface  sections containing a subscheme". Comm. Algebra 7 (1979), no. 8, 775--790.
Let $X$ be an algebraic variety over a field $k$. For any $x\in X$, define the local embedding dimension $e(x)$ of $X$ at $x$ by $e(x)=\dim (\Omega_{X/k}^1\otimes k(x))$ (so if $k$ is perfect, then $e(x)$ is just the dimension of the Zariski tangent space at $x$). It is easy to see that for any integer $e$, the set $X_e$ of $x\in X$ such that $e(x)=e$ is contructible. By convention $\dim\emptyset = -\infty$.
 Theorem (Kleiman-Altman)  Suppose $k$ is infinite and $X$ is quasi-projective (resp. projective) over $k$. Let $r$ be the maximum of $\dim (X_e) +e$ for all $e\ge 0$. Then $X$ can be embedded in a smooth quasi-projective (resp. projective) variety $Z$ of dimension $r$ over $k$.
For example, a reduced projective curve over an infinite perfect field can be embedded in a smooth projective surface if and only if the tangent space at every point has dimension at most 2.
In general, combining with the result on embedding of smooth projective varieties, one gets an embedding of $X$ in a projective space of dimension bounded by $\dim X$ and local embedding dimensions of $X$.


Sticking caliper - free off or replace?

Question: The other day, one of the front calipers on my wife's Micra stuck, causing the brake on that wheel to drag. I freed it off by winding the piston in and pumping it back out a few times, until it went in and out freely, and the brakes are now working correctly, however I'm wondering if it's just going to stick again pretty soon - in which case it'd be better to replace it with new? I couldn't see any sign of damage to the seals that could have allowed moisture into the piston, but the car doesn't get a lot of use.
Answer: I've seen this where is was just a build up of dried up brake fluid baked into a ridge on the piston.  Cleaning it off solved the problem.  Your pushing the piston in and out may have rubbed it off.
If it is not leaking, I would just keep an eye on it for a while.
Comment: @NickC it might be an idea to get an overhaul kit for the caliper and change the rubber seals and clean and lube the piston/cylinder.
Comment: There were definitely no leaks, that was one of the first things I checked!

Sticking caliper - free off or replace?


Trying to execute python command through php but permission errors

Question: I uploaded an image file and copied it from temporary folder to a folder inside /var/www/. Then, tried to execute a python command via php where the exec() command is in the following format.
exec('python file.py $_FILES["file"]["name"]');

and even doing the following does not work,
exec('python file.py' + $_FILES["file"]["name"]);

In the python side, I am trying to read the filename and do some processing on it and save the image.
source = cv2.imread(sys.argv[1])
#some processing
cv2.imwrite("upload/result.png", resultimage)

Note: The uploaded images are being shown as owned by www-data group after upload. I have added my user to the www-data group and have done the following as well.
sudo chown -R tilaprimera:www-data upload

sudo chmod -R g+s upload

where here upload is my folder storing the uploaded images. I have made the python script executable too,
sudo chmod +x script.py

and also the script.py is perfectly running okay as
./script.py

Why is the python script not executing via the php?
Answer: In the python script file, the directory change was done as
os.chdir('/var/www/upload')

and in the php side, I gave the full path for the python script to run
exec('python /var/www/upload/script.py ' . $_FILES["file"]["name"]);

This way, the problem got solved.


Domain access on views

Question: I am using domain_access module for multisite. I have two different domains (www.example.com, www.example1.com). If i created a view it will be displayed in both the sites. Now i need to create a view only for the particular domain (www.example.com), It should not be displayed in another domain (www.example1.com).
There is any solution in drupal?
Answer: Domain views module

Part of the Domain Access suite.
Provides Views integration for Domain Access.

Domain access on views


Where does OS X store my Adobe product keys?

Question: I know that Keychain holds my WiFi and other passwords, but I'm curious to know where my Adobe and Microsoft product keys for things like CS6 and Office live. I'm using OS X Mavericks.
Answer: There's no generic OS X place for storing product keys. It is up to each individual software supplier to decide where they want to store the products. Usually it is done in ordinary files stored in the file system.
For Microsoft they reside in /Library/Preferences/ under a name such as com.microsoft.office.licensing.plist.
Similarly for Adobe I think they are in /Library/Application Support/Adobe/<product>/<product> Registration
As a user you don't really need to know where it is stored as the programs handle product key management themselves.
Comment: With regard to the Adobe path, I can't find a Registration folder in the Adobe folder (even using Spotlight to search recursively)…?
Comment: The path looks weird because I wrote some parts of it inside angular braces, which were removed by the stackexchange editor. You need to look in the "product name" subfolder to the Adobe folder.
Comment: Regarding Adobe, just google it, if you have a psecific program you're looking for - and it's not a generic question like it originally sounded.
Answer: For adobe CS5, look in /Library/Application Support/Adobe/Adobe PCD/cache/cache.db: this is a sqlite database (you can open it with sqlite3).
sqlite3
.open "cache.db"

Then run the query:
select * from domain_data where key='SN';

This should give you a 24-numbers encrypted serial number. You must then decrypt it (the "SoftKey Revealer" freeware for Windows has a decryption tool, you can also run it using wine on Linux and possibly Mac OS).
If you re-install, you might need to enter your trial serial key at installation, and then enter your product key at the activation step. For the trial serial, see the other answer from mspasov.
Answer: Another way to decrypt the serial number, as opposed to downloading freeware tainted by evil payloads (at least one download site for "Softkey Revealer" has taint) is to run a simple JavaScript function (copied from elsewhere, but tested and works):
function DecodeAdobeKey(sAdobeEncryptedKey) {
  var regex = /[0-9]{24}/g;
  if (!regex.test(sAdobeEncryptedKey)) {
    return 'corrupted serial';
  }

  var AdobeCipher = new Array(), index = 0, sAdobeDecryptedKey = '';
  AdobeCipher[index++] = '0000000001';
  AdobeCipher[index++] = '5038647192';
  AdobeCipher[index++] = '1456053789';
  AdobeCipher[index++] = '2604371895';
  AdobeCipher[index++] = '4753896210';
  AdobeCipher[index++] = '8145962073';
  AdobeCipher[index++] = '0319728564';
  AdobeCipher[index++] = '7901235846';
  AdobeCipher[index++] = '7901235846';
  AdobeCipher[index++] = '0319728564';
  AdobeCipher[index++] = '8145962073';
  AdobeCipher[index++] = '4753896210';
  AdobeCipher[index++] = '2604371895';
  AdobeCipher[index++] = '1426053789';
  AdobeCipher[index++] = '5038647192';
  AdobeCipher[index++] = '3267408951';
  AdobeCipher[index++] = '5038647192';
  AdobeCipher[index++] = '2604371895';
  AdobeCipher[index++] = '8145962073';
  AdobeCipher[index++] = '7901235846';
  AdobeCipher[index++] = '3267408951';
  AdobeCipher[index++] = '1426053789';
  AdobeCipher[index++] = '4753896210';
  AdobeCipher[index++] = '0319728564';

  //decode the adobe key
  for (var i = 0; i < 24; i++) {
    if (i % 4 == 0 && i > 0)
      sAdobeDecryptedKey += '-';
    sAdobeDecryptedKey += AdobeCipher[i].charAt(sAdobeEncryptedKey.charAt(i));
  }

  return sAdobeDecryptedKey;
}

You can copy this to the Chrome or Firefox debugger console, then type:
console.log(DecodeAdobeKey('[put the encrypted number here without the square brace]'))

Comment: This is a fine, stand-alone answer. I've edited it to exist properly as one.
Comment: The number I got from this was 1 number off from my actual serial number. The 3rd number should have been a "2", but this gave me a "5".
Answer: Adobe registration info (for most recent Adobe CC products) is stored at /Library/Application Support/Adobe/Adobe PCD/. There is a SQLite file, containing the keys. Here is a partial dump:
...
INSERT INTO "domain_data" VALUES('1','V7{}Lightroom-6-Mac-GM','EPIC_APP','Adobe Lightroom');
INSERT INTO "domain_data" VALUES('1','V7{}Lightroom-6-Mac-GM','EPIC_APP_160','Adobe Lightroom');
INSERT INTO "domain_data" VALUES('1','V7{}Lightroom-6-Mac-GM','TrialSerialNumber','9732070344xxxxxxxxx8');
INSERT INTO "domain_data" VALUES('1','V7{}Lightroom-6-Mac-GM','ExpirationDate','');
INSERT INTO "domain_data" VALUES('1','V7{}Lightroom-6-Mac-GM','NTL_WO_SN','');
...

Comment: Those will only give you the trial serial numbers; the real serial numbers are in a cache database in a subfolder
Comment: @personne3000 please can you provide the full path to this folder?
Comment: @codecowboy just look at my answer, I wrote the full path there


How to use the checkbox value on a marketing cloud html form for creating lead in salesforce

Question: I have created an Html form on my marketing cloud landing page and I am creating a lead on the form submission using CreateSalesforceObject() function.
All the form fields are being captured well except one checkbox field.
I am using the request parameter to fetch the checkbox value but it's giving me error500.
Can anybody help me how to resolve this issue?
Comment: https://salesforce.stackexchange.com/questions/296953/how-to-try-catch-retrievesalesforceobjects-in-ampscript/296979#296979 use try catch around it to isolate the problem.
Answer: My guess is that you need to define a true or false value.
If your HTML looks like this:
<code><input type="checkbox" name="consent" value="true">
</code>
Then in your AMPscript code block, use the following syntax (obviously change the arguments as required):
<code>  var @consent, @createLead

  set @consent = iif(RequestParameter('consent')==true,'true','false')

  set @createLead = CreateSalesforceObject(
        "Lead", 5,
        "FirstName", RequestParameter("firstname"),
        "LastName", RequestParameter("lastname"),
        "Company", RequestParameter("company"),
        "Email", RequestParameter("email"),
        "Consent__c", @consent
       )
</code>
Comment: Thanks mate. it worked like magic. Also upon submission, I want to redirect to my 'Thanks for submission' page. how to do i do that. any clues?
Comment: Yes, simply add the [Redirect function](https://ampscript.guide/redirect/) after the CreateSalesforceObject function, like: `Redirect("https://mysubmissionpage.com")` or another CloudPage: `Redirect(CloudPagesURL(123))`
Comment: Thanks a lot, Eliot. Just one last query. is it possible that After the Lead has completed the form they should receive a confirmation email to their provided Email? IF they click the link to confirm, the Lead Records OwnerId in CRM should change. I am not sure how should i approach towards this.
Comment: @MikeT, that's a completely different question. I would suggest you create a new question for that. Also, SFSE isn't a free code-writing service, so please provide an example of what you have tried, so we can help you.


How to help a shrub recover from a toxic fluid spill?

Question: I believe this is a cedar.  Sadly, while working on the foundation for a room addition, it got sprayed with hydraulic fluid when a machine broke.  It never occurred to me that I should have rinsed the fluid off of the plant and now there is damage.  Can I do anything to help it along or just leave it be?
Answer: Presumably it has rained a few times since then. There are soaps that are not supposed to harm plants, but maybe it's too late for that.
You could remove and replace some of the surface soil. Try not to damage roots. You should consider whether the replaced soil needs special disposal effort since it likely has hydraulic fluid remnants in it. That will depend on the nature of the fluid.
You could trim away some of the dead branches. Hopefully the plant will grow over the hole better with the dead branches removed. Considering most of the damage is on the side towards the house this might be a good idea.
If you choose trimming, you want to cut back to just before live wood. Try not to leave dead tips. So go back to a fork where one side is dead and the other is live, and cut off the dead part at the fork.  Try to leave as much live bark as possible so the cut spot will grow over.
You could also consider balancing the tree a little. It will be easier to decide after the dead branches are gone. The idea is to encourage an attractive shape, and get light to the parts you want to grow.
Dead branches and tips are problems for a few reasons. They provide places where insects and fungus can get in. They provide a place that ice can build up in the winter. And they don't provide any benefit to the tree.


got EndpointNotFoundException when consuming WCFService in A webrole from B webrole

Question: I have a webrole for hosting a web application, and another webrole for hosting a WCF service. Now I have got my WCF service webrole published on windows Azure, but the webrole with web application is not since I am still developing it. Then when I try to consuming the WCF service which has published on cloud in the web application, it gives the error:EndpointNotFoundException, the inner exception is remote server is not found.
But actually, I can comsuming the WCF service in a web application which is not a Azure project. so is it because web application in one webrole can't consume WCF service in another webrole?
Answer: It should be able to as long as they both aren't in Azure.  At that point you will need an InternalEndpoint instead for them to communicate through.  Did you add it as a web reference in Visual Studio and that worked correctly?  Can you browse to the WCF service from the browser and see it?  My guess would be that it has the wrong port, maybe you just manually updated the reference after publishing it to Azure.