To craft a Javelin of Lightning, you need to be able to cast Lightning Bolt; can I use a Wand of Lightning Bolt to meet this requirement?

Question: So to craft a javelin of lightning, you need to be able to cast lightning bolt. My druid can't do this, but if he bought a wand of lightning bolt, could he use this to meet the requirements?
Comment: Welcome to rpg.se! This is a pretty good first question. Thanks for participating and happy gaming!
Comment: Welcome to RPG.SE! Take the [tour] if you haven't already, and check out the [help] for more guidance.
Answer: On Magic Item Creation says

Note that all items have prerequisites in their descriptions. These prerequisites must be met for the item to be created. Most of the time, they take the form of spells that must be known by the item's creator (although access through another magic item or spellcaster is allowed).

Thus a creator that wants to create a javelin of lighting could meet that item's lightning bolt prerequisite by expending charges from a wand of lightning bolt instead of, for example, by expending lightning bolt spells from his daily allotment of spells.
(Because of a javelin of lightning's market price of between 1,001 and 2,000 gp, each javelin typically takes 2 days to create and requires a lightning bolt spell each day of its creation. This makes it expensive to meet a javelin of lighting's prerequisites using a wand of lightning bolt—each charge of a typical wand of that 3rd-level spell at caster level 5 has a market price of 225 gp! Also, a typical druid doesn't have the spell lightning bolt on his spell list so the typical druid will need to make Use Magic Device skill checks—or have some other way—to activate that wand of lightning bolt.)
Meeting this lightning bolt prerequisite for a magic weapon, though, is often considered unnecessary. See, on Magic Item Creation also says

At the end of this process, the spellcaster must make a single skill check (usually Spellcraft, but sometimes another skill) to finish the item. If an item type has multiple possible skills, you choose which skill to make the check with. The DC to create a magic item is 5 + the caster level for the item.

Because the typical minimum caster level for a lightning bolt spell is 5, that's only a base DC 10 Spellcraft skill check, but this Spellcraft "DC to create a magic item increases by 5 for each prerequisite the caster does not meet."
So to create a javelin of lightning at caster level 5 without needing to use a charge from a wand of lightning bolt (or finding a dude to cast lightning bolt while you and he slave for a couple of days over this javelin of lightning or whatever) changes that Spellcraft skill check DC from 10 to only DC 15. Since a lot of folks who make magic items—wisely!—also ramp up their Spellcraft skills, not being able to meet directly a magic item's prerequisite or two is often considered a trivial impediment.

Note: The item creation feat prerequisite can't be bypassed by increasing the Spellcraft skill check DC. Further, spell prerequisites can't typically be bypassed when creating potions, spell completion magic items like scrolls, or spell trigger magic items like wands. For instance, a druid couldn't increase the Spellcraft DC to bypass the lightning bolt prerequisite of a wand of lightning bolt to create that item!
Answer:
You can create a Javelin of Lightning without knowing Lightning Bolt but increases the DC by 5.
Having a Wand of Lightning Bolt won't help you because, although you can use an item to give you access to a spell you don't know, Lighting Bolt is not a Druid spell so a Druid can't use a Wand of Lightning Bolt.
If you know someone who can use a Wand of Lightning Bolt like a wizard or sorcerer then you can cooperatively make the Javelin of Lighting.
Comment: I'm unsure why this was downvoted... this is accurate.
Comment: Accuracy does not mean good answer. The information is correct, but it repeats something the OP already knows and is presented terribly.
Comment: "Lighting Bolt is not a Druid spell so a Druid can't use a Wand of Lightning Bolt.", This is incorrect, a druid can use a wand of lightning bolt, they just need to make a DC20 use magic device check to do so.
Comment: @williamporter I think it's fair for answers not to use *typical*, *usual*, and *normal* and just assume a regular ol' druid unless the asker provides more information, but I may be in the minority. Further, while an answer can use words like *typical et al.* to make it clear that exceptions may exist, actually *listing* every exception in an exception-based game that's as vast and cumbersome as *Pathfinder* places an undue burden on the answer. (Every answer would be a book were it to list every exception!)
Comment: @HeyICanChan, if it were some corner case that a druid cannot use a wand except in a specific case, I would agree. Except, there is an entire skill specifically for the purpose of using magic items and you can use it while untrained. The information is just incorrect in this case, a Druid can *typically* use any wand, they may just need to make a check.
Comment: @williamporter Nonetheless, the skill Use Magic Device can't be used untrained, and the skill Use Magic Device isn't on the typical druid's skill list. I can totally understand *wanting* the phrase *Lighting Bolt is not a Druid spell so a Druid can't use a Wand of Lightning Bolt* to say instead *Lighting Bolt is not a Druid spell so a **typical** Druid can't use a Wand of Lightning Bolt*, though, but, like I said, I don't think it's necessary, even if my answers tend to include such language. As the question is posed generally, that phrase is, as it stands, is accurate generally.


Reading Text file in SparkR 1.4.0

Question: Does anyone know how to read a text file in SparkR version 1.4.0?
Are there any Spark packages available for that?
Answer: Spark 1.6+
You can use text input format to read text file as a DataFrame:
read.df(sqlContext=sqlContext, source="text", path="README.md")

Spark <= 1.5
Short answer is you don't. SparkR 1.4 has been almost completely stripped from low level API, leaving only a limited subset of Data Frame operations.
As you can read on an old SparkR webpage:

As of April 2015, SparkR has been officially merged into Apache Spark and is shipping in an upcoming release (1.4). (...) Initial support for Spark in R be focussed on high level operations instead of low level ETL.

Probably the closest thing is to load text files using spark-csv:
> df <- read.df(sqlContext, "README.md", source = "com.databricks.spark.csv")
> showDF(limit(df, 5))
+--------------------+
|                  C0|
+--------------------+
|      # Apache Spark|
|Spark is a fast a...|
|high-level APIs i...|
|supports general ...|
|rich set of highe...|
+--------------------+

Since typical RDD operations like map, flatMap, reduce or filter are gone as well it is probably what you want anyway.
Now, low level API is still underneath so you can always do something like below but I doubt it is a good idea. SparkR developers most likely had a good reason to make it private. To quote ::: man page:

It is typically a design mistake to use ':::' in your code since
       the corresponding object has probably been kept internal for a
       good reason.  Consider contacting the package maintainer if you
       feel the need to access the object for anything but mere
       inspection.

Even if you're willing to ignore good coding practices I it is most likely not worth the time. Pre 1.4 low level API is embarrassingly slow and clumsy and without all the goodness of the Catalyst optimizer it is most likely the same when it comes to internal 1.4 API.
> rdd <- SparkR:::textFile(sc, 'README.md')
> counts <- SparkR:::map(rdd, nchar)
> SparkR:::take(counts, 3)

[[1]]
[1] 14

[[2]]
[1] 0

[[3]]
[1] 78

Not that spark-csv, unlike textFile, ignores empty lines.
Answer: Please follow the links
http://ampcamp.berkeley.edu/5/exercises/sparkr.html
we can simply use -
 textFile <- textFile(sc, "/home/cloudera/SparkR-pkg/README.md")

While checking the SparkR code, Context.R has textFile method , so ideally a SparkContext must have textFile API to create the RDD , but thats missing in doc.
# Create an RDD from a text file.
#
# This function reads a text file from HDFS, a local file system (available on all
# nodes), or any Hadoop-supported file system URI, and creates an
# RDD of strings from it.
#
# @param sc SparkContext to use
# @param path Path of file to read. A vector of multiple paths is allowed.
# @param minPartitions Minimum number of partitions to be created. If NULL, the default
#  value is chosen based on available parallelism.
# @return RDD where each item is of type \code{character}
# @export
# @examples
#\dontrun{
#  sc <- sparkR.init()
#  lines <- textFile(sc, "myfile.txt")
#}
textFile <- function(sc, path, minPartitions = NULL) {
  # Allow the user to have a more flexible definiton of the text file path
  path <- suppressWarnings(normalizePath(path))
  # Convert a string vector of paths to a string containing comma separated paths
  path <- paste(path, collapse = ",")

  jrdd <- callJMethod(sc, "textFile", path, getMinPartitions(sc, minPartitions))
  # jrdd is of type JavaRDD[String]
  RDD(jrdd, "string")
}

Follow the link
https://github.com/apache/spark/blob/master/R/pkg/R/context.R
For test case
https://github.com/apache/spark/blob/master/R/pkg/inst/tests/test_rdd.R
Comment: Thanks for your reply ABC. But I actually meant for SparkR 1.4.0 version. There is not a function called textFile() in this version. Check this link https://spark.apache.org/docs/latest/api/R/index.html
Comment: if you check through the code https://github.com/apache/spark/blob/master/R/pkg/R/RDD.R the comment says RDD can be created using textFile but I can't see any textFile code there but on checking Context.R , i do find the method https://github.com/apache/spark/blob/master/R/pkg/R/context.R
Comment: Yes but my question is how to call that method from Spark 1.4.0 API. The latest version doesn't have that method. If you have read a text file using **SparkR 1.4.0** successfully pls share your code.
Answer: Infact, you could use the databricks/spark-csv package to handle tsv files too.
For example,
data <- read.df(sqlContext, "<path_to_tsv_file>", source = "com.databricks.spark.csv", delimiter = "\t")

A host of options is provided here -
databricks-spark-csv#features

Reading Text file in SparkR 1.4.0


When this hold: $\det(AA^{T})=0?$

Question: I know if A is a column vector, the equality holds.  Any comments or suggestions would be greatly appreciated.
Comment: Let $A$ be a square real matrix. $det(AA^T)=\left(det(A)\right)^2=0$ iff $det(A)=0$
Answer: The determinant of a square matrix is nonzero if and only if the matrix is invertible (or, in other terminology, nonsingular).
If $A$ is a generic matrix with real coefficients, not necessarily square, we know that $AA^T$ is invertible if and only if $A$ has a right inverse. So the condition for having $\det(AA^T)=0$ is that the matrix doesn't have a right inverse, which can also be stated in the form "the matrix $A$ has rank less than the number of its rows".
Answer: I will assume we're working over the real numbers. I will prove egreg's answer in that case.
$AA^T$ is invertible if and only if $YAA^T = 0$ implies $Y = 0$ for every row matrix $Y$.
Obviously if $YA = 0$ for a particular row matrix $Y$, then we will have $YAA^T = 0$. I claim that the converse is true.
For if $YAA^T = 0$, then $(YA)(YA)^T = YAA^T Y^T = 0$. Thus the row vector $YA$ is orthogonal to itself. (Its dot product with itself is zero.) Over $\mathbf{R}$, this implies $YA = 0$.
Thus the condition for $AA^T$ being invertible can be rephrased as: $YA = 0$ implies $Y=0$. This amounts to saying that the rows of $A$ are linearly independent. If $A$ is $m \times n$, this is the same as saying that $A$ has rank $m$.
Thus $\det(AA^T) = 0$ if and only if the rank of $A$ is less than the number of rows.

When this hold: $\det(AA^{T})=0?$


Request an unpublished paper owned by another (foreign) university

Question: I am a graduate student at a US university. One of the papers I need for my research is a Ph.D. thesis, owned by the University of Birmingham, U.K. (but this question is for a more general case). That thesis has never been published and is not available on the web. When searching for that paper on the University of Birmingham library website, they only have the hard copy of that paper in their library. Is there a way that I can obtain that paper?
Comment: A dissertation *must* be published, in the UK and anywhere in the world. It might not be available any more, if it's old. And, sorry for asking: Have you written an email to the Library in Birmingham?
Comment: Ask your friend.
Comment: @SmallChess If I knew anybody studying there, I'd have asked already.
Answer: If the thesis is recent enough that it would have been written electronically, you can try to locate the author and ask if they would be able to send you an electronic copy.  This is a reasonable request.
Otherwise, talk to a librarian at your university library.  They almost certainly have some sort of inter-library loan that can get you a copy, or access to the original.  Requests like this are part of their job and this is a perfectly reasonable thing to ask them to help with.
Related:
Requesting a copy of the PhD thesis from an author?
Is it okay to ask someone for an (electronic) copy of their PhD thesis if it is not available online?
Comment: "Ask the author" is a surprisingly very successful technique for getting hard-to-retrieve articles: most authors actually want their work to be read and are happy to share it on personal request. The hard part, sometimes, is finding a current email address for the author (especially for older articles, but that is probably not the case with the OP).
Answer: I think the British Library can provide any PhD thesis from a UK university, even if no electronic copy has been stored in a library. See
http://ethos.bl.uk/
Comment: Not necessarily. The very first one I looked at told me that Ethos doesn't have the full text and I would need to contact the university's library.


how to map Linux (CentOS) drive to Mac (Snow Leopard)?

Question: Anyone know how to map a Linux (CentOS 6.2) drive to a Mac (Snow Leopard)? I have root privileges. The Linux machine is not in a local network, but accessed via the internet.
Answer: I don't know about other people, but sshfs works fine for me. Alternatively, you could set up a VPN and then do a samba mount, which is cumbersome but works.
Or better yet, you could do a nfs mount, which is about as simple as you can get.
Comment: Thanks qweet. Looks like the link you provided states it's only valid for Leopard. Curious though. Did you go through the whole process in the link, or could possibly I just use sshfs alone somehow to keep things much simpler?
Comment: What do you mean by simpler?  You install SSHFS, and its the prerequisites, then you connect.
Comment: By simpler I mean, do I need to install MacFuse and Macfusion (or equivalent; sounds like "yes")? Regarding the nfs mount link, this looks simpler, but there's no mention of logging in anywhere to the server. Should the Mac user enter username and password to access the server somewhere in this process?
Answer: If you want to use the native AFP protocol to share with the Apple, use netatalk:
$ yum info netatalk
Available Packages
Name        : netatalk
Arch        : i686
Epoch       : 4
Version     : 2.2.0
Release     : 2.el6
Size        : 694 k
Repo        : epel
Summary     : AppleTalk networking programs
URL         : http://netatalk.sourceforge.net/
License     : GPLv2+
Description : This package enables Linux to talk to Macintosh computers via the
            : AppleTalk networking protocol. It includes a daemon to allow Linux
            : to act as a file server over EtherTalk or IP for Mac's.

It's in the EPEL repos.
Since the other box is somewhere on the Internet, you can can use OpenVPN to set up a connection between the two.  If the Linux box is the OpenVPN server, TunnelBlick works very well as an OpenVPN client on the Mac.
Answer: iSCSI is another possible solution for your problem.
While the iSCSI-target is freely available on CentOS, you probably have to buy a iSCSI-inittiator solution for MAC. At least I found some hits with reports about working commercial iSCSI-initiators for Snow Leopard.


How To Create a New Windows Forms Application Project in Visual C++ 2013 Ultimate?

Question: The project template to make a Windows Forms App is missing in Visual Studio 2013 Ultimate.
This is working for real. I it found online. It was in Spanish by someone. So I re-wrote it in English. Please see my answer below.
Comment: possible duplicate of [Where is the C++ GUI Builder?](http://stackoverflow.com/questions/15188757/where-is-the-c-gui-builder)
Comment: I was looking for a duplicate before writing this. I was not able to find the duplicate. Anyway, the way I put my question is better.
Answer: The following are the steps to make such a project:

Go in the menu bar: File => New => Project, to get a list of project templates.
Select in the tree to the left go: Templates => Visual C++. Select on the right of the of the window of the templates list : Empty Project (Visual C++) .
There will be in the "Solution Explorer" a new tree of files which belong to your new project. Expand it. Let's say you got a new project named "Project1". You'll get on the top of the tree "Solution Project1 (1 project)" . After expanding the tree, You should get on the top of the expansion something called "Project1" right under "Solution Project1 (1 project)" . Right-click "Project1". Select "Add New Item" from the right-click menu.
In "Add New Item" from, in the tree to the left , go : Visual C++ => UI => Windows Forms. click save.
You'll get the question "You are adding a CLR component to a native project. The project will be converted to have Common Language Runtime support. Do you want to continue?" . Click "Yes" .
Again, one more time, right-click "Project1" and go "Properties".
On the tree to left, go : Configuration Properties => Linker => System. And to the right of the properties window set "SubSystem" as "Windows (/SUBSYSTEM:WINDOWS)" .
Also go: Configuration Properties => Linker => Advanced . And to the right of the properties window, set "Entry Point" to "main". If you cannot not see "Entry Point", just re-open the properties window again. This is the function "main" given below. this is where you're application will start running from.
Finally, Double-click the form designer and move the cursor to the bottom of the code just right before the closing brace of "namespace Project1". Paste the following code. Please remember to rename the variables of this code according to your project needs to get it working with the empty form.
[STAThread]
void main(array<String^>^ arg) {
    Application::EnableVisualStyles();
    Application::SetCompatibleTextRenderingDefault(false);

    MyForm form;
    Application::Run(%form);
}

Credit for this answer goes to @superlinux.
Answer: The guide did not work for me so I searched in YouTube video and its easy to put following code in MyForm.cpp instead of the code that the post had given and it works.
using namespace System;
using namespace System::Windows::Forms;

[STAThread]

void main(array<String^>^ args)
{

    Application::EnableVisualStyles();
    Application::SetCompatibleTextRenderingDefault(false);
    Project1::MyForm form;
    Application::Run(%form);
}

Answer: I know this may be late, but other users may be curious on how to do this while keeping the terminal window open. This way you can test minor stuff by using cout. Anyways, instead of placing the int main() in the UI, you can make another .cpp file (just the cpp not a whole new class) and in it you would have something like:
#include "MainWindow.h" //which is the name of the UI file
using namespace Projectname //you can check this at the top of the UI file says something like namespace Projectname { ui code }

[STATHREADATTRIBUTE] //you need this otherwise your window can't run things like the webbrowser
int main(){
    MainWindow mw; //the name of the header file
    mw.ShowDialog(); //this brings up the window, you can use mw.Hide() to close it
    return 0;
}

This way you dont really have to mess with the configurations and can keep the terminal window open. I believe you can turn the terminal window off through the config properties later. But I usually prefer this way because its easier to test my code.


What is Mgt_Base module?

Question: I was hunting for the cause of some SimpleXMLElement errors in my log when I found out the culprit was some module in app/etc/modules called Mgt_Base. The errors showed up when I accessed the adminpanel
I'm trying to figure out whether I can just disable the module to stop the log errors or whether it's essential. Unfortunately I'm new to Magento so I'm having a hard time trying to find out exactly what this module does.
Does anyone know what this Mgt_Base module is supposed to do or how I can find out that information?
Answer: Mgt_Base is not default magento module.May this is third party extension.
Comment: That's what I was thinking, but I'm having an awfully hard time searching online for what it even does.

What is Mgt_Base module?


auto complete fields from selection

Question: I have taxonomy term with 2 fields: a and b. I have two taxonomy terms.

term1: a1 and b1
term2: a2 and b2

I have a content type with 3 fields; the first one is from a selected list from the taxonomy terms (term reference). When I choose the first field, I need that the related taxonomy terms appear on the second and third fields.
For example, if I choose term2, I need that the terms a2 and b2 appear automatically in the other fields.
Is it possible?
Comment: Do I have to use tokens?
Answer: Ok, if somebody are interested in it I've found this post that solve my question:
Auto-Fill from on content type to another

auto complete fields from selection


MySQL High Availability for InnoDB

Question: I am looking for MySQL High Availability with huge transactions. I prefer to go with InnoDB Engine.
I prefer to use MySQL Master - Slave Replication. However, this option provides us Manual fail over of Application from Master to Slave.
QUESTIONS

What could be the maximum difference time to have Sync between Master and Slave ?
Is there any option of having High Availability other than this approach ?
Answer: While Percona XtraDB Cluster is great for Multimaster Replication and InnoDB, it is not good for every type of workload. Bill Karwin states MySQL's Async Replication could be better due to workload : What are the drawbacks of using Galera Cluster instead of Master/Slave Replication?
If you are still looking for synchronous replication, you could look into using DRBD with UCARP or Linux Heartbeat for DB VIP and Failover Management.
Under that setup, the Master (aka DRBD Primary) has a data volume mounted on DRBD, MySQL running, and a ucarp mechanism for automatic failover.
The Slave (aka DRBD Secondary) does not have the data volume mount. MySQL is not running. DRBD is doing everything in terms of having a Block Device synchronized with the DRBD Primary.
DRBD is best used when having failover set up withing a single data center. DRBD should never be setup to with DRBD Primary and Secondary in two different data center due to synchronization latency. I have discussed this before in these posts

Mar 29, 2011 : MySQL high availability, failover and replication with Latency
Mar 26, 2012 : 3 Databases, Best Replication Setup?
Aug 20, 2012 : Best solution for cross-datacenter MySQL master-slave replication

I recommended this for doing PostgreSQL with DRBD : PostgreSQL Failover - What tools should I use?
The drawback in using MySQL/DRBD for High Availability is that fact there is only one instance of MySQL running. The benefit i shaving a full copy of the data on disk. Even a hard failover will have InnoDB crash recover bring back uncommitted data that is written in the double write buffer (inside ibdata1).
If you want it all, use DRBD Clusters inside a data center but have DRBD Primary in one data data center using MySQL Replication in Circular Fashion with a DRBD Primary in another data center.
Answer: You should look at MHA, a perl script that performs the failover automatically for mysql replication.

MySQL High Availability for InnoDB


Slow down strobe on light

Question: I have a flashlight with a strobe mode and need to know how to slow down the strobe on it. Please tell me if I should add a resistor or vary the power source to slow and NOT dim the strobe light.
Comment: A very hand wavey question. But the answer you're looking for is: you need to reprogram the micro controller that is in the device.
Comment: Show us a schematic of the flashlight circuit, and take out the part about flashlights. Then we can help.
Answer: I don't think that is possible, since these kinds of functions on flashlights are usually controlled by microcontroller and not by discrete electronics. At least I have never seen one where that was the case.

Slow down strobe on light


How do I make my turtle happy?

Question: My turtle, Tyler, has recently been getting really sad. He is perfectly healthy. But he is eating slower, and sleeping more - thus he seems sad, which makes me sad!
Are there toys that I could buy, or different foods that I can give him? It might be his food. Thank you!
Comment: What kind of turtle is he, and what kind of enclosure do you have him in?  What does he eat?

"Sad" turtle behavior is often because of a lack of UV light, being too cold, or other problems with the turtle's environment.
Comment: It is a bog turtle, and I am looking at the light right now. It seems like one of the  bulbs have broken. My UV light has three small bulbs. His environment is a good size. He has space to stay on and, and plenty of toys and places to swim. I am kind of a minimalist, so there's some empty space, a little bit, for the turtle to just sit and feel spacious. @Meg
Comment: That sounds good, it doesn't need to be elaborate.
Comment: @Meg That sounds pretty good! Do you happen to know where I could find a new bulb?
Comment: If you have a local aquarium store they often carry them, or there are online pet stores like chewy.com and event amazon.com carries some reptile supplies.  Depending on what type and style of light fixture you use, you may even need to contact the manufacturer for help in finding the right replacement bulbs.
Answer: My suggestion is that you could create a basking tank with an UVB lightbulb. Also, you could add a few feeding guppies in the water you could add a few feeding guppies to keep him active and happily chasing guppies.
You could also get another turtle to keep company.
Comment: Thanks for your answer! Can I find any of these items at the local perstore? (Petco) And do you think I might be able to buy a boy? (I have a girl)
Comment: of course, you will get it at petco.com but I kinda don't trust Petco personally so you could try http://www.theturtlesource.com.I don't live in the US even then they helped me with a tortoise diet I could prepare at home via email specific to my tortoise breed. They have everything your turtle could ever need and you could ask questions via email and they reply.
Answer: Sad turtle behavior is usually a result of a turtle being too cold, lacking UV light, or going into a semi-dormant state (brumation), which can naturally happen when the days are shorter and nighttime temps are lower in fall and winter.
Replacing your heat and UV bulbs can help perk him back up, and if you don't have a thermometer already, you may want to check that the tank temperature is proper.
If you think he's bored and needs enrichment, live food is a good way to go, or you can hide treats for him to forage for (make sure you take out anything he doesn't find promptly, this can get messy).  Anecdotally, some turtles seem to enjoy a natural looking background image taped on the outside back of the tank to look at.  I can't vouch for that making a difference to my turtle, but it can't hurt!

How do I make my turtle happy?


Connecting bootstrap.dat to Bitcoin QT?

Question: I have installed Bitcoin QT and I have also downloaded bootstrap.dat from a torrent. I am having trouble in adding bootstrap.dat to Bitcoin QT. Please guide me. Thanks.
Answer: Place bootstrap.dat in the bitcoin data directory and then start Bitcoin-Qt.  It will read the file to create the blockchain.  The file will be renamed to bootstrap.dat.old when this is completed to prevent reprocessing when Bitcoin-Qt is restarted.
You can locate the data directory by reading this.

Connecting bootstrap.dat to Bitcoin QT?


Discussing negative experiences on professional networks: acceptable or not?

Question: Is it suitable to post about a negative experience with a prominent online retailer on a professional network such as LinkedIn? I made several attempts to point out an issue that could be easily verified with just a few clicks or a single phone call, such as checking the delivery status on the carrier's website. However, they unwaveringly relied on their system, which clearly contained an error. This reliance not only led to a significant loss of my time but also caused me considerable disappointment.
Comment: It's acceptable, but usually LinkedIn is for professional self-promotion, and you should know that a potential employer can see all the posts you've made on LinkedIn. That is why not many people use LinkedIn to complain about companies, because it could paint them as complainers when looking for a job. In my opinion, that is what X-Twitter, or Yelp reviews (depending on the business), or many of the review sites out there, are for, and personally, I would use one of those sites instead of LinkedIn to make such a complaint.
Comment: What would you hope to gain by doing so? What would be your desired outcome?
Comment: @joeqwerty I find this story both entertaining and insightful, revealing flaws in what's considered a perfect system. Hopefully, someone from the company will notice and resolve these issues.
Comment: Why don't you just contact them by phone or email? Posting on LinkedIn seems like the least effective way to do this with the least chance of being seen and affecting change.
Comment: @joeqwerty The situation is that I've reached out to them, and not just them, but others as well, multiple times through both email and phone.
Comment: How is this a "Workplace" topic?
Answer: The honest answer is that I'd save that sort of stuff for the likes of Glassdoor or other review-type sites.
There's two reasons:
1: If you are wanting to have a vent and a moan - go to Facebook.
2: Praise in Public, Criticize in private.
Now, by all means, find someone in a high-enough position on Linked-in and send them a direct message with your issues - but doing it in public is somewhat Gauche in my opinion
Comment: Depending on location, Trustpilot is also an excellent forum for consumer warnings.
Answer: Nope - You wouldn't discuss this matter on your CV or during an interview or in-person networking event right? That's a good rule of thumb that it doesn't belong on LinkedIn.
I can understand the urge to vent about the issue you experienced but LinkedIn is just not the place for that sort of thing. Not only is it extremely unlikely to actually get you anywhere in terms of resolving your situation (customer-facing social media such as facebook and twitter or a review service like Google or Yelp is likely to be far more productive in this regard) but it's going to reflect negatively on you, as you'll come across as someone who doesn't understand professional norms - probably not going to be a deal-breaker or anything that serious but why would you risk sowing any little negative seeds on what is supposed to be your best professional front?
Comment: "in-person networking event right" - maybe the in-person networking events I go to are more informal, but I would.


google play services crashing on login attempt

Question: I have a Moto E gen1 and android 5.1 installed on it.
After factory reset , google play services crashes every time, whenever i try to login to my account. Apart from this login problem everything is working smoothly.
Comment: Try clearing the data for it again, or upgrading it by sideloading a newer APK.
Answer: Maybe just try to go in developers mode
Google service, google+, app store etc stopped working
I tried all the recommendation to clear cache, etc etc and after the factory reset still getting the error. What finally worked for me is going to Developers mode (easy to do, search how to for you phone in google).
I bet some developer tested something and push his code to PROD without testing real user mode. Once I did, the error magically disappeared.


Why does SKLearn's Logistic Regression model have the same coefficients as my own model for 1 class but have different coefficients for other classes

Question: I am currently implementing logistic regression from scratch and I'm comparing my model with SKLearn's logistic regression. Since this is just an exercise, I decided to use toy data, specifically using the Palmer's Penguins dataset. Comparing my implementation's coefficients with SKLearn's I get this: (the dict is my implementation's coefficients, while the normal list is SKLearn's)
{'Adelie': array([ 2.71869553e+01, -5.10530642e+00,  8.95099131e+00,  5.24749815e-02,
        6.27858209e-03]), 'Chinstrap': array([-2.92432584e+01,  2.77557691e+00,  1.09108267e-01, -1.99461744e-01,
       -1.52392419e-02]), 'Gentoo': array([  0.68028231,  -0.15432404, -14.95178004,   0.67591593,
         0.02598858])}
[[ 2.71960599e+01 -5.10686666e+00  8.95378324e+00  5.24706034e-02
   6.28110428e-03]
 [-3.05419279e-02  2.36553040e+00 -2.89090975e-01 -2.96850695e-01
  -1.12584894e-02]
 [-2.37512840e-01 -1.37551011e+00 -1.51342172e+01  8.53889447e-01
   2.94388319e-02]]

As you can see, the One vs Rest coefficients for "Adelie" are pretty much the same for both models, but the other classes are different. I'm wondering why this is the case.
I'm aware that I have to use the paramater multi_class='ovr' as SKLearn's default parameter for multi_class is biased towards something (I forgot what bias it has). I also used penalty='none' for the SKLearn model, as I had a regularization parameter of 0. As for the optimization, I used SKLearns minimize function with method='BFGS' as SKLearn's logistic regression uses 'LBFGS' as it's default method for gradient descent. Looking at the user guide for SKLearn's Logistic Regression, it looks like I implemented the same equations they are using for logistic regression, so I don't think there are any errors here.
My question is why are the coefficients different for the 'Chinstrap' and 'Gentoo' classes? Using google, I found out that, for logistic regression, a log-loss cost function is convex, so wouldn't this mean that the coefficients for all classes for both models should be the same if one of them ended up being the same? Why would the coefficients for one class be the same but be different for other classes? I want to say that this is due to the errors in my implementation or because there was one parameter that I overlooked when using SKLearn's model, but I wasn't able to find any errors. Below is my code. Thanks for reading this!
import numpy as np
from palmerpenguins import load_penguins
from sklearn.linear_model import LogisticRegression
from scipy.special import expit
from scipy import optimize as op
from sklearn.utils import shuffle

def logisticRegression(X, y, classes):
    m, n = X.shape  # m = number of examples, n = number of features, not including bias
    theta = {}
    for currClass in classes:
        yCurr = (y == currClass)
        yCurr = yCurr.astype(int)
        theta_ini = np.zeros(n + 1)  # theta_0 is the bias variable
        theta_ini[0] = 1  # convention is that theta_0 = 1
        X_bias = np.insert(X, 0, np.ones(X.shape[0]), axis=1)  # adding column of ones for the bias variable
        # gradient descent
        currTheta = op.minimize(costFunction, theta_ini, (X_bias, yCurr), method='BFGS').x
        theta[currClass] = currTheta
    return theta

def costFunction(theta, X, y, lambda_=0.0):
    m = X.shape[0]
    yp = expit(np.matmul(X, theta))
    eps = 1e-5
    leftOp = np.sum(y * np.log(yp + eps))
    rightOp = np.sum((1 - y) * np.log(1 - yp + eps))
    # reg = np.sum(np.square(theta[1:])) * lambda_ / 2
    cost = -1*(leftOp + rightOp) / m
    return cost

def main():
    df = load_penguins()
    # Data cleaning:
    # There are columns with NaN, so we drop those
    df = df.dropna()
    # Dataset has island, sex, year, all of which are not needed so we drop these variables
    features = df.drop(columns=['island', 'sex', 'year'])
    target = features.drop(columns=['bill_length_mm', 'bill_depth_mm', 'flipper_length_mm', 'body_mass_g'])
    features = features.drop(columns='species')

    # Convert features and target to numpy arrays
    X = features.to_numpy()
    y = target.to_numpy()
    y = y.reshape(y.shape[0])
    species = np.unique(y)

    theta = logisticRegression(X, y, species)
    model =  LogisticRegression(max_iter=10000, penalty='none', multi_class='ovr').fit(X,y)
    skTheta = np.insert(model.coef_, 0, model.intercept_, axis=1)
    print(theta)
    print(skTheta)

if __name__ == "__main__":
    main()

Comment: You're computing $\sigma(x) = \frac{1}{1+\exp(-x)}$ and then $\log \sigma(x)$ or $\log(1 - \sigma(x))$. If you work through the algebra, you can simplify the expression greatly. This will solve the $\log 0$ problem & the bias that arises from the $\log(\sigma(x) + \epsilon)$ kludge because the simplification means won't lose numerical precision from round-tripping: $\log \exp (x)$.
Answer:
Scikit-learn is open-source so you can check the source code yourself for the differences.
If you look at the implementations of statistical algorithms in high-quality software (R, scikit-learn) vs naive implementations, you will notice that they are much more complicated. They do a lot of clever tricks to improve the vanilla algorithms.
One obvious culprit in your code may be using hardcoded + 1e-5 to avoid problems with logarithms. The constant is arbitrary and may alone be a reason for the difference, but there are many other differences if you look at the scikit-learn code.
Comment: Yeah, I did reckon that Scikit-learn would have different algorithms but I was just curious why it was the same for one class but different for the others. In my eyes, if it was the same for one, then wouldn't the algorithm be the same? But yeah, I should go look at the source code more carefully. As for the hardcoded `+ 1e-5`, I have that on there to prevent getting `log(0)`, as my code would frequently throw out errors of trying to do something with infinity.


Why are personal dictionary entries unavailable in some input fields?

Question: So my android 4.3 personal dictionary abbreviation/expansions work fine in some text inputs such as memo pad or text messaging, but it seems if the input is specialized such that it knows to expect an email or a phone number, the expansions are not available. Is there a way to make these always available when the keyboard is active without exception? If not, how can I otherwise avoid typing out my long email address when setting up settings, filling out web forms, etc?
Answer: As you've noticed, the app you're typing into can tell a "hint" to the keyboard app (or input method) to let it know what kind of text to expect, such as an email address. It's then up to the keyboard app to decide how to interpret that. For example, it can look in your contacts for email addresses.
You haven't said which keyboard app you're using, but from what you've described it seems that this app chooses to ignore expansions when it receives this hint. Since it's up to the keyboard app what to do, you might like to install and try out a different keyboard app. I don't use expansions/abbreviations myself, so I can't recommend one, but there must be one out there that lets you use them for email addresses, phone numbers, etc. as well as normal text.
Do bear in mind that a keyboard app can record all the text you type, so be extra careful to only install apps from reputable sources and developers.
Comment: OK, good tip. I'm using the stock android keyboard at the moment because in 4.3 and 4.4 the swyping is so good I haven't tried any third party ones yet, although I have tried several in the past on earlier android versions.


Do signed certificates from public certificate authorities add any value for always encrypted?

Question: If I create Always Encrypted columns in Microsoft SQL Server from the SSMS gui, it makes a self signed certificate. Is there any value in making a CSR and paying a certificate authority (or using letsencrypt.org) to make a certificate? Does that chain of trust add and value in this case?
Answer: Certs from trusted CAs (like VeriSign) are used when you need a certificate that must be able to prove its issuer, purpose, validity, etc... Certs for data encryption like Always Encrypted typically do not require such proof since your certs typically don't float beyond your org. I don't know of any use case where you would benefit from using a 3rd party CA cert in an AE deployment. Even when you have strict management/rotation policies, I can't think of any common policy that you can't implement using a corporate issued cert or even a self-signed cert (though the latter will have a bit more manual work).
Comment: Ok, so beyond value, can I made SQL Server care? Assuming I had a business requirement for chain of trust, could I make SQL Server, or the ODBC driver check for chain of trust and emit a warning? Could I configure SQL Server to not let me install a self signed certificate, or would I need to audit for that externally?


Managing songs on Ipod Shuffle

Question: I'm Pretty new to Ubuntu and i've had no success in installing Itunes through Wine, So i'm wondering if there is anyother software that can help me manage my songs on my ipod.
Answer: You can use rythmbox to transfer music.
Just place the music you want to add in the <code>~/music</code> folder and open rythmbox.
connect your iPod.
Drag the music from the computer to your iPod.
This method worked for my old iPod nano 3rd generation but it should work for you too.
rythmbox is usually installed in ubuntu by default so you don't have to install anything new either.

Managing songs on Ipod Shuffle


Apple 2015 fiscal year accounting calendar

Question: I was wondering if anyone know where I can acquire Apple's 2015 fiscal year accounting calendar?  I have tried a few varieties of search term and nothing is showing up.
Answer: You can find a link to the fiscal calendar in iTunes Connect at the bottom of the "Payments and Financial Reports" page.
I'd post a link here, but it might change in the future.


how to extrude along a path to connect 2 meshes

Question:
I need to connect a couple of areas along a path. They where 2 separate models I am combining and I am having some trouble. The modles are an engine and turbo. I need to connect the selected areas along the selected path, and have it look like a pipe. Anyone know how to do that. It is all now one object.
Comment: [Bridge Edge Loops](https://blender.stackexchange.com/questions/126808/how-to-use-bridge-edge-loop-to-create-arch/126844#126844) will likely not give you enough control, so probably make the path a separate object convert it to a bezier curve, adjust as necessary then merge at the end
Answer: I don't think you can do it this way but you have something close to it with 2 LoopTools > Loft or Bridge. Also, you'll have a better topology if the first and last selection have the same amount of vertices. Activate the LoopTools addon, then:
LoopTools > Loft
Select one of your circles, duplicate it several times where you want the pipe to follow. Select the first and last circle and all the duplications. Then right click to make the Context menu appear > LoopTools > Loft. The pipe appear. You can tweak some parameters in the Operator box (bottom left).

LoopTools > Bridge
This solution is not as precise as you don't determine any intermediate. Select the first and last circles, then right click to make the Context menu appear > LoopTools > Bridge. The pipe appear. You can tweak some parameters in the Operator box (bottom left).
Answer: I think I would convert the edges from the path to a curve and then
use one of the edges from the MotorObjects as Bevelobject.
so you have to select the Edges that make the path first and hit "P" to
seperate them.
Same goes for one of the rings that is your end or start ring select
only the ring and hit "P" -
seperate by selection.
then go back to object level and select the path.
go to object menu and search convert to curve.
after convert, go into edit mode and hit curve set Spline type
to make it a bezier curve
Same for the other object you have seperated.
now you can use the ring as Bevel Object in
 Properties Panel - Curve - Bevel
set curve resolution to 1
go into edit mode for the "ring" and move it to the center
of the Scene and rotate it so it's on the ground like in the Picture:

last but not least, move your path so it fits in the hole and use scale, rotate
and tilt on the first and last Control Point of your curve to match the object.
finally - convert your curve to mesh and join and connect to your base mesh.
Cheerz
if somebody wants to make screenshots to illustrate the process - go for it.


removing write up protection from micro sd card

Question: My micro sd card suddenly got locked and i don't know how to remove the write up protection using my macbook air nor the disk utility. How do I remove the digital write up protection from my card using my mac?
Answer: Golden Rule #1
As soon as an SD card [or USB stick] starts to play up - bin it.
They're not worth the effort once they error.
I go through literally hundreds of them for work. Low write count, high read count.
If they error once, they will error again. Quality control on them is, let's say… variable.
Some of them have a controller chip that will permanently lock them to read only if they detect a write error, as a preservation measure. There is no way to unlock them once this happens.
Golden Rule #2
Don't use them to store anything valuable.
Edit:
If the data on an SD card was truly valuable, it is theoretically possible to replace the controller chip, or even directly access the memory itself. This service can be performed by data recovery specialists, but they charge a lot for their efforts & still can make no guarantees.
Rules 1 & 2 are still 'best practise'
Verbatim from my answer at https://superuser.com/a/854645/347380


What is the difference between HD LED Glare and HD LED Backlit?

Question: I was comparing this two products from Lenovo and Dell. There are no major differences but one difference in their display. Can anyone help me what is the difference between HD LED Glare and HD LED Backlit displays?
Answer: "Glare" and "Backlit" are two different, unrelated things.
LED Backlit means the LCD is lit from behind using LEDs as the light source. This will actually be true for both displays in question (since they are both "LED" LCD displays).
See this similar SU question: Difference between a LED Backlit and LED HD Display on laptop monitor
"Glare" means the screen is smooth/glossy instead of having a matte finish (matte screens are for "anti-glare").
For more info on Matte vs. Glossy, check out this other SU question:  What makes glass monitors different from matte or glossy?


What Does This Picture Say?

Question: I stumbled across a picture of Severus whilst on the internet, and me being who I am, this has its disadvantages.  I am not a good reader of cursive whatsoever, so if someone could help me out, that would be great. Here is the picture:
Comment: It says squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle squiggle
Comment: Well, it's in French for starters.
Comment: Bigger version here; http://th03.deviantart.net/fs70/PRE/f/2009/356/4/e/Severus_Snape_Background___2_by_rouquinamour.jpg
Comment: This question appears to be off-topic because it is not about science fiction and fantasy.
Comment: I've taken the liberty of re-asking over on French:SE. Once we get a translation, we can locate the source; http://french.stackexchange.com/questions/12721/what-does-this-say-in-english
Comment: I twittered [to the picture's author](http://coverjunction.com/cover/Harry-Potter-Severus-Snape) (some singer). Low chance of reply, but what the hell. It was worth creating a twitter account
Comment: As I said above. I wouldn't of even known.
Comment: Update: there's now an answer posted at the French:SE that looks good.
Answer: I've taken the liberty of reposting the answer posted at the French:SE.

The text reads:*

Je suis bien touchée de ce que vous me dites à ce sujet. Vous savez que mon coeur a toujours battu pour vous tous et je sais bien que c'est réciproque. La bonne Denise ne veut tout d'un coup pas accepter la croix de notre ordre mexicain que je lui ai envoyée sous prétexte que la Reine n'aimait pas les ordres et que c'était ce qui lui avait expliqué que je ne l'eusse pas comprise sous la première distribution. Je lui ai répondu que Grand' maman

It is a letter written in 1866 from Charlotte, the Empress of Mexico, to her uncle, the Duke of Nemours.
Source: Rice University http://scholarship.rice.edu/jsp/xml/1911/27238/1/aa00207.tei.html
I wouldn't qualify this as "normal" modern writing in France but I guess most of the doctors prescriptions I had in my life were less legible than that letter ;-)

It's actually page 3 of the letter and actually starts and stops midsentence.
Answer: Adding to TrishLing's answer, and with a major hat tip to Jilliagre over at French:SE for the wording, the translation would be something like:

I am touched by what you tell me about this. You know that my heart
beats for all of you and I know that you feel the same way.
All of a
sudden, good Denise doesn't want to accept the cross of our Mexican
order. I sent him on the pretext that the Queen did not like these orders and
it was explained to him that I had not included these orders in the first
distribution.
I [also] told him that Grandmother....

Obviously the first part is actually quite sweet whereas the second half is merely a conversation about matters of family business, and appears to be there simply as filler.

What Does This Picture Say?


Google App Engine: Backend getting stuck after fetching a large number of URLs

Question: I'm having a problem with the GAE backends and taskqueues. Basically what happens is, after the backend does several url fetch calls for a few minutes, tasks start getting stuck without even starting. The enforced rate drops to 0.10/s and the queue hardly moves. It only starts to move if I restart the Backend instance but only to reach the 0.10/s enforced rate again.
I'm currently working on a GAE project that requires the app to traverse around 70000 URLs, retrieve the HTML, check for values in the HTML, and update some records in the datastore based on the values in the HTML.
The implementation involves a cron job that takes around 300 URLs every minute, splits them by 10's, and assigns them to different tasks in the task queue. Each task goes through their 10 URLs, processing the contents.
I'm running a B4 static backend instance. Task queue rate is at 5/s. Max concurrent requests is 8.
I tried adding task aging as well but it didn't help.
---- October 19, 2013 ----
Edit: I tried commenting out a lot of code and narrowed down the problem to URL Fetching. Apparently when I remove the URL fetching, things run very smoothly. Still, I'm not sure how to fix this since I'm pretty sure I closed all connection related resources.
Answer: You may reach the quota limit for URL fetch which is 3000 API calls/minute or 657,000 API calls/day.


Sharing Video on Ubuntu

Question: I am brand new to Ubuntu.  I want to have my daughter-in-law share videos of our first grandson.  Can you send me instructions on how to have her upload videos so we can watch them?  Thank you.
Comment: Hello, and welcome to AskUbuntu! Did your daughter-in-law try an upload service that didn't work for you, or are you just asking what *should* work? If it's the first, could you name the upload service? Basically everything should work (see my answer).
Answer: Ubuntu can play every commonly-used video format. Simply have the videos uploaded in the way they were before you switched to Ubuntu. I really can't imagine a technology your daughter-in-law might upload to that wouldn't work. You may be asked to install a "video codec" or player, but Ubuntu will recognize and install the required software automatically.
If you do not know how to share videos to begin, I recommend uploading to YouTube and selecting the "Unlisted" option to keep the videos private. Then you can simply watch and share the videos through your internet browser.

Sharing Video on Ubuntu


Show entry versions on front-end

Question: If I have entry versioning turned on is there any way that I can show details of previous entry versions on the front end?
Answer: I don't believe there is any way using native EE tags, but using the query module I'm sure this could be done or by creating a plugin perhaps.
Answer: Please see here http://www.sidd3.com/get-entry-revisions-in-expressionengine/
It would be helpful for you.
Comment: That link seems to be dead.
Comment: I have developed a plugin for this purpose. One can download from here: http://www.sidd3.com/entry-revisions-plugin/

Show entry versions on front-end


Please reconsider unlocking comments on this question

Question: I'm afraid I have a slight problem with a self-described retired moderator having the last word on commentary implying that the conversation had descended into rudeness and then locking because the comments were "off topic."  None of the comments were the slightest bit rude, and although many may have been filtered through the commenters' political views, almost all were about the context of the wording under discussion.
Comment:  You're certainly playing with fire on this one! Yoichi Oishi and waiwai933 are probably ELU's equivalent of "national treasures". I don't really want to get bogged down taking sides, but there *are* a lot of comments there - mostly Off Topic to a greater or lesser extent. Why not incorporate anything relevant into your actual answer (that's what comments are *supposed* to be for; improving the answer), and perhaps ask a mod to move *all* the comments to a chat thread (where they should have gone before the comment thread got so long).
Comment: @medica Yes, I accept that moderating is a thankless job.  It's also one voluntarily undertaken and in the case of ELU one for which there are clear guidelines.  Would someone have been offended in the absence of moderator action?  No explanation was given and there's no indication that anyone was offended.  In the short time I've been here, I've looked to  your posts -- questions, answers, and commentary -- as a source of enlightenment, and I won't stop now.  Letting it go I recognize as wise advice, and I intend to do no more than respond on this comment thread.
Comment: I agree, the comments  prompted the lock, which were in turn  probably prompted by the views expressed in the answer. Anyway don't worry, the lock just meant to stop futher off-topic discussions on a 'sensitive' issue. I posted a quick comment as a small warning under your answer, but it was not helpful. Let's turn the page..there are more questions  waiting for good answers :)
Comment: @Josh61 Not so much that it wasn't helpful but that I wasn't paying enough attention.  Page turned.
Comment: Let me add that I would have had no objection to a warning not to let politically-tinged discussions descend into rude behavior.  Neither would I have had a problem with moving the entire discussion to chat.  I'm just not pleased that any moderator, national treasure or no, feels free to swan in with a sly (and in my opinion) false implication that commenters have violated rules of decorum and then to lock the thread from further commentary.  I am reliably informed that he or she who moderates least moderates best.  Just as I do not need to be informed that what pleases me doesn't mean squat.
Comment: @deadrat - While I don't support obsequious veneration as a legitimate reason to refrain from posting a complaint, I can attest to moderating being a fairly thankless job; one is bound to offend no matter how a situation is handled. Mods are supposed to keep sites relatively on-topic and trouble-free, whether it's about keeping things apolitical or asking someone to refrain from comparing pirating videos to cannibalism, slavery, etc. in comments. It doesn't matter if it's a warning, a lock, or moving comments to chat (the easiest solution), someone is going to be offended. I say let it go.
Comment: ...cutting to the chase, I'm coming down off the fence to side with you. But now we're *both* on a sticky wicket - even with my supporting upvote, your meta question still has a negative net tally. Anyway, it's your issue, so why don't you post an answer here *yourself*, asking waiwai933 to reconsider, move all those (unwanted? redundant?) comments to chat, and free up the "main" answer so it can continue to attract the upvotes it deserves (I will immediately upvote *both* answers, obviously! :)  Bear in mind I'm *not* a mod, so I've no idea if such action is even possible, let alone easy.
Comment: @Rathony When my time-out has expired and the lock is lifted, I intend to take the discussion to chat, where I'll be happy to consider the merits of your views on Clinton's exchange with Roby.   I don't think my outright statement -- it certainly wasn't an implication -- was the issue that prompted the lock, and that's the only thing I want to discuss on meta.  If my answer were inappropriately opinion-based, the proper remedy would hardly be to leave it in place but lock it.  I think the perceived problem was with the comments.  I refer you to the last sentence of my last reply to m_t.
Comment: Deadrat's well-written and enjoyable answer expresses his personal opinion on the matter in question. This is inevitable when you are to interpret something said by someone (a most famous politician in this case), and makes the whole thing off-topic for ELU. OP has accepted the answer showing that he is just fine with the opinions put forward, but discussions on political issues, which naturally tent to raise contrasting emotions, should be avoided both her and on main.
Comment: @Josh61 Thank you, I think.  I've reread my answer and I'll have to cop to some extraneous personal opinions (which does not include Rathony's cite), but that's not a suitable discussion here.  I don't think the opinions in my answer prompted the lock.  An edit, solicited or volunteered, would have done the trick.   I refer again to the end of my last reply to m_t.
Comment: The answer is just fine as it stands, and besides that too is locked, a bit strange that the comments are locked, I didn't consider them to be inflammatory, but perhaps they were teetering on the edge.
Comment: @FumbleFingers Thanks for the warning.  First, although there are people who can scorch my feelings, trust me, none posts to ELU or any other cyber-outlets in which I participate.  Secondly, my expectations are as low as my investment, which is limited to voicing some irritation.  Asking a committee of moderators to overrule one of their own is like asking a US federal judge to reconsider his ruling.  Sure, there's a formal mechanism for doing so, but it rarely, if ever, has any effect.  Except, as I should have anticipated, to provide an outlet for driveby downvoting.
Comment: Actually, I didn't realise until a moment ago that not only can no further *comments* be added to locked posts - we can't *vote* on them either. (I tried to upvote your answer there, but couldn't). Yours is clearly the best answer there, since it's the only one that explains exactly *why* "the whole night" might raise a titter - and of course Yoichi is quite capable of looking up ***levity*** in a dictionary, so it's quite possible there was a *cultural* difference at bottom of his confusion, which you very adroitly cleared up.
Comment: @FumbleFingers Thank you.  The particular issue is mine, but the general problem is one for the moderators to solve amongst themselves.  They should hop to it without my having to importune them.  In any case, the stakes are low and not worth my turning myself into one of those people I complain about -- The Internet Guy Who Has To Have The Last Word About Everything.
Comment: @deadrat - I'm grateful my comment was taken in the spirit it was intended. I understand things from the other side, too. Now, as a mod on other sites, I've made mistakes that I wish I could undo. This does happen to be a mod action that *can* be undone, so I wish you luck. And no harm in asking. (Btw, people might have flagged some comments. You would have no way of knowing that, though.)
Comment: @deadrat for what it's worth, I read your answer and didn't feel it was political.  I thought it explained the language in question.  Was the same kind of answer I'd give to a student.  I didn't know about everything that went on in the hearing and when I read the answer, I said "Ok, that's what's going on."
Comment: @michael_timofeev Thank you.  I don't think that my answer prompted the lock, but of course, it could have been flagged as abusive as the answer here seems to imply.  I think the moderator's note about the possibility that "comments are veering into rudeness" are more to the point.  But it's impossible to say for sure, and that's the real problem here.
Comment: @Rathony I have encountered your argument before that no meaning is discernible because it's all "subjective."  I will be happy to entertain in chat that and other substantive questions about the original answer as soon as the lock expires.  Such discussion is off-topic here.
Answer: The post will automatically unlock twenty four hours after the lock was applied (roughly 14 hours from now). I should note for the record that my decision was made based on comments that I have deleted, as well as other information not publicly available. As I stand by my decision, I do not intend to unlock the post any earlier, though another moderator may do so at their discretion.
Comment: @SvenYargs Only deadrat could have accepted an answer on this question (without a Stack Exchange developer going directly into the database, but that really would be quite extraordinary). I don't actually have any actual view that would verify that since moderators can't view individual votes, and accepts are just a type of vote to the system, but I would be quite astonished if deadrat hadn't clicked the accept mark (though possibly accidentally?).
Comment: @SvenYargs It's certainly possible that I clicked where I didn't mean to.  Should my re-clicking the checkmark undo the accept?  At this point, it hardly matters.
Comment: This answer has been accepted.  But not by me.  In fact, I downvoted it not least because of the declaration that you stand by a decision you have clearly abandoned.  My recollection of the commentary isn't strong enough to recognize which comments you've deleted, but I notice you've left your own implying that some commenters have violated decorum.  They have been released from their toddlers punishment of a timeout, but their trespass remains unnamed as do the complaints of anonymous others.  The real problem is one of moderation -- a lack of transparency, courtesy, judgment, and engagement.
Comment: And I'm sorry that you feel it necessary to hide behind a duty of confidentiality that I have not asked you to breach.  As I am guided by the good sense of the estimable @medica, I will not waste anyone's time asking for a review of a decision that has already been rescinded.  Nor will I unaccept an answer that I didn't "accept" in the first place.  I wouldn't wish to encourage the extended dispute and adjudication of moderators' decisions, which (as in this case) are rarely cause for great anguish.  There's a (small) problem here, but I've explained my disagreement, and that's enough.
Comment: Did someone other than deadrat activate the green "accept' mark for this answer? I have always assumed that answer acceptance is entirely and exclusively a prerogative of the poster of the question. If a third party sometimes accepts an answer on behalf of (or in place of) the poster, is this a Meta-only feature or is it sometimes done on the main EL&U site as well?
Comment: I am sorry that you feel that way. Unfortunately, I cannot share further information without breaching confidentiality of communication between other users and moderators. If you would like, you may ask for either another moderator or the Stack Exchange Community Team to review my decision.
Comment: You are also welcome to unaccept this answer if you are not satisfied with my response; there is no obligation on you to accept a moderator's (or indeed anyone's) answer.


Location, life and applying for faculty positions

Question: I am 5 years into my postdoc, which has been up and down but I now have a decent publication record. I like what I am doing, am ready to manage people and can't wait to get out of the lab and no longer be a postdoc. I have many ideas and not enough hands. But, it is becoming clear that to be "successful" one has to be willing to look absolutely everywhere for a faculty position. I am in New York City, I moved here for my postdoc from London, UK, and love it here. I have friends and a support system, a husband, a great apartment. Aside from that it is relatively convenient for flying to the UK to see my family - who have a lot of problems, which I am struggling to deal with. Although I think I might want to have a faculty position, I want to be here more - and I think I need this to feel happy. My family problems has taught me that life is too short to be miserable and do things that will make you unhappy.
My boss is going all out promoting me to her PI friends and telling them how great I am, asking around for positions and introducing me to people - which is incredibly supportive. But she keeps suggesting places I just can't see myself living in, and says I need to be open minded. The fact is that I simply do not want to.  What would you do? If I tell my boss this, I feel like I'll lose her support and need her on my side for the next step (which also I wouldn't mind being in industry). I am really confused and don't know how to have this conversation with my boss or if I should at all. Any ideas?
Comment: Superstars can pick where they are going to live. If you're really good or really lucky you might get a choice between a few positions. If you're less good or less lucky you may have an option: take it or leave it. And, of course, some folks are left out in the cold for a hiring season. Even if they could do the work.
Comment: This is a hard one. I actually ruled out academia early in my PhD because of this very reason. You are more invested in it with five years of postdoc under your belt... There are a lot of universities in the northeast though if you are willing to move just a little bit. i.e. it's probably just as easy to get to London from Boston as well.
Comment: Two questions for you: (1) would you rather your supervisor discovered how you feel directly, or indirectly (i.e. by analyzing your lukewarm follow-up of the leads she provides)?  (2) do you enjoy teaching (and do you have the potential to be good at it)?
Comment: For what it's worth, I did the opposite. I quit academics to move back to my family and live in a great city. Never been happier.
Answer: Best wishes to you. This is definitely a hard decision. I chose career over my personal life and I've spent the last five years in a small city which, to be honest, I don't find all that appealing. I believe it was the right decision (I love my work), but I'd be lying if I said I was completely sure.
I certainly know of academics who made the opposite decision, and I think they feel analogously: they may have some regrets, but suspect that they made the right call.
Ultimately, no one can make this decision for you. You might also keep in mind that there is middle ground between only New York and "absolutely everywhere". There are at least a dozen American cities with direct flights to London, most of which are quite big and cosmopolitan, all of which have research universities, and several of which are not far from New York. So you might consider compromising somewhat while still ruling out places where you definitely don't want to live.
Then again, you might not. Good luck to you in any case.
Answer:
But, it is becoming clear that to be "successful" one has to be willing to look absolutely everywhere for a faculty position.

That's not true.  You can (or rather, some can) be successful on the academic job market even by being quite geographically restricted, and conversely just because you look absolutely everywhere for a faculty position does not guarantee you'll get one.  What is true, of course, is that, the broader your search, the higher your chances of getting a position somewhere.
You're right of course that if your constraint is "in New York City" then there are lotteries you can play with better chances of winning than that.  So I think the first thing to decide is how much you want to stay exactly where you are now.  If that is important to you, then I think you should search primarily for non-academic jobs, while still making sure to apply for every reasonable job in NYC (or in whatever radius of NYC works for you).
Also:

I like what I am doing, am ready to manage people and can't wait to get out of the lab and no longer be a postdoc.

Do I understand correctly that you are a postdoc in the laboratory sciences and as such have rarely set foot in a classroom in the last five years?  If so, that's a long time away from the teaching aspects of academia.  You didn't say that you couldn't wait to get back in the classroom; you said you can't wait to manage people.  This makes me think that the type of industry position in which you are managing a lab may actually be more suitable for you than academia.
While it is very valuable to be thinking about how you value various careers and locations, you should also realize that you don't really know what your choices will be until a very late stage.  So my basic advice to you is: keep all your options open.  Sure, you'd prefer to have an academic job in NYC, but as I said the chances of that are rather small.  Would you rather have an academic job in Boston or Philadelphia doing exactly the research you want or would you rather work in NYC doing roughly what the higher management tells you to?  In many cases, I think you can't know the answers to all these questions in advance.

My boss is going all out promoting me to her PI friends and telling them how great I am, asking around for positions and introducing me to people - which is incredibly supportive. But she keeps suggesting places I just can't see myself living in, and says I need to be open minded.

You have a great supervisor.  She's right in general terms: you probably do need to be open-minded, since you probably won't get exactly what you want.  She may not be right that you are willing to live in location X.  What I would suggest is that you, first, be sure to be gracious about all this help.  Second, you should be honest about the general situation: you have some constraints, and in particular you may or may not stay in academia at all.   However you can decide how specific you want to be about your constraints.  If your advisor likes the idea of placing you at University X and you have a good relationship with your advisor, in my opinion it's easy enough to apply for University X and sort it out later, unless you know in absolute terms that you would never take a job at University X.
Let me say finally that I have had experience trying to place geographically constrained postdocs on the tenure track job market.  When someone seems to truly want an academic job and makes too constrained a search, it makes me nervous.  So I have definitely been in a similar position to your advisor, urging people to apply to places that are not the best fit or their top choice.  I do think, that as someone who's watched the tenure track job market closely for over a decade, my instincts are more solid than someone who is going through the process for the first or second time.  And I would rather my postdoc have too many options than too few.  Much rather.  There is certainly no doubt that in the end the choice is being made by the postdoc and not by me.
Good luck!
Comment: Please don't take this the wrong way, Pete, but is there any chance the answer could be edited a little for length and focus?
Comment: @Yemon: Yes, I pared it down a bit.
Comment: Thank you all very much for your comments - certainly a lot of food for thought! I know no one can make this decision for me, but I'm grateful for all of the different opinions. After quite some time in academia, it is time to make that decision and it's a tough one! Appreciate the help!


Energy consumption of a small TFT

Question: I am looking to replace a 4.3 inch TFT (480*270 px - 400-500 mA @ 5V) by a more energy efficient one (other sizes welcome) to go with my raspberry pi driven handheld emulation console.
What is the minimum intake that I have to take account, if I can find a screen that runs natively on the 5V or 3.3V that my battery or the Raspberry supplies?
Comment: Look for ones with led back lights. But most tfts will have the same energy consumption as that. That said, if the idle screen off consumption is too high, look at replacing the convertor or adding a relay to turn it off completely.
Comment: Thanks for your input. I don't mind the idle consumption in general, but I have the feeling that it is an indicator that somewhere power could be saved in general. I will try to find one with an LED backlight.
Answer: Mobile phones give quite a good benchmark on display power consumption.
For example a Samsung Galaxy S5 has a 5", 1920x1080 pixels display. And it has a 2800 mAh battery and is able to do a benchmark at 200 nit for around 7.5 hours (based on phonearena).
So the phone needs an average of 375 mA during that time. I'd guess that most of it goes in the display, so there is not that much current to be saved, but they run on a lower voltage, so you can save some power. (If you calculate pixels per milliamp they are insanely more efficient)
It's quite easy to get your hands on those mobile phone displays, but it's a lot harder to get your hands on an efficient driver to use the displays outside of their normal environment (at least that's my experience).
I don't know which interface you want to use, but I think that's part of the problem, going from RPi -> HDMI -> Display is more power hungry than say a display which goes µP -> Display (embedded displayport).
The 3.3 V of the RPi is very weak, you won't be able to power a display directly from it. It's limited to 50 mA if I remember correctly.
Comment: At the moment I am using a car monitor tft, which needs a DC DC converter (on-board) and produces a lot of heat. The connection is made via the component out of the RPi.
I don't need more pixels since the original games were written for CRT TV's as display units. The low pixelcount should help to save energy compared to cellphones. The screen has an idle intake of 140 mA @ 5V (backlighting and TFT off), which I hope could almost completely saved by using a better energy conversion. Is that true?
Comment: @kamuro 150 mA @ 5 V without anything going on sounds quite high yes. I don't know how that thing is built, so it's hard to guess why that is the case, maybe it's still converting the composite signal. You could use a relay or something similar to turn off the monitor completely.
Comment: As said just now in the comment above, I don't mind the idle consumption in general.
I think the problem lies in a bad DC-DC conversion, but I don't know whether that is the trugh. I will try to find out by trial and error, the screen was quite cheap, so the learning effect is worth the loss if things go wrong. Thanks for your input, I learned from your answer and comment.

Energy consumption of a small TFT


Under Cabinet exposed NM/Romex

Question: The original builder (USA, ca. 2006) ran exposed NM/romex between the fixtures. Maybe this is a nebulous question, but is that within code?
Comment: I had a similar situation when I replaced an under cabinet light. The entry point was a little different leaving a few inches of Romex exposed. I boxed it in with wood. I'll let someone with more experience answer.
Comment: As an aside, I am replacing these old fixtures with similar but "linkable" led fixtures. The jumpers between fixtures are 3-wire/110V. I've read that exposed NM is not to code, on the other hand, these jumpers would seem just as non-compliant.
Comment: Are these LED fixtures low-voltage, by chance?  Low voltage is much more liberal...
Comment: No, it is 110 coming into the fixture, whether it is hardwired, or linked from another fixture.
Answer: You can look up NEC at NFPA.org-  free registration required.
Comments in parens are my rewording.
334.10 Uses Permitted
Type NM ('Romex')....shall be permitted in 1 and 2 family dwellings, and multifamily dwellings of types III, IV and V construction
(and other buildings, but must be concealed)
A "For both exposed and concealed work in normally dry locations" (except buildings other than 1 and 2 family dwellings, and multifamily dwellings of types III, IV and V construction.)
334.15 Exposed Work
A To Follow Surface
Cable shall closely follow the surface of the building finish or of running boards
B Protection from Physical Damage
..."where necessary" (describes which types are acceptable)
Which means if the electrical inspector thinks the wire is exposed to physical damage.
So bottom line, this is "exposed" but
"closely follow(s) the surface of the building finish" and doesn't seem "exposed" to significant physical damage, unless the inspector thinks so so it is code compliant if not elegant.
It seems unlikely the residents will poke sharp objects up there.
Article 320 is 'Armored Cable' Type AC, which says,
"320.10...shall be permitted...in both exposed and concealed installations"
"320.12 ...Type AC cable shall **not be used...where subject to physical damage**"
In this situation, AC is allowed exactly the same way as NM in a 1-2 family house, which I'm assuming is the situation..
For the LED jumpers, you'd have to look at what kind of wire they are.
Answer: With 120vac the cable needs to be protected so no this would not meet current code. If you swapped the romex out for MC type cable it would or ok.
Code requires NM wiring to be covered by a minimum of 1/2" drywall or plywood. If closer than 1-1/4 inch to the surface a nail plate is required. The easiest way to run exposed wire in this case is MC or metal clad--it is a flexible metal covering that can be surface mounted. There is always conduit but that will be thicker and harder to install than MC.

Under Cabinet exposed NM/Romex


Can I place 220V Live traces on top and bottom of PCB?

Question: Can I place 220V/10A max Live on top and bottom of PCB and let them cross over on 2 different layers. Is it safe? Is there a minimum distance of some rule that we need to follow. Attached image with PCB image. Please advice.
Answer: Typical FR-4 PCB will have a Dielectric Strength (or Dielectric Breakdown voltage) in the order of 10s of kilovolts per millimeter. Ask your PCB manufacturer to provide the datasheet of the material they use, so you can check the value yourself.
Therefore, running Line traces on the top layer and Neutral traces on the bottom is fine.
However, you need to be careful when the Line voltage appears on the bottom layer, such as the areas circled in red. In such cases, you need to ensure that the proper clearance and creepage distances are maintained.
The safe distances will depend greatly on the environment your PCB will be used in, but the typical rule of thumb is to leave a 2mm gap between mains and any low-voltage trace. The strictest requirement for voltages with peaks up to 420V is 6mm.
You can refer to UL 60950-1 Section 2.10.3 for full details.

Why would the manufacturer leave such a narrow space between pins?

There are several considerations:

TO-220 is probably cheaper than a larger package, such as TO-247.
The manufacturer thinks that TO-220 is sufficient for the power dissipation of the device.
Not every customer is going to use the device at high voltage.

By making these tradeoffs, they can cater for a larger market, than would otherwise be possible.
And for those customers who do use high voltage, there are several ways to go about using such a device:

Interleave the pads and form the legs of the device manually.
Use conformal coating or potting.

See this app note from infineon for some ideas: https://www.infineon.com/dgdl/Infineon-ApplicationNote_MOSFET_CoolMOS_Electrical_safety_and_Isolation-AN-v01_00-EN.pdf?fileId=db3a30433d1d0bbe013d20e0cbf017fe
Comment: +1. That's why transistors for high-voltage applications usually come in wider packages (like TO-3P) with wider spacing between legs (5mm), and/or with longer leads that allow to form them in such a way that increases the distance between center pin and side pins.
Comment: @Armandas Just wondering, the Triac I am using here is a BT136 wich is rated for 600V/4A. Why would the manufacturer leave such a narrow space between pins. I guess they all comply to some standards.
Comment: @SureshM I have updated the answer.
Answer: in the U.S. for most mains-powered or battery-powered information technology equipment, the minimum allowed PCB spacing should be determined from UL 60950-1 2nd Edition Tables 2K, 2L, 2M or 2N. For voltages under 300ac a good rule of thumb is 4mm of clearance.  You should be able to run on top and bottom of the pcb with no problem however you must maintain at least 4mm clearance between the high voltage and any other trace or pad on the same side.  More details can be found by googling the above document numbers.  Please be careful and double check everything.  People's lives including your own depend on it


Has there ever been an instance where a couple were independently elected to be President of a democractic government?

Question: I know that women have been elected as Presidents of many countries in the world, although that has yet to happen in the United States. But has there ever been an instance of a country where a President was elected, and then his or her spouse was elected at a later day to be President? I haven't heard it mentioned one way or another, and am quite curious.
Answer: Yes. Argentina had one of those, and a closely related situation.
Néstor Kirchner was Presidente of Argentina from 2003 to 2007, and his wife, Cristina Fernández de Kirchner served as President from 2007 to 2015.
Also in Argentina, Juan Perón died while in office and was succeeded by his wife Isabel Martínez de Perón, but that does not qualify because she was not directly elected as President (she succeeded Juan Perón because she was the Vice President).
Comment: I wonder if there was an instance that wasn't back-to-back. 16 years difference is a large amount of time. Hmmm...
Comment: Juan Peron chose his wife to be his VP? Interesting...
Answer: Well, Sonia Gandhi, the Italian-born widow of the assasinated Rajiv Gandhi won the 1998 election to the leadership of the Congress Party - the political party that has governed India for most of the time since independence from Britain in 1947.
She remained in that office for 22 years, and led the party to victory at the 2004 elections - but she declined the premiership in favour of Manmohan Singh.


loanable funds theory: why is the supply of loanable funds equal to saving (+ dishoarding + new money)?

Question: It seems that the loanable funds theory suggests that all that is saved is supplied in the market for loanable funds. This makes sense when we are talking about 'household saving' (i.e. household income minus consumption). This money will be put on a savings account (or used to buy bonds), and if not, counts as hoarding per definition. I have a hard time grasping why it would be true for 'firm saving'. Let me explain what I mean by that: Assume a production volume of 1 million $ in a given period. Assume further that 800.000 are paid out as wages and that 500.000 of those are consumed. Overall saving is 500.000, household saving is 300.000. It's obvious that the households will want to loan out those 300.000 (and in the case that they hoard some of this money, it constitutes hoarding, i.e. negative dishoarding, and gets subtracted from the supply of loanable funds = saving + dishoarding + newly created money). But I don't understand why the firms would supply the remaining 200.000 as loanable funds. Is there some assumption that profits are rules out in principle, i.e. that production has to equal household income? I'd be very grateful for some clarification, thx in advance.
Comment: Loanable funds is a defunct concept, so I don't spend time thinking about it (money is created when a bank loan is made). However, in the real world, most money holdings are in banks and broad money components (e.g., money market funds). Businesses only keep a minimal amount of banknotes/coins, so cash is returned to the financial system. The model is attempting to capture this part of reality.
Comment: In a conventional model the assumptions may include: two sectors firms and households; household saving equals investment in the firm sector. I think your hypothetical allows firms and households to make independent production and saving decisions. If Robinson Crusoe decides to invest rather than consume then he has created the tautology "saving is investment; investment is saving." If he pays wages to Friday and lends Friday money to buy goods then Crusoe is a firm and a creditor and Friday is consumer and debtor. We see finance as a consequence of employment relations.
Comment: In the conventional macroeconomic models the firms are also owned by households so the savings of the firm is returns to capital investment by households and is therefore part of household income. So firm savings is part of household consumption and savings.
Comment: @Dayne but there are no firm savings at this moment. The firms have produced products with the total value of 1 million, only 500.000 were consumed by the household, 300.000 were loaned out by the households and thus invested, and the remaining goods with total value 200.000 haven't been bought, because it seems there's no money left to buy them with.
Comment: Sorry I think I still haven't understood your example. The firm produced goods worth 1000, all of which has not been sold? This is not described in your original question so could you please clarify the example once again?
Answer: Does saving increase the supply of credit? Critique of loanable funds theory.
http://wer.worldeconomicsassociation.org/files/WEA-WER-4-Lindner.pdf

In the first step, the concepts of "saving" and "credit" will be clearly distinguished using simple accounting. It will be shown that credit is not limited by anybody's saving and that no one has to abstain from consumption in order for a credit to be provided. Also, it will be shown that financial saving (an increase in net financial assets) through a reduction in expenditures reduces other economic units' revenues and thus their ability to spend and save. Using the concept of excess demand and supply, it will be shown that excess saving does not lead to an excess supply of credit − which would lower interest rates − but to an excess supply of goods, services and/or labor which will lower prices and production. How interest rates change is not determined by excess saving: They could increase, stay the same or decrease. Finally, it will be argued that the identification of saving with the  provision  of  credit  is  likely  to  stem  from  the  invalid  application  of neoclassical growth models to a monetary economy.

The  present  paper  shows  that  the  underlying  view  of  the  "saving  finances  investment"  doctrine implies that the amount of loans that can be lent in a period is limited by the amount of saving in the same period and that, consequently,an abstention from consumption (and other spending) is necessary for more credit to be available for investors. This view is the basis of loanable funds theory (Robertson, 1936;Ohlin, 1937a,c,b;Tsiang, 1956). It will be argued that this view is deeply flawed. Using simple accounting rules in the vein of Stützel (1978;1979) and Lavoie and Godley(2012), the paper will first clarify the difference between saving and the provision of credit: saving changes an economic unit's net worth which the provision of credit does not. The provision  of  a  credit  only  changes  either  the  composition  of a unit's  financial  assets or the length of its balance sheet, but not its net worth. Second, it will be shown that loanable funds theorists commit a fallacy of composition  when  they claim  that household financial saving  increases aggregate investment  in tangible assets.

In recent history Paul Krugman defends the use of loanable funds model in online debates with other economists. The statistical measures in the United States have two components called national income and product accounts (NIPA) and flow of funds accounts (FFA). These debates seem to revolve around what role the interest rate(s) play in the dynamic increase or decrease of production, income, and financial instruments. There does not seem to be any deterministic role for interest rates and the financial accounts are not directly linked to the NIPA accounts because there are accounting methods to re-value assets, to depreciate assets, to recognize casualty losses, and introduce other discontinuities in the financial sectors. In short there is no simple deterministic mechanism to link financial saving and investment in a complex credit-driven economy.


MacBook Pro 2011 keeps booting the OS X Utilities and won't accept our Apple ID

Question: Before the issue became my headache, one of our relatives created a partition on my MBP to keep their files. Yesterday they deleted their partition and there might be important files that was delete and we don't know what it is.
Once we turn on the MBP it boots directly to OS X Utilities. Did some research and follow all helpful instructions that we found online, but seems it won't work.
Steps that we did.

We tried the internet recovery, internet recovery error 4403f always shows even if we use a different internet access.
NVRAM reset.
Tried Single user to reset. (fsck -fy)
Ran Disk Utility and found that the "volume..." something was fixed.
Date was changed to current date to install OS X since we encounter an error about computers compatibility and need to try again.
Tried to hold the option button and choose Macintosh HD, but still boots OS X Utilities.
We use 2 Apple IDs, but new problem encountered. The error message says: "Apple ID has not been used in App Store and the other is for US App Store only and will be redirected. The installation was cancelled."

Question:

Do we need to use the very first apple id that was used to update or install the OS?
Haven't tried to erase the Macintosh HD in Disk Utility since when we try to re-install OS X Lion, the Apple ID's are not accepted.
Answer:
Yes, you do need to use the original Apple ID.
You did not ask a question.


Is it possible to embed CL, CD, dCLda, etc, into a tensor?

Question: Is it possible to form a tensor (i.e. matrix) such that this tensor applied to the apparent wind vector produces a vector representing the resulting aerodynamic force?
Answer: Yes, actually the vector of the nondimensional aerodynamic coefficients is related to the nondimensional forces using a coordinate transformation tensor. Then, this tensor depends on your coordinate system (stability axes, wind axes) which in turn depends on which coordinate system is more convenient for your job. For example
\begin{gather}
\begin{Bmatrix} C_{D_i} \\ C_Y \\ C_L \end{Bmatrix} = \Bigg[ \bar{\bar T^s} \Bigg] \begin{Bmatrix} \overline{F}_x \\ \overline{F}_y \\ \overline{F}_z \end{Bmatrix}
\end{gather}
where $\bar{\bar{T^s}}$ is your stability axes coordinate transformation tensor which incorporates the sines and cosines of the rotation angles and the right hand side vector is the nondimensional force components. For detailed derivations regarding this coordinate systems and their use you may want to check Chapter 6 of the book of Mark Drela, $\textit{Flight Vehicle Aerodynamics}$ from MIT Press.


Fragstats input data for whole study area

Question: I have a land cover map covering an area of 1560 square km. I am interested in landscape fragmentation analysis using Fragstats. But I am confused about input data for the whole study area. I do not have problem on data preparation but problem about whole study area. I am not sure about how can I use whole study area as input data. Could anyone please let me clear about how can I use my whole study area for the analysis?
Comment: What specifically are you having problems with?  The more detail that you provide us, the easier it is for us to help troubleshoot. Are you using this with GIS software? If so, what version? Please update your question to provide us more information.
Comment: Thanks !vI have seen a couple of tutorials on input data as specific cell area of the study area as; grid (50m/50m)>buffer>negative cell value for the buffer edge>positive cell value for the inside landuse> converting raster or ASCCII. I want landscape metrics to the whole study area of 1560 sqm, not only single grid. I am using ArcGIS 10.2.2. Is it possible to get landscape metrics from the whole study area? If possible then how to prepare input data for the whole study area?
Answer: ArcGIS 10.2 is your problem. According to the Fragstats information page, you cannot use Fragstats with ArcGIS newer than 10.0:

Version 4.2 should be compatible with all versions of ArcGIS 10.0 and
  earlier, but it will not work with ArcGIS 10.1 or later.


SVN pre-commit hook to validate subdirectory name only in shell script

Question: I am trying to o add a pre-commit hook that validate sub-directory name in yyyymmdd format.It should be applicable to specific directories only not to whole project folder.Please help to write the hook script.
Answer: It is an easy job. You should rename the pre-commit.tmpl file located in hook directory under your repository into pre-commit (Linux) or pre-commit.bat/exe (for windows). the commit path and other info are passed to your hook script through command line parameters. Take a look at this guide. You may also take a look at this link and this one for more info.


length extension attack on an MD5 hash of a text file of about 10K Bytes?

Question: How much computing time on a typical desktop computer would it take to find a new length and new data to extend a text file of about 10K Bytes with a given MD5 hash?
Comment: That isn't a length-extension. It's a second-pre-image and totally infeasible (cost above 2^120)
Comment: Define "extend a file with a given hash". Is it a requirement that the original and extended file have the same hash? Or something else, like that two different extensions of the original file give the same hash, irrespective of the original's hash? Is it allowable that the (end of) the original is crafted by the attacker to make the task easier?
Answer: First of all, let us explore what a "length extension attack" is; it might not be exactly what you assumed it was.
Suppose we were given the MD5 hash of a bytestring we'll call $A$; we may have no idea what the string $A$ consists of, but we do know its length.
Then, we can create a bytestring $B$ (which depends on the length of $A$, but not any of its contents; it'll be between 9 and 73 bytes long), so that, for any string $C$ we pick, we can compute the value:
$MD5(A || B || C)$
This value will generally not be the same as the original $MD5(A)$ value; so if you're looking to create second preimages, this doesn't help you.  However, you're looking for (say) a way to attack the use of MD5 as a Message Authentication Code, this might.
As for the time taken to compute the value $B$, and the value $MD5(A || B || C)$, well, that's essentially trivial; $B$ can be computed directly from the length, and the time taken to compute the hash is essentially the time it takes to compute $MD5(C)$.
A number of other hash functions share this observation; SHA-1, SHA-256, SHA-512. There are also other hash functions for which this is not true: SHA-384 and AHS (now known as SHA-3) among them.
Comment: This string $B$ usually contains some zero bytes, which might make the resulting string $A||B||C$ a non-"text"-file, depending of your definition of text file.
Comment: @PaŭloEbermann: actually, it'll always contain at least one zero byte unless A is at least 8 Petabytes long.  So, yes, if you can't live with zero bytes in your byte strings, this observation isn't likely to be greatly useful to you.