Extract X11 configuration information from running instance

Question: Since I had a hard disk die on me, I figured I could easily try some other OS (I usually run Ubuntu).  Turns out that Ubuntu flawlessly recognizes my video card and monitor (X11 works right out of the box), and none of the other systems I tried gets anything working (I tried CentOS and FreeBSD).  In my now working version of Ubuntu I cannot find a configuration file with information I could try to use with one of the other versions, which makes me guess that it just detects the hardware every time.  Can I extract its choice for drivers and configuration options somehow (so I can try these same options in the other systems)?
Comment: @Giles thanks for the tag correction.  Took me looking at wikipedia to realise that X11 is the protocal, and Xorg is the implementation that indeed I am running.
Answer: Xorg -configure (run as root from a text console) produces a configuration file that should be equivalent to what Xorg autodetects.
But that may not be enough, because it's likely that the reason your video card works in Ubuntu is that it has more recent drivers, or installs proprietary drivers that the other OSes don't install. Look in /var/log/Xorg.0.log for startup messages (that's the Ubuntu location, it may be different on other OSes), and see where they differ.
Comment: It fails with `Server is already active` if it's already running.
Comment: @dhill you can only run this in a text console (eg. TTY1) without having Xorg enabled. So you first need to stop/kill Xorg session. For example `sudo systemctl stop lightdm`, then run that command: `sudo Xorg -configure`. A new file should be present in the `/root` folder.


What does it mean to "subscribe" to an IMAP folder?

Question: I'm using Thunderbird with Gmail IMAP and there's this "Subscribe" option for folders. What does that mean?
Comment: This is now a somewhat dated question and Thunderbird has changed a bit since it was asked. To get more up-to-date information see [Thunderbird and Gmail](https://support.mozillamessaging.com/en-US/kb/thunderbird-and-gmail?s=subscribe&as=s). Modern versions of Thunderbird handle gmail as a special case because its unique implementation of IMAP. For information on how Thunderbird handles standard IMAP email, see Mozilla's support page about [IMAP Synchronization](https://support.mozillamessaging.com/en-US/kb/imap-synchronization#w_synchronization).
Answer: This is due of the peculiarities of the IMAP protocol. Strangely enough, the authors of that protocol not only thought about email when they dreamed it up, they also thought about usenet and newsgroups. The newsgroups of the usenet form a large hierarchy with thousands and thousands of groups. The original aim of IMAP was to support having the complete hierarchy available through your IMAP account. Of course, you wouldn't want all those groups to show up in your mail client, thus the concept of folder subscriptions was added to the protocol.
If I remember correctly, Thunderbird also has an option to simply show you all your available folders without going through the motions of subscribing to single folders. It has nothing to do with offline use or synchronization.
If you want to know more about the IMAP protocol, check out the corresponding Wikipedia article. You can also try to read the corresponding RFC which makes up the protocol and which is full of examples concerning usenet newsgroups (and has only a few examples that relate directly to email).
Answer: There are already a couple of very good answers to this question (which I've upvoted) but I thought I'd complement them with an answer detailing the relevant commands specified by the IMAP protocol, RFC 3501.
Subscribing to folders
In IMAP, subscriptions are used as a way of marking which folders should be displayed by IMAP clients. Some system folders may provide functionality but not contain emails that are of interest to the user, e.g., an Exchange server contains folders such as Contacts, Journal, Sync Issues).
Two IMAP commands are used for listing IMAP folders:

the LIST command lists all folders.
the LSUB command lists only subscribed folders.

The output of the LSUB command is affected by 2 commands:

SUBSCRIBE adds folders to the list displayed by the LSUB command.
UNSUBSCRIBE removes folders from the list displayed by the LSUB command.

See What is the use of Subscribe and Unsubscribe commands in IMAP4? for examples of the effects of the subscription commands.
Note also that folders are marked as subscribed on the IMAP server so that all clients see the same list of folders. See Is IMAP (un)subscribe meant to work across mail clients?.
Answer: The folders you subscribe to are the ones displayed by Thunderbird.  It subscribes every folder it finds when you first setup the account and any folder you add through Thunderbird is automatically subscribed as well.  I guess that option is there so if you were to add a folder through another application or a webmail-ish app and you wanted that new folder to be displayed as well you can just turn it on.
Maybe this link will clarify things.  Here's a quote:

Your IMAP email client (eg
  Thunderbird) will display the folders
  in your account to which you are
  "subscribed".
Generally, this will be all of the
  folders in your account, and only the
  folders in your account. However, in
  some situations you may find that
  there are folders in your account that
  do not appear in Thunderbird, or
  folders that appear in Thunderbird
  that are not in your account. This can
  be fixed by subscribing to (or
  unsubscribing from) the offending
  folders.
Comment: I edited to clarify.  If you were to login to your IMAP account through a web portal and create a folder then Thunderbird would not even display it until you subscribed to it.
Comment: Don't forget that you may also want to turn subscriptions *off* - one of the benefits of IMAP is that state is (in theory) maintained on the server so you might not, on a mobile device or on a laptop (particularly a netbook) want to subscribe to folders that potentially have a high volume of traffic
Comment: How is this different from going to `File->Offline->Offline Settings->Select folders for offline use`? This doesn't seem to be the same as subscribing (at least as suggested by the UI), so I guess it must have a different meaning.
Comment: To clarify, as I can witness in my Maildir on the IMAP server itself, the subscription list is stored on the server, not on the client.
This is also confirmed by an other answer here, which explains this is handled by the IMAP protocol itself.
So, I don't see why a web client wouldn't respect the IMAP protocol, unless it's messing around with your Maildir directly (BAD) !
Answer: I believe that it allows you to subscribe to a folder on the server, there by syncing the contents of whats on the server with what's in the Thunderbird client.
Answer: 2017-01-26: Thunderbird 45.5.1: The previous answer, about starting at File, was the key for me.
From a particular account:
    File | Subscribe
results in a list of folders, then:
    Gmail
then from a list of folders: check or uncheck the folders desired or not desired.
In my case, it was eliminating Important and All.


How to use a Web proxy?

Question: I've a PC with a LAN connection that is connected to the internet. My system is added to a Domain. Now I've created an ad-hoc wifi connection and my mobile devices can access the HTTP server in my system.I do that using the IP address of the ad-hoc connection.
Now I want these mobile devices to access Internet through my PC. Can I use any proxy servers to do this? I cannot share the internet connection since I'm in a Domain.
Can you please let me know if a proxy server will be able to help the mobile devices to access the Internet in my PC?
Answer: You could configure an instance of the Squid proxy service. Squid is usually used for Linux machines, but their site does have some windows binaries you can use, so that should work fine. Squid's just the one I've used the most.
Privoxy is another you could check out.
Google searching around should reveal various additional options.
Still, it sounds like you should be able to configure your main machine to share it's Internet connection, but whatever - proxy servers can be something of a solution too.
Comment: Thanks. I could not download the above application (since it is blocked here). I downloaded Charles Proxy and was able to setup the proxy
Comment: Squid or Privoxy are blocked for you? Wow, police state. Sorry to hear that friend. Anyway, glad you were able to find some fit.

How to use a Web proxy?


Experimental research work on a similar experimental setup patented by someone else

Question: For my PhD thesis, I have conceptualised an experimental setup which is similar to an already existing patented design. Can I do research work on that setup (conceptualised by me) by simply citing that patent ? Are there other things to keep in mind ?
Comment: _Are there other things to keep in mind ?_ -- Yes, you need to determine what is the expected outcome of the research, given that a key aspect of it has already been patented, and is the expected outcome enough of a justification to commit to doing the research in the first place. Have you discussed this with your advisor?
Comment: Everything you can imagine is patented nowadays, especially plausible research ideas. Just cite it. Make a big deal of your system's differences if you are worried. If you don't make gobs of money from it, they have no reason to come after you; patent suits in the US cost $1M to pursue.
Answer: You should probably consult an IP lawyer. Your institution probably has someone who can help with this. Depending on what you are doing you may be using the patent idea or not (ie violating). You might be able to get a license from the patent holder. Lots of possibilities here.
In one scenario, the patent owner may be interested in your work.
But there is too little stated in your question and too much implied to be able to give nay definite answer.
Answer: I think not all patents have the same rules. Sometimes only commercial use is forbidden, research use may be ok. Some patent holders are reasonable and will give you explicit permission to use it if you ask nicely. Others refuse. It doesn't hurt to ask, though.
If your design is only similar, but not exactly the same, it may not even be covered by the patent. You should look carefully at exactly what the patent is for. Or better yet, ask a patent lawyer to look at it (your institution probably has one).
In practice, patent enforcement usually happens when the patent holder finds out, and then sues you for causing them to lose income they "deserve" by virtue of holding the patent. Since you will probably obtain little income from the patent, the case will not be very strong even if they do decide to sue. But more importantly, the journal where you expect to publish may have stricter rules on patents than your local regulators, so I would check their policies as well.
Answer: On top of others excellent answers, just to add that please check if the patent is already expired. There is a status stated in the patent information (18-20 years from the approval time). If it is already expired, then I guess there is no concern on the legal side.


Magento 2 : Css and Javascript not loading

Question: I have a big problem with magento, my css and javascript are not loading, I already did:
Content deploy;
Deleted the static folder but kept the .htacess;
but nothing seems to work.
Comment: could you tell, which OS are you using and is magento installed on local or on server
Comment: what does the console error show?
Comment: Permissions -- Be sure that you have the proper user/group and permissions for the folders to generate and serve the content.
Answer: Navigate to your pub folder in {docroot}/pub/static/frontend/{vendor_name}/{theme_name}/{language}/ and see what's there. If you have all the files you expect to see, that means you have an issue with the permissions on the newly deployed files. Odd are good that you need to either open up those permissions or you ran the deploy as the wrong user and now the server can read from them. There is no way to know what you need these settings to be from here, as we don't know your server configs, so it might be worth updating your question with these settings and see what they might need to change to for a fix.
If the files aren't there or look incomplete you need to deploy the files again with:
php bin/magento setup:static-content:deploy

You say you ran the deploy but then depleted the static folder. You have the order there backwards, you remove the old files and then deploy, but that might just be a typo. Just saying it here to make sure.
Answer: Do you have minification or bundling turned on?
What mode do you have Magento, is it Developer / Production?
Are you getting a 404 for each JS/CSS file?
Do you have the correct .htacces file present in your /pub/static folder? It should be this one https://raw.githubusercontent.com/magento/magento2/2.2-develop/pub/static/.htaccess
Have you tried running static-content:deploy for your store/themes language, for instance
php bin/magento setup:static-content:deploy en_GB

Clear all mage-* cache and fpc-* full page cache files


Can Stock Brokers trade against you when they are holding two orders on opposite sides of the market?

Question: Imagine that the XYX (not a real name) stock has a bid of 50.05 and an ask of 50.12. A discount broker currently has two orders. One is a limit buy at 50.11 and the other is a limit sell at 50.06. Can the broker buy the stock from the first client at 50.06 (using the broker's money ) and then immediately resell it to the other client for 50.11?
Answer: No. A Stock Broker is not trading anything - all he is is forwarding orders to the exchange. If he does not do that he is actually committing fraud - at least because he invoices you the fee the exchange calls for it (unless you are having one of those "free" trading accounts).
Trading stocks is regulated in pretty much every jurisdiction and unless you talk of some really low end OTC stocks these days where the broker may work together with a dealer / market maker, no - he simply is not trading to start with. Brokers are basically (especially these days) glorified call center agents or (as organizations) order forwarding systems. At least unless you are really rich.
Comment: The question asks whether they *can* trade, not whether stock brokers generally *are*. They can submit the sell, then submit their own buy order at 50.06, and putting aside other market activity, they would get stock, at which point they can submit the buy, then submit their own sell.
Comment: Ah, and he can not. Trading is very limited. He CAN NOT - what he CAN is set of a counter order, but whether this one executes against this particular client or not is not something the broker has influence over.
Answer: This would be frontrunning. Stock brokers generally have a fiduciary duty to their clients, and front running someone you have a fiduciary duty towards is illegal.

Front running, also known as tailgating, is the prohibited practice of entering into an equity (stock) trade, option, futures contract, derivative, or security-based swap to capitalize on advance, nonpublic knowledge of a large ("block") pending transaction that will influence the price of the underlying security.[1] In essence, it means the practice of engaging in a Personal Securities Transaction in advance of a transaction in the same security for a client's account.[2] Front running is considered a form of market manipulation in many markets.[3]
Comment: The buyer and the seller  are getting filled at prices that are better than the current bid/ask quote, aka inside the spread.  How is that front running? The broker isn't trading in advance of a large customer order nor is he capitalizing on **nonpublic knowledge of a large ("block") pending transaction that will influence the price of the underlying security.
Comment: STEP 1: (in the US) Always ask your broker if they are a fiduciary.
Answer: The SEC defines Internalization as:

When you place an order to buy or sell a stock, your broker has choices on where to execute your order. Instead of routing your order to a market or market-makers for execution, your broker may fill the order from the firm's own inventory. This is called "internalization."  In this way, your broker's firm may make money on the "spread" – which is the difference between the purchase price and the sale price.

Linked to the above page is another page which explains Your Broker Has Options for Executing Your Trade:

Just as you have a choice of brokers, your broker generally has a choice of markets to execute your trade:

For a stock that is listed on an exchange, such as the New York Stock Exchange (NYSE), your broker may direct the order to that exchange, to another exchange (such as a regional exchange), or to a firm called a "third market maker." A "third market maker" is a firm that stands ready to buy or sell a stock listed on an exchange at publicly quoted prices. As a way to attract orders from brokers, some regional exchanges or third market makers will pay your broker for routing your order to that exchange or market maker—perhaps a penny or more per share for your order. This is called "payment for order flow."

For a stock that trades in an over-the-counter (OTC) market, such as the Nasdaq, your broker may send the order to a "Nasdaq market maker" in the stock. Many Nasdaq market makers also pay brokers for order flow.

Your broker may route your order – especially a "limit order" – to an electronic communications network (ECN) that automatically matches buy and sell orders at specified prices. A "limit order" is an order to buy or sell a stock at a specific price.

Your broker may decide to send your order to another division of your broker's firm to be filled out of the firm's own inventory. This is called "internalization." In this way, your broker's firm may make money on the "spread" – which is the difference between the purchase price and the sale price.

Brokers must adhere to best execution practices that are regulated by the SEC and individual exchanges.  What I do not know is what limitations are placed on brokers when it comes to Internalization.
Comment: I don't see how Internalization (selling using shares already in inventory) matches OP's question "Can the broker **buy the stock from the first client** at 50.06 (using the broker's money) and **then immediately resell** it to the other client for 50.11?"
Comment: @RonJohn - It's not the broker's own money. I don't know what the restrictions are regarding internalization so you may be right. Consider this: The OP's set up is that the current NBBO quote is $50.05 and an ask of $50.12. If their orders are sent to the exchange, they become the market on each side and the quote becomes $50.06 by $50.11 and there is no fill until some counterparty crosses the spread and one or both of their orders get filled. If the broker fills their orders, both get better than current market price and both are happy. It's not front running.  But is it kosher?  I dunno.
Comment: And to complicate this even more, brokers are allowed to do **cross trades** across different client accounts if one client wants to buy  and another wants to sell. The broker can match the orders without sending the orders to the stock exchange  but he must report the transactions after the fact but in a timely manner and time-stamped with the time and price of the cross. These trades must also be executed at a price that corresponds to the prevailing market price at the time. See [Investopedia](https://www.investopedia.com/terms/c/crosstrade.asp).
Answer: Yes, that's called being a dealer. That is how they make money.
Comment: The Accumulation and TomTom answers give citations.  Yours is a one-line assertion without facts.
Comment: Not on Stack Exchange.  **You say** you used to work for ML, DW and Fidelity, but ignore the fact that "on the Internet, no one knows you're a dog".
Comment: All I'm asking for (and keep asking for) is a citation.
Comment: **Dealers** make money by charging transaction fees and service fees, **not** by trading.  (Unless you have evidence to otherwise prove your assertion.)
Comment: @RonJohn LOL, maybe learn anything about stock brokerage, or look up the terms "market maker" in a dictionary? Duh. You know I used to work for Merrill Lynch (and Dean Witter before that). In fact, when I worked at Fidelity my ENTIRE JOB was to try to quantify how much the different Wall Street brokerages were making off of us. "Service fees" are peanuts. They would not even be able to keep the lights on with service fees. You know that most brokerages don't even charge transaction fees anymore. Do you even have a brokerage account?
Comment: @RonJohn Yeah, well that's a mistake. It's more important to be right, than to be quoting random things out of books that are wrong or irrelevant. Most scholars are poor. Know any teachers? Not exactly the richest people you know probably.
Comment: @RonJohn Uhh, you are giving an example of a guy who does not even know the difference market making and front running as preferable to myself? That is pretty funny. A long answer does not mean it is either good or correct.


Interrupting ModelBuilder between two processes?

Question: I am using a model builder to create a tool that uses a DEM to create contour lines. Then I want to select, on screen, one of the contour lines to use it as an input parameter for the clip tool to clip the DEM. Is it possible to interrupt the model builder tool in run time so the user can select a specific contour lines and then the tool continues to the next step (clipping).
Comment: I'm not aware of a tool that can manage this manipulation; I guess your options are: 1. create 2 distinct tools; 2. Use selection within the model base and a-priori parameters that user can define; 3. code the break() / pause() in the code using python. Unfortunately I can't help with option #3. Good Luck
Answer: My understanding is that a ModelBuilder model can only be run from start to finish without interruption.
Consequently, as commented by @dof1985, I think your only option is to create two models/tools that you run before and after your user operation.
You could orchestrate them using a Python AddIn.


Is there a change in the voltage/current when motor is locked up? How can one sense this?

Question: I am working on a motor control system, and I'd like to be able to know when the motor has reached its max output and has locked up (shaft no longer able to rotate, due to mechanical force pushing back).  The motor will be used with a ball ramp mechanism to create a linear motion. I need to know when the motor stops spinning so that I can move on to the next task in the system. What would be the best/most efficient way to do this?
Comment: Efficiency is a funny thing. There's a most economical answer, mechanical efficiency, electrical efficiency - what it comes down to is, all of the above. If this is getting industrialized, you may want to employ a torquemeter in order to directly sense and control the variable of interest.
Answer: You should be able to measure the current during normal load operation (from experimentation) and then measure the current during an overload (stall) condition, and then use a shunt resistor (like, a 1% 0.1 ohm resistor) and an op-amp based comparator circuit to indicate when it has reached it's end-point/cannot move any further.
Measure the resistance across the motor terminals (this is assuming a simple 2 terminal DC brushed motor) with an ohm-meter. Then you can estimate the stall current by Ohms law, V = IR, meaning I_stall = V_applied / R_motor.
As the motor begins to move and starts generating back EMF, it will reduce the input current to something more reasonable.
When the motor meets something which stops the output shaft from moving, the resistance reduces again back to the motor's armature resistance (R_motor i mentioned earlier).
Comment: If you use this method, @Zack, you may be able to find detailed locked rotor torque and stall current information on the motor datasheet.
Answer: Rather than stalling the motor when it reaches the end of its travel, I'd prefer to use a limit switch to sense the position, and turn off the motor before it reaches the physical end-of-travel.  This would be much kinder to the motor and to the mechanism than forcing the motor into the mechanical end stop.
Comment: I also prefer this, but the travel range will change over time, as this mechanism is being used to compress a clutch pack (there may be a 10% or so increase in travel range over time, to apply the same force)
Comment: @Zack maybe a flywheel is in order? Drive the motor to put rotational momentum into it, cut the power before end of travel and let the flywheel ride through.
Answer: The very best way to tell if a motor is locked up is to use and encoder on the motor shaft (there are very inexpensive encoders out there now for the hobby market), and monitor its speed.  Just looking at current isn't reliable, as it can change based on the motor type and design, and the way a load is applied.
Looking at shaft speed, you can also see exactly when it is starting to get overloaded, and take action before it actually stalls.
Also, going to locked rotor stall is very damaging to almost all types of motors.  Induction and brushless motors will experience overheat conditions on the windings and all the winding joints, DC motors will burn the commutators and brushes.
To answer the exact question though, is there a change in voltage/current at stall... again, it depends on the type of motor, very low torque shaded pole AC motors like clock and small fan motors probably won't see much change, but any actual wound DC or Induction motor will go to it's locked rotor current which is just the applied voltage divided by the winding resistance.


Common language effect size- place of equality

Question: In Common language effect size (CLES) (http://en.wikipedia.org/wiki/Effect_size#Common_language_effect_size) how are cases with equality managed. Suppose there are 10 cases in each of control and treatment groups. Hence 100 pairs can be compared. If in 30 of these controls are higher, 40 of these treatment group is higher and in 30 two groups are equal, what will be effect size? Will it be 40/100 or 40/70? It seems CLES may not be suitable for data where many pairs have equal value.
Answer: You may want to read the Wikipedia page for the Mann–Whitney U test (also called the Wilcoxon rank-sum test). In essence, the U statistic of the test is based on the same idea as the "common language effect size". And the issue of ties comes up in this context as well. The solution there is to assign a value of 0.5 to ties. So, in your example, the value would be $55/100 = 0.55$. This also has intuitive appeal, since this will give a value of $0.5$ for two groups with exactly the same data (e.g., $2,4,5$ in the first group and $2,4,5$ in the second group) and two groups with only ties (e.g., $4,4,4$ in the first group and $4,4,4$ in the second group).
Comment: Thanks for your reply. Is there any reference that CLES also uses 0.5 for ties? Which formal package of CLES should we use? Can we used CLES for both numeric and categorical data?
Comment: As a reference, you could cite pretty much any book on non-parametric statistics that describes the Mann-Whitney U test. For example, [Hollander & Wolfe (1999)](http://www.amazon.com/Nonparametric-Statistical-Methods-Myles-Hollander/dp/0471190454/), see page 118, or [Sprent & Smeeton (2000)](http://www.amazon.com/Applied-Nonparametric-Statistical-Methods-Chapman/dp/1584881453/), see section 5.2.4. I don't know what you mean by "formal package". And with categorical data, how would you determine which value is larger? So, no, the CLES isn't applicable then.
Comment: I should have written ordinal rather than categorical.
Comment: Should be okay for an ordinal scale, since you can determine unambiguously whether one data point is larger than another data point -- after all, that is all that the CLES is based on.


UITabBarController -shouldAutorotateToInterfaceOrientation: warning

Question: I am getting the following warning from lldb:

The view controller  returned NO from
  -shouldAutorotateToInterfaceOrientation: for all interface orientations. It should support at least one orientation.

This is a standard UITabBarController, not a subclass and has no categories. Why am I getting this warning?
Answer: The default implementation of shouldAutorotateToInterfaceOrientation: for UITabBarController returns the orientations that is allowed for all the tabs.
So, you are either having one view controller (for a tab) that returns NO for all orientations or you are having conflicting orientations (one view which only supports landscape and another that only supports portrait).
Answer: It should support at least one orientation, doing a check to see if the orientation is portrait will return yes.
 return toInterFaceOrientation == UIInterfaceOrientationPortrait
should help a lot.
Comment: It isn't a subclass. It is a default Apple made UITabBarController.


Transplanting periwinkle

Question: I have plenty of periwinkle (probably Vinca minor, or possibly V. major) in my back yard. I will soon attend to building a storage shed there. I would have to clear periwinkle for the shed ground. I would like to transplant that periwinkle to a sloping part of my front grassy/weedy yard that causes me headaches when moving. How do I perform this operation and when is the best time to do that? I am talking about western Pennsylvania.
Answer: You will need to dig out the Vinca with roots attached in order to tranplant it, and you should only do that when the winter is over and the ground is not frozen. If the area you want to transplant to dries out frequently during spring/early summer and you are unable to irrigate it frequently until they are established, it's probably best to pot up rooted sections, cut them back to an inch or so and let them grow sufficiently to form a good root system before planting them out. If you transplant to the ground immediately, ensure you have dug over the area where you want to move them to first, cut back the top growth to about 1 or 2 inches, then water in well after planting. You will obviously lose the flowers this year, but they may produce a few later on.
Comment: In springs, I have been lazy before and just mowed mine near the edge of the bed.  A TON of it just roots in the lawn on its own!  It should be a relatively easy transplant.    You could probably just pull up a lot of it, turn it into the new soil, and keep it moist.
Comment: Vinca throws out quite long stems - where the end is in contact with soil, it will form roots  over time, that's why  its in your lawn.
Comment: All right, I will definitely heed the advices and try it out. I think the main guessing for me will be to estimate when the snow/freeze will not come back. I will report on the results in due course.
Answer: I have now performed the transplant(ation), the first for me. I shaved off about 1-2 inch of grassy new location soil, and brought in dug out Vinca and placed it there. If the lumps were with complete root, it took root in the new location, if I skimmed, it did not take root. This was done last Summer and I see, majority of the area is still covered, but it does not look as perfectly healthy as where it came from. It did have a few flowers in the new spot. I think this year will show me how things are going. Vinca is a creepy crawly, and I hope that will happen so at least the sloping parts of my front yard get covered. My concern is that the new location gets too much sun in comparison to the back yard shady area where it thrives.

Transplanting periwinkle


What's the difference between keras api augmentation and data augmentation definition?

Question: The augmentation definition is increasing the number of images by using rotation, crop and flip to avoid overfitting. The keras API apply augmentation but no increasing the number of image. What keras augmentation does in images? Is API augmentation such as preprocessing of images? Is augmentation replace the original image with new augmented images?
Answer: The Augmentation api apply different augment defined by you (horizontalflip, verticalflip, rotation, zcawhitening etc) to your original image rather than making a copy of it. It apply different augmentation on the same image on different epoch which reduce the generalization error.


Fantasy Book with color coded districts and underground school

Question: I'm trying to find a book that a friend read when she was at school but can't remember the name.  It has an underground school and they can travel to different worlds. There were different districts that were colour coded.  She thinks it had an orange cover. she would have read this in the 2000's.   Can you help?
Answer: Could it be the seventh tower series?

The world is shrouded by a veil casting it all into darkness, so it come across as underground. The book is set in a castle inhabited by people who do magic with light - the colour of light used denotes the power of the magic. Districts get assigned colours according to the colour of the magic of those living there. The magic is done with glowing stones taken from another world - which people in the castle can cross to.
Answer: Could it have been the Myst Reader? Involved underground, traveling to different worlds, I'm not remembering color coding even though it might be involved in some way. It's been over a decade since I picked it up.
Comment: There was no color coding at all in any of those three novels.  *Book of Ti'ana* featured an underground city / civilization, not just a school, while the other two had some plot portions in the ruins of that same city.  Only what you have pictured here & *Book of Atrus* was released with brown/orange cover.  You've got some hits, but it doesn't seem to fit as a whole.
Comment: @RebeccaTitheridge And is it?


Approximating dirac delta function with sinc functions

Question: I am trying to prove the following
 $$\lim_{a\rightarrow\infty}~\int_0^\infty\frac{f(x)\sin(ax)}{x}dx=(\pi/2)f(0)$$ for all square integrable functions $f(x)$ continuous at $0$.
I tried to do the following:
substitute $ax=t$ then $$\lim_{a\rightarrow\infty}~\int_0^\infty\frac{f(x)\sin(ax)}{x}dx=\lim_{a\rightarrow\infty}~\int_0^\infty\frac{f(\frac{t}{a})\sin(t)}tdt$$ Now i would like to show that $$\lim_{a\rightarrow\infty}~\int_0^\infty\frac{f(\frac t a)\sin(t)}tdt=\int_0^\infty\lim_{a\rightarrow\infty}\frac{f(\frac t a)\sin(t)}tdt$$ To be able to do this I'm trying to use arzela's dominted convergence theorem for riemann integrals which would allow me to carry limit inside the integral. But I am unable to find a dominating function $k(x)\geq0,\int_0^\infty k(x)dx<\infty,|f(t/a)\sin(t)/t|<k(x) \forall a>0$. Can someone help me out
Comment: Perhaps the [Riemann-Lebesgue lemma](http://en.wikipedia.org/wiki/Riemann-Lebesgue_lemma) might prove helpful.
Comment: @user104254 yup I should have added a factor of $pi/2$. Also since I would be using Dirac delta in the context of quantum mechanics, I would like to know what additional assumptions must I make.
Comment: $f$ is continuous at $0$
Comment: But how to prove it. Should I be using dominated convergence theorem or some other approach.
Comment: Do you have some additional informations about the behavior of $f(x)$ on $[0,1]$?
Comment: "$f$ is continuous at $0$": You should edit that into your question, instead of leaving it as a comment where it might be overlooked.
Answer: I'm not really sure that there is a simple solution for that. In some sense, this limit is equivalent to the theorem about the inverse Fourier transform, so there will be no simple solutions. But use Parseval/Plancherel (I never remember which one is about the Fourier series).
Or proceeding more elementary: Consider for simplicity the symmetric extension of $f$, so that the integral is over $(-∞,∞)$, resulting in twice the required value. Then, using
$$
\frac{\sin(ax)}{x}=\frac{e^{iax}-e^{-iax}}{2ix}=\frac12\int_{-a}^a e^{ixv}dv
$$
one gets
$$
\int_{-∞}^∞ \frac{\sin(ax)}{x}f(x)\,dx = \frac12\int_{-∞}^∞\int_{-a}^a e^{ixv} f(x)\,dv\,dx
$$
Now we only need to apply Fubini to exchange the order of integration, so that
$$
...=\frac12\int_{-a}^a \sqrt{2\pi} \hat f(v) \,dv
$$
and by dominated convergence, this converges to
$$
\frac{\sqrt{2\pi}}2\int_{-∞}^∞\hat f(v) \,dv=\pi\,\widehat{\widehat{f}}(0)=\pi\,f(0)
$$
There still are some assumptions that need to be added so that the used Fourier integrals, especially the last one, actually exist. $L^1$ and at least quadratic decay at infinity should be sufficient. The test functions, tempered or with compact support, all satisfy these conditions.
Comment: I think plancherel's theorem guarantees existence of fourier transform of $f$ and that $\hat f$ is in $L^2$. But it only provides that $f=\hat{\hat f}$ almost everywhere. Does almost everyswhere include $0$
Comment: @somitra The statement about "almost everywhere" can be made more precise: equality holds at every Lebesgue point, provided the functions are properly defined at those points. A point of continuity is a Lebesgue point.
Comment: This feels a bit circular. Isn't the integral in question the key element of the double-Fourier-transform theorem you invoke at the end?
Comment: Yes, that is what I wrote in the first paragraph, that this limit is equivalent to the Fourier inversion or double-Fourier theorem. However, modern proofs of the Fourier inversion theorem do not use the cut-off of the integral but exponential dampening to approximate the Fourier-transform with something controllable.
Answer: It is obvious that this cannot hold unless $f$ is continuous at $0$, because otherwise the value $f(0)$ becomes decoupled to the continuum of values that determine the integral, and the result is meaningless. Therefore, whatever route you take must be based upon this continuity condition.
So, how do you do this? First of all, you unpack the definition. Let $\newcommand{\eps}{\varepsilon}\eps$ be some positive number which we'll fix later. Then we know that there exists $\delta=\delta_\eps$ such that
$$
|x|<\delta\Longrightarrow |f(x)-f(0)|<\eps.
$$
How does this relate to your integral? Your transformed form,
$$
I=\int_0^\infty f(t/a) \frac{\sin(t)}{t}\mathrm dt,
$$
involves values of $x=t/a$ which are both below and above the $\delta$ threshold. The ones below, i.e. those $t$ such that $|t|<\delta a$, have $f(t/a)$ close to $f(0)$, which means that they will end up contributing the most, whereas the other ones are unconnected to $f(0)$ and must therefore decouple in some way. To make this change in behaviour explicit, you can split up your integral:
$$
I=J+K=
\int_{0}^{\delta a} f(t/a) \frac{\sin(t)}{t}\mathrm dt
+
\int_{\delta a}^\infty
 f(t/a) \frac{\sin(t)}{t}\mathrm dt.
$$

Now, it is tempting to deal with the two chunks at the same time, but the truth is that they require different handling. Let's deal with the messy, unimportant one first.
$$
K=K(a)=\int_{\delta a}^\infty f(t/a) \frac{\sin(t)}{t}\mathrm dt
$$
goes to zero as $a\to\infty$. This is semi-plausible: you are taking the tails of the integral, which ought to vanish, but your function $f(t/a)$ rescales itself with $a$ to match the outgoing lower limit, so that it always equals $f(\delta)$ there. It is therefore the decay of the $\mathrm{sinc}$ function that drives the limit.
One way to make this precise is to use the Cauchy-Schwarz inequality in what is effectively an $L_2$ dot product:
$$
|K(a)|^2
\leq
\int_{\delta a}^\infty f(t/a)^2\mathrm dt
\int_{\delta a}^\infty  \frac{\sin^2(t)}{t^2}\mathrm dt.
$$
The first one is constant, equal to $\int_{\delta}^\infty f(t)^2\mathrm dt$ and bounded by $\int_{-\infty}^\infty f(t)^2\mathrm dt$, while the second one converges to zero. Thus $\lim_{a\to\infty}K(a)=0$.

The interesting integral, on the other hand,
$$J=J(a)=\int_{0}^{\delta a} f(t/a) \frac{\sin(t)}{t}\mathrm dt,$$
needs to converge to $\propto f(0)$, so we need to use the closeness of $f(t/a)$ to $f(0)$. You can thus unpack $f(x)$ into $f(0)+(f(x)-f(0))$ to get
$$
J=
f(0)\int_{0}^{\delta a} \frac{\sin(t)}{t}\mathrm dt
+
\int_{0}^{\delta a} \left[f(t/a)-f(0)\right] \frac{\sin(t)}{t}\mathrm dt.
$$
The second term is essentially bounded by $\eps$. You could try to say that
$$
\left|\int_{0}^{\delta a} \left[f(t/a)-f(0)\right] \frac{\sin(t)}{t}\mathrm dt\right|
<
\eps\int_{0}^{\delta a}  \left|\frac{\sin(t)}{t}\right|\mathrm dt
$$
but the second integral diverges. Instead, one repeats the Cauchy-Schwarz trick:
$$
\begin{align}
\left|\int_{0}^{\delta a} \left[f(t/a)-f(0)\right] \frac{\sin(t)}{t}\mathrm dt\right|^2
&\leq
\int_{0}^{\delta a} \left|f(t/a)-f(0)\right|^2\mathrm dt\int_{0}^{\delta a}  \left|\frac{\sin(t)}{t}\right|^2\mathrm dt
\\ & <
\delta a \eps^2\int_{-\infty}^{\infty}  \left|\frac{\sin(t)}{t}\right|^2\mathrm dt.
\end{align}
$$
You now have enough ingredients to get the limit, and you can get the nice number by doing the Dirichlet integral
$$
\int_{0}^\infty \frac{\sin(t)}{t}\mathrm dt=\frac\pi2.
$$
The limiting procedure takes a bit of care, because you have a fair few quantities involved. If you package all the results so far, you can say that
$$
|I-\frac\pi2 f(0)|
<
f(0)\left|\int_{\delta a}^\infty \frac{\sin(t)}{t}\mathrm dt\right|
+
\eps\sqrt{\delta a} \|\mathrm{sinc}\|
+
\|f\|\sqrt{\int_{\delta a}^\infty \left|\frac{\sin(t)}{t} \right|^2 \mathrm dt},
$$
and you want to bound this arbitrarily close to zero. This is a bit of a balancing act, because you need $\delta a$ to be large and $\eps\sqrt{\delta a}$ to be small, but it can be done. To do it, take $A$ such that the first and third terms are small when $\delta a=A$; then, choose $\eps$ such that the second term is small enough, for $\delta a=A$ fixed; this determines the necessary $\delta$; and finally take $a=A/\delta$. This is enough to guarantee the limit.
$$\tag*{$\blacksquare$}$$

Finally, let me put in a word or two about why I went all this way instead of cracking the problem with some huge theorem. Essentially, trying to apply some form of dominated convergence theorem will never work, because there is no dominating function. In physicist language, the Dirichlet kernel converges to a Dirac delta function:
$$\lim_{a\to\infty}\frac{\sin(ax)}{x}=\frac\pi2 \delta(x).$$
This is loose language but its precise statement is exactly the integral you want to prove.
In other words, this integral breaks exactly the same dominated convergence schemes that you're trying to use, and the limit - in whatever sense it exists (which it does) - is outside of the function space you're looking in. This is why, unless you have fancier tools available, you need to work it from the ground up.
Comment: I think the final inequality should be $|I-\frac\pi2 f(0)|
<
\left|f(0)\int_{\delta a}^\infty \frac{\sin(t)}{t}\mathrm dt\right|
+
\epsilon\sqrt{\delta a} \|\mathrm{sinc}\|
+
a\|f\|\sqrt{\int_{\delta a}^\infty \left|\frac{\sin(t)}{t} \right|^2 \mathrm dt},$
Comment: Yes, that is correct. Apologies.
Comment: In that case the third term cannot be guaranteed to be arbitrarily small as $a\rightarrow\infty$. So the analysis breaks down I think.
Comment: Sorry, I didn't see that modification. You are right that the first term was incorrect. Your third term is not.
Comment: I say this because
$\int_{\delta a}^\infty f(t/a)^2\mathrm dt=a\int_{\delta}^\infty f(t)^2\mathrm dt$ after substituting $t/a\rightarrow t$
Comment: Oh, yes, you are right - that's pretty subtle. You are again correct, it is cancellations and not absolute convergence that makes $K$ vanish, so it is essentially a version of the Riemann-Lebesgue lemma. I will redo that section when I have time.
Comment: @E.P. I think there is an issue applying the Riemann-Lebesgue lemma to the term $K$ because unless $\delta>0$ is fixed, the domain of integration will depend on $a$.
Comment: @MattRosenzweig I don't really have time to address this but if you have a fix you're welcome to implement it.
Answer: Im really not sure if this works but i thought I try,
As you mentioned the claim, $$lim_{a\rightarrow\infty}\int_0^{\infty}f(x)\frac{sin(ax)}{x}dx=\pi/2f(0)$$
follows after your substitution as $f(x)$ is continuous at $0$ when we can move the limit inside.
So I started to construct $g(x)\in L^1(\mathbb R_+)$ s.t $|\int_0^{\infty}f(x)\frac{sin(ax)}{x}|\leq g(x)$.
For $x\in[0\infty)$ we have,
$$|f(x)\frac{sin(ax)}{x}|\leq|\frac{f(x)}{x}|$$
and Hölders inequality yields,
$$\int_1^{\infty}|\frac{f(x)}{x}|\leq(\int_1^{\infty}|f(x)|^2dx)^{1/2}(\int_1^{\infty}|1/x|^2)^{1/2}=(\int_1^{\infty}|f(x)|^2dx)^{1/2}<\infty $$
which follows from the assumption that $f(x)$ was square integrable.
Now for $x\in[0,1]$ we have two cases,
Let $A=\{x\in[0,1]:|f(x)\frac{sin(ax)}{x}|<1\}$. Clearly for all $x\in A$ we have,
$$ |f(x)\frac{sin(ax)}{x}|\leq1$$
which is integrable since $\lambda(A)\leq\lambda([0,1])=1$,
Let $B=\{x\in[0,1]:|f(x)\frac{sin(ax)}{x}|\geq1 \}$.
For $x\in B$ we have,
$$|f(x)\frac{sin(ax)}{x}|\leq|f(x)\frac{x}{x}|\leq|f(x)|\leq|f(x)|^2$$
which is integrable.
So finally we found a bound in $L^1$ for all $x\in\mathbb R_+$. And you can move the limit inside to obtain what was to prove.
I hope i didnt miss something... do not hesitate to correct me.
Comment: Although we have found a bound for $|f(x)\frac{sin(ax)}{x}|$ the limit still can't be moved inside as $lim_{a\rightarrow\infty}f(x)\frac{sin(ax)}{x}$ doesn't exist.
Comment: @somitra use your substitution, then it should work... or am I missing something?
Comment: I think for substitution to work, limit should exist. If we move the limt inside before making substitution then the resultant mathematical expression does not have a meaning as the limit does not exist.
Comment: @somitra Yes you actually right, and the bound wont work after the substitution. Sorry for that! As is said, it was just a try...


Movie with kid crawling on the ceiling

Question: It was a movie I saw as a kid and like the kid I think was crawling on the ceiling and it was horror. I asked my dad and he said it involved crows, but nothing is pulling up.
Comment: There was a scene in *Trainspotting* like that, but it's not on-topic.
Comment: When were you a kid?  How many years ago?  Was this on TV?
Comment: If someone posts the correct answer, you can accept it by clicking on the checkmark by the voting buttons, as per the [tour].
Comment: There's also hotel Transylvania and the Addams family (the newest animated one) that had scenes like that.
Answer: That's the 2007 film, The Messengers.

When the Solomons trade in the craziness of big-city life for the quiet of a North Dakota farm, little do they expect the nightmare that follows. Soon after arriving, teenage Jess (Kristen Stewart) and her younger brother see terrifying apparitions and endure attacks from a supernatural source. Jess must warn her disbelieving family before it is too late to save them.

It involves crow attacks, and ghosts that only Ben, the younger brother, sees at first, including a child that crawls across the ceiling.
It's the crows that you mentioned that made me think of this one, then a search for the title and "ceiling" found a few people referencing the child moving across the ceiling. It's not a great film, but decent. The sequel (actually a prequel) was a bit worse.
Ben watching the child crawl up the wall and across the ceiling

FWIW, the bit that got me and my wife to watch (and might have stuck out in the minds of others), was a scene where the mother was fluffing the sheets, and a pair of ghostly legs are briefly visible in the trailer.

Movie with kid crawling on the ceiling


How and why did Naruto's parents rise from the dead in a war?

Question: If Naruto's parents (Minato and Kushina) were killed when Kurama attacked the Leaf Village when he was born, how and why did his parents rise from the dead (alive again) in the war with different generations of Hokages?
Answer: Minato was resurrected with the edo-tensei by orochimaru.
His mother never appeared during the war arc. He only saw her in his mind when he went to tame the nine tails.


If a communication paradigm is asynchronous, is it also time-uncoupled?

Question: If a communication paradigm is asynchronous, is it also time-uncoupled? if so then are there any appropriate examples?
Comment: there are some websites which are ready to give solution but not free of charge and thats why it forced me to put in stack overflow
Answer: No.
Time-uncoupled communication means that the receiver(s) do not have to exist at the time the sender is sending. Sender and receiver can have independent lifetimes.
Asynchronous communication means that the sender does not have to wait until the receiver has received his message to proceed. The sender doesn't have to block.
What this means is that all time-uncoupled communication is asynchronous, but not vice versa. With asynchronous communication, the receiver doesn't have to meet in time with the sender, but he has to exist at the time the sender is sending. So, asynchronous communication is not time-uncoupled.
My source is Chapter 6 (Indirection communication) from this book https://www.amazon.com/Distributed-Systems-Concepts-Design-5th/dp/0132143011 .


Is an open interval (in one-dimensional R) a strictly convex set?

Question: I am teaching math economics.  The class and I are struggling with whether an open point set of one-dimensional R is a strictly convex set.  The interval in question is X=(a,b).  We are working with a definition of strict convexity that says that X is strictly convex if the convex combination of any two elements of X formed using lambda=(0,1) consists of points that are interior points of X.  By this definition, and according to my understanding of the definitions of epsilon neighbourhoods, interior points, and open sets, I believe that the open interval X=(a,b) is both convex and strictly convex.  Again, this is for point sets of one-dimensional R only that I am asking.  Thank you.
Comment: You are correct in your understanding.
Answer: If $X$ is $any$ interval of $\Bbb R$ and $u,v \in X$ with $u<v$ then  $(u,v)\subset X$ (otherwise $X$ would not be an interval ). And $(u,v)$ is an open  subset of $\Bbb R$ so $(u,v)\subset Int (X),$ because $Int (X)$ is the union of $all$  subsets of $X$  that are open subsets of $\Bbb R.$
For each $w\in (u,v)$ there is a (unique) $r\in (0,1)$ such that $w=(1-r)u+rv$ by elementary algebra: $$w=(1-r)u+rv\iff w-u=r(v-u)\iff r=(w-u)/(v-u)\quad \text {(as } v-u\ne 0)$$.... and $0<w-u<v-u$ so $0<(w-u)/(v-u)<1.$


Modern List view is not showing for Document library even enabled New Experience

Question: I have SP 2019 farm, the document library migrated from MOSS 2007 is showing classic page even "New Experience" enabled in List Settings
Answer: After some research, I found some other web part other than XSLTListView is added to that page view. after removed those webparts page working like a charm.
I have followed below steps to find out the issue:
Reference URL : https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries#rest-request

To get page rendering type (REST type) copy and page below rest end point in browser (update server host name): http(s)://server/_api/web/getfilebyserverrelativeurl('/sites/dev/ECMTest/Forms/AllItems.aspx')/pageRenderType
check the response value: I got value 1, then checked with the previous Reference URL i got description about the problem (MultiWebpart)
Answer: I also had another Webpart in my View Page, so had to Delete that Webpart and then it worked for me (Make sure you clear Cache after Deleting webpart or try in another browser)
I followed these Steps:

Checked the Page Rendering Type of 2 Diff Libraries View Page

The Library which has Custom Webpart added, Returned 1
https://tenanturl/_api/web/getfilebyserverrelativeurl('/WTABTARegistratieDatabase/Document/Forms/ModernView.aspx')/pageRenderType

Another Library which has no Webpart, returned 100(Modern)
https://tenanturl/_api/web/getfilebyserverrelativeurl('/sites/WTABTARegistratieDatabase/SiteAssets/Forms/AllItems.aspx')/pageRenderType

Deleted custom webpart, and now it worked.


Install Android 3.0 Market on Emulator

Question: Has anyone installed Android 3.0 Market on an emulator?  I have been adapting some instructions I found so they would work on Honeycomb.  Almost there ... take a look.  Step 8 has a problem, as you can see.  Suggestions?
http://slinnbooks.com/books/android/accessing-android-market-from-android-sdk.html
Answer: You should be able to fix the problem with the command below:
<code>emulator -memory 1024 -avd MotorolaXoom -partition-size 512 -scale .75
</code>
But it is not working here. You can install Android Market, but when you reboot the emulator, everything is cleared. I think it is related to the version of the SDK.
So, don't upgrade the Android SDK.
If you manage to install Android Market successfully, please share your SDK (r08) with me.

Install Android 3.0 Market on Emulator


Connecting Zynq boards fast and deterministic way

Question: I'm trying to make a cluster with Zynq-7010 boards for a real-time application. One of them will be the master, and it will control eight client boards. The master board will also collect the data from clients. I tried to use 100Mbit ethernet connection to connect the nodes but it was not as fast as I need. In addition, it was not deterministic because of switch's indeterministic behavior.
Could you give me some idea about how to connect them fast and deterministic way?
Edit:
Each node has RS-485 interface to outside. Nodes make RS-485 communication up to 10Mbit/s. The master node  has to collect 500byte data  from each of them every millisecond.  The timestamps of each node must be identical (+-2us). The nodes must start to reply the master in 20us.
Comment: Use one of the PMOD connectors to send a sync pulse from the master to the slaves, and trigger the slave process off that. Then use the Ethernet to communicate the process results back to the master.
Comment: You need to put some numbers to your requirements. What is the nature of the communications between the boards? How much data throughput do you need, and how tightly synchronized do they need to be? Be specific.
Comment: Each node has RS-485 interface to outside. Nodes make RS-485 communication up to 10Mbit/s. The master node  has to collect 500byte data  from each of them every millisecond.  The timestamps of each node must be identical (+-2us). The nodes must start to reply the master in 20us.
Comment: Those boards seem to have a bunch of LVDS lines, and should be plenty fast.
Comment: I agree with @WhatRoughBeast.  you need a sync signal.
Comment: 500 byte/msec times 10 bits per byte (adding a little overhead) times 1000 msec per second times 8 units gives 40 Mbit/second. So 10 Mbit/sec RS485 will not possibly work.
Comment: They are point to point connections. There are 8 transceivers in the main board.
Comment: Sorry I've misunderstood. Actually 8 transceivers will be located in each node and communicate with outside world. Internal communication doesn't have to be RS-485. I thought I would be able to use 100Mbit Ethernet, but it caused bottleneck.
Answer: Basically, you're probably out of luck. A bit more information might help. When a slave reports to the master, what is the packet size? Your 20 usec figure for data latency suggests a maximum of 10 bytes or less per packet, and if that is so you're just hosed.
Start with basic requirements. 500 bytes/msec times 1000 msec/second times 8 slave units gives a basic data rate to the master of 4 MB/sec, or 32 Mbit/sec. Obviously, a 10 Mbit/sec RS485 bus will not do the job.
Will 100 Mbit Ethernet work? Probably not. You need to understand the overhead requirements  first. Assuming UDP, each packet of data (up to 1518 max) must be accompanied by the following header fields:
12 bytes - Interframe gap
 8 bytes - Preamble and SFG
14 bytes - Ethernet header
 4 bytes - S-tag
 4 bytes - C-tag
20 bytes - IP header
 8 bytes - UDP header
 4 bytes - CRC
74 bytes total
Note that this requirement applies to each and every packet sent by each and every slave.
So, if you're trying to send packets of 10 bytes, each packet will actually contain a minimum of 84 bytes. And you can't invoke a custom, minimalist header structure, either. Since the master has to service 8 slaves a router or switch will be required, and this unit will only respond to a conventional protocol.
You have not specified exactly what the data timing represents. A 500 kB data rate combined with a 2 usec timestamp requirement suggests something like a 500 kHz/1 byte per sample or a 250 kHz/2 bytes per sample acquisition rate, but this is entirely conjecture on my part. And, as I've stated, your 20 usec latency requirement suggests that you want a small packet size. But what if you allow a large packet size, like 500 bytes/packet?
What might work is the use of a staggered sync pulse arrangement. You would provide 9 lines from the master to the slaves. The first would be an acquisition clock running at 500 kHz or 250 kHz (assuming my hunch is correct) which would be broadcast to all slaves. Since I'm assuming relatively short (say, less than 10 meters) between slaves, the sychronicity of the clock at the slaves would be much less than your 2 usec. The other 8 lines are sync pulses with a 1 kHz frequency, but spaced at 125 usec. Each sync pulse goes to one slave. Each slave uses a double-buffered data storage structure, and upon receipt of a sync pulse transmits a 500-byte data packet to the master using 100 MHz Ethernet. while simultaneously acquiring the next packet's data. The timing for each data sample is implicit in the acquisition clock rate and the location of the sample within the packet, with each packet having a known offset - some multiple of 125 usec. Since the total Ethernet packet is 574 bytes, the overhead will not interfere with the throughput requirement.
Answer: I will assume that as you have nodes, they are far apart.  You could provide a GPSDO (gps disciplined oscillator) and pps at your nodes.  In this manner, you can provide in logic a second and clock tick counter for accurate timestamping.  If you are in a building, you would need a cable drop from antennas.  Then your accuracy is how good your oscillator is.  In general, most clocks can be set up to be very accurate over a second or two, but if you need large holdover (GPS/sync outage) accuracy, the longer and how accurate dictate how much cost will be.  For large holdover, rubidium clocks are very nice.
Comment: Actually they are located in same place.
Comment: I used to use a pc to manage  all that work. But I decided to use single board computers. Because they become cheaper and fast enough.
Comment: Then I would investigate the master providing a sync every so often, say 1 PPS.  Have you verified the master can handle the amount of data you have?
Comment: I ask as Im curious what 2 ARMs at 666 MHz can do
Comment: 100Mbit Ethernet creates bottleneck so that I got stuck about how to collect data. Actually That's why I've posted this question.
Comment: I see, my answer is about determinism.
Comment: I'm going to use bare metal image. There won't be an OS,  so that I don't expect a determinism problem.
Comment: As @WhatRoughBeast says, 40 Mbit.  x8 will be about 320 Mbit.  I think you have a problem, not just with network.  as apalopohap says, you may need to take advantage of LVDS and connect cleverly
Comment: your question was partually about nondeterministic time through switching
Comment: what board are you using?
Comment: Zynqbery from Trenz electronic
Comment: May be I should use serdes
Comment: yes, serdes differential via lvds signaling
Comment: take a look at microZed. it has 10/100/1000 ethernet and has high speed logic side connectors


Getting real machine information from a virtual machine

Question: If a malicious software gets into a virtual machine, what is the most information of the actual machine it can obtain?
Comment: https://serverfault.com/questions/72623/is-it-possible-to-find-information-about-host-machine-from-inside-virtual-machin
Answer: Ideally, the virtual guest is not able to see anything from the host. But the world is not ideal. Here we go back to the discussion of Joanna Rutkowska. She developed a technique to determine  to test if you are living in a virtual environment. It was called the "red pill".
Joanna just provided a proof-of-concept, which you can see in https://stackoverflow.com/questions/46267618/red-pill-detect-virtualization
It, however, does not mean that you can just read (or even write!) all sorts of host data.
Some virtualization techniques provide explicitly some information for their virtual machines. If you are running Windows as a Hyper-v  client, you can see in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters that you are a guest. If you use Vagrant, you will see a directory vagrant somewhere. This directory may also be available to your malware.
And there is always the possibility that a form of malicious software made a new discovery how to access the host from a guest. We may think that is not likely, but we also thought that of processor-microcode.
Comment: AWS exposes a lot of information to any process asking for it, that with the proper analysis will show that is a MV in Aws.
Answer: With default options in many cases you can at least see the CPU manufacturer, sometimes the exact CPU model. You can also make some assumptions on CPU speed, amount of RAM.
The GPU, while not being passed through directly can still be fingerprinted.
Maybe also some info on the network when it is bridged/nated
If the malware can break out of the VM by bugs in the virtualization software,  side channels like CPU bugs, rowhammer ... it can of course do a lot more.


Binary Star system with one star stationary?

Question: Can a Binary Star system be possible where in one star is stationary and the other star revolves around it? (Just like a planet revolving a star. i.e planets in the system and the star revolving around their own center of masses to balance the system).
Answer: Well, motion is relative so you can choose a frame of reference where one is stationary.  If you do though, it makes the equations of motion quite complicated.
Even in our solar system, the Sun isn't stationary.  It orbits the center of mass of the whole solar system (barycenter), just as each planet orbits the center of mass.
The center of mass of our solar system moves relative to the sun due to the motion of the Sun and planets.  Here is a graph:

(Source)
So you could potentially call a body in a system where the barycenter stays inside that body "stationary" but that's not technically correct, no matter how lopsided the masses of the bodies are.  For example:

The larger mass will still always move relative to the system barycenter.
Comment: OP has probably attached reference frame with heliocenter of the Sun.
Comment: @SachinShekhar doing so makes the equations describing orbital motion much more complicated.  Sure you can approximate it with the heliocenter but heck, you could choose the center of the Earth as a reference frame too.  Point is, the barycenter of the system is the easiest (and I'd argue most correct) choice.  The barycenter never coincides with the exact center of any body in any realistic n-body system.
Comment: @BrandonEnright Klemperer rosette?
Comment: @MrLister that's why I used the words "in any realistic n-body system" because those systems aren't stable.
Answer: As others explained: When two masses interact gravitationally, it's not like the smaller mass is orbiting the larger mass. Both bodies orbit the common barycenter. When one of the two masses is extremely large compared to the other, the barycenter of the system is almost in the center of the larger mass, so the effect on the larger mass is negligible (like a satellite orbiting the earth). But it still won't be completely stationary. The effect would just be too small to measure.
But I would like to get back to your original question, "Can a Binary Star system be possible where the mass difference is so large that the effect on the larger star is negligible": There isn't that much difference in the masses of stars. Stars need to be massive enough to generate enough pressure to maintain nuclear fusion, but not so massive that they collapse into black holes. Also, the larger the star, the faster does it undergo fusion and the shorter its lifespan. For that reason the heaviest known stars have just about 100 times the mass of our sun, while the lightest know stars have just one tenth of a solar mass. A mass difference of factor 1000 isn't small enough that the effect on the larger mass wouldn't be notable.
Comment: @user1324816 I think what Phillip and Brandon Enright are saying is that it is not possible for a body to remain stationary when another body orbits it. Sachin Shekhar is pointing out a situation in which one of the two stars *appears* to be stationary but it really isn't. Unless the mass of one star relative to the other is infinite, there will always be a small displacement from the center of the heavier body. It may be an inch or it may be hundreds of thousands of miles, but neither body is ever truly stationary. But it might be safe to *assume* it is if the displacement is negligible.
Comment: Thanks Philipp. I'm confused now because of Sachin Shekar's answer. He gave an example of our sun sized star revolving around a  large star like  R136a1. Would the size difference be large enough for such configuration to be plausible?
Answer: In any system, components revolve around center of mass of the system. In our solar system, Sun has 99.9% mass of the system. So, center of mass of system is inside the Sun (nearly coinciding with center of Sun).
Seeing the massive stars in the existence, yes, it's possible that a Sun type star can truly revolve around R136a1 type stars. R136a1 stars are 265 times solar mass. In a binary system with Sun, it'd contain 99.6% mass of the system. So, center of mass of the system would exist near its own center (so, size of star doesn't matter here).
Answer: This is an instance of the classical two body problem. We know from Classical Mechanics that the movement of two particles orbiting eachother can be reduced to the study of the movement of a single particle with a mass equal to the system's reduced mass, $\mu=\frac{mM}{m+M}$ moving in a conservative potencial (for more on this subject, you can refer to virtually any CM book; I specially recommend Golstein's "Classical Mechanics", although Thornton's book also gets the job done). As to your proposed problem, say you have two bodies orbiting each other, of masses $m$ and $M$, where $m<<M$. Then, the mechanical energy of the system is given by:
$$E = \frac{1}{2}\mu \dot r^2 + \frac{L^2}{2\mu r^2}+V$$
where $r$ is the distance between both bodies. Now, since the second star is much heavier than the first one, we could approximate the reduced mass as:
$$\mu = \frac{mM}{m+M}\cdot \frac{M}{M} = \frac{m}{1+m/M}\approx m$$
Therefore, Classical Mechanics correctly predicts that the heavier star remains stationary whilst the second one, which is much lighter, orbits it. We can introduce this approximation in the conservation of energy equation:
$$E \approx \frac{1}{2}m\dot r^2 + \frac{L^2}{2mr^2} + V$$
Where, in your problem, the potential will be keplerian:
$$V = -G\frac{M}{r}$$
Notice how the mechanical energy is conserved (since there are no external forces acting on the system), so you can actually calculate the orbit of the lighter star (more generally, you can reduce your problem to quadratures, which you can then integrate numerically):
$$dt = \sqrt{\frac{m}{2}}\cdot \frac{dr}{\sqrt{E-\frac{L^2}{2mr^2}-G\frac{M}{r}}}$$
Furhtermore, if you'd like to calculate the trajectory as a function of the angle (which I would recommend more than $r(t)$), you can use the conservation of angular momentum:
$$L = mr^2\dot \theta$$
Then, applying the chain rule to $\dot r$, you get:
$$\frac{dr}{d\theta}\cdot \frac{d\theta}{dt} = \frac{dr}{d\theta}\frac{L}{mr^2}$$
Therefore:
$$\frac{dr}{d\theta}\frac{L}{mr^2} = \sqrt{\frac{2}{m}(E-\frac{L^2}{2mr^2}-G\frac{M}{r})}$$
$$\boxed{d\theta = \sqrt{\frac{L^2}{2m}}\cdot \frac{dr}{r^2\sqrt{E-\frac{L^2}{2mr^2}-G\frac{M}{r}}}}$$
In short, your system would only be stable if one star were much lighter than the other, forming a binary system with an approximately circular orbit.


What kind of graph (or distribution function) should I use to show that the probability of an event is X%

Question: I have created a program that does 1000 simulations of randomly selecting N number of balls (with different colors) from let's say 20 balls. This program also counts how many instances that a particular desired outcome/event (e.g. all N balls are the same color, etc.) has occurred from all those simulations.  I may also tweak the program to do 2000, 3000,...,10,000 simulations, and compare the number of instances that the desired event has occurred. Now, my problem is how can I use those figures in a graph to prove that the probability of that event is equal to or approximately equal to X%. I have no problem with making the program itself, but any suggestions for the graph (i.e. x versus y axis) would be appreciated.
Comment: I guess that you could run your program for various number of simulations and plot the calculated ratios (desired outcomes / all outcomes) to show graphically that there is a limit as the number of simulations tends to infinity. That limit would be the desired probability. As for the plot, I mean: number of simulations on X axis and ratios on Y axis.
Answer: Here's an example I put together, simulating a basic fair coin toss. On the X-axis, the number of simulations is shown and on the Y-axis the success rate (e.g. the proportion of times we got heads), which should approximate the probability. (The plot was done using R, and the number of simulations is from 100 to 10000.)

From the picture, you can see that there is, of course, some variance in the data as the experiment is random. However, as we make more simulations, the variance of the data is getting smaller. Also, this plot is a close-up view, and the values on the Y-axis are mostly $0.5\pm0.02$ (the error is smaller near the end), so we have a good approximation. On the next plot, I rescaled the Y-axis so it shows values from $0$ to $1$. The limit can there be easily seen, and is, of course, $0.5$.
Comment: How did you come up with that graph? I've been trying to do something similar in Python, but it's taking very long(I was using a for loop to create the array of probabilities).
Comment: Well, I used standard functions in R, the code was more or less mean(replicate(simulation(),n). I don't know if these functions include some optimizations, it's not unlikely. And it did take some time, maybe a minute or so.
Comment: That code was for simulating n times. As for generating a sequence of simulations, I used sapply. Maybe there is a similar function for python. I basically applied the above code to a sequence of 'n's from 100 to 10000 with a step of 100


first use of common sense

Question: I am writing a novel with a narrator, a Victorian doctor, writing in the year 1854. Would he have used the expression "common sense" in the same way that British writers use it today?
Comment: According to http://www.etymonline.com/index.php?term=common+sense&allowed_in_frame=0, it was first used in 1726. I see no reason why it can't be used in 1854, but I'm not sure if Victorians used it.
Comment: To the etymological field day below, add the brief thought that someone schooled in the 18th or 19th centuries *might* have said *sensibility.*
Comment: I think this is a very interesting question (hence my lengthy answer below), and I don't think that the cursory treatment of "common sense" by Etymology Online does justice to English speakers' (and writers') complex and subtle usage of the term across the past four centuries.
Answer: Yes, the expression is quite old. According to Etmonline:

14c., originally the power of uniting mentally the impressions conveyed by the five physical senses, thus "ordinary understanding, without which one is foolish or insane" (Latin sensus communis, Greek koine aisthesis); meaning "good sense" is from 1726.

The most well known historical example is Thomas Paine's Common Sense (1776), which is probably the source of the initial spike in its usage:

As you can see, it was used around the time you're writing about. Some examples written in the field of medicine (and alternative medicine):

The common sense of cholera, by a practical practitioner (1854)
Common sense versus homœopathy (1855)
The Homoeopathic Echo: A Journal of Health and Disease, Volume 1 (1855):

Now many things may be beyond common sense, in the first meaning; I have given, but not contrary to it; and many things may be above common sense, in the last signification, but not opposed to it.

You can get fairly good results (including some of the ones I've included) for a broader time range using a search like this.
Comment: You can add this: Edward B. Foote, M.D., 'Medical and Electrical Therapeutist',  [*Medical Common Sense; Applied to the Causes, Prevention and Cure of Chronic Diseases and Unhappiness in Marriage*](https://books.google.com/books?id=iNRkAAAAIAAJ&printsec=frontcover&dq=Medical+Common+Sense+Foote&hl=en&sa=X&ved=0ahUKEwj3tb2wk8zRAhUJxVQKHR8kA4AQ6AEIHDAA#v=onepage&q=Medical%20Common%20Sense%20Foote&f=false) a little later, in 1864.
Answer: With regard to the distinction that Etymology Online draws between "the power of uniting mentally the impressions conveyed by the five physical senses, thus 'ordinary understanding, without which one is foolish or insane'" (from the 14th century) and "good sense" (from 1726), it seems to me that the division in actual usage may have been much less clear-cut than that authority suggests.
Consider this instance from John Martiall, A Replie to M. Calfhills Blasphemovs Answer Made Against the Treatise of the Crosse [by William Bradshaw] (1566):

Iudge by yower owne argume[n]t: yow woulde haue it thus. Diuells are disco[m]fited by that which Moyses handes prefigured:but Moyses handes prefigured the signe of the crosse, ergo by the signe of the crosse diuells are discomfited. Is not this all one in effecte? Haue yow not the same matter, and the same sense, that I had in mine? And haue altered nothing, but added a terme, and left out certayne wordes, which I added to make it more playne, VVhich doth not infringe the substance and grounde of the argume[n]t, but the forme and fashio[n] onelye? And wil you laughe with indignation at an argument all one in effecte with yower owne, because it is not in mode and figure? Dothe not yower Logicke teache yow, that the argument that lacketh mode and figure is not to be reproued as euill, nor the former of it, voyde of witt and co[m]mon sense, if it be reducible to any mode and figure? Haue you not hearde of manye such in Logicke? And if yow haue forgotte this, maye we not laugh (not as yow doe with indignation (for that may welbe called a dogges laughter) but with good reason at yower malepertnesse in finding faute with that, which to no man that hathe wit, or common sense, seemeth reprehensible?
...
But that the crosse or crucifixe is, or hath ben taken, for such [an idol], and as vnlaufull to be worshipped, as that was, you should first haue proued, and the[n] triu[m]phed: but because you knewe your weaknes in that behalf, you vse a common sophistication called, Petitio principij, and like a foolish sophister you presuppose, that to be proued, which you were neuer able to proue, nor shalbe as long as scriptures, councells, fathers, reason, and common sense shalbe of any authoritie with men.

Each of these instances involves a pairing of "common sense" with another cognitive faculty—in the first two instances "wit" and in the third "reason." It is certainly possible to read "common sense" in all three instances as meaning "ordinary understanding." But if not for the assertion by multiple authorities that "common sense" as "good sense" didn't arise until more than 150 years later, I could well imagine that the author here meant "common sense" in its modern sense, which Merriam-Webster's Eleventh Collegiate Dictionary (2003) gives as follows:

common sense n (1726) : sound and prudent judgment based on a simple perception of the situation or facts

To the extent that "common sense" as the Eleventh Collegiate defines it stands in opposition to the formal logic of "foolish sophisters," it would work very neatly in each of the three instances above. Likewise with Thomas Nash, "The Four Letters [of Gabriel Harvey] Confuted" (1592):

What Authors dost thou alleadge in thy booke? not two but any grammer Scholler might have alleadgd.
There is not three kernels of more than common learning in all thy Foure Letters. Common learning! not common sense in some places.

Here the contrast of "common learning" with "common sense" again reads very well (and indeed more forcefully and effectually) when we interpret "common sense" as having its modern meaning rather than the meaning "ordinary understanding."
And again, from Reginald Scott, The Discouerie of Witchcraft:

The concluion therefore shall be this, whatsoeuer heeretofore hath gone for currant, touching all these fallible arts, whereof hitherto I haue written in ample sort, be now counted counterfet, and therefore not to be allowed no not by common sense, much lesse by reason, which should lift such cloked and pretended practises, turning them out of their rags and patched clowts, that they may appeere discouered, and shew themselues in their nakednesse, Which will be the ende of euerie secret intent, priuie purpose, hidden practise, and close deuise, haue they neuer such shrods and shelters for the time : ...

My point in raising these instances is not to try to prove that "common sense" was used to mean "good sense" (that is, "sound and prudent judgment based on a simple perception of the situation or facts") in the 1500s, but to show that the early, Etymology Online–endorsed meaning "ordinary understanding" and the much later meaning "good sense" are not nearly so far apart and easy to separate as one might suppose from the line that Etymonline draws at 1726. It seems to me that "ordinary understanding" and "good sense" shade into one another readily and subtly, especially when the "judgment" aspect common to both is central to the context in which the term appears.

Conclusion
The upshot of all this is that "common sense" seems to have rapidly evolved beyond describing the mechanical or physiological operation implicit in "the power of uniting mentally the impressions conveyed by the five physical senses" to mean, generically, "ordinary understanding"—and that "ordinary understanding" and ordinary "good sense" are so closely allied that English speakers may have understood "common sense" to encompass both senses long before 1726.
In dealing with individual cases, it can be hard to tell whether the focus of "common sense" is on sound basic understanding or on sound practical judgment. I certainly wouldn't want the job of having to prove that the author of every instance of "common sense" published between 1566 and 1726 had in mind "ordinary understanding" and not "sound and prudent judgment based on a simple perception of the situation or facts."
Consider Thomas Gordon's use of the term in "An Apology" (1719):

The Danger of the Church comes from divers Causes, the principal of which I shall reckon up.
And first, common Sense and Sobriety are great enemies of the Church. While folks are sober and rational, they can see about them, and want that large Competency of Blindness which so eminently qualifies a Man for a good Churchman. So long as they are destitute of that Title to Orthodoxy, they will be attending to the Means of their own interest and Safety, than which no greater Rubs can be thrown in the Priesthood's Way.
...
The Lord Syntax is past Fourty, and has all the Rules of Grammar by Heart; but notwithstanding this great Accomplishment, the Cowl is not yet taken off his Face, and he is still a Minor. But being a Babe in common Sense, he is consequently a resolute High Church-man.

These passages seem to equate "common Sense" with practical judgment in opposition to book learning and strict religious orthodoxy.
And ten years before Gordon's treatise, the Earl of Shaftesbury published "An Essay on the Freedom of Wit and Humour" (1709), which discusses "common sense" at length and from multiple perspectives but in particular emphasizes the term's association with the "Opinion and Judgment" of "the Generality or any considerable part of Mankind"—a description that emphasizes both the "shared" (neither "combined" nor "everyday," but tending strongly toward the latter) aspect of common and the "judgment" (not "mode of perception") aspect of sense.
When it comes to retracing the evolving meaning of "common sense," we're on a very slippery slope.

first use of common sense


How does a 'const struct' differ from a 'struct'?

Question: What does const struct mean? Is it different from struct?
Answer: The const part really applies to the variable, not the structure itself.
e.g. @Andreas correctly says:
const struct {
    int x;
    int y;
} foo = {10, 20};
foo.x = 5; //Error

But the important thing is that variable foo is constant, not the struct definition itself.
You could equally write that as:
struct apoint {
    int x;
    int y;
};

const struct apoint foo = {10, 20};
foo.x = 5; // Error

struct apoint bar = {10, 20};
bar.x = 5; // Okay

Answer: It means the struct is constant i.e. you can't edit it's fields after it's been initialized.
const struct {
    int x;
    int y;
} foo = {10, 20};
foo.x = 5; //Error

EDIT: GrahamS correctly points out that the constness is a property of the variable, in this case foo, and not the struct definition:
struct Foo {
    int x;
    int y;
};
const struct Foo foo = {10, 20};
foo.x = 5; //Error
struct Foo baz = {10, 20};
baz.x = 5; //Ok

Comment: Cheers. Can I get a +1 for my observation? :D
Answer: 'const' as the word constant itself indicates means unmodifiable. This can be applied to variable of any data type. struct being a user defined data type, it applies to the the variables of any struct as well. Once initialized, the value of the const variables cannot be modified.
Answer: Const means you cannot edit the field of the structure after the declaration and initialization and you can retrieve the data form the structure
Answer: you can not modify a constant struct ,first struct is a simple data type so when a const key word comes on ,the compiler will held a memory space on a register rather than temporary storage(like ram),and variable identifiers that is stored on register can not be modified
Comment: This is incorrect. The struct is not stored in a register.


SLD for OS Mastermap

Question: We are just looking into moving from MapServer to GeoServer for some of out WMS needs, one of which is to serve OS MasterMap to our users.
Before I have a go at creating the SLD styles for MasterMap does anyone have any they have created that they are willing to share?
Comment: OS forums has guidlines for ITN Roadlinks in OS MasterMap - http://www.ordnancesurvey.co.uk/itnforum/thread.jspa?threadID=841 but "I'm afraid we don't have any other SLD files for other layers of MasterMap. It is expected that users will work though the style guides to create their own and tailor colours and lines to suit individual requirements."
Comment: Thanks Mapperz, I posted on that forum and got a response from OS. I was more asking if anyone had a good example of there work they were willing to share before i sat and did the work. Lazy i suppose, but do we not all want similar styling for the basic MasterMap and then Change to suit specific projects?
Answer: If you are still looking for some SLD files I have attached a link to a zip file with SLD and QML for OS MasterMap.  These were created using QGIS and so may need some tweaking to work with GeoServer.
http://words.mixedbredie.net/wp-content/uploads/2012/08/Styles.zip
Answer: I can not help you directly, but I have two suggestions for indirect procedures:
1) If someone has the appropriate styling available for you as ESRI ArcMAP lyr-files an easy way forward is to generate SLD-files using GeoCat Bridge
2) Geoserver as WMS-forwarding. This means you can cache up any WMS-service and forward it for internal (or external) use. You should of course make sure you are not breaking any copyright regulations for the primary WMS-layer.
Other than this I can strongly recommend using Geoserver.
Answer: Youve probably sorted your requirements by now but there's now a set of SLD's available under opn licence: https://www.ordnancesurvey.co.uk/oswebsite/support/products/styled-layer-descriptors/index.html
Julian
Answer: Thank you Julian.
5 years later, the link to the SLD files has changed to
https://github.com/OrdnanceSurvey/OSMM-Topography-Layer-stylesheets
Answer: You can use the GetStyles SLD operation on a MapServer WMS to get an SLD representation of the style used by MapServer

SLD for OS Mastermap


How can I prevent rain from dripping off the roof rake edge?

Question: Recently I have noticed that about 1-2' from where the roof would drain into the gutter, water is dripping over the edge of the house on the side. What would cause that to happen? Nowhere else around the house does it do this.
Comment: What actual problem are you trying to solve? Your house will get wet when it rains, and that's not a problem statement.
Answer: That is not unusual if you live in an area where the wind /rain are blowing at an angle to the home. Even with no real wind it can happen and a photo would be helpful. It may be a slight difference in the stagger of the shingles or possibly the overhang has a slight sway or droop there we usually leave a bit of an overhang on the sides and I probably would not worry , but a photo might reveal an issue that we can point to.
Comment: How do I add a picture?
Comment: I added photos to the original post.
Comment: I just noticed the update. I believe what you have is normal, there is no way to stop the driven rain or gravity flow. You might try adding a bead of silicon sealer but this could hold water and cause problems. I would say this is normal from what I see. The roof pitch is somewhat flat so any creases in the tarpaper could redirect some flow.
Answer: Wind / slight pitch variation at that portion of the roof maybe...
You can add a "rain diverter:. Basically, something to redirect the water towards the gutter at the edge of the roof.
You can lift the shingles a bit and slide a L shaped piece there for example, say 2" x 2". You may not even have to attach it.
I've even seen home owners use a piece of drip edge upside down.


How to decribe this type of relationship?

Question: What is the word or words to describe a relationship between two persons who kow each other very well without making any effort to speak things out and that they just know that the other one holds the same thought as he/she does?
Comment: They are [completely] ***in synch*** with each other.
Answer: Two people who understand each other with few or no words could be said to be in tune with each other.

[Merriam-Webster]
in a state in which people agree with or understand one another · The president and his followers were clearly in tune. —usually + with · The new supervisor is not in tune with the needs of the staff.

Or they could be described as being on the same wavelength.

[Cambridge Dictionary]
(of two or more people) to think in a similar way and to understand each other well:
What makes the problem worse is that Howard and Tina are not on the same wavelength about how to deal with it.

But if you're talking about the overall relationship, then they might have an intuitive relationship.

[Merriam-Webster]
1 a : known or perceived by intuition : directly apprehended · had an intuitive awareness of his sister's feelings


Sub-dividing a polygon into smaller polygons

Question: In OpenStreetMap data, some large areas are tagged with a residential=yes tag. Actually within this large polygon there are multiple smaller (rectangular) houses (which are actually not drawn as yet). I would like to 'slice' the large polygon into smaller rectangular polygons. Or looking at it another way, I would like to or auto-generate as many fixed size rectangles (houses) into the larger area. I would like to achieve this either using QGIS or MapWindow, as I do not have ArcGIS. Is there any way to do this?
Comment: Please decide whether it is QGIS or MapWindow that you wish to ask about in this particular question.
Answer: It won't look terribly realistic without taking into account roads.  I suggest you'll need to work out a few classes of population density / urbanization, and build separate models for how you'd populate each one.  A very simplistic low-population suburban model may look like:

Split road lines into the segments that exist between intersection nodes
Calculate length of road segments
Divide road segment lengths by 100m and modulo by 1 to get N
Divide road segment lengths by N to get H
Every H meters along a road segment, create a 201m-long line centered on the road, perpendicular to the road
Buffer all roads by 100m
Split those buffers by the perpendicular line layer to create initial lots
Split those initial lots by the road segment layer to make a final lots layer
Establish centroids for those final lots
Paste a house model in a random orientation (or pointed towards the nearest road if you can figure out how) at each final lot

This should give you, very roughly, something like this, albeit without the cul-de-sac effect:
Answer: Roads will be important, so take your centerline roads geometry file, buffer it by 13' to get 26' wide streets. Use the roads-buffer polygon to clip the neighborhood polygon. Take the resulting polygon, negative buffer it by 10-20' to represent building setback, call it 'builable_lots". Second negative buffer, 50' deep, call it 'back_yards'.
Then overlay a grid of points at a scale of about 'yard size', say 30-50' offset, and use buildable_lots and back_yards polygon to select points that could be houses.
Buffer each point by half a house width (15'). Then use the buildable_lots and backyards to clip off the front/back of each circle, so you've got little polygons composed to two arcs and two flat-ish sides, each representing a house.
Then put a square minimum bound geography envelope around each house-ish thing.
Answer: Use an iterative negative buffer, sort of like a Serpinksy square, by repeatedly splitting the polygon into sub-polygons and negatively buffering them. Buffer distance (-20) to get an inset polygon, split that polygon into quarters. Repeat the negative buffer on that polygon. Do that until the size of the resulting polygon is roughly house-sized.


What does it mean when the native resolution of a display is NOT the highest resolution?

Question: For most displays that I had the native resolution was the highest supported resolution. However I have one display that has a different native resolution from the maximum one. Does that mean that the panel is NOT of that highest resolution?
Comment: Some resolution configuration dialogs have an option to display all resolutions supported by the card, including ones not supported by the monitor.  It's possible that's why you're seeing higher-than-native resolutions.
Answer: The native resolution is best resolution the display can use.
The display itself has so many horizontal and vertical pixels as the native resolution. The display does support higher resolution, but by selecting them, they compensate by simply not displaying all pixels.
For example, your display has a native resolution of 1280x720, but can display 1920x1080. It will accomplish this by removing 640 columns of pixels and 360 rows of pixels. The image will look different than when you have 1920x1080 as native resolution, but at least you can view higher pixels. This is essentially only useful to at least be able to see in this resolution, because displays that offer this are usually cheaper than displays that natively support it.
If you can get a display that natively supports the larger resolution and the price is not that much bigger, you will want to go for that display.
It is common for beamers to offer support for higher resolutions, but not actually have that resolution natively. Also, this is commonly seen in older LCD TV's.
When is this downscaling going to be a problem?
- When you want to read text in a small font. Important pixels will be missing and it will make reading text hard.
When is this downscaling okay?
- Video content (real life) will still look great on either resolution, because the content itself does not have much sharp lines or corners close to eachother where such detail will matter.
- If you have large text, the downscaling will nog have a significant effect, and the text is still readable. In essence, this can allow windows to appear smaller than if the native resolution is used, while still have readable text. It creates more real-estate on your desktop, but sacrefices clarity. Again, a monitor that natively supports the high resolution will always do it much better.


All Pairs Shortest Path vs Shortest Path

Question: I do not understand the difference between the All Pairs Shortest Path problem (solved by the Floyd–Warshall algorithm) and the Shortest Path problem (solved by Dijkstra's algorithm).
Comment: Have you read *any* resource on this? Even Wikipedia explains this reasonable well.
Answer: All-pairs shortest paths using Floyd-Warshall leads to determination of a value for all pairs of nodes that describes shortest distance of any path that exists between those two nodes. Note that sometimes, two nodes will have no path between them. Also, the graph that we apply the algorithm to may be directed, so one node may have a distance to a second node, but the reverse is not true. It classically takes $O(|V| ^ 3)$ time.
Dijkstra's algorithm solves the single-source shortest paths problem. It classically takes $O(|E| + |V| \cdot \log(|V|))$ time. Note that for dense graphs, $|E|$ = $O(|V| ^ 2)$, so we could say that Dijkstra's is $O(|V|)$ times faster than Floyd-Warshall.


Is there a way to find $\limsup$ and $\liminf$ for ergodic processes almost surely?

Question: Let $\{X_k\}$ be an ergodic process. I know that if $f$ is a smooth real valued function then by Birkoff's ergodic theorem, $$\lim_{n\to \infty}\frac{1}{n}\sum_{k=1}^n f(X_k)=\mathbb{E}(f(X_1))\ a.s.$$ Is there any similar result for the $\limsup_n$ or $\liminf_n$ of the sequence $\{f(X_k)\}$, i.e. results which involve expectation? More specifically is there a way to find $$\limsup_n f(X_n),\ \liminf_n f(X_n)$$ almost surely? Though I have asked the question for the general ergodic processes, even results for stationary processes like Gaussian processes will be helpful to me. Also, if they are not available, it will be very kind if someone can give me some references that I can use to find methods to find these results. Thanks in advance.
Answer: For ergodic $X_n$, almost surely
$$\limsup_n f(X_n) = \sup_n f(X_n) = \sup \{a \in \mathbb{R} : Pr(f(X_0) > a) > 0\}.$$
In other words, by recurrence, what can happen (with positive probability) will eventually happen---infinitely often.
Update (Sep 4, 2015):
You seem most interested in the case of a Gaussian process. Therefore, I should point out what appears to be two incorrect assumptions in your question.  You seem to assume that every stationary process is ergodic.  This is false, but the converse is true; every ergodic process is stationary.  Also you seem to assume that every Gaussian process is stationary.  Again this is false.
Consider a Gaussian random variable $X$.  Then $X, X, ...$ is stationary and (degenerately) Gaussian, but not ergodic.  Moreover, my above formula does not hold; instead $\limsup_n X_n^2 = X_0^2 = X^2$.  (I imagine one could construct non-degenerate examples of stationary Gaussian processes where my formula at the top doesn't hold, but I am not certain.)
Further, if $Y_n$ is an i.i.d. sequence of Gaussian random variables with mean 0 and $a_n$ is a sequence of positive real numbers which converges to 0 sufficiently fast, then the sequence $a_n Y_n$ is Gaussian, but it is not stationary.  Also, by Borel-Cantelli, almost-surely $\lim_n a_n Y_n^2 = 0$.
An even better example for my last point would be the following.  If $B_t$ is Brownian motion, then the processes $Z_n = B_{1/n}$ is Gaussian but not stationary.  Yet, almost-surely, $\lim_n Z_n^2 = 0$.
Comment: So does this mean that if $\{X_k\}$ is a Gaussian process, $\limsup_n X^2_k=\infty$ and $\liminf_n X^2_k=0$?
Comment: Yes (assuming $n$ is $k$).
Comment: My last "yes" comment assumed you were referring to *ergodic* Gaussian processes.  I updated end my answer accordingly.
Comment: Thanks for the updates, it cleared some big misconceptions I was having about the ergodic processes. By the way can you kindly direct me to some reference from where I can learn about ergodic processes and stationary processes in depth?


How to find the first git commit that's not my commit going back in time?

Question: Is there a way in git to find the first (second, third) git commit that's not my own commit going back in time?
Answer: The following commands may prove useful:
git shortlog

git log --committer '^(?!YOURAUTHORNAME).*$' --perl-regexp

or similarly,
git log --author '^(?!YOURAUTHORNAME).*$' --perl-regexp

These two variations of log use a regular expression to say "not my user."
You can find info on these commands here. Obviously replace YOURAUTHORNAME with enough characters of your own username to make it unique. If you absolutely only want the single most recent commit, include the --max-count=1 argument to the log command.
As demonstrated with other answers, there are many ways to produce this, including using other linux tools like grep or sed.
Answer: Good question, not too sure if Git can do this itself, but a bit of help from good old "grep" should do the trick.  Try this:
git log | grep "Author:" | grep -v "Author: JohnCrawford" -m 1

Obviously put your own name in it and not mine ;-)
Answer: git log | grep -P -B 1 '^Author:.*<(?!${YOUR_EMAIL})' | head -n 1

Replace the string ${YOUR_EMAIL} with what it should be and you'll get the commit hash of the first commit that doesn't match your email address.
First 3 commits that aren't yours:
git log | grep -P -B 1 '^Author:.*<(?!${YOUR_EMAIL})' | grep ^commit | head -n 3