What is the equivalent moment of inertia of a two-pivot pendulum?

Question: I am working on a system that consists of a hanging-pendulum thrust balance with two pivot points, one in the front and one in the back There is a heavy weight applied in the front. I can change the position of the center of gravity by applying counterweights on the rear part. See attached image.. The position of the center of gravity is known as well as the moments of inertia with respect the pivot points
I would like to simplify this system to an equivalent physical pendulum with one pivot point. However, because I have two pivot points, I have two moments of inertia, one with respect to each one of the pivots.
In the beginning I thought about taking the mean average of both, and then calculate the period of a physical pendulum or compound pendulum, just as Hyperphysics suggests: $T=2\pi\sqrt{\frac{I_{y}}{mgLcm}}$, where

$I_{y}$ is the average moment of inertia,
$m$ is the mass of the system,
$L_{cm}$ is the distance pivot-center of mass.

but this just does not seem right. Can somebody give me a hint on how to do this? Better, is it even reasonable to do such simplification? Shall I use a matrix notation? My purpose is to study how the thrust balance will respond when a force is applied upon it.
I have analyzed the oscillations of the system for several counterweights. From the study of those oscillations I can obtain the damping coefficient $\zeta$ and the natural frequency of the undamped system $\omega_{n}$, but I still need $I_{y}$ to complete the equation $\omega_{n}=\sqrt{\frac{k}{I_{y}}}$.
Comment: What happens if you instead start with 2 pendulums coupled with a spring,  and set the spring constant to infinity?  e.g. http://www.maths.surrey.ac.uk/explore/michaelspages/documentation/Coupled
Comment: You can model the hangers as springs in parallel to find the property of the equivalent pendulum with a single pivot.
Answer: You have two moments which means you need to find the neutral axis which usually coincides with the system centroid along $I_{xx}$.
The difficulty is overcome by applying simple rules of statics and equilibrium.
$$\Sigma M_A + \Sigma M_B=\Sigma M_{W}$$
This means that your 2 arms could actually behave as a single pivot if their apex pinion point was cosymmetrical above the neutral axis in the x-x plane. Remember that force through a single point removed the resonance?!


How to remove dark stains on light-colored granite countertops

Question: There are dark stains on my 2 year old light color granite countertops, even though I applied 2 layers of sealer* when they were brand new.  They were purchased directly from a large wholesaler by a friend who is a very small contractor.  The locations of the stains and a history of only infrequent small water splashes suggest that they were caused by human skin oils.  How can the stains be removed, and future staining prevented?  *"Stone Pro" "Ultimate Pro" "Impregnating Sealer for Dense Stone" was used ($43 a quart).
Comment: Can you post a picture?
Answer: If your stain is something like oil that has made it past the sealer you may be able to "draw" it back out of the granite. You want a poultice to sit on the stain, you can buy special powders for this by I found plaster of Paris and acetone worked better.
Be sure to test in an inconspicuous spot first to make sure this will not make things look worse.

Wipe the area clean with soap and water to remove any dirt and grime.  The surface should be clean above the oil spot.
Mix plaster of Paris with acetone in a container.  Start with the plaster of Paris in the empty container and slowly add/mix in the acetone until the plaster is dissolved into a goopy paste. You don't want it too runny but you don't want dry chunks of plaster either.
Put the mixture on the stain, overlap the stain by at least an inch all around and pile it up a bit.  Don't spread it out too thin, I usually have it at least a ¼ inch high.
Cover with plastic wrap and tape down the edges with masking tape.
After 12 or 24 hours remove everything (the plaster of Paris mixture, plastic wrap, and tape). The stain should be lighter or gone completely.  If it is lighter but still visible repeat the procedure.

This process worked well for me on my white granite that was super porous and I mistakenly used plumbers putty to seal the kitchen faucet. I was horrified to see an oil stain the next day. I removed the putty and let it dry out but the stain persisted. Using the process above I got it removed.
Last point, you likely will just have to seal this granite a lot. You have enough sealant on it when water beads up on it, once it stops you need more sealer. It may be 1 or 2 years later or even sooner. The stone will tell you when you need to reapply, not a calendar.


how to separate components in an svg file in sketch

Question: I'm given an svg file with a logo that has both text and an illustration.. it appears as a single entity in my sketch application.. is there a way to separate it (ie i want to remove the robot from this logo).. I remember I used to be able to do stuff like this in Illustrator
update
Answer: The icon on the left shows you it is a raster (bitmap) image, which means it is not made up of layers, but of pixels. You can't edit individual elements like in a vector image. You may be able to edit it in a raster image editor, such as Photoshop, but you will have a hard time doing major edits.
Answer: Usually everything is nested inside a folder, like so. You can select and delete all unnecessary elements and resave.
Comment: This is a raster image, exported as SVG. You can't do anything about it, unless you find the original vector artwork.
Comment: no folders.. see update


How to view video/photo from smartphone to TV?

Question: Is it possible to view media contents from the smartphone to the TV?
I would like to buy a movie from the PlayStore but I am not sure on how to view it.
I need a specific cable (to connect the HDMI port) or is possible to use chromecast too?
Answer: You didn't say what phone you have, or what Android version, so here's a summary.
Physical cables
If your phone supports MHL
and your TV does as well (almost all HDMI TVs do), then you can connect the phone to the TV with an MHL cable. There are two kinds of cables: a standard one, and a special one for certain kinds of Samsung phones. See How does MHL work? for more details. Usually, the TV mirrors the phone screen (i.e. it displays the same thing at the same resolution), but Android offers apps a way to display different content on the TV screen. This is commonly used by media players and presentation apps.
The oldest HDMI TVs don't support MHL, so you'll need a slightly different type of adaptor to connect your phone. You can tell these adaptors because they have an extra input for an external power supply (often a micro-USB socket). Apart from that, it works the same way.
If your phone supports SlimPort
Some phones use SlimPort instead of MHL, such as the Nexus 4. You can't tell by looking at the phone: both SlimPort and MHL use the USB-on-the-go connector. You have to know which one your phone uses. With the appropriate adaptor, you can connect your SlimPort phone to any HDMI, DisplayPort, or VGA input. Just like MHL, once you've done this the TV screen will mirror the phone screen, or some apps can display different content.
If your phone supports HDMI
A few phones and tablets have mini-HDMI or micro-HDMI outputs, but this has largely been replaced by MHL and SlimPort. If you do have one of these outputs, you'll need the appropriate cable to connect it to an HDMI input, and just like MHL or SlimPort, it'll mirror the phone screen, or display different content in apps that support it.
Chromecast
If you have a Chromecast and Android 4.4 or later
and your TV has HDMI input, then you can use that to mirror the phone screen on the TV wirelessly. Plug the Chromecast into your TV, and use the Chromecast app to help set it up. As with MHL, Android also offers apps a way to display different content on the TV screen.
If you have a Chromecast and earlier Android versions
You can still use Chromecast with media player apps that support it, including YouTube, Play Movies, and the Gallery on some devices. You just can't mirror the phone display to the TV.
Comment: I have Nexus4 not rooted with default kitkat 4.4.4
Comment: As I said, the Nexus 4 supports SlimPort, or you can use a Chromecast.
Answer: Greetings from SlimPort Support.  The way to connect your device to a TV or display is with a SlimPort HDMI adapter or dock.  There is a new product called the SlimPort NANO.CONSOLE that just launched on Indiegogo – it lets you connect your device to the big screen (at up to 4K Ultra HD 2160p video-out), simultaneously charge your device, and remotely control your device with the included Bluetooth Smart touchpad remote.  It's really useful and plug-and-play easy to set up and use.  Please check it out on Indiegogo by searching on "NANO.CONSOLE".
You will also want to make sure your device is SlimPort supported.
Thank you!


How to set urban areas to NoData in a DTM?

Question: In ArcGIS 10.1, I have a DTM and a polygon layer representing urban areas. For processing reasons, I want to exclude the urban areas from the DTM (i.e., setting urban areas to NoData). How can I accomplish that? My guess is that I have to preliminary convert the polygon layer to raster, and then using Raster Calculator. But I am stuck on this latter step.
Answer: You have to make
1) DTM vector mask with exclusion of you urban areas,
2) clip you DTM with this mask.
Here is step by step instructions and similar question.
Comment: thank you. I found a solution that is, perhaps, a little bit simpler.
Answer: I found a solution.
1) find a polygon that cover the extent of the whole area;
2) use the ERASE tool, as described here: Performing reverse clip in ArcMap?; the tool will subtract the urban areas extent from the extent of the whole area;
3) use the polygon layers returned by step (2) as mask in the EXTRACT BY MASK tool. The resulting raster will be the DTM with the extent of the urban areas set to NoData.


Binary classification algorithm

Question: I have a retail customer transactional data set with features such as customer ID, product, date, number of products bought, ZIP code of customers, amount of the transaction. There already exists a business rule-based segmentation to segment customers if they are interested in coke or not based on their buying.  I have to do a binary classification to add more customers into the coke segment. Any suggestions on the kind of algorithms and approach that would suit this data set best?
Comment: Do you have annotated data? Maybe based on all customers who have bought the target product before?
Comment: Yes, I do have that data. SO all customers are labelled either 1 or 0 based on the number of target products bought.
Answer: Possible scenarios:

You can predict "Likely to Buy Probabilities": Create features that covers before purchase (e.g: product click, product view, purchases from same category etc). After, train a classifier and use prediction probabilities  (predict_proba_) to obtain scores. Then sort them pick x% and report them to business unit. They can offer discounts, campaigns to converge customers fast.
Try to find segment transitions. For example coke buyers move to lets say pie segments faster than vegetable segment. Identify those transitions and apply advertisement on cross categories.
If you have transaction data you should try to use apriori based algorithms and collaborative filtering methods for recommendations.
Additionally you can do RFM analysis and compare RFM segments and already created segments to find best customers of yours.

Hope this is helpful!

Binary classification algorithm


Computer science fields that deal with peer-to-peer systems

Question: I'm an undergraduate and am looking forward to becoming an academic; do the whole PhD stuff and start doing research. I'm interested in a variety of computer science related things but lately P2P technologies have really caught my interest. I have the impression that I need to choose one of the computer science fields to perform my PhD studies in, so now I'm wondering how to do  that, given my interest in P2P technologies. Would P2P fall under the area of distributed systems and such?  Which fields of computer science are most relevant to P2P systems?
Comment: I do not know whether it is a good PhD topic, but it is an important one.
Comment: @DavidRicherby, you're right.  I took another look, and I think you're absolutely right and my criticism of the question was a little bit unfair.  Thank you for taking the time to make the case for why this was OK.  Anyway, hopefully this revision feels like an improvement you and Luca, but if you disagree, feel free to roll it back.
Comment: @D.W. OK -- glad we're both happy.
Comment: maybe find the intersection of a p2p technology and its implementation. one emerging example, bitcoin. anonymous networks such as Tor also have a lot of theory. there is a lot of overlap between some areas of crypto & distributed systems. social networks could even be considered p2p technology although maybe stretching it. queries such as these sometimes go over better in [chat]
Comment: Networks (obviously); Distributed; communication; crypto & security; algorithm analysis; may even parallel computing, and possibly many others, depending on the exact application.
Answer: Distributed systems, algorithms and even graph theory are fields that are likely to be relevant.
But, in a sense, "fields" aren't particularly relevant. You don't get a PhD "in a field" but, rather, by finding an advisor who wants to do a research project with you. That person would probably be in one of the fields I've suggested but being in a field isn't a formal status.
Answer: Not repeating previous answer.
Security, cryptography, zero knowledge techniques are probably also
very relevant.  Essentially you should analyze what properties you
expect from your P2P system, and that include two kinds:

properties that you would expect from any implementation of the
same service.
properties that only P2P can provide.

Typically, many services can be fully centralized, but that gives too
much power to whomever can access all the data. Possibly P2P can avoid
that. At what cost?
Identifying the questions you might have, and the way they were so
far addressed may help you identify relevant fields. Look at all
existing P2P systems.
For example, the first one may have been Internet TCP/IP. What did it
rely on? I would guess that probability theory has some part in it. What else?
And if you manage to produce a working P2P search engine that is
competitive, I hope they give you two PhDs for the price of one.


Mac OSX 10.3 Log fills up

Question: I'm using an old 99 blue and white G3 tower with OSX 10.3.9 on it and using Reason. After about 10 or more hours of leaving the program open, the log file fills up and on my relatively small partition, renders the program unable to save changes or do much of anything.
I routinely delete the old log files when the computer is on for long periods of time but is there a shell script that can automate this process?
Answer: You probably want logrotate, which is the standard unix-y way to do this. If it's not included on your install, you can get logrotate from DarwinPorts.

Mac OSX 10.3 Log fills up


Entity Framework with MySql: Map System.Guid to VARCHAR(40)

Question: I am using Entity Framework 6 code first to connect to a MySql database. I do not own the database. I cannot change the database schema. I also cannot change to another flavor of Entity Framework (model or database first).
I'm having trouble mapping my POCO object to a particular table
The table is as follows:
CREATE TABLE 'my_table' (
   'id' VARCHAR(40) NOT NULL,
   'name' VARCHAR(200),
   Primary Key ('id')
)

I know for a fact that the 'id' column will always be a Guid. Therefore I have created my POCO class as follows:
public class MyTable
{
   public Guid Id { get; set;}
   public string Name { get; set;}
}

From my understanding EF for MySql will only map VARCHAR columns to string fields in your POCO. Is there any way I can tell entity framework that the 'id' column should be converted from a VARCHAR(40) to a Guid?
I was thinking of accepting that I could not map to a Guid. I'd just map to a string and create a custom getter method:
public class MyTable
{
   public string Id { get; set;}
   public string Name { get; set;}

   public Guid GetId()
   {
       Guid id;
       if (Guid.TryParse(this.Id, out id))
            return id;
       else
            return new Guid();
   }
}

Please help an EF newb out. Thanks
Answer: I could not find a way to do this. I was hoping that entity framework would just throw an exception if the VARCHAR(40) could not be parsed to a Guid. That is not the case with the MySQL provider.
I ended up declaring my Id member as a string. To keep my POCO class a true POCO class, I created a helper method to convert strings to Guids.
Answer: You may want to use interface for that and use explicit implementation.
public interface IMyTable
{
  Guid Id { get; set; }
  string Name { get; set; }
}

public class MyTable : IMyTable
{
  public string Id { get; set; }
  public string Name { get; set; }

  // use explicit implementation for Id
  Guid IMyTable.Id
  {
    get => Guid.Parse(this.Id);
    set => this.Id = value.ToString();
  }
}

So instead of using MyTable, you can use IMyTable to get object with fields that have the expected types.


How do I import posts into a SharePoint 2007 blog?

Question: I had a blog on our 2010 installation but have replaced it with a blog on our 2007 instance (because it's public).  I want to move some of the posts from the 2010 blog into the 2007 one but seem to be having trouble creating posts.  I thought I'd import using a datasheet view, but they're all read only.  Linked tables in Access are the same story.  Do I really have to spend all afternoon writing a PowerShell script?
Answer: One thing you might consider is using Live Writer. You can connect it to both environments, recall the posts from the 2010 environment, then post them to the new environment.
Comment: That only kind-of works.  The trouble is that I've got a couple of hundred articles, and the images get broken when they move.


Searching for efficient method to compute $a^n \bmod p$ for large numbers

Question: I need  an efficient algorithm with clear steps to compute $a^n \bmod p$ when $n$ is large enough and $p$ also. I'm looking for something equivalent to the built-in PowerMod function in Mathematica.
Comment: @AntonTrunov. Yeah, I too discovered that, too. My choice of which to list as a duplicate was guided by which of the two answers I judged to be clearer.
Comment: https://en.wikipedia.org/wiki/Exponentiation_by_squaring, https://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method
Answer: The algorithm you are looking for is quick modular exponentiation.
It is based on the exponentiation property of modulus operator
:
A^B mod C = ( (A mod C)^B ) mod C
for example we need to calculate 4^8 mod 7 (let us assume for the time being 4^8 is a large number and cannot be computed by available machines.)
we can then write
=(4^ 4 * 4 ^ 4) mod 7
=(4^4 mod 7 * 4^4 mod 7 )mod 7
= (256 mod 7 * 256 mod 7) mod 7
= 2
This algorithm doesn't only work for powers of 2 it works generally . We just need to write the power in its binary representation .
example :
3^31 mod 4
can be written as
3^(16+8+4+2+1) mod 4
you can see once we apply the exponentiation property to same the computations will be quite efficient.
Answer: You can use the Square and Multiply method:
Goal: Compute $y \equiv a^b \pmod{N}$
Step 1:
$\text{Initialize }\\ x \leftarrow a \\ t ~\leftarrow 1$.
Step 2: Square and Multiply
$\text{while } b > 0: \\
\quad\quad \text{if } b \equiv 1 \pmod{2}: \\
\quad\quad\quad\quad t \leftarrow t \cdot x \pmod{N} \\
\quad\quad ~ x \leftarrow x^2 \pmod{N}\\
\quad\quad ~ b \leftarrow b \ \text{div} \ 2\\
\text{return } t
$
Comment: You don't actually need to precompute the binary digits of $e$. You can do it as you step through the loop.
Comment: At the second look I don't think this implementation works. You should start from the least significant digit. You also need a variable to store the successive powers of $x$: $x^1, x^2, x^4, ...$. And you need to store the result. Now it seems like those 2 variable got mixed up.
Comment: Looks good to me! I would probably save a line of code and used $b \leftarrow b \ \text{div} \ 2$ -- in that case $b \leftarrow b - 1$ is not need.


Can we show both Credit Card Statement and Bank statement for Schengen visa?

Question: I am planning to visit France in September. According to the requirement list the embassy is asking for a bank statement. I would like to know how much should I show in my account for 6 days in France. Is it possible to show credit card statement (planning to buy air tickets by credit card) and other fixed deposits?
Comment: A credit card statement is only of secondary use; the primary reason they ask for a bank statement is because it also indicates that your financial status is commensurate with what you have listed as your job; that you have steady income (and expenses). A credit card statement doesn't show all this.
Comment: Both credit card statements and bank statements are acceptable evidence for *Schengen* applications.  See also http://travel.stackexchange.com/questions/45648/can-i-convince-embassies-to-accept-my-overpaid-credit-card-as-a-proof-of-funds/45681#45681
Answer: They don't just want to see the balance of your account, they want to see a reasonable pattern of income and expenditure. For tourism, you should have enough monthly income to pay for a normal cost of living and to save for the trip.

This shows that you have a steady and well-paid job back home, which makes you less likely to become an illegal immigrant and overstay.
It shows that you did not need a credit to make the trip. People who borrow large amounts of money might plan to repay it by working in Europe.
Answer: Well, credit card statements might be acceptable in most countries. I have just checked with Schengen consulates in my country (Pakistan) just credit card statements are not acceptable. Further they stated that having a good credit line available along with 6 months bank statements would enhance your financial and economic conditions. immihelp mention: Acceptable means of subsistence may be cash, traveler's checks, credit cards or anything else that guarantees sufficient funds.
Most France Embassies required somewhere  at least €60 for each day of stay. You are staying for six days, presumably somewhere around €360 to €400 plus cost of your airline ticket should be available. From my personal perspective at least €2,000 would satisfy the visa officer provided that you are maintaining your accounts nicely for the last 6 months.
So basically more or less Schengen requirements are almost the same, but differ in some countries depending on your nationality.


Is my self-created question a valid contribution to MSE?

Question: I asked a question (Evaluate the integral $\int_0^\infty \frac{x (\ln(x))^2}{x^4 + x^2 + 1}\text{ d}x$) that I created myself in order to show a particular technique, but apparently people dislike this way of contribution. Is it true that such questions are discouraged?
Comment: Math.SE is not a blog. It's not for "I came up with a cool new technique and I want to share it with you guys". And when a post feels that way, it tends to be less welcomed, at least amongst some people.
Comment: I think the problem is with the presentation (and maybe some people didn't read closely enough). The only question you ask is, what is the value of the integral, but it's clear that you know the value of the integral, so it appears that you're not actually asking a question. Maybe if you reworded it to "Here's how I calculated this integral; anyone have another way to do it?" there would be less opposition. Anyway, I wouldn't worry too much, you seem to have gotten a couple of useful answers.
Comment: http://math.stackexchange.com/help/self-answer
Comment: @CarlMummert That is one purpose of the site. I can't count how many times I've wanted the answer to something, typed the keyword into google and found the answer here or on MO. Sharing knowledge is also a purpose of the site.
Comment: For such questions, where you know the answer, or at least *one* answer, why not use the "Answer Your Own Question" feature?  Seems like it's made for such situations.  Comments, anyone?
Comment: @CarlMummert My take on this is that, if the question would be OK on its own without being self-answered (it has context etc), then self-answering is OK. Otherwise it's not. Basically, Meelo's answer's first paragraph.
Comment: @CarlMummert I don't see what it changes if you already know the answer, if the question/answer is legitimate and not an obvious reputation grab... What's the difference, from the point of view of someone else, between asking a question and someone else answering, or someone asking and answering, if the Q/A pair is identical? None.
Comment: @Najib Idrissi: that page is very unfortunate. Self-answered questions are not nearly as welcome on this particular site as that page suggests. As Asaf says above, this site is not a blog - it isn't meant for people to say "look what I know". It's meant for questions to which you *don't* know the answer. Now, if the OP works out an answer after asking the question, that is ideal, and posting that answer is welcome. But a question to which the OP *already* knows the answer is not a question in a genuine sense. The page you linked ignores this distinction (it was not written by math.SE).
Comment: @Najib Idrissi: we are looking at two different issues. The issue is not whether it is OK to answer one's own questions - it is certainly OK in certain circumstances. The issue is whether it is acceptable to ask "questions" to which one already knows the answer - which in my mind are not "questions" at all. These are (rightly) discouraged regardless whether the OP answers them or not.
Comment: @Najib Idrissi: the purpose of the site, though, is the interaction between the asker and answerer. This interaction is absent in immediately self-answered questions, and distorted in "puzzle" questions.  The purpose of math.SE is not to serve as a free blogging tool (other StackExchange communities may have different practices, of course.) The idea to make it so is one of the unfortunate legacies of a certain former SE employee.
Answer: Your intention of asking a question and then answering it is certainly allowable. However, the usual standards of quality still apply. That is to say, a question which is simply a problem statement (e.g. integrate this by using that) is not only problematic because it will look like homework, but it's also almost never a strong question.
For instance, if someone wants to ask a homework question, I want them to show some effort because then I can know what points they're finding tricky and highlight those in my solution. If someone wants to ask a question out of curiosity, I'd like them to motivate the question somehow.
With your particular question, I think the issue is that the question looks basically like a computation - you gave the technique you wish to use, and a problem tailored to be solved with that technique. It's not terribly open to other answers, and the actual question being solved seems awfully arbitrary - which is problematic, since it means that the question is unlikely to be asked by other people (at least other people who don't already know the answer), and thus the contribution is unlikely to be seen. However, you do seem to have some good question implicit in what you asked - you recognize that your current answer is tedious to put into practice, so it would've been most reasonable to post, as your question, a full solution (or a specific description of your technique, sufficient for someone competent to reconstruct the solution) and to ask if there was a less computation-heavy way to do that.
Comment: Yes, motivate the illustration, perhaps by saying something about what makes the technique worth knowing or interesting.  Contour integration involves some art in selecting contours in the complex plane.  While a detailed explanation of why this contour works for that integral might best fit in the Answer, mention of your intent (foreshadowing?) would improve the Question for many Readers.
Answer: Puzzle Questions are allowed.  But, as you see from the comments here, they may be disapproved by many users.
HERE is an example puzzle question I posted a while back.  See the disclaimer I put at the top.
Comment: That might explain the seemingly random/unexplained downvotes I've seen on answers to such puzzle questions...
Answer: Short answer: yes!  We get problems like this all of the time.  There are people here that will downvote and vote to close because they do not like simple "Problem Statement Questions" (PSQs).  The thinking is that all PSQs come from people who just want free tutoring and are deserving of our scorn.  (Such people certainly are.)  However, this sort of thinking is robotic; the questions worth answering are hard enough to be obviously not homework.
So perhaps, just to be safe, if you want to pose hard integrals, sums, and the like, that are clearly not homework, maybe spend a line or two explaining how you came across the integral and what your thoughts on a solution might look like.  But, in an ideal world, you needn't do that if the problem is hard enough to clearly not be homework.
Comment: Making assumptions about people's motivation and then criticising it is not valid argumentation. I doubt that there are many PSQ-opponents who "robotically" close any question that "shows no effort". Also, it is probably not so much PSQ at work here, but more the line that Gerry and Asaf described in their comments.
Comment: @Lord_Farin: Sorry, but I will push back on that.  Yes there are - we have among us those who look at any request to evaluate an integral as something put up by a lazy goodfornothing.  I have gotten into repeated arguments about such problems, and have made many requests to reopen.  So, no, I am not imagining this.  I use the word "robotic" because there is no other way to describe a reason requests to evaluate difficult integrals get repeatedly targeted for closure.
Comment: @Ron Well, I suppose we agree then (encouraged for everyone, mandatory for experienced users). But I read the sentiment of your post differently, due to "[P]erhaps, just to be on the safe side, [...] maybe" being a *very* silk-gloved approach -- hardly encouragement in my book, more like a disappointed realist's take on things.
Comment: I can't think of a question (much less an integral) that is clearly not homework because of its difficulty. Maybe I've had some unusual and difficult homework in my time.
Comment: @ToddWilcox: Take a look through my highest-voted integration answers, for example.
Comment: @Ron I'll take your word for it. Such makes me sad :(. However, regarding your main point, I still firmly contend that it should be promoted, no, *mandatory*, to provide at least a few lines of context/motivation. They help in locating a question through search engines, gauging difficulty at a quicker glance, identifying handles towards a solution. There's really no downside, except for time, and if a question is worth asking, it is definitely worth those few minutes. (Perhaps we'll have to agree to disagree on this.)
Comment: @Lord_Farin: I don't really disagree with you in spirit - I encourage it (as you can see from this post).  But the word doesn't always get out, and sometimes a newbie brings a really interesting challenge here.  So perhaps where we disagree is the mandatory thing, just because it is too hard to enforce everywhere.  (Experienced users, though, are another story.)  As you might be able to tell, these puzzle problems are really what drives a lot of my enjoyment here, so I do take it a little personally sometimes.
Comment: @Lord_Farin: You are correct, it does come off that way.


Nārada Muni Cursed by Prajāpati Dakṣa

Question: When, why and at what instance Narada Muni was cursed by Prajapati Daksa?
Answer: The story is told in this chapter of the Srimad Bhagavatam.  Daksha had 10,000 sons called the Haryaśvas, and he instructed them to populate creation with more beings.  But then Narada convinced them to become Sanyasis rather than beget children.  Then Daksha had 1000 more sons, giving them the same instruction, but Narada similarly convinced them to become Sanyasis rather than beget children. Daksha was so angered that he put the following curse on Narada:

You have made me lose my sons once, and now you have again done the same inauspicious thing. Therefore you are a rascal who does not know how to behave toward others. You may travel all over the universe, but I curse you to have no residence anywhere.

And Narada voluntarily accepted the curse:

My dear King, since Nārada Muni is an approved saintly person, when cursed by Prajāpati Dakṣa he replied, "tad bāḍham: Yes, what you have said is good. I accept this curse." He could have cursed Prajāpati Dakṣa in return, but because he is a tolerant and merciful sādhu, he took no action.

Not to keep you in suspense, Daksha ultimately fulfilled his responsibility as a Prajapati to populate the earth by having a bunch of daughters whom he married off to various gods and sages, as described in the next chapter of the Srimad Bhagavatam.
Comment: The Bhagavatam says they were born through Vishnumaya: https://www.vedabase.com/en/sb/6/5/1 "Impelled by the illusory energy of Lord Viṣṇu, Prajāpati Dakṣa begot ten thousand sons in the womb of Pāñcajanī [Asiknī]. My dear King, these sons were called the Haryaśvas."
Comment: On a side note, how were these 10000 or so children born?
Answer: Bhagavatha Puranam Canto 6.5 describes how all the sons of Dakṣa were delivered from the clutches of the material energy by following the advice of Nārada, who was therefore cursed by Dakṣa.
Influenced by the external energy of Lord Viṣhṇu, Prajāpati Dakṣa begot ten thousand sons in the womb of his wife, Pancajanī. These sons, who were all of the same character and mentality, were known as the Haryasvas. Ordered by their father to create more population, the Haryasvas went west to the place where the river Sindhu (now the Indus) meets the Arabian Sea. In those days this was the site of a holy lake named Narayaṇa-saras, where there were many saintly persons. The Haryasvas began practicing austerities, penances and meditation, which are the engagements of the highly exalted renounced order of life. However, when Srīla Narada Muni saw these boys engaged in such commendable austerities simply for material creation, he thought it better to release them from this tendency. Narada Muni described to the boys their ultimate goal of life and advised them not to become ordinary karmīs to beget children. Thus all the sons of Dakṣa became enlightened and left, never to return.
Prajāpati Dakṣa, who was very sad at the loss of his sons, begot one thousand more sons in the womb of his wife, Pancajanī, and ordered them to increase progeny. These sons, who were named the Savalāśvas, also engaged in worshiping Lord Viṣhṇu to beget children, but Narada Muni convinced them to become mendicants and not beget children. Foiled twice in his attempts to increase population, Prajāpati Dakṣa became most angry at Narada Muni and cursed him, saying that in the future he would not be able to stay anywhere. Since Narada Muni, being fully qualified, was fixed in tolerance, he accepted Dakṣa's curse.

Nārada Muni Cursed by Prajāpati Dakṣa


Stay at Frankfurt/Main airport

Question: I will be arriving in Frankfurt one day before my flight via train. Is there any way to stay at the airport one night? And one more question: Is there any Internet cafe for taking documents print out. Please remember that the day I am travelling is on Sunday so is there any Internet cafe which opens on Sunday also?
Comment: Have you tried searching https://www.frankfurt-airport.com/en/services/hotels.html
Comment: If the flight is not early in the morning, staying in the city center next to the train station might be an interesting option. Airport hotels start at 100€/night while you can find a hotel room for less than 50€/night in the city. It's a 12 minute ride by S-Bahn to the airport, the price is 5€ for a one-way ride.
Answer: There are at least three hotels, probably more, within the Frankfurt Airport Complex. About an internet cafe inside the airport I am not sure. However, if you choose to stay at an hotel, then doing print-outs should not be a problem.

Stay at Frankfurt/Main airport


What is the need of temple in Hinduism?

Question: Generally all Hindus Visit temple for to perform prayers. But according to Hindu ideology why we need temple as we can perform prayers at our home as well?
Comment: Temple is a remider for people that Lord exist. If new born generation will never see any religious place/building then how they will come to know about lord, only talk is not enough to tell him about them.
Comment: you can perform prayers at home. You do not need temples.
Comment: You can put idols in ur home but what about Pranapratishta which is done according to the Agamas and other Scriptures? Without Pranapratishta there is NO idol worship. Now, Are u eligible for doing that? Even if i assume u can do that it will only benefit  u and ur family. From Temples thousands of people can get God's blessings. So Temples are needed and that's exactly why they are there.
Comment: @SwamiVishwananda Then why temples?
Comment: If you think that you can worship God in ur homes like the way the priests do it in Temples then you are misinformed.
Comment: Temples came at a later date. They were not part of Vedic culture. To worship God, no priest is necessary. What is necessary is a longing heart.
Comment: @Rickross then how does it make any difference? We can put idols of our holy god and we can do that at our home as well
Comment: @SwamiVishwananda Something coming at a later time does not mean that it can be avoided.. Even sannyasa is not mentioned the Srutis but that's part of our culture now. The people of our age are not only intellectually weak but physically weak too, They are not capable of following a Vedic way of life. So its futile to talk of Vedic way of life in today's time.
Answer: What Is the Need of Temples In Hinduism ?
There are thousands of temples all over India and all over the world  of different sizes, shapes  and at different  locations.
A Hindu temple is a unification of the idea of Arts, Dharma, Beliefs, Values, Devotion  Rituals etc.Temples are consciously  constructed  to make us families with divinity of god.
People  visit temples to communicate with gods and offer their prayers. Temples also act  as spiritual centers where discourses, meditations bhajans special poojas  are often arranged , where people celebrate festivals .
Some temples also serves the purpose of religious schools , where people /students can learn more about Hinduism traditions , scriptures etc.
Some of them also have their own Ved-Path shalas , where interesting students can  stay and learn Vedas and other texts for some years and can become priests or pundits.
Library of manuscripts – From ancient times temples are also  used to store manuscripts s well as spiritual books as a library .
Here is the reason given in Shreemad Bhagvat purana of why wise people started deity worship in temples.

द्रुष्टवा तेषांमिथो नृणामवज्ञानात्मनां नृप | त्रेतादिषु हरेचर्या
  क्रियायै कविभि: कृता ||३९||
dṛṣṭvā teṣāṁ mitho nṛṇām avajñānātmatāṁ nṛpa tretādiṣu harer arcā
  kriyāyai kavibhiḥ kṛtā
My dear King, when great sages and saintly persons saw mutually
  disrespectful dealings at the beginning of Tretā-yuga, Deity worship
  in the temple was introduced with all paraphernalia SB
  7.14.39

And here in this chapter SB 11.27: Lord Kṛṣṇa's Instructions on the Process of Deity Worship. Lord Krisha himself  describes what is the importance of temple building .

मदर्चां संप्रतिष्ठाप्य मन्दिरं कारयेद् दृढम् | पुष्पोद्यानानि
  रम्याणि पूजायात्रोत्सवश्रितान् ||50||
mad-arcāṁ sampratiṣṭhāpya mandiraṁ kārayed dṛḍham puṣpodyānāni
  ramyāṇi pūjā-yātrotsavāśritān
The devotee should more fully establish My Deity by solidly
  constructing a temple, along with beautiful gardens. These gardens
  should be set aside to provide flowers for the regular daily worship,
  special Deity processions and holiday observances. SB
  11.27.50
प्रतिष्ठाया सार्वभौमं सद्नना भुवनत्रयं | पूजादिना ब्रह्मलोकं
  त्रिभिर्मंत्साम्यतामियात् ||52||
pratiṣṭhayā sārvabhaumaṁ sadmanā bhuvana-trayam pūjādinā
  brahma-lokaṁ tribhir mat-sāmyatām iyāt
By installing the Deity of the Lord one becomes king of the entire
  earth, by building a temple for the Lord one becomes ruler of the
  three worlds, by worshiping and serving the Deity one goes to the
  planet of Lord Brahmā, and by performing all three of these activities
  one achieves a transcendental form like My own.SB 11.27.52

Not all the people are having some sort of arrangement of  worshiping gods in their own houses so they also can easily go to the temple for the purpose
So a temple is a very important aspect of Hindu Dharma where people of al the kind can offer their worship to many gods and can perform  rituals , poojas etc. And can  get the close to divine and can experience the union with the divine.
Comment: "saw mutually disrespectful dealings at the beginning of Tretā-yuga" - what are those 'mutually disrespectful dealings?' The explanation by Prabhupāda is a bit lame. He says "A powerful Vaiṣṇava who has converted others into Vaiṣṇavas is to be worshiped, but because of material contamination, sometimes such an exalted Vaiṣṇava is disrespected by other, minor Vaiṣṇavas. When great saintly persons saw this contamination, they introduced worship of the Deity in the temple." Maybe there's a better explanation for that verse. Not sure what this 'material contamination' is.
Comment: @sv.- "what are those 'mutually disrespectful dealings?'  -My Gita press version is providing the details about that but not prabhupada , they are jealousy ,insult , disrespect . So the Wise man simply saw increase of such qualities of people in society and established custom of deity worship in temples , to somewhat bring harmony among people :)
Comment: 'they are jealousy ,insult , disrespect' - ok, maybe you can add that to your answer and btw, do you think introducing deities/idols really solved those 'disrespectful dealings' .. I would say it didn't fix the original problem :P
Answer: Swami Vivekananda:

God is eternal, without any form, omnipresent. To think of Him as possessing any form is blasphemy. But the secret of image worship is that you are trying to develop your vision of Divinity in one thing.
Idolatry in India does not mean anything horrible. It is not the mother of harlots. On the other hand it is the attempt of undeveloped minds to grasp high spiritual truths.
Man is to become divine by realising the divine. Idols, or temples or churches or books are only the supports, the helps, of his spiritual childhood; but on and on he must progress.

It is difficult for people to think of formless and omnipresent God which is why idol worship was introduced.

We may worship anything by seeing God in it, if we can forget the idol and see God there. We must not project any image upon God. But we may fill any image with that Life which is God. Only forget the image, and you are right enough---for "out of Him comes everything". He is everything. We may worship a picture as God, but not God as the picture. God in the picture is right, but the picture as God is wrong. God in the image is perfectly right. There is no danger there. This is the real worship of God.

What is the need of temple in Hinduism?


recreating the dialogue sounds of the 60s

Question: i am working on a series that is 100% adr. The series is in the style of a 1960s dubbed film and have been asked to process the dialogue so that it reflects those times. . Any suggestions thoughts or links i would welcome. Have tried the kings microphones but i am more interested in sculpting the tone rather than set and forget.
Answer: Do you have access to a nagra? you could run the dialog trough tape
to give it that kind of feel
Answer: Perry Mason is a great reference point.  It's actually a fantastic case study in the progress of audio recording technology.  You're probably going to want to check out anything from seasons 7-10.  For the time it's probably some of the period's best quality recording, at least that I've seen.
For tone shaping, try the AIR Vintage Filter in PT 8 or 9.  If you can get past the slow load time and the ugly interface, it's really quite fantastic.  Import a section of your reference film and then tone-match from there.
Comment: @mrwednesday; I'd recommend throwing an EQ3-7 in after the VF to get it really tight.  I usually boost the Fat and leave the actual filter pretty open.  That way I can get the tape drive and still be able to shape the overall sound as well.  Remember that those old tape machines made it up to *maybe* 6k.  So go hard on the high-end.  I'd love to hear what you come up with.
Comment: @g.a.harry... Rockin' Tip!

I've never tried that on Dialog before... always thought of it as a standard filter sweep type effect. It really does add some nice character to Dialog! I'll be using that tip for sure!
Answer: Some things to experiment with:
Using a ribbon mic to record the dialog.
Re-recording the dialog to optical film (will yield the best results).
Re-recording the dialog to 1/2 inch, 1/4 inch, cassete or VHS tape.
Tape saturation plug-ins.
Speakerphone.
Izotope Vinyl.
Notch EQ.
Adding various optical noise under the dialog.
Comment: Great suggestions.  I've been wanting to experiment with this so I'll try them out and play around.
Answer: Limit the upper and lower frequencies, slightly over compress and add some underlying white noise.  The noise interacts with the original signals and generates harmonics.   Then boost the upper mid range to add emphasis, lastly allow the actors to move slightly off mic during the ADR sessions.
Answer: Sans Amp works really well
Answer: Experiment with the procedure that Mr. Gary Rizo and his team(rerecorder mixer in skywalker) used in "We owned the night". They wanted the 70's sound. So, he first asked the rerecording mixers of that period how they used to process the dialogue back in the days and what part of the process affected the sound. After his research, he inserted in his mixing board the next chain: the outputs of an analogue Nagra( it was used for the dailies) feeding the inputs of a single stripe recorder( it was used for edtining), the outputs of the single stripe recorder feeding the inputs of a fullcoat mag( used for the final mix) and back to the cadenza mixing board( cadenza? I might be wrong about the model of the board). Try also mixing mono.
+1 for the ribbon mic!
When you finish I would love to hear your conclusions.
Best regards
Comment: @Marco I think it's credenza ;)
Answer: I will be editing some online episodes very soon and will post links if anyone is interested.
Again, thanks for the replies.
Comment: Congratulations on getting the job! I'm sure it was excited experimenting and being creative at the same time. I'm interested on watching some episodes.


What user details are shared with publishers through Apple News?

Question: Apple says that "News seamlessly delivers the articles you want to read in a beautiful and uncluttered format, while respecting your privacy, because Apple doesn't share your personal data,". What user data is shared with publishers. It is the same data that iAd shares?
Comment: On the Apple News Publisher website: "iAd provides campaign management, targeting and reporting capabilities that help drive your business." I want to know specifically what data is "reported" to publishers so I can make an informed decision on whether I want to use the News app or not. https://developer.apple.com/news-publisher/
Comment: Cool - it's always good to question and ask for details :-)
Comment: What makes you think any data is shared with publishers? Apple could simply scrape web sites and show you news articles without sharing anything at all. You might do all the sharing when you tap on a link to go to the web site of the publisher. What problem are you trying to solve here?
Answer: In iOS 9 Settings >> News >> News and Privacy, there's a long text that itemizes the privacy protections (and limitations) related to collection and use of individual and aggregated data.
Regarding "Disclosure to Third Parties", it says, in part:

We do not share any of your individual data with third parties...
Comment: Nice catch @pseudon - I was about to post that here. It's a long read but quite comforting once I struggled through it all on the iPhone screen. It looks pretty consumer friendly and none of the iAd sharing is intrusive or something that you can't easily purge from Apple's servers when you wish to remove your history.
Answer: I'm pretty sure that the publishers themselves don't have any access to your personal data. It's likely Apple News collecting info on what Apple News articles you read and like, so as to present news stories and articles that you might like to read in the "For You" section.
Comment: But why should we believe you - where has Apple stated this
Comment: I'm with Red Eagle - I see no indication that Apple shares any data with news publishers. They simply scrape selected feeds like a RSS feed scraper of old and parse, repackage it and present you snippets with the option of reading up more. Isn't this like an assistant going to the library and photo copying articles you might like and making you a daily briefing sheet. The publisher has no way to know you read their works under this model AFAIK.
Comment: @bmike Exactly!
Answer: Publishers get rich analytic just like any other web page you visit. The Apple News app is little more than a glorified RSS reader bundled with an in-app web browser.
In iOS 10, publishers will be able to distinguish Apple News users from other visitors to their website to a greater extent in iOS 9 due to a new User-Agent for Apple News 2.


When the two time series with different length, how could we analysis them with a bivariate GARCH model?

Question: At this moment, i need to do the analysis of rouble/us dollars exchange rate and the stock market index in Russia, I prefer to do that in a multivariate GARCH model. However, I have a question about the data. Currently, I have both data sets but they are not parallel, in other words, I have the stock market index in 30th Dec, 2014, 5th Jan, 2015, .... which is different from the exchange rate 31th Dec, 2014, 1th Jan, 13th, Jan, ..... I am not sure whether i downloaded the wrong data, otherwise, how should I deal with such case, to delete some days from both datasets?
Comment: No, @Kiwiakos, I mean in different market, for example, A and B, one day 1, A is open but B is closed.
Comment: Are you saying that both are sampled weekly but one on Mondays but the other on Wednesdays?
Answer: Usually I do one of the following:

I change granularity of data: download weekly returns instead of daily;
I create "super-laborious days index": I.e. (1) produce dates index consisting of all possible dates except for Sunday's and Saturday's; (2)  on ALL series in dataset interpolate linearly dates, missing vs. super-index (say, on index A I have returns on A1, A2 and A7 dates, A3 were a national holiday; on B I have B1, B3 and B7: B2 were a holiday; 5 and 6 in both series are Sunday and Saturday; I create superindex C, with dates C1, C2, C3, C4 and then interpolate A3 between A2 and A4 and B2 between B1 and B3). I did that when wrote a paper about daily volatility spillovers in 12 countries across the world - many points where dates were unparalleled, as every nation has its own set of holidays.
Comment: Can you add a link to the paper you wrote?
Answer: Where there are missing days in a time series, any time series, I would prefer interpolation by some method to omitting the data when you are interested in a particular granularity.
Interpolating data points can be done by a number of methods depending on how you look at the world and the best fit for your data:

Assume that the previous period's close was the same as the data for
the missing period (a "flat" model)
Linearly interpolate the data, i.e. create a straight line between previous close and next open and set the data points off the line.
Fit a spline or moving average through the data n periods on either side and interpolate off the curve.
fit a more complicated model to the data n periods on either side and interpolate off that model.

realistically I normally choose 2 or 3 as the best payoff to effort as they best explain the "trend" over the closed period and out of hours / auction trading.
Another answer suggests changing the granularity which I think is undesirable if you are interested in interpolating or extrapolating on a daily basis rather than based on a higher granularity as you smooth out the granular characteristics.


If the content is fetched by wget, could there be an issue if I don't know the content-type in the HTTP response?

Question: It's a question about wget.  I have a simple file uuid.html in the document root that contains a single line 54da5638-099d-4cf3-9319-c436fcb81334. I get the line in a shell script with content=$(wget localhost/uuid.html -O -). My server, Apache, automatically assigns the content-type text/html to the outputdocument in the response that is returned to wget. Is it reliable to consider that, in this particular case where the file only contains an uuid string, the content-type in the response header does not affect what is returned by wget and assigned to $content?  I know that Apache would set the content-type to text/plain in the response header if I used the extension .txt for the file. That's not the question. Also, Is it necessary to specify content-type in http response header? is a similar question, but the context is different: they consider that the request is made by a browser. Also, of course, I checked that it works on my server.  The question is whether this is reliable, irrespective of the environment.
Comment: I would have deleted the question had I enough reputation, because  the correct thing to do is to make sure that the file has the correct content-type.  If you don't know the content-type, then to answer the question, one has to consider the behavior of wget on an UUID string, for every content-type. It's not interesting.
Answer: The content-type is used by browsers to figure out how to display the content.  Browsers have to choose the rendering method based on the content type.   Rendering plain text is very different than rendering HTML.
wget performs the same action for all files: it saves them to disk.  In my experience it doesn't pay attention to the Content-Type header, it just saves the file.   Most file systems don't have any mechanism to store meta data about the file other than its filename and permissions. So the content type doesn't even get stored.
The one exception might be Mac OS.  Macs file systems have the ability to store far more meta data about files than that of other file systems reference.  I've never used wget on Mac, but it is possible that the content type gets stored as file metadata there.  That would then effect which program is chosen to open the file using the default action.
Of course, other file systems are usually going to guess based on the file extension which is .html.  Since that is incorrect as well, the systems may behave the same as to which types of applications get chosen to open the saved file.
If you are consuming the uuid with a specific script or application, it probably doesn't matter to you what the OS would choose as the default editor and viewer for the file.  I can't imagine that your use case is going to cause any unforeseen problems on Windows, Mac, or Linux.
Comment: Well, the `-r` option is not used in my case, but if it was used and the string turned out to contain an html link, the content-type `text/html` would make a difference. So, in principle, it's possible that a weird content-type would make wget behave differently,  even without the `-r`option and  an html link.
Comment: I mean, maybe such a weird content-type does not exist, but this depends on wget. I am just saying that what happens with the `-r` option and the content-type `text/html` makes me worry that such weird content-type does exist.
Comment: That is true, wget can scan html for links.   Of course it won't find any in your simple uuid document.
Comment: Yes, I will accept your answer. Otherwise, the question made no sense: why asking, if you doubt the expertise thereafter.  In a context where you cannot fix the content-type, your answer is the best one can have.


Create your Own Design Theme

Question: I like to design my own skin of the website. I created 2 new folders with the
name examplefolder in the directory, the path is:
1) app/design/frontend/default/examplefolder
2) skin/frontend/default/exmaplefolder
In the configs->design->Themes->standart I put my folder (examplefolder).
In the frontend my website should appear only in text. No formattings.
But this not works, there is no ajustment to my modification. I cleard the caches in magento and in the browser.
Has anyone an idea whats wrong ?
Many thanks for reply
Thanks but it still does not work. I can adjust the config as you mentioned. But all of my changes I try to do in the folder comicworld (see picture) has no affect to the fronted. I try to change again the current Package Name to comicworld but the following mistake message appeared: magento theme package with this name does not exist and cannot be set.
Thanks for further assistance
Answer: <code>Go to System > Configuration > Design > Pacage and System > Configuration > Design > Pacage
</code>
Comment: up vote
0
down vote
accept
Thanks but it still does not work. I can adjust the config as you mentioned. But all of my changes I try to do in the folder comicworld (see picture) has no affect to the fronted. I try to change again the current Package Name to comicworld but the following mistake message appeared: magento theme package with this name does not exist and cannot be set.

Thanks for further assistance

Create your Own Design Theme


Reflective surface

Question: Have you encountered the problem of reflective surfaces for realsense camera (d435 or t265) and lidar (A1 or A2). I would like to know what are the ways to solve problems with reflective surfaces for them programmatically, without using other sensors such as sonars. Perhaps there are any solutions at OpenCV. I would be very glad to hear people who tried to solve a similar problem. Thank you for attention
Answer: Reducing reflection on an image is hard, really hard, because you only have the pixels, and they are most likely white.
So changing the environment to get good images is the desired solution.
Robotiq wrote a nice article about it:
https://blog.robotiq.com/10-solutions-to-improve-robot-vision-with-shiny-objects
You can however detect reflection using OpenCV, and then decide what to do, for example:

fill the reflection with the average color of the pixels around
Ignore the reflection area.

If your reflection is not covering everything you might want to look into deep learning instead of openCV, i found it much easier to cover all cases using a good model, than to create filters in openCV that covered every scenario.
note that I don't have any experience related to reflection regarding the realsense or Lidar.
Answer: I had the same difficulty about 10 years ago and ended up using lacquer spray to get rid of reflectivity. This is impossible to solve edge case unless you somehow introduce semantic scene understanding and make a special routine to handle it.

Reflective surface


Android Time span picker

Question: I am designing an app that requires the user to pick

a time (e.g. 3 PM)
an additional value, representing a time gap (in minutes) before and after the selected time.

For example if the user has selected  15 PM  and 15   the app will consider times 2:45 PM  to 3:15 PM.
The trivial solution of a time selector combined with a list box, produces a long list with too many possible options for the time gap.
Another attempt was implementing it as a slider over 24  vertical lines  where the width of the slider is proportional to the time gap.  This approach was too difficult to operate on a small screen.
What is the best way to implement such a component?
Answer: Unless you are building a scientific app, people tend to set time in 5-minute increments. Then the picker may look like this:

Android Time span picker


Bluetooth keyboard won't re-pair to my Galaxy Note 10.1

Question: I bought a Bluetooth keyboard and it worked beautifully for 2 days. I then unpaired it to use on my friend's tablet and it worked amazingly well on hers as well. When I went to re-pair the keyboard to my Note 10.1 it shows up in the Bluetooth devices list, but the box to type in the code will not come up and there is no settings cog next to the name like there should be. So the keyboard has become useless as I can not for the life of me find a way to re-pair and connect it to my tablet. I am running android 4.1.2. Please help as I need this to work for school. I purchased this to take notes in class.
Comment: Thank you so much. I feel so so stupid I tried everything from bluetooth apps, turning bluetoooth on and off, holding the name of the keyboard to see if I could get a box to pop up even scanned it for virus. In doing all that I never thought to restart the tablet lol. I can build and program computers, but can't think of restart tablet lol. Anyway thank you again.
Comment: @John Well done! Now please add that as an answer, so other users can see the problem is solved.
Comment: Have you tried disabling your bluetooth radar and then trying to reconnect? Reboot your device if that doesn't work.
Answer: This behavior is typical of some sort of internal error, you could try restating your bluetooth service. If this doesn't work a quick reboot is likely to solve your problem.
Answer: The Samsung Rep at my local Best Buy figured this out.
1- goto Settings/Applications/Applications Manager
2- select BLE Scanner, then click on CLEAR DATA
3- select Bluetooth Pair, then click on CLEAR DATA
4- restart the tablet


A question about the security on Tor (Android)

Question: Say you want to post on an imageboard anonymously. Well, I did that and while it worked, however it says "required permissions not granted, reverting to the system file picker" when I browsed my photos on there. What does this mean? Does it mean that people (such as the website owner) gain access to my camera roll that way? Also, are there any exploits on Tor that target this?
Answer: That is nothing to worry about. That message appears if you try to upload a file but the browser does not have permission to access the camera or microphone. Instead it will only allow you to upload existing files through the default file picker. The website owner does not get access to your camera roll.
For more details see: https://bugzilla.mozilla.org/show_bug.cgi?id=1538270
Answer: It's an old Tor Browser "bug". You don't need a browser - yes, it's better than nothing, but it's not a solution. Use a VM - Virtualbox, Xen, KVM or QubesOS - and a normal browser properly incapsulated


Can I create triggers in the database?

Question: We are trying to setup CiviCRM in Wordpress.
Our Database is on GoDaddy, but we are running into a problem:
"Could not create a database trigger."
The Database Settings appear to be correct.
Any thoughts on how to fix this error?
Thanks!
Comment: Please edit your question with what versions of Wordpress and CiviCRM you're using. No need to mention what host you are on. When you created the database to be used for CiviCRM, you need to make sure your database user has the permission for database triggers.
Comment: It does help to mention the host, b/c the host (in this case GoDaddy) will not let you have the perms you need to create triggers. I found that problem w/a couple of other hosts. GD is one that won't let you create triggers, if you're using shared hosting there.
Answer: If the Setup Screen tells you that the database settings are correct, it means you can login into the database with the username and password that you entered. However, it does not guarantee that the MySQL database user has enough privileges to perform all necessary database actions.
CiviCRM needs trigger support and in the System Administrator Guide at https://docs.civicrm.org/sysadmin/en/latest/requirements/#mysql-permissions is described what this entails.
If you are not able to grant the correct privileges in the control panel of your internet service provider, you have to contact their service desk.
Answer: This occurred to me too, my website was hosted with godaddy, i contacted them and they refused to allow 'Triggers' privileges on database while website is hosted with GoDaddy shared hosting plan. So i had to shift to iPage which allows the required privilege.
Hope this helps.
Answer: You might not be able to create triggers and stored procedures in shared hosting and might need to move to a cloud. I remember having these issues on godaddy too and moved to Ubuntu cloud. Call them and check. As I recall as a DBA you cannot create these without the super user privilege which isn't possible in shared environments
Answer: Usually cheap hosting costs you more in the longer run. There are some civi-specific hosting providers (CiviHosting springs to mind) & using one of them will make you less sad

Can I create triggers in the database?


Journey Builder Event vs Trigger

Question: What is the difference between and Event and a Trigger in Journey Builder?
Answer: A Trigger is a set of conditions that cause an interaction to run.
An event is a user- or administrator-initiated action that an administrator defines that must be met before an interaction is created.
Triggers listen for events, and once that event occurs, can initiate an interaction defined within Journey Builder.
Comment: A Journey Builder Trigger is comprised of an event and a filter.  The event is the Automation or Event API call that will initiate an Interaction.  The filter uses the Contact data attributes to determine whether or not a contact will enter that Interaction.
Comment: But following the Journey Builder for Apps book, it creates a Trigger and then that trigger gets called via REST and the Interaction runs. There is no Event created. Or am I missing something? I'm still confused on how these are related.
Comment: Maybe Kelly or Tim can jump in here, but my understanding is that while events can be created, they don't necessarily have to be. In the Journey Builder for Apps book, the event would be the user installing the app, and giving their email address.

Journey Builder Event vs Trigger


How to enable vim addon packages?

Question: I have installed vim-nox as well as vim-latexsuite and vim-outliner on Ubuntu 12.10. There's nothing wrong with Vim but neither of the add-on packages does anything. What do I have to do to in order to enable them?
Answer: Vim add-ons are not enabled for all users by default. To use an add-on, use vim-addons:
$ vim-addon-manager
# Name                     User Status  System Status
editexisting                removed       removed
justify                     removed       removed
latex-suite                 removed       removed
matchit                     removed       removed
vimoutliner                 removed       removed

$ vim-addons install latex-suite
$ vim-addons install vimoutliner

Answer: I have tested various plugin managers for vim, and find pathogen the best of them all. I first tried vundle which was recommended on this site (https://stackoverflow.com/questions/2458398/packageplugin-management-for-vim), but found it too complex.
What I wanted was a way to keep each plugin in it's own directory. Pathogen does just that: every plugin in ~/.vim/bundle is activated automatically.
pathogen is really very simple:

you install the pathogen plugin
add call pathogen#infect() to .vimrc
when you want to try a package, you install it into a directory in .vim/bundle/... Pathogen will activate it automatically.
to get rid of a package, you just remove it from .vim/bundle. I have a directory .vim/bundle.off where I move unused packages which I might use sometime later.

How to enable vim addon packages?


Has a play-in team ever won the NCAA Men's Basketball Championship?

Question: Has a play-in team (a team that entered the tournament bracket through the preliminary "First Four" tournament games) ever won the NCAA Men's Basketball Championship?  If not, what are the lowest seeded teams to win?
Comment: Not sure how this is unclear. Could this be found rather easily? Sure. But it clearly asks if a [play-in team](http://sports.stackexchange.com/q/2407) has ever won a championship, and if not, what is the lowest seed to do so (as play-in teams are generally double-digit seeded).
Comment: Good point, sorry, it was a quick edit with a bad explanation.  My motivation in adding the additional question point was to entice a better answer than a yes/no question.  But you're right, I probably could've done more to help this question be understood by those that don't know college basketball as well.  I was surprised there were no details on the seeding topic already, and it would seem a good place to put together a deepest-performance-by-seed breakdown such that it would cover other possible potential questions in the same vein.
Comment: @JeopardyTempest Noted. Although I'm on board with your motivation, we should be careful in editing questions to the point where it becomes almost unrecognizable to the original. A nudge in that direction is more appropriate, so that the OP knows what a [good question](http://meta.sports.stackexchange.com/a/613) looks like on Sports SE. That said, I just didn't understand why there were unclear votes on a question that was pretty straightfoward in its original form (though it was barebones), and your edit didn't necessarily help with the "stigma" associated with this question.
Comment: This [edit](https://sports.stackexchange.com/revisions/15566/2) added  on to the original question asked, but I wouldn't say it improved or diminished understanding. Improving understanding would have included defining what a play-in team is.
Answer:
Has a play-in team ever won the NCAA Men's Basketball Championship?

No.

If not, what [is] the lowest seeded [team] to win?

Villanova is credited as being the lowest-seed to win the NCAA Men's Basketball Championship as an 8 seed in 1985(1).
Answer: The NCAA tournament expanded to include the play-in teams starting in 2011. Since 2011 tournament the lowest seed to win it all has been a 7 seed (UCONN). To answer the first part of your question, no play-in team has even made it to the championship let alone won it.

To answer your second part, "Three 11 seeds have made it to the round of four--LSU in 1986, George Mason in 2006 and VCU in 2011. Throughout the history of the tournament, just 14 teams seeded seventh or worse have made it to the Final Four. The lowest seed to win the tournament and national title was the No. 8 seeded Villanova in 1985" Source:LINK HERE


Want to build data driven framework with selenium webdriver

Question: I have knowledge of selenium and want to implement data driven framework.
So, I need basic knowledge for this at a starting level so that I can proceed in my organization
Comment: What language are you using? Can you expand more on what exactly you are looking and where you are having problems?
Comment: I am writing in java and I am working in an ERP solution. I am able to write the scripts to automate the individual pages and but I have no idea how to manage all the individual scripts if I write many.
So, I need help in designing a framework to manage them all
Comment: I think this is too broad a question to really answer easily as it stands - SQA is a better fit for specific questions about the problems you've been running into.
Answer: Don't start with designing framework: YAGNI principle applies. Start coding. Implement tests, refactor common parts - and framework will emerge. Difference is, this framework will have only features you need.
By definition, if you have to ask how to design a testing framework (don't already have skills to do it right), you should not try to foresee what you may need - because you cannot do it right.
Become a skilled programmer, and after trying for a while, you will see what works for your situation. Also, read code of other more skilled coders. Join some relevant open source projects.
Comment: That's a good point you are saying.  I am able to write the scripts to automate the individual pages and but I have no idea how to manage all the individual scripts if I write many. Any suggestions ?
Answer: I would tend to disagree with the comment of not designing and just coding.  As with any testing you should aim to plan and find issues in requirements Before writing code.  Its harder to change things later!
I am quite a fan of Page Object Model (POM) as an approach
http://seleniumeasy.com/selenium-tutorials/page-object-model-framework-introduction
http://www.toolsqa.com/selenium-webdriver/page-object-model/
This approach keeps your tests, data and page elements separate from one another. For me, this makes the tests easy write, and just as importantly, to maintain.
For example if a test fails following this model its unlikely the test conditions have changed after it initially passed.  That means the test code will probably not need changing.
Has the element moved? Update the element location
Has the data changed? Update the data
Following concepts like "one test, one assert" will also mean your errors will likely tell you exactly what needs updating to fix your tests.  Or better yet, what to raise a bug about ;)
Comment: Can you elaborate on how page objects make the test more data-driven?
Comment: In of itself no model Makes tests data-driven.  It only offers methods of managing the data.  What I suggest is the separation of elements and test data from the tests themselves.  This will make things easier to scale (among other things)
Comment: I thought i may be useful to you (and others) to create a webdriver base project on GitHub,  feel free to use it as a base for your project https://github.com/ECiurleo/webdriverBase


How to configure Truffle to use the Ganache GUI instead of ganache-cli (TestRPC)?

Question: I'm using Truffle v4.0.1 (core: 4.0.1) with the default configuration (ganache-cli aka TestRPC) on Ubuntu and it works fine, but I'd like to use the Ganache GUI.  However, I can't find any instructions on how to configure them to work together.  The Truffle documentation has a nice page explaining what it is and how it install and configure it, but not how to configure Truffle to take advantage of it. Thanks!
Comment: always feel free to make a PR to the official docs instead of just posting a self answered question here.  thanks!
Comment: nice.
can we bind ganache server to public ip of my instance, to access it from anywhere.
Answer: You'll need to add a development section to the networks section in your project's truffle.js:
module.exports = {
  networks: {
    development: {
      host: "localhost",
      port: 7545,
      network_id: "5777"
    }
  }
};

Make sure you get the port and network ID correct. Those are the defaults, so if you change them in Ganache you will need to change them here as well.
To use this specified network, after building the contract files, you'd use the command
truffle migrate --network development

Comment: I tried doing this and failed.  Maybe there is bitrot.  I found that editing truffle.js made no difference, and I had to edit the client js in the truffle library to get it to use the right port.
Comment: my transactions are failing though. Calling a setter is throws Error: connection not open
Answer: Download ganache from https://truffleframework.com/ganache/
Open Terminal from your ganache file directory. Type the following and enter.

chmod a+x ganacheVersion.AppImage


Do I need a round trip ticket when entering the US as F1 for short term training?

Question: I will be taking English classes in the US as F1 student (ESL program). The program is 3 months long and I plan to stay in the US for at least 4 months. Is entering the US on F1 with a one way ticket enough?
Is it recommended to also book the return ticket and possibly show it to the immigration officer?
Comment: Check prices of the one way and the return tickets, as often one way tickets are not cheaper.
Answer: There's no statutory requirement for a round-trip ticket (there is such a requirement for most visa waiver program visitors, but not for people traveling with visas).
The officer may decide to investigate how you plan to leave the country, though.  If you have more than enough money in the bank to buy a one-way ticket out, that should be satisfactory in the absence of a ticket, but you may have to prove that.  In practice, I don't think they check people's tickets or financial situations that closely in most cases, but it may vary depending on nationality, age, and/or other factors.


Is there any clarification from togashi with his new worktime since 2016?

Question: Based on this website there is a continously chapter per years for about 10 chapter for every year that mean 1 tankoubon per years. Since when he decide to work only 10 chapter per years ? Is there any clarification from Togashi or Shueisha ?
Answer: The autor is suffering from prolonged back pains and hasn't been able to recover.
While the exact reason isn't always stated, Togashi's chronic illness is a well known issue and mostly assumed to be the reason for pretty much all the hiatuses.


How long should Windows 10 pins be?

Question: Pins in other contexts seem to usually be only four or six characters long, but this seems to be vulnerable to brute force attacks. However, I am not very knowledgeable about this, so there may very well be a method to prevent this. Is there?
Answer: The R2B2 can guess a 4 digit pin (10,000 combinations) in about 20 hours, not taking into account the delay for entering a phrase after every 4 failed tries. When using a 6 digit pin (1,000,000 combinations) this will rise with a factor of +/- 100, making it about 2000 hours (about 83 days). A 8 digit pin (100,000,000 combinations) would again raise this even higher.
The question is, when using a 6 or 8 digit pin (the 4 digit is way to low imo), why not use a password? What is the added value of a pin when you could also use a 6 or 8 digit numerical password, besides having the intruder know he only has to try numerical values?
Comment: AFAIK the PIN feature is there to provide great usability (in trade of to lower security) for touch devices (phones/tablets). > In a world with increasingly strict password requirements—with
> numbers, symbols, and capitalization—it can take upwards of 30 seconds
> to enter a long, complex password on a touch keyboard. We have a
> strong belief that your experience with Windows 8 should be both fast
> and fluid, and that starts when you sign in. [Source](http://blogs.msdn.com/b/b8/archive/2011/12/16/signing-in-with-a-picture-password.aspx/)
Comment: Windows 10 said that pins were more secure than passwords, I think because pins cannot be used to access a computer from other devices or something.
Comment: @danielAzuelos What Microsoft is basically saying is that when/if an attacker cracks your pin, they can't use that to log in to your Microsoft Account, and thus, all of your Windows 10 pc's with that account. So yeah, it's not really more 'secure' at all.
Comment: → Kyth'Py1k: I can't see (trust?) the real math behind this commercial Windows speech.
Comment: @DavidZech that's awkwardly phrased; am I correctly reading it as saying that a compromised pin exposes all data on a single device; but not anything protected by an MS account and stored elsewhere (as would be the case if the attacker logged in by compromising the associated MS account password)?  Or is everything in the MS cloud also exposed, but local files on other computers using the MS account still supposed to be safe?
Answer: First of all, Microsoft Windows allows you now to use PINs of any length. Secondly:

Microsoft has taken a new approach to thwarting brute force attacks
  with a challenge phrase. Essentially when a the PIN gets entered
  incorrectly four times in a row, users are sent to a different screen
  where they are required to enter a specific phrase. This 'challenge
  phrase' slows potentially malicious brute force entry and doesn't
  freeze the device. While similar to a captcha method, the challenge
  phrase also prevents automated machines from entering popular PINs
  over and over.

Source.
Comment: After viewing @BadSkillz video, I found this solution to be very nice. Then I read the sequel of your linked article: "*Currently there is a single challenge phrase of A1B2C3*". Well, it's like a captcha with a single well-known answer. Why I am not so surprised? Aaah, Windows, how brilliant ideas can be ruined for I-don't-know-what-reason :( ...
Comment: @WhiteWinterWolf I totally agree :)
Answer: Windows logic behind using a PIN is it's easier to remember a PIN (numbers), so you won't have to write it down.
While this is correct, it doesn't make it more secure.
Just like with passwords (password, qwerty) the average user gets lazy. My guess is that most people will use PIN numbers that are 4 digits, and something familiar. DOB, bank card pin, family DOB, or simple patterns, 1234, 0000, 8008, 2580.
Windows has implemented some brute force protection, which helps prevent or at least slows down automated brute force attempts.
However, with my guess above, it will make manual brute force attacks by family members or non technical users with some information on the user much easier.
My advice

Use PINs longer than 4 numbers
Make it unique, no birthdays, funny body parts, keyboard patterns
Remember it, don't write it down
Disregard everything above and use a password

And to answer the title, a random number of digits thats easy to remember in your head, but also isn't 4.
The reason I say not 4 is that is the default number people think of with PIN numbers, and the reason I say a random number is for a little more obscurity.
e.g.: If you told someone your password is 20 characters long, they would attempt to brute force 20 characters. If you didn't, they would have to attempt 1-20.
Obviously the more digits you use, the harder it will be to guess/force, but there's also the debate over usability vs security.
Answer: The delay that Windows 10 adds for guessing PINs is an important factor. For Windows 10 desktop v1903, it seems to be that you can guess four PINs incorrectly, wait some period of time (starting from 0 seconds, then 30 seconds the second round, then 1 minute, then 2 minutes, apparently doubling each time), then have to type in the challenge phrase A1B2C3, then you can guess again, and then you'll have to restart the device to try again. (Note that it does have to be a cold reboot; if you try take advantage of fast startup by shutting down and booting, it'll still say you have to restart to try again.)
Say we can type in five PINs and type in the challenge phrase in 5 seconds, and rebooting takes 25 seconds (although it actually takes about 45 seconds for my Surface Pro 6). If the maximum lockout time is 99,999 minutes (although the link appears to be about passphrases, not PINs), we can guess 5n PINs in
if n ≤ 16: (0.5 + ∑₁ⁿ (0.5 + 0.5 × 2ⁱ) minutes.
else: (0.5 + ∑₁¹⁶ (0.5 + 0.5 × 2ⁱ) + (n - 16)(0.5 + 99,999)) minutes.
For a four-digit purely numerical PIN, we'd have to guess 5,000 PINs on average (10,000 total possible combinations), or n = 1,000, which is about 187.2 years.
If the maximum lockout time were instead 30 minutes (I haven't tested this enough to know what it really is), we can guess 5n PINs in
if n ≤ 4: (0.5 + ∑₁ⁿ (0.5 + 0.5 × 2ⁱ) minutes.
else: (0.5 + ∑₁⁴ (0.5 + 0.5 × 2ⁱ) + (n - 4)(0.5 + 30)) minutes.
For n = 1,000, this would be just over 21 days. Not terrible.
For a 6-digit numeric PIN (n = 100,000), this would be 5.8 years. For a 4-character alphanumeric PIN, not including capital letters (n = 167,961.6), this would be 9.74 years.
However, this is all assuming that no one (e.g., you) ever enters the correct PIN during the time period, which would reset the lockout period. If they're sneakily repeatedly trying PINs while you're not there, they could crack it in a somewhat shorter amount of time.

How long should Windows 10 pins be?


Why would the specific heat capacity of water be used as the specific heat capacity of zinc sulfate?

Question: I could not find the specific heat capacity of zinc sulfate and saw that people use water's heat capacity instead. Why is that?
Answer: If the substance is dissolved in water, it's very typical (and more correct) to use the heat capacity of water in lieu of the pure salt, acid, base, etc.
The reason is simply that, when in solution with water, there is much more water than the solute. It's an approximation, but a decent one. This is common practice in freshman-chemistry lab courses which I've taught.
It's difficult to find heat capacities for pure salts such as zinc sulfate because the means by which we measure it is typically through a reaction, and typically a salt is dissolved in solvent (e.g. water) in order to perform a reaction. That is to say, reactions of solids are just less common than liquids, gases, and solutions.
That said, the NIST database reports a $c_{p}$ for zinc sulfate of 99.01 Jmol$^{-1}$K$^{-1}$ at 298 K.
Looking at the original paper, I found this plot of $c_p$ as a function of temperature. At room temperature, you can see it is roughly 100 Jmol$^{-1}$K$^{-1}$.
Stuff like this can be easily obtained from citrination.com search engine.


Uploading PDF files from the front-end

Question: I am working on a Wordpress site that has a custom front-end form for submitting posts. I need to add a field in the form to allow users upload a single PDF file along with the post. How can I achieve this?
Answer: I have done a simple function for that, but i allow all types of media. So this could be a start:
function insert_attachment( $file_handler, $post_id, $settpdf='false' ) {

  // check to make sure its a successful upload
  if ( $_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK ) __return_false();

  require_once( ABSPATH . 'wp-admin' . '/includes/image.php' );
  require_once( ABSPATH . 'wp-admin' . '/includes/file.php' );
  require_once( ABSPATH . 'wp-admin' . '/includes/media.php' );

  $attach_id = media_handle_upload( $file_handler, $post_id );

  if ( $settpdf ) update_post_meta( $post_id,'_pdf_id', $attach_id );

  return $attach_id;
}

and then a input like: <input type="file" name="uploaded_pdf">
You can retrive the meta like this:
$pdf = get_post_meta($post->ID, '_pdf_id', true);
echo '<?php __('Download PDF','mytheme'); ?>';

Comment: Thanks a lot guys, I'll try it out.
One more thing please, how can I display this particular attachment as a link for download when people are viewing the post?
Can I set it to be stored in a custom field? That way I can retrieve it using get_post_meta.

Thanks again.
Comment: See updated answer.
Comment: Thanks Pontus. You guys are the best.
It's really amazing that I could get so much assistance. I really appreciate it.
Will let you know if the code works well for me.
Comment: Hi @Pontus, at the risk of sounding greedy, can you please take a look at this other question of mine?: [WordPress search via metadata](http://stackoverflow.com/questions/10774547/wordpress-search-via-metadata/)
The initial code seems to be baffling everyone so I would like to implement the search form using wp_query as suggested by one of the commenters. What is your opinion?

Any pointers or code sample would really be appreciated because I'm not so good at tweaking WP.

Uploading PDF files from the front-end