Risks of Long-life Session

Question: Most "big" websites seem to have enormous sessions. From looking through the cookies, Stack Exchange seems to have a one-week rolling session, GitHub has 45 days, and Gmail seems to have a never-ending session.
What are the security implications for having sessions longer than an a few hours? Apparently, the recommended time for session expiry is just fifteen minutes, but obviously that's pretty bad for user experience. Is there a nice, happy medium for session expiry that smaller webapps can use? How do major websites manage to get away with such long sessions?
Answer: Indeed the question is pretty interesting. Either way it boils down to a risk assessment plus controls in place of each system. Roughly, we could imagine 2 undesirable consequences of long-life session:

Somebody can just open browser with your logged account. Controls:

Close all sessions from another device via Account settings if you suspect that your personal device has been stolen.
Lock your personal device. Except that the session is 15 minutes long, there is no big difference between 7-week session and infinite session: somebody can use your computer if you don't lock it, and the session is usually being renewed infinitely until you use device. So you should lock your device and close all sessions from another device if your computer has been stolen.

Somebody can steal your session ID and open it on another device. Controls:

User notification about that via Push Notifications, SMS, e-mail.

About controls in place of mentioned systems, let's look at each case:

Stack Exchange has 1 week rolling session. Controls: you can login with Google or with custom e-mail, you can remove sessions, you can logout.
GitHub has 45 days. Controls: there is a two-factor authentication (2FA), session control, backup e-mails, SSH keys, logout.
Gmail has never-ending session. Controls: suspicious login detection, alerts, 2FA, backup e-mails, everything....

Keep in mind that the difference between 7 days and 45 days session policy is kind of subtle: while session is still active somebody can just open your browser if you forgot to lock your device. Therefore it looks like there is no too much to do about a not locked device, but GMail has pretty huge control about any suspicious activity. Anyways, security engineers select expiration time from their internal security risk assessment which may differ from case to case, it may differ from our perception, there is always a portion of subjectivity.
Answer: My opinion is that many services need to find a balance between security, usability, and also their business models. More and more companies want to collect as much data as possible about their users, and for that reason they want you to stay logged in all the time. These services often beg/nag you to log in or register, if you scroll their pages while logged out. Social media features also rely on sharing stuff quickly and almost compulsively, and that can be done comfortably only if you are already logged in to your social media websites, basically all the time. What about the security risks? They are probably considered to be negligible, thanks to all the other security controls these companies have implemented, and they probably decided it's not worth hurting their business model to gain a little more security.
Let's see the risks, and why they could have decided to leave them out of the equation.

Your brother uses your computer, and you forgot to log out. If your someone else has unrestricted access to your computer, you already have bigger problems to deal with. Making the session expire after a few hours instead of days won't have a significant impact on your security anyway.
You logged in from an internet cafe, and forgot to log out. Again, whenever you use someone else's machine, you are going to have bigger problems if you are not very careful. In any case, if the website allows you to "log out on all other devices", then you can stop the attacker's session as soon as you realize something is wrong. Also, 2FA is going to help, or even just setting a recovery option (email or phone). Most social media websites have those options, and some even beg/nag you to use them.
Someone steals your cookies. How, and what for? Websites that are serious about security use http-only cookies, HTTPS, HSTS, do security checks on your IP, your location, your device, your behavior, offer 2FA and various recovery options, etc.
CSRF and XSS. Some vulnerabilities allow you to steal cookies, or ride existing sessions. If you are logged out, these kinds of attacks might not work. But serious websites probably already implement CORS, Content Security Policies, don't allow browsers to load them in iframes, offer bug bounties, have internal security teams, develop and/or use artificial intelligence to monitor their business, etc. Would reducing the cookie expiration time to a few hours or even minutes have an impact, in this scenario?

To sum up, for those "big" companies reducing the session time isn't going to have a noticeable impact on their security. Making sessions expire too soon is actually going to hurt their businesses, because their users expect and are expected to be always connected. I still log out on every website when I'm done using it, because it's always a good habit: we now that not every website can be expected to follow the best security practices or invest enough resources in security like Google/Facebook/etc.
Answer: TL;DR Cookies can have a lifetime explicitly set, or expire at the end of a browsing session. The Expires attribute does not necessarily mean the user is considered "logged in" for that entire time.

From looking through the cookies

I think there is a misconception between the cookies and the application logic implemented around them. If you look at the cookies alone: some site use cookies before the user has even authenticated--so as to track anonymous users. The use of cookies can be for a wide range of tracking purposes, including tracking authenticated users.
A session cookie is a specific cookie that expires with the users browser session. Namely, when the user closes their browser the session cookies expire.
There is nothing stopping the server (application) from deciding require the holder of the cookie to (re)authenticate.
Comment: Thanks for your answer! I'm not referring to session cookies, but rather server-side sessions that are identified via a cookie containing an ID. I got the times I mentioned by searching for a session ID cookie (usually having something like `sid` or `sessionid`) and refreshing with them deleted (every time, I was logged out).
Comment: You do bring up a good point that the `Expires` attribute doesn't necessarily mean the lifetime of the session. Though, from my experience with the sites I mentioned, I can be inactive for days at a time and stay logged in, so I think my assessment is at least partially correct.

Risks of Long-life Session


Why does my gravatar change?

Question: I noticed that my gravatar has changed about 5 times for the last month. As for now, my gravatar on quant.stackexchange is brown, for the SE user it's blue but for the MSE it is red (while it was blue too 2 days ago). What causes a gravatar to change?
Comment: Did you by any chance change e-mail addresses?
Answer: I'm pretty sure you didn't specify any e-mail address. In this case your gravatar is based on the last ip address used to access each site and will change if you access the sites from multiple locations. You can fix this by specifying a fake e-mail address in your profile if you don't want to put your real e-mail address. The appearance of your gravatar is then based on that address.
Comment: @Rebecca: Ah, thanks, so finally I know _why_ it changes!

Why does my gravatar change?


Flour shortage in baking

Question: I have to make brownies but I am abt 3 tablespoons short of flour,  can I replace it with all purpouse flour or should I make the brownies with the less amount of white flour that I have..
Comment: All purpose flour **is** flour. What does the recipe call for?
Comment: Are you using cake flour ?
Answer: Sure, use all-purpose flour.
I don't know what your original recipe said, or what exactly your non-all-purpose white flour is, but all-purpose flour is normal, regular flour, exactly what a brownie recipe that calls for "flour" would normally mean. Even if there is a difference here (e.g. cake flour vs all-purpose flour) a few tablespoons in brownies is not going to be a big deal.

Flour shortage in baking


How to ignore div's of particular class when getting element from point

Question: I'm using Google Swiffy animations, which are contained within
s that cover the entire area of our document.  There are several layers of these animations.  Much of the animation is transparent, but we don't have the option of cropping out the whitespace.  For example, our web application is 1000px x 500px, and there are several layers of animation
s that are absolutely positioned at 0, 0 and are also 1000px x 500px.
Beneath the animation layers, there are interactive controls, buttons and links.  On many browsers, excluding IE of course, we can simply use the CSS pointer-events: none; style and the clicks passes right through the animations to the controls.  However, a few customers still use IE, so we need to support them.
I've been experimenting with document.elementFromPoint();, however, it only gives me the animation div itself.  Stepping out of that div using parentNode also doesn't seem helpful because there is no translation point.   I really need something like ActionScript's localToGlobal().
Is there a way to ignore all of these animations divs when using elementFromPoint so I can identify the intended click target?
Answer: It looks like a specific CSS3 property from mozilla.. Then I've found this post: How to make Internet Explorer emulate pointer-events:none?


Wordpress JSON API remove posts from a specific category

Question: I have installed Wordpress JSON APi plugin, the idea what I want to do is to retrieve all posts from a websites except a specific category for example with ID: 434.
I need all posts except from this category.
The query is like this example: www.example.com/?json=1&count=300
I have changed something in code but it removes the details of categories, not posts.
if ($category->id == 434 && $category->slug == 'archive') {
// Skip the 'archive' category
continue;
        }

How it is possible, please help me!!!
Answer: I found a solution. You have to go to the folder controllers/core.php and there you have to change the function get_recent_posts().
You have to add this code to remove categories that you don't want:
public function get_recent_posts() {
global $json_api;

// get all the categories from the database
        $cats = get_categories();

            // loop through the categries
            foreach ($cats as $cat) {
                // setup the cateogory ID
                $cat_id = $cat->term_id;

                // create a custom wordpress query
                query_posts("cat=-434,-22837,-13571,-1,-18,-17385");
                // start the wordpress loop!

                while (have_posts()) {
                $posts = $json_api->introspector->get_posts();
                return $this->posts_result($posts);
                }
           }

  }

Comment: Thanks for sharing the solution, please mark this as the accepted answer.


Automatically align the border of one shapefile to overlap the border of another

Question: Can I automatically align the border of one shapefile to overlap the border of another, without editing each vertice individually?
Answer: I believe what you are searching for is called Integrate (ArcGIS Help 10.2 - Integrate (Data Management)):

Integrate is used to maintain the integrity of shared feature boundaries by making features coincident if they fall within the specified x,y tolerance. Features that fall within the specified x,y tolerance are considered identical or coincident.
Answer: There are many methods available and they all have pluses and minuses.  See http://resources.arcgis.com/en/help/main/10.2/index.html#//01m800000015000000 for some but not all.  The advantage of the Integrate tool (or Validation of two layers in a topology) is that it happens with little work, but only if the differences are within the tolerance.  You can increase the tolerance but at some point it may move vertices in both layers you don't want moved.  Since both change the inputs do them on copies or in an edit session in case you don't like the results.  Note, even though you can set a priority for which layer is to align to the other in both; people on these forums have often commented that both layers had vertices moved. I usually end up either 1.) choosing to reshape one polygon and using the trace tool to match it to the other layer, or 2.) (since I have ArcGIS Advanced) using the desired shape feature to first split the target then deleting the "scrap", and then using construct features taking into account existing ones to fill in the gaps, then merging them with the main poly to finish.


Should you comment changes in code and in the changelog?

Question: I have notice a trend for developers to comment their changes less with the justification that the purpose/date/reason is in the changelog. They have some very justifiable claims that duplication of effort is occuring if we require both.  I am spending some serious amount of time tracking down changes.  No specific direction has been given and the lack of a consistant approach has me a little peeved.  Typically are people doing both?  Are there tools I might want to try out to reduce the hunt down time.  Currenltly we have cvs, git, and svn implementations.
Answer: Comments in the code should describe the what the code currently does.  These comments will change only if the intended behaviour of the code changes -- if the revision is just a bug fix, they should not change.
Comments in the change log should describe what changes were made in this revision.
Corollary: Avoid putting revision numbers/dates and the name(s) of the programmer who made the changes in the code comments.  (Thanks to both Jonathans.)
Comment: Also comments in the change log can't be changed but comments can be changed in the code by anyone at any time. Therefore any dates, names or revisions information should not be in the code.
Comment: I don't always agree on dates.  If the bug is related to a workaround for a bug in a compiler, then it is helpful to have the platform, compiler version, and date in the comment explaining the hack.  Then, 5-10 years later, you can review the code and remove the hack with more confidence.
Comment: I have been struggling to put that thought into words.
Comment: @Jonathan Leffler: I agree -- if the date refers to an external object, then it's part of "the intended behaviour" of the code and should be documented in code comments.
Comment: I've updated the post to hopefully be clearer on this. (In the same way, you are allowed to include programmer names in code comments if it makes sense to do so, provided you're not giving the name of the programmer who made the change for that reason alone.)
Answer: Don't clutter your code with comments that explain changes.  That's just one more thing that needs to be maintained and probably won't be consistently, leading to more errors and more changes.  Use the source control comment feature for what it is intended.
If you need to explain why something was done a certain way in comments in your code, that's fine.  As long as it isn't required for every change.  That leads to clutter comments like
<code>// fixed bug #3365
</code>
Comment: Changed the question on you a little sorry.
Answer: Arguably.  If you change the code but don't update the comment then comments get out of date.  I'm a huge stickler for this sort of thing and I forget to update comments more often than I'd like to admit.  But the description of the change is (or at least should be) never wrong.
Comment: Changed the question on you sorry.
Answer: Not in my opinion.  Code should be commented such that you can easily read the code.  This is even more necessary for code that had a bug which was fixed.
Both places should be well commented and it is probable that they will contain duplicate descriptions.  However they are both used for different reasons.  When you are backtracking through source control it is usually to track down how an issue was introduced.  Having good comments can make this process much easier.  Code comments allow you to work through the code to try and find the current bug or add the next feature.
They should be doing both and understand why it is important.
Comment: You would think they would want to comment the code more because they interact less with the source control system.  The mere act of making them give clear details in the changelog is making their habits bad.
Comment: Changed the question on you a little bit.
Answer: Both the comments server different purpose. The code comments are to illustrate and explain what the piece of code does, how it works, what it expects and what it returns. Also the exceptional conditions that can arise.
The check-in comments are more to inform what changes you have made and the reasons for the change.
Answer: Dont know if you use annotation tools, Some IDE's like eclipse integrate well with CVS and show you exactly which line was modified when and by whom if you use the cvs annotation tool.
Comment: Tools can help you vote.  Unfortunately I would need many tools to cover all the cases.


Does the fact that there exists a polynomial time quantum algorithm for integer factorization suggest that integer factorization is in P?

Question: Just as the title says: Does the fact that there exists a polynomial time quantum algorithm for integer factorization suggest that integer factorization is in P? Additionally, if one could show that a problem known to be in NP had a polynomial time quantum solution, would that be enough to show that P=NP?
Comment: Why do you think that it *might* suggest that?  This would be a  better question if you edited it to share your thoughts -- we might be in a better position to give you answers that you'll find more useful.
Comment: @D.W. I'm far from an expert on the topic but I took a parallel computing course at my university. For my final project in the course I wrote a parallel algorithm to do integer factorization of large numbers. I was talking to one of my professors about the topic and we got onto the discussion of the time complexity of the problem and he mentioned that the fact that there is a polynomial time quantum solution to the integer factorization problem might be evidence that it belongs to P. So, I wanted to get some more input on the topic.
Answer: No.
The class $P$ refers to the classical Turing machine model, we don't know if $BQP\subseteq P$ (we suspect that it isn't), thus this does not mean that factoring is in $P$.
We don't know how to simulate a quantum algorithm in a classical machine with only polynomial slowdown (the naive translation would result in an exponential algorithm for factoring).
Many problems in $NP$ have a quantum polynomial time solution, and also classical polynomial time solution, since $P\subseteq NP$. See our reference question for an overview and precise definitions.
The more interesting question would be if quantum computers can solve NP-hard problems efficiently, or formally, if $NP\subseteq BQP$. We suspect that this statement is false, though even $PH\subseteq BQP$ is still open. Proving $NP\not\subset BQP$ would also in turn prove that $P\neq NP$ (since $P\subseteq BQP)$.
It is also worth mentioning that factoring in not known to be NP-hard (and believed not to be) so we can still have both $NP\not\subset BQP$, and a polynomial algorithm for factoring in a quantum computer.
See these questions:
Consequences of SAT∈BQP,
Can a parallel computer simulate a quantum computer? Is BQP inside NP?,
for a discussion on the possibility of $NP\subseteq BQP$.


Can I visualize the photo location of the photos in a Shared Albums in Apple Photos?

Question: Can I visualize the photo location of the photos in a Shared Albums in Apple Photos or do I have to import them first?
Answer: If location data was included for the published items (shared album) you should be able to see it... it's a preference option.
Answer: Photos.iOS will show the Photo Location map for an album but NOT for a Shared Album. Photos.macOS will show Location data for a Library (does not support for album level) but I am pretty sure this doesn't include Shared Albums.
I would say the answer is No.


C wire - Where does it go?

Question: Got a wifi thermostat.  Behind the old thermostat was a blue wire.  The other side of the blue wire in the equipment isn't plugged into anything.  I need to get the 24v common hooked up to this blue but don't know where it goes.  Any help is greatly appreciated.
Answer: Fortunately, in your case, the fat blue wires in your first photo are the transformer return -- connect the skinny blue wire from the thermostat cable to the fat blue wires. Since the air-handler maker used quick-connect terminals for the internal wiring, you can crimp one of these onto the end of the thin blue wire and slide it on in place of one of the fat blue wires somewhere, then slide the fat blue wire onto the stacked end the linked terminal provides.
Comment: For testing purposes I could simply just expose some of the copper in the blue skinny wire and attempt to push into one of the blue wires?  The digikey link looks useful for a long term solution!  To crimp one of those digikey products do I simply use pliers or need some special tool?  OUT of curiosity, what lines are the fat blue wires in the electrical diagram?    Is it the BL on the right side of the diagram?  I see that ground symbol to the right of it.
Comment: @user3330299 -- while it's *possible* to crimp these with pliers, you'll get somewhat better results out of a $10 crimper from the hardware store.  (I use a more sophisticated ratcheting tool that costs ~$50, but that's probably not worth it for a one-off job).  The fat blue wires are indeed the wires marked BL on the right side of the diagram.
Answer: You don't show where all the thermostat wires are connected in the unit, so I can't see how it's currently connected. But according to the schematic, the blue wire heading off to the left of the first photo is the C wire.

C wire - Where does it go?


What is a suitable substitute for 'approach', as used in 'research approach'?

Question: When currently writing a proposal, I find myself often using 'research approach' and 'approach to research', but I cannot come up with a suitable alternative to avoid tedious repetitions. I'm trying to describe how research is conducted in different fields quite broadly (so including theoretical background, empirical methods, "institutional memory" etc), so 'research methods' is too specific, but 'research philosophy' feels to vague.
Comment: _Approach_ is from a motion metaphor, where you're seeking Truth in the jungle and gradually get closer to it. Asymptotically, no doubt. It just means a way, manner, or means of doing the research, whatever kind it may be and whatever kind of "doing" it involves. All you need to do is figure out what metaphor you want to use. Motion is good -- or can be good, if there is any observable; but accretion of knowledge (build a firm foundation, increase performance, maintain and improve infrastructure, access), for instance, is another possibility. There's lots more.
Comment: "Technique", "method", "procedure", "process"...
Answer: I'd vote for research methods or research methodology here but if that does not fit your needs for any reason, you could use these terms which offer a broader coverage:
(a) research process
(b) research system
Answer: The phrase research approach is much less specific than research method.
To me, it gives the gist of the method, as well as including elements that don't directly fit into the method proper. It's a high-level term and IMHO overused and jargony.
For example, "Our research approach to studying X requires that we travel and hire extra staff". Here, you would not use "research method" because you'd never actually include these two facts in a methods section of your publication.
I think approach to research is fine when comparing how things are done in different fields. For example, physics takes a more quantitative approach to research than...
I would avoid research system and research paradigm. And definitely don't use research framework. We don't need more frameworks.
Comment: Your second to last paragraph is exactly how I'm using it - comparing fields on a large scale. This is also why I'm hesitant towards 'research method'.


Suppose G is a connected graph in which each vertex has even degree. Then, G has no cut edges.

Question: I tried to prove this statement by contradiction, where G is a connected graph in which each vertex has even degree and G has a cut edge, then proceed letting x, y, z to be in G where x, y are endpoints to the cut edge e. So x and y are in two separate component of G - e. Then I tried to show that there is a path from x to z and one from y to z, so x and y must not be in two components. Therefore there is a contradiction. But I don't know if the proof is valid and how to best utilize the fact that the vertices have even degrees?
Comment: How did you show that there is a path from x to z and a path from y to z? This doesn't immediately sound easy? The easiest way (IMO) to prove this result is to observe that x and y each have odd degree once e is deleted. Then if x and y are in the same component, contradiction e was not a cut edge, whereas if x and y are in different components, then the degree sum of each component is odd, contradiction by handshake lemma.
Answer: HINT: if there is a cut edge $e$, then each of the 2 components of $G\setminus \{e\}$ has exactly $1$ vertex of odd degree. The Handshake Lemma has something to say about this though.
Answer: Let's take an arbitrary edge $e$ and study whether it's a cut edge. We will take its end points $v, w$, and see if there is a path from one to the other that doesn't use $e$.
The graph has an Eulerian cycle. Take such a cycle that starts at $v$. Either this cycle gets to $w$ before it traverses $e$, or its reverse does. Either way, deleting $e$ does not disconnect the graph.


Version control with Visual Studio, should individual project have their own version control?

Question: I currently have a solution wide version control. Is it best practice, or is it better to have version control on each project in the solution?
Answer: Having different versions for each project is more effort and you should do that only if you need it. E.g. these projects are used by different solutions and may be released in different versions that you have to support independently.
If all that does not apply, stick with one version for all projects.
Answer: Everyone probably has their own way of going about it. Personally I would keep the version control solution wide, unless an individual project is able to stand on its own without the rest of the solution.


Is switching my flourescent light fixures to LED fixures a DIY project?

Question: My house has a fluorescent light fixture that includes a ballast. I saw instructions here for changing it to a regular light fixture that I can use for LED bulbs instead. Is this a project that I should attempt on my own? Do I need to hire an electrician? I have switched numerous switches in my house so far, and I'm a decent learner, but I don't have vast amounts of electrical experience.
Comment: It depends entirely on you. It's DIY for some, and far better to hire an electrician for others. Telling which you are across the internet is difficult.
Comment: I'm assuming, since most fluorescent applications provide a decent amount of light, you'll be replacing these with larger LEDs.

Keep in mind many larger LEDs give off electromagnetic interference (EMI) more so than fluorescent. You don't generally notice issues with cell phones, WiFi etc. with the 60 - 80 watt equivalents. Start getting stuff that's bigger and you may notice issues. However, with just one, you're probably fine.

Just FYI: I've had this happen to multiple people who tried exterior high output LED flood lights, and can no longer open their garage door from 10 ft away.
Comment: Ah.  Thanks for the heads up.  These are actually small circular tubes. I have no idea why the previous owner installed it this way.
Answer: Fluorescent fixtures are fairly simple to work with. There are LED tube bulbs that will plug right into the system without touching the ballast, but these cost more and are less energy efficient. Upgrading your existing fixture to ballast-free LED's should be easy- mostly consisting of just removing and throwing away the old ballast and rerouting some wires. If your existing tubes are not T12 you would also have to change the tombstone connectors.
There is a better article to read here at EarthLED that describes different fluorescent tube replacements and how to use them. Here is a brief excerpt from the article:

The oldest but also least expensive and most widely installed option
  is the ballast bypass or direct wire LED fluorescent replacement tube.
  Instead of building expensive circuitry inside to enable the function
  with a ballast, this option instead allows the user to bypass the
  ballast entirely and run directly off of the line voltage at the
  installation.


Connecting iPad Pro to the internet via Ethernet

Question: Okay, so you would think my client wanting to get an iPad online via ethernet would be simple and straight-forward way for me to earn $20.  When I arrived, this is the setup I found:

The iPad Pro (model MQDX2LL/A, with software version 14.4.1) cannot simply be plugged into the GS108PE ethernet switch because an error message occurs on the iPad when you plug in the lightning adapter: "The attached accessory uses too much power."
Upon arrival, the Amazon Basics USB Hub was not plugged into an outlet, and I found that plugging in the 5-Volt DC stopped that error message from popping up; apparently, there is a power requirement to send data of a certain quantity through the camera adapter (so I read online).  With sufficient power, under the iPad's Settings the "Ethernet" option appears, as exemplified here:

The problem I faced then was that something seemed to be assigning the iPad a 169.254.xxx.xxx IP address, which is the dummy value for "bad connection" or something of the sort.
Periodically, after restarting the EU2251 modem, a real IP address of 192.168.x.x would appear, but would suddenly and unexpectedly revert back to the default dummy address 169.254.xxx.xxx after some time and without notice.  I tried "hard-coding" or manually setting the IP address, but it wasn't clear this was working.  Problem 1: How to secure a stable IP address.
Now, sometimes when I had a real IP, I would test a website in Safari, but I always received a message along the lines of "The site can't be reached" with subtext of "www.X.com's server DNS address [or was it IP address?] could not be found".
I found online one forum suggesting manually setting the DNS to Google's like so:

However, this didn't resolve the issue; rather, attempting to load a website would simply hang for almost a minute or two before seemingly timing out, whereas before a website could not be reached in just a few seconds.  Problem 2: How to access the internet.
So that's the situation.
With so many moving parts here, I'm not really sure what the next step in trouble-shooting this might be.  There's the modem, switch, and desktop that could be configured; there's hardware and cabling limitations that could be preventing data transmission or holding compatibility-issues; there's the iPad itself.
I'm wondering if there's a setting upstream from the iPad that I need to configure to whitelist, acknowledge, or route it.  Do I need to hard-code/manually enter the IP address, subnet mask, and router in the iPad settings rather than relying on its default "Automatic" detection ?  Am I using the wrong ethernet port in the switch (I've tried multiple)?  Networking is not my forte, yet as seen, this is a relatively unusual situation.
What do you think ?
(P.S.- To be sure: the internet works fine from the desktop, and the iPad can connect to the modem/internet via Wi-Fi.)
Reference: Why not just use an Ethernet-to-Lightning adapter?  "Not enough power."
Answer: 169.254.xxx.xxx is a self-assigned link-local address that you see only if IPv4 address assignment via DHCP was not successful. Read it as "nobody has assigned me an IPv4 address".
I suspect one of the very high number of connectors (8 if I counted correctly) between the iPad and the modem causes problems. Get an Ethernet to Lightning adapter (e.g., from Belkin), and keep the USB hub out of things. (USB hubs are very complex devices and endless sources of problems.)
Comment: That's probably why the Belkin adapter feeds power for the iPad through the Ethernet adapter: https://www.apple.com/uk/shop/product/HMJU2ZM/A/belkin-ethernet-power-adapter-with-lightning-connector
Comment: The issue with the Ethernet-to-Lightning adapter was "The attached accessory uses too much power."  This seems to be an issue specific to the iPad Pro.  Ref: https://forums.macrumors.com/threads/has-anyone-tried-using-ethernet-on-ipad-pro.1974288/page-5
Comment: Thanks, Markus.  I'll recommend this and if we can get ahold of one to test it (mostly on backorder), then I'll report back.  I appreciate your help !


How do I create a view with filter on a field built using the date module?

Question: I created a content type that includes a date field.  I want to create a view that filters on this field, but it appears that the field is being seen as a text field because there are no operators for greater than or less than like I would see if I were filtering on the posted date.  I only see text based operators like length, starts with, etc.  What do I need to do?  I'm running Drupal 7.  How do I make this work?
Answer: You have 2 types of date filter handlers in Views ; try not to use the one that is your field but the date field, that will ask you on which date field it'll filter.
Comment: Thank you.  I finally found what you were talking about after I enabled the Date views piece of the Dates module.
Answer: Just to better explain how to have date support on views: it has to be enabled "date views" module.
People using drush just needs to execute:
<code>drush en date_views
</code>


How do I factor sweep and dihedral in the lift equation?

Question: I'm guessing that you add cos(angle of dihedral) to calculate lift loss by dihedral, but I'm not sure how to factor in the lift loss by the wing swept. Could someone help me include lift loss due to dihedral and sweep? Thank you
Note: I mean without factoring it into the lift coefficient.
Comment: I don't think you can avoid 'factoring it [wing sweep] into the lift coefficient'. The sweep changes the angle of attack response (reducing the lift slope in the first place, but not only that), rather than lift per se. If you linearise though, then it's possible.
Answer: Snorri Gudmundsson's "General Aviation Aircraft Design"'s equation 9-57 allows you to estimate the lift coefficient curve's linear slope for trapezoidal/swept wings:

Note: the equation is in radians, not degrees
As for the dihedral, Equation 9-33 estimates the impact on angle of attack and Equation 9-35 estimates the resulting lift force:

Let me know if it's not what you wanted, though, I didn't quite get the "without factoring it into the lift coefficient." part - isn't the question's title about how it impacts the lift coefficient?


Grocery Store Aisle

Question: When speaking the phrase grocery store aisle, I leave the s in aisle silent.  Are there any regional variations of English in which the s is not silent?
Comment: Interesting comment here:http://www.etymonline.com/index.php?term=aisle
Comment: I can add that I've never heard the "s" pronounced in my region (the US - specifically the Northeast - major metropolitan areas + New England).
Comment: No, I certainly know of nowhere in Britain where the s would be pronounced, in *aisle*, *isle* or *island*.
Answer: OED lists a large number of forms — probably unsurprisingly since it's a Middle English word:

Pronunciation:  Brit. /ʌɪl/ , U.S. /aɪl/
Forms:
α. ME eile, ME eill, ME ele, ME elle, ME hele, ME ill, ME ille, ME–15 eyle, ME–15 yele, ME–15 yle, ME–18 ile, 15 heyell, 15 yell, 15 ylle, 18– hile (Eng. regional (south-west. and Isle of Wight)); Sc. pre-17 eyll, pre-17 iile, pre-17 iill, pre-17 ile, pre-17 iyle, pre-17 iyll, pre-17 yell, pre-17 yill, pre-17 yle, pre-17 yll; N. E. D. (1884) also records a form lME eille, lME ylle.
β. lME ilde, lME jlde, 15 ȝelde, 15 yeld, 15 yld.
γ. 15 oyle, 15 (Sc.) 16– aisle, 15–17 ayle, 16 oylle, 17–18 aile.
δ. 15– isle (now nonstandard).

The only form which has an s originated in the 17th century, and that's the form which has survived (apart from the "nonstandard" isle).
Regarding the -s-, OED has

The γ. forms show alteration after Middle French, French aile wing, etc. The modern standard spelling aisle, which was hesitatingly admitted by Johnson (1755), probably shows an alteration of ayle after the δ. forms, rather than being in any way directly influenced by the rare Middle French, French †aisle.

Thus there is only one form of the word in its history which includes an -s- and that may have been influenced by the French aile. OED comments "In Middle French and early modern French spellings with medial -s- this is a purely graphic device serving to indicate the open quality of the vowel."
The word itself derives from Anglo-Norman ele, eele, eile "wing of a church" (late 12th cent. or earlier), according to OED, which is directly related to the French aile.
Accordingly, it seems reasonable to say that the -s- in aisle has never been pronounced.
Comment: It appeared to me from glancing at the OED that the s comes rather later than the 15th century suggested by Etymonline (see @mplungian comment). the first example with both an a and an s is 1789.

Grocery Store Aisle


Undo within a modal dialog

Question: We're having a debate about how "Undo" should operate, specifically within a modal dialog box (on a desktop platform).
What I see generally in applications is that each individual control (text box generally) has its own "undo". So if you type a change into a text box, then press Ctrl-Z it undoes the change to that text box.
What I've never seen is an Undo chain that spans multiple entry fields in the dialog. So to explain:

User makes changes to field A
User makes a change to a different field, B
User presses Ctrl-Z. Change to field B is undone.
User presses Ctrl-Z again. Focus changes to field A and change to that is undone.

This might be what you expect within an "editor" (the "project properties" editor of a C# project within Visual Studio does this for example), something with a "save" model, but doesn't feel like what I'd expect within a modal dialog with an "ok"/"cancel" model. However I can't find any UX guidelines that back my feeling up (or indeed contradict it).
It perhaps depends on how complex the dialog is. Clearly for a simple dialog, just cancelling the dialog gets you out of trouble, or using a "reset" button for example, something along those lines.
Is there a good principal to apply here, a "normal" behaviour?
Are there any documented UX design principles I can reference that might cover this?
Thanks.
Answer: I would enable the undo functionality inside the modal. The way I see it, when the it is open, everything behind it freezes and all edits only apply to the modal. Please make sure you test this with your users and see if they expect this functionality.

Undo within a modal dialog


What is the \name macro?

Question: Is anyone familiar with the macro \name{}? The AucTeX configuration uses it to avoid spell-checking people names, but it does not seem to be defined.  Is it just a mock macro, or it has some real usage somewhere?
Comment: What happens if you write `\show\name` somewhere in your document?
Answer: When you wrote The AucTeX configuration uses it to avoid spell-checking people names, I think you answered your own question.  I've never heard of Auctex recognition of a \name macro before: where did you find it?  It is not in the default ispell-tex-skip-alist Emacs variable on my setup, so it needs to be especially set up to do that.
In any case, the contents of Latex variables will never be defined by Auctex, since Auctex's job is just as an editor.  To use this macro you will usually have to insert something like \let\name=\relax, unless the macro is defined in the right way in one of your class or package files — I suppose there might be one that does that.  And if it has not been so configured, to tell Ispell not to worry about the spelling of people's names you need to add ("\\\\name" ispell-tex-arg-end 1) to the contents of the ispell-tex-skip-alist Emacs alist.
Comment: Thanks, Charles! mpg probably got the right answer, but your solution for spell-checking is useful.
Answer: The answer depends on your preamble. For example, the letter class and many of its derivatives (extletter, akletter, chletter, etc.) define it as a macro to be used like \title: you put \name{You Name} somewhere in the preamble, and then Your Name is used at the appropriate place in the document.
Other classes and packages define it another way.
Comment: Figures that's right - This macro probably comes from the letter document class. However, it is useful for spell-checking, as Charles describes.

What is the \name macro?


Will removing the insulation from an unfinished basement cause it to be a lot colder?

Question: We live in upstate NY and the house has an unfinished basement.   It's waterproofed with cinder block walls and a concrete floor. There is no framing, no drywall.  However someone put up this hanging batting insulation with a white vapor barrier over it and it is just nailed to the cinder blocks.  It's awful looking so we really want to take it down.  We can't afford to frame it and insulate it properly since it's just for storage and laundry.
So my question is:
-If I take off this current insulation is the basement going to be a lot colder?  Is it a bad idea to get rid of it even if it hideous?  If so is there a cheap idea for insulating without framing?
Comment: A picture of the insulation and vapor barrier might be helpful.
Comment: I'd question whether the vapor barrier is on the right side of the insulation - depending on how well it's water proofed, water can migrate in through the concrete and if the vapor barrier is facing inside the rooms, the water may be getting trapped in the insulation.
Answer: Good question. Under the circumstances, I feel you would be better off leaving the existing insulation alone, or simply cover it with a more attractive plastic sheet or some inexpensive fabric. perhaps a curtain type wall over the insulation?  If you remove it without a plan to replace the insulation, the basement will be somewhat cooler. There are several ways to insulate the walls without framing, but adhering rigid foam insulation is expensive, up to $80 per 4X8 sheet, and spray on foam is more expensive than that and should be professionally applied.
Answer:
If I take off this current insulation is the basement going to be a lot colder?

Probably.  It's difficult to estimate without knowing the indoor/outdoor temperatures of your home, construction of your home, R-value of insulation, etc.

Is it a bad idea to get rid of it even if it hideous? If so is there a cheap idea for insulating without framing?

I wouldn't remove it because it's serving a purpose.  If it's an unfinished basement, what does it matter if it's ugly?  I haven't seen a great looking insulation.  If it were me, I wouldn't worry about it, or finish your basement.
Answer: The only thing that really matters is that the zone in your basement that is above grade is insulated well.  Your region is a mixed climate - you are on the colder side of the mixed climate though.
I would suggest two things if you are not finishing your basement.  Keep insulation to the point where you hit outdoor grade.  This might be a foot to three foot in some basements.
Add 2x4s along the perimeter at grade level to support insulation - or add rigid to those wall parts.  The 2x4s plus concrete nails is cheaper and would look good.
I don't agree with the batte insulation against the wall with a vapor barrier over it for your climate.  But the vapor barrier is probably better than having insulation flying around... So poke lots of small holes in vapor barrier.  You will have condensation and it needs to be exposed to air.
Now with less insulation you will have a colder basement in winter - but not a lot colder... but also a colder summer which is good.  Basically the offset neutralizes the energy costs for certain climate zones.  And add on the mold issues complete batte installs it is a no brainer to not do it.


New phone number but still have the steam mobile app logged in?

Question: I got a new line (and #) and did not update it with steam app prior to doing so. Im still logged in and can use my authenticator when it requests it. What can I do to update my number seeing that I don't have access to the phone number attached to my steam account? Its been a while since I got the new # and I have never gotten around to changing it, and I don't know who owns my old #.
Answer: You can easily do this by going here if you have access to your phone number, which you don't but, if you start the process, there's a certain step where you can choose something like "I can't confirm the phone number" and you can go on following that path.
I'm not sure about it as I never did it but you will probably have to contact Steam support (good luck with that).
Answer: When you added Steam Guard to your account it should have prompted you with a recovery code and hopefully you wrote it down somewhere. This code can be used in order to regain access to your Steam account or to change your phone number.
Anyway, if you still have the Steam Guard app on your phone you can still use it without requiring the recovery code to sign in.
In order to change your phone number you can choose between a SMS to your old number or that app. The app also includes a recovery code mentioned above and you can review it whenever you like, but the generated token should work just fine.

If for some reason you can't use your mobile app AND you don't have your old number (which obviously is the case) you can still remove your old number by verifying your account via E-Mail.
Only if all of those steps fail you'll likely have to contact the support team.


Basic attack strategy for Civilization 5

Question: I'm new to the Civilization franchise and was just wondering if conquering early game is worth it. Should I upgrade my civilization and unleash my fury when I have everything unlocked or is there some merit to conquering a civ here or there when still in the medieval era. I ask this because (I'm playing right now) I personally don't see the benefit in just wasting early game units when I can just upgrade everything and unleash hell later on when I have all the fun stuff :)
Comment: Only one question is allowed at a time, please resubmit the second question as a separate question. This way we can keep arguments from happening as much as possible.
Comment: I only see the one question, "is it better to conquer early or wait until later?"
Comment: There was one that I put up there. It's gone now :D
Comment: Well, I'm curious and will probably answer it when you ask it :)
Answer: There is significant advantage to conquering in the early game.  Your Civ's power is almost always directly related to the size of your empire, except for the hit to happiness due to size, and potentially income drain if you don't build your economy properly.
Thus, the earlier you get big, the more of an advantage you will have.  I tend to try to time my conquering with the advent of new siege units.  Usually this means I will go on my first conquering spree when Catapults come along.  This is pretty early in the game by any standard.
Trebuchets are a small improvement by comparison, but when Cannons and Artillery enter the game, these are both times to start picking fights.
Artillery in particular start with Indirect Fire and one additional point of range compared to previous siege units.  If you get there first and have a strong lead by this point in the game, it's pretty much game over for the AI.
The siege units allow you to down cities quickly and with minimal losses to your army.  If you're ahead technologically, taking these units into battle will almost always end in a decisive victory for your side.
Do note that these siege units should be trailing behind whatever front-line infantry is modern at the time you start your attack.  By themselves, they're fairly weak and won't stand up to melee attacks.
Once you've conquered a single neighbor, chances are you're going to be ahead in most meaningful metrics.  Thus, you'll get to the next siege unit milestone earlier, and can more easily conquer your next foe.  This snowball effect means that the earlier you start, the quicker you win.
Finally, if you get to the point where you're playing for score, the earlier you finish the game, the higher your score will be.  The fastest way to win is by far conquering the other Civs and taking their capitals.  Thus, it's a solid strategy when playing for score to conquer early and conquer often.
Answer: Managing your empire in Civ is all about juggling different needs that you can never fullfill 100% at the same time. Ideally you would want to research all technologies, build all wonders and buildings, generate huge amounts of culture and faith, whilst at the same time founding as many new cities as can physically fit onto the map and waging ruinous (for the others) war on all other players/ai. But that is just not possible. Instead you try to cover all the bases as well as you can manage given your current position.
The best time to go to war isn't set in stone, you will have to decide when the conditions are right. The earlier in the game, the easier it is to conquer cities. Especially the enemy's capital gets much harder to take as the game progresses, because it gets bigger and gets better defensive buildings - but also because the enemy will have more space, cities and units between you and it. When you are already falling behind in the early or mid game, it can become increasingly difficult to make up the difference later.
Playing as different Civs and going for different cultures makes a huge difference. Some Peak very early, making early game agression very powerful. Others Peak during the midgame or even later - or they might even not have especially powerful military Units at all, thus their strengths are in different areas.
Overall I try to start dominating my local area right around the time when siege units start to show up. At that stage it only takes conquering the enemy's capital to make them sue for peace, which means wars are relatively short and don't put you behind that much. And since they won't have had much time to grow their newer cities at that point, they will be completely powerless in comparison to you for the foreseeable future.


How can we be sure that all call_rcu() callbacks are invoked/completed in Linux kernel?

Question: I have a kmem_cache which contains RCU-protected data.
I also use call_rcu() after updating the RCU-protected pointers to free the elements in further.
Before destroying the cache i have to make sure that all slabs are freed.
The documentation says that both synchronize_rcu() and call_rcu()'s callbacks wait for an end of the current grace period. So there's no guarantee that once the synchronize_rcu() returns all call_rcu()'s callbacks are completed and particularly freed the slabs. Neither i haven't found a guarantee that all call_rcu() callbacks are invoked synchronously in a FIFO manner which could allow us to use one more call_rcu() for the destroying the cache.
So, how can i make sure that all RCU-protected data are freed before destroying the cache?
P.S. In my case with x86-64 Linux kernel the synchronize_rcu() waits until all call_rcu()'s callbacks are completed and it somehow works, but it seems like undefined behaviour in terms of documentation.
Answer: The answer is the rcu_barrier() function.
From the https://www.kernel.org/doc/Documentation/RCU/rcubarrier.txt:

Unloading Modules That Use call_rcu()
But what if p_callback is defined in an unloadable module?
If we unload the module while some RCU callbacks are pending, the CPUs
executing these callbacks are going to be severely disappointed when
they are later invoked, as fancifully depicted at
http://lwn.net/images/ns/kernel/rcu-drop.jpg.
We could try placing a synchronize_rcu() in the module-exit code path,
but this is not sufficient. Although synchronize_rcu() does wait for a
grace period to elapse, it does not wait for the callbacks to
complete.
One might be tempted to try several back-to-back synchronize_rcu()
calls, but this is still not guaranteed to work. If there is a very
heavy RCU-callback load, then some of the callbacks might be deferred
in order to allow other processing to proceed. Such deferral is
required in realtime kernels in order to avoid excessive scheduling
latencies.
rcu_barrier()
We instead need the rcu_barrier() primitive.  Rather than waiting for
a grace period to elapse, rcu_barrier() waits for all outstanding RCU
callbacks to complete.  Please note that rcu_barrier() does -not-
imply synchronize_rcu(), in particular, if there are no RCU callbacks
queued anywhere, rcu_barrier() is within its rights to return
immediately, without waiting for a grace period to elapse.
Pseudo-code using rcu_barrier() is as follows:

Prevent any new RCU callbacks from being posted.
Execute rcu_barrier().
Allow the module to be unloaded.


How can I fix broken URLs after migration

Question: I copied my staged working EE site to a SiteGround production server and the URLs are now broken.
I have the site in xyznew directory.
- The homepage does come up and displays properly at www.xyz.org/xyznew
- But when I hover over all the top level menu items, my browser shows the links as www.xyz.org/xyznew/#  which just returns back to the current page, the homepage.
- When I hover over all my second level menu items, they return links of the form xyznew//events/julyevent   [Yes with double slashes and not prefixed with the domain name. )
It seems like a configuration file issues, but I don't know what setting(s) are off.
Any assistance would be greatly appreciated.
Comment: Please post the relevant template code for how your links are generated so we can better help you.
Answer: Please consider this question closed. I've turned the site migration over to a more experienced EE developer than me.


How to get vim-latex's \cite completion to pick up the .bib file from the directory below?

Question: I'm using the Classic Thesis Latex template which provides the Chapters in a separate folder in relation to the 'root' file and the .bib file. When editing the chapters in Vim I would like to use the  completion feature for references but as the .bib file sits in the folder below in relation to the file I'm editing, vim is not able to locate it. So I was wondering how I could get it to pick up the references from the .bib located at a lower level than the current folder?
Answer: It seems like the option you need to set is Tex_BIBINPUTS. If you have modelines enabled, you can probably add a modeline in the specific files of your thesis to setup this variable, or you can set it in your .vimrc :
let g:Tex_BIBINPUTS="path/to/bibfolder/"


No improvement in test and training accuracy when training different optimizers

Question: I am currently testing 5 different optimizers to see their training loss, and their testing accuracy. The optimizers are: AdaGrad, AdaDelta, RMSprop, Adam, Nadam. I am using a quite simple model with only two hidden layers, each with 1000 hidden nodes, and the dataset is Cifar10. I am also testing it with, and without, dropout. Here are my models and my setup:
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import os
import pandas as pd
import sklearn
import sys
import tensorflow as tf
import time

## Load data
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.cifar10.load_data()

## Build Neural Network, take optimizer as parameter and compile
def get_model(optimizer):
    model = tf.keras.Sequential()
    model.add(tf.keras.layers.Flatten(input_shape=(32, 32, 3)))
    model.add(tf.keras.layers.Dense(1000, activation='relu', kernel_regularizer='l2', kernel_initializer='he_normal')) # Hidden
    model.add(tf.keras.layers.Dense(1000, activation='relu', kernel_regularizer='l2', kernel_initializer='he_normal')) # Hidden
    model.add(tf.keras.layers.Dense(10, activation='softmax', name='output')) # Output

    model.compile(optimizer=optimizer,
                 loss=tf.keras.losses.SparseCategoricalCrossentropy(),
                 metrics=[tf.keras.metrics.SparseCategoricalAccuracy()])

    return model

optimizers = dict()

optimizers['AdaGrad'] = tf.keras.optimizers.Adagrad()
optimizers['AdaDelta'] = tf.keras.optimizers.Adadelta()
optimizers['RMSProp'] = tf.keras.optimizers.RMSprop()
optimizers['Adam'] = tf.keras.optimizers.Adam()
optimizers['Nadam'] = tf.keras.optimizers.Nadam()

### Fit
histories = dict()

for optimizer in optimizers:
    print("Running", optimizer)
    model = get_model(optimizers[optimizer])

    history = model.fit(x_train, y_train, epochs=200, batch_size=128, verbose=1)
    histories[optimizer] = history

Next is my very similar code but for dropout. I must admit that my proficiency with dropout in Tensorflow/Keras is not super high, so I may well be doing something wrong here. For example, I'm not sure which side of the layer the dropout is supposed to go on, or whether using both He initialization and dropout is acceptable.
## Build Neural Network
def get_dropout_model(optimizer):
    model = tf.keras.Sequential()
    model.add(tf.keras.layers.Flatten(input_shape=(32, 32, 3)))
    model.add(tf.keras.layers.Dropout(0.2))
    model.add(tf.keras.layers.Dense(1000, activation='relu', kernel_initializer='he_normal')) # Hidden
    model.add(tf.keras.layers.Dropout(0.5))
    model.add(tf.keras.layers.Dense(1000, activation='relu', kernel_initializer='he_normal')) # Hidden
    model.add(tf.keras.layers.Dropout(0.5))
    model.add(tf.keras.layers.Dense(10, activation='softmax'))

    model.compile(optimizer=optimizer,
                 loss=tf.keras.losses.SparseCategoricalCrossentropy(),
                 metrics=[tf.keras.metrics.SparseCategoricalAccuracy()])

    return model

# Dropout
dropout_histories = dict()

for optimizer in optimizers:
    print("Running", optimizer, " with dropout")
    model = get_dropout_model(optimizers[optimizer])

    history = model.fit(x_train, y_train, epochs=200, batch_size=128, verbose=1)
    dropout_histories[optimizer] = history

What my training process shows is that Loss monotonically decreases over the course of training, and for almost all of them I reach an exceptionally low loss. However, training accuracy and test accuracy both remain very bad. AdaGrad and AdaDelta are the exception, where they achieved a decent accuracy when not using dropout. With dropout, however, all models got accuracies of 0.1, no better than a random guess.
Some of the logs from training:

Loss for AdaGrad monotonically decreases and accuracy steadily goes up.
Last 5 epochs of RMSprop:

Loss is very low, but training accuracy is bad.
Adam finishes with worse training accuracy than it started with (first few epochs ~0.2 accuracy):

Nadam:

AdaGrad with Dropout:

Final evaluation:

Some of my ideas what I might be doing wrong:

My loading of the data is wrong. Perhaps the labels need to be converted to categorical with tf.keras.util.to_categorical()
I am using the wrong metrics for the wrong data. Perhaps sparse categorical accuracy is not applicable to the format of the data set. From my understanding, though, it is. And besides, the first few optimizers do actually achieve a decent accuracy.
Something about my model architecture is wrong.
For the dropout results specifically, I am implementing dropout wrong. I know dropout weights need to be scaled during inference, but from my understanding this is performed automatically by Keras/TF. If I do need to manually scale them, how would I go about doing this?

What is very strange is that there is no difference between the models except the optimizer used. I am using the same get method to generate each network! So if AdaGrad and AdaDelta get decent accuracies, then so should Adam, Nadam and RMSprop using the exact same architecture.
If this were simply that my models overfit to the training data, and thus has poor generalization to the test set, then I would expect that at least the training accuracy is high. But this is not the case.
Any input on this would be greatly appreciated!
Answer: Have you tried adding an extra layer to your network? Adding another layer with 1000 neurons allows me to achieve 40+% accuracy using the Adam-based optimizers, with some reaching an accuracy of more than 60% (not using dropout). Using RMSProp with the same additional layer also seems to improve training accuracy wise, however it seems to converge much slower. This doesn't seem to just be about the number of parameters, as using an addition layer but fewer neurons per layer (e.g. [1000, 500, 250]) achieves better accuracy using fewer parameters (~4m parameters vs ~3.7m). Didn't have the time to also test the networks with dropout, but I'd suggest first making sure the model can overfit on the training data before using dropout to prevent overfitting.
Comment: That's a useful comment for sure. Unfortunately my task was specified as using only 2 hidden layers, so I don't have that flexibility. What I am curious about, though, is if you got the same testing (and training) accuracy as me when running only with 2 hidden layers. To confirm whether it is something specifically to what I did or a more general result.


Weyl spinor's spin direction

Question: I am a bit confused about the spin direction for a Weyl spinor. So as far as I understand, a Weyl spinor represents a massless fermion and it is an eigenstate of the helicity operator. Now say we have a right handed Weyl spinor traveling in the positive $x$ direction. This means that his spin will always point in the positive $x$ direction and the helicity will have an eigenvalue of 1/2. Now, Weyl spinor represents actual particles (at least theoretically, but I think they were used for neutrino, too) so these particles have 2 spin states. As initially the spin is along positive $x$ it  looks like $(1/\sqrt 2,1/\sqrt 2)^T$. If we want to measure the spin along the $z$ direction we have 50-50 chances to get up and down. Now, if we measure the $x$ component (after we measured the $z$ component) we have 50% chances to find the spin in the state $(1/\sqrt 2,-1/\sqrt 2)^T$, so pointing along the negative $x$ direction. So just by measuring its spin, we have 25% chances to turn a right handed Weyl spinor into a left handed one (as the momentum doesn't change - $p$ and $S$ commute). Of course this is not right so something is wrong with my understanding of spin in the context of Weyl spinors. Can someone clarify this for me?
Answer: These comments may get you thinking in the right direction:

to talk about measuring spin in different directions we have to (at least in principle) be able to go to the rest frame of the particle to take spin measurements.
for a massless particle, hence travelling at the speed of light, we know from special relativity there is no such rest frame. So it is not meaningful to talk of measuring spin in different directions. The only property we can talk about is helicity (i.e. which way it is spinning relative to the direction of motion).

You can place all this on a mathematical footing by studying the Poincare group representations of massive and massless particles. Massive particles have little group SO(3) while massless particles have little group SO(2).
Want more: read Weinberg.

Weyl spinor's spin direction


Reaction between iron oxide and metallic zinc or aluminum at 500C

Question: High temperature corrosion of iron occurs on passenger automobiles in areas such as  exhaust headers, pipes and bolts that reach temperatures of about 500°C. The iron is in the form of steel or stainless steel and the corrosion is in the form of rust or scale.
What would occur if 99.9% pure metallic zinc (or aluminum) were brought into tight contact with iron in either its clean, rusted or scaled state and heated to normal exhaust temperatures in the presence of moisture and salts?
For example, exhaust flanges are clamped together using nuts and bolts and the bolts are long enough to allow a second nut to be installed. A zinc (or aluminum) washer is installed on the bolt and a second nut is used to crush it into the already-installed nut. The iron-oxide bolt / zinc or aluminum washer / iron bolt sandwich is heated in the presence of salts and moisture.
Would the zinc melt and drip away?  Would such an assembly provide any cathodic protection against rust or scale?  Would the preexisting flaky scale be converted into a blob of solid iron. Would a violent thermal reaction occur between the zinc and iron oxide and the exhaust burst into flames?
CLARIFICATION: the purpose of this question is to understand the likely interaction between Zn/Al and iron oxide/iron and uses exhaust pipes as a practical example.  Specifically:

At the moment the Zn melts, would it be expected to wick into rusted areas and reduce the rust back into iron and produce a coating of zinc oxide?
Would an Al washer crushed between two rust-prone nuts provide any protection against rusting, especially at high temperatures, in the small area around the Al washer?
Answer: Zinc and aluminum both melt. Aluminized steels area available. But the standard 13 % chrome SS does so well it is not used much any more. I have never seen corrosion problems on SS exhausts with well over 100,000 miles.


Can you avoid getting sued or copyrighted for using products you don't have permission by changing their names?

Question: So I was browsing on Tv Tropes (don't judge me) and found out this trope called A.K.A.-47 which authors or creators use to avoid getting lawsuit from companies. They change the names or tweak some designs of the product which allows them to have free use of it. But I remembered back then, the SCP community was facing a lawsuit against a Russian because one of the branches was called Russia and apparently they didn't ask permission to use that name. I'm really confused how lawsuits or copyright works so can someone please help me better understand this stuff/
Comment: There are multiple issues here, and it's not clear what you're planning to do. If you write about a company called MacDinalds who poison all their customers, that might be defamation. There are issues about trademark infringement if you might confuse customers, e.g. selling a Harry Putter book. There are additional complications around satire and fair comment, and it all varies between jurisdictions. But you won't get sued just for saying someone drove a Ford or drank Coca Cola. There is a Law SE for specific legal questions, but you will need a specific question.
Comment: By  the way, you should probably explain what SCP is and maybe provide links or references, if they're relevant to your question.
Comment: Here's the link I found about it: https://www.reddit.com/r/SCP/comments/dvb6dp/announcement_regarding_licensing_emergency/
Answer: Sometimes shows do this not because "if we mention Pepsi, they'll sue us" but because "if we mention Pepsi, Coke might stop advertising on this show" (or might not start.) This is especially common when a show might get syndicated to a lot of markets separated in time or space from the current one. (On one US soap opera, the children used to be sent off stage "to play Pretendo", which everyone knew meant Nintendo.)  In shows where there is "product placement" (very common on reality and competition shows, for example) San Pellegrino pays big money for us to see the players drinking their drink. Any time some other drink appears, the brand is concealed, mostly to increase the value to San Pellegrino of the placement they've paid for.
Understand, this is not about Pepsi being a copyrighted word, or the shape of a bottle being a trade secret that can't be revealed on a sitcom, or any rules that a person has to be careful not to break, but are at least written somewhere. It is about comporting yourself in a way that maximizes ad revenue for your show. This is in many ways a more powerful motivator than laws and rules.
Answer: I am not a lawyer; but this is my understanding:
The point here is if the company (or person) can convince a jury that you intended your fake product to be their product, that the majority of people in in your audience would know this was their product, then you can be liable.
That is why you often see, for fictional tech billionaires, somebody will describe them as vunderkind competitors of Facebook, or Microsoft, or Intel. They name the companies as innoculation against copyright or defamation; the criminal CEO of a new startup social media company giving Facebook stiff competition cannot be Zuckerberg, obviously.
You can do the same thing with some products. Your character buys an electric car, and is happy to tell their buddy "This is a brand new company, but better than Tesla,Lexus, anybody."
It is fair use to use the name a real company saying they did NOT make your product. So if you need a fictional product that in real life is only made by Nabisco, you just invent a fictional company and fictional product name and actually name Nabisco and their product as the biggest competitor.
Clearly, the product is not Nabisco's, and you don't end up claiming their product causes something negative.
Now, if you are referencing some real-life public scandal in Nabisco, that might be enough for Nabisco lawyers to convince a jury that despite your attempts at concealment, you can only be talking about them.
Don't try to use fiction as a clever way to avoid lawsuits; it is unlikely to work. These are laws of "intent", technicalities will not work. Actual humans, in jury, have to decide whether you intended to defame a person or company, or intended to violate their trademark or copyright. They will see through your defense of spelling it "Mabisco", or naming some criminal "Jim Smythe" instead of an actual "John Smith".
If you are content with using a similar product that might be a competitor of an existing product or company, you can probably do that by actually naming the real-life product and company as competitors in your fictional world.


Different Coloring of Julia Sets

Question: I have known about Julia Sets for a while now, and today I had an idea about the coloring of Julia and Mandelbrot Sets. What if someone were to color them not only by how quickly z diverges, but also how quickly it converges. How would I go about doing this in a program? Has it already been done?
Answer: First because "... a single algorithm for computing all quadratic Julia sets does not exist." (Mark Braverman, Michael Yampolsky)
one have to find what type of dynamics ( inside Julia set) has.
Then one can use :

attraction time, Koenigs or Boettcher coordinate
Siegel disc coloring
Cauchy Convergence Algorithm (CCA)
....

Answer: In fact, just is exactly how WolframAlpha colors its Julia sets. Here's the result of the query "julia set -1", after the image type is set to escape time:

Furthermore, this is really the only way to go when drawing Julia sets for rational functions. Here's the Julia set of $z^{-2}-1$:

Finally, Newton's method pictures, with the different basins of attractions shaded in different colors are generated this way.

Different Coloring of Julia Sets


Google fusion table Info windows opening slowly in IE

Question: I've created a custom Google fusion table-google visualization page, seems to work fine firefox/safari.  However, in IE 8 the info windows open slowly.
here's my link: link.  I'm not sure how to diagnose this problem, or even what specifically to ask. Anyone experience anything like this?
Answer: Is it just IE 8? I looked at your link in IE 10 and it loaded in the same time as Chrome. While its not IE 8, i tried switching through the modes using the IE developer bar... 7-10 loaded about the same... but i will say i personally have had JQuery/ajax performance issues with IE 7 and 8 (9 and higher seems to have cleared them up). Most of the problems are due to the a more limited support of DOM and HTML standards.. sometimes its just switching some script around... have you been able to time the ajax call (theres some tools out there) vs. rendering time? That might tell you if its your ajax script or if its more related to the HTML rendering.


n-channel JFET: importance of gate drain voltage (Vgd) and validity of negative drain source voltage (Vds)

Question:
We always consider the gate source voltage as this determines the Vgs,off. But how come the Vgd doesn't have the same effect?

Following from this (and more importantly) why can't we have a negative Vds for an n-channel JFET??
I get that we need to prevent forward biasing between the diode, but that only means that Vgs < 0 and Vgd < 0, it does not mean that Vds < 0!
Answer: Most JFETs are symmetrical, and the source of an N-channel is defined by convention as the non-gate terminal with the lowest voltage.  You can switch the gate and source terminals and get the same effect.
MOSFETS may be symmetrical, but due to differences in construction meant to improve their performance, most are not.  There may be JFETS which are asymmetrical, but I haven't run across them personally.
Comment: There is an open question I'm watching about what makes some JFETs asymmetrical: https://electronics.stackexchange.com/q/541739/66767
Comment: Thanks. @cristol-polychronopolis Can you explain why, for N-channel, the source is defined by convention as the non-gate terminal with the lowest voltage?? Why does this convention swap for P-channel?
Comment: Lowering the voltage on the gate decreases the (N-)channel width, but doesn't completely pinch it off until the gate reaches a certain (negative) threshold relative to the channel.  The entire channel must be above the gate voltage by some amount to achieve effective shutoff.  The smallest difference will be between the gate and the lower of the two channel terminals.  As such, that one is called the source, and the threshold is specified as Vgs(th).  The convention is mirrored for P-channel devices, with the same logic applying.


In compositor 2 images overlay each other

Question: I have two objects on two different layers. Gem and surface plane. I also use HDRI and because of that I can't disable "Use environment" option in Render Layers menu. I followed this tutorial in goal to achive glare effect on gem stoune. But in the compositor I either loose surface or loose gem stone. What nodes should I use to preserve either surface mesh and gem.
Answer: Use a Color > Alpha Over node to combine both layers, then use the Diamond layer Alpha channel map as mixing factor.
Make sure you created a proper alpha map in the Gem layer so it can be properly combined.
Comment: Remember to enable film>transparency so that the layer with the gem has an alpha channel to be used with the alpha over node proposed on the answer.
Comment: In addition, I had to rerender layers with that film=>transparency option to aqcuire alpha channel.


Setting homegroup in Windows 7 for sharing files on a Network

Question: I'm running a windows seven system which is connected to the hostel network.There are dozens of connected PC's that are using windows seven.My friends and I wanted to share files with each other on the same network so we tried to create a homegroup. But that doesn't work. Windows seven prompts to join an existing homegroup created by some unknown person rather than giving an option to create one. Is there anyway we can setup our own homegroup?
Or if there is any other good way to share the files with each other without using homegroup.
Answer: Couple things to consider;

In Windows 7 Starter and Windows 7 Home Basic, you can join a HomeGroup, but you can't create one.
Your network location might not be set to Home. HomeGroup only works on home networks.
If you are on a domain network, your system administrator might have turned off HomeGroup completely

Also, if you are still having problems setting up a homegroup, here is a link to a Microsoft article - Why can't I create a homegroup? This article states:

Typically, a homegroup is created automatically when you set up a
  computer with this version of Windows, but there are several things
  that could prevent you from creating one. To diagnose and fix common
  problems with creating a homegroup, first try running a Fix It wizard.
Comment: There is an existing homegroup which means that network administrators haven't blocked the creation of a homegroup.At one moment I figured out the person whose homegroup was windows prompting me to join.I asked him to tell me the password of his homegroup which he didn't remember so he simply closed his homegroup.I thought that it would make me able to create my own homegroup but than again I was being prompted to join the homegroup created by some other person.
If I ask network administrators to resolve the situation will that work?
Or if there is any otherway we can share our files mutually?
Comment: If you aren't able to resolve the use of homegourps, you can ask the administrator to setup a shared folder on the network for you to place files to be shared with others.


Problem defining morphism in Galois cohomology of algebraic group

Question: Let $K$ be a field and $G$ an algebraic group defined over $K$. If $M\supseteq L$ are two finite Galois extensions of $K$, then the groups $\text{Gal}(M/K)$ and $\text{Gal}(L/K)$ act, respectively, on the $M$-points $G_M$ and the $L$-points $G_L$ of $G$, and one may then define
$$\rho_L^M:H^1(\text{Gal}(M/K), G_M) \to H^1(\text{Gal}(L/K), G_L)$$
Well, it is the last definition that I don't get. How is $\rho_L^M$ defined?
If I have a representative $\phi$ of a class in the first cohomology set, this is a function $\phi:\text{Gal}(M/K)\to G_M$, how do I get a function from $\text{Gal}(L/K)$ to $G_L$? From my point of view, it should be the other way, since $G_L$ is a subset of $G_M$ and elements in $\text{Gal}(M/K)$ map to $\text{Gal}(L/K)$ via restriction.
Answer: Indeed, it should go the other way, and is the inflation map : $Gal(L/K)$ is the quotient of $G=Gal(M/K)$ by $H=Gal(M/L)$ so for any $G$-group $A$ (here $A=G_M$) you have the inflation map $H^1(G/H,A^H)\to H^1(G,A)$ (and here $A^H = M_L$).


How to refuse delivering emails that are not signed by trusted PGP keys?

Question: I'm fed up by spam and would like to have an email address that will only deliver mails signed by users I declared trusted. Some kind of purgatory for mails the signatures of which are trustworthy by a Web of Trust connection would of course also be a nice feature. Is there a either provider that offers this service, or at least a (preferably FOSS) mail server setup for self-hosting?
Comment: Unless you often get e-mails from people you don't know yet and are in your WoT, setting up a white-list on e-mail address will be easier. That being said, most OSS MTA and MDA do allow scripting, so in theory you should be able to hook it up to gpg.
Comment: @TobiasKienzler No, it won´t. Will convice them of not writing any email to you though.
Comment: but then you'd have to have friends that actually use gpg and have cross-signed their public keys. From my experience, it's not really common in IT/security circles, let alone geeks or general population. You may have different friends/colleagues though...
Comment: Hi Tobias, shopping / recommendation questions are not really a good fit for SE. Do you want to ask something more like, how could a good solution solve this?
Comment: @HubertKario Good point, although the WoT is probably the closest thing to some intelligent friends-of-friends / colleagues-of-colleagues etc. whitelist... (Now please don't tell me I should use Facebook for that)
Comment: @HubertKario nah, I'm rather optimistic :-7 This functionality might however be very convincing for non-geeks to use GPG...
Comment: @droope that _may_ be a good thing after all m-/
Comment: @TobiasKienzler agreed!
Comment: @AviD That's true. Jeff's edit gave me some directions, I hope it's less shopping-y now
Answer: Any Unix MTA can pipe mail to a script. Run signature checks on the server and if the script returns true, pass the mail on. See your favorite MTA's documentation for an explanation of how. This is the same kind of setup used to create listserves.
Comment: Thanks for the edit, that's probably the more correct question to ask. (Accepted answer, though an actual example configuration with scripts would of course steal the checkmark :-P )
Answer: We are currently in development of this functionality as a Cloud Application that will run in your private cloud on the Jumpto.com Internet Security platform. Secure Mail will eradicate spam by making your email address unresolvable on the normal Internet by unauthorized users. More information on the product will be released upon roll out in the next few weeks.
Comment: Sounds interesting, please update your answer and drop a comment when that happens. Also, welcome to security.SE! But also be aware of the faq entry on promotion: http://security.stackexchange.com/faq#promotion


Sending to multiple emails in a single Gmail contact

Question: As a high school, we need to send regular emails to a certain group of student's parents. We have grouped the students by grade, however, when sending emails, it only sends to the first parent listed. We need to default BOTH parents on every email. How can I set up our contact list?
Answer: You have to insert the respective contact several times, for each email address.
If you insert the contact by hand (i.e. by writing the name of the contact in the To/Cc/Bcc box), if the respective contact has more addresses, the list of addresses will be displayed and you can choose  the one you want. For the second one, start writing the name again and choose a different address from the drop-down list. (In the image below, the respective contact has 5 addresses, so if I want to send the message to, say, 3 of the 5, I start writing the name once and choose one the emails, then again and choose a second email, then again and choose the third email.

Else, if you insert the contact by clicking on the To, search for the contact in the box and then select each of the emails listed for that respective contact and then click Select.


In SAS use loop to rename indexed columns?

Question: I have a dataset with variables as col1, col2, col3, ..., col15. I want to rename them to new1, new2, new3, ..., new 15. I can write 15 times the similar rename col1 = new1; in SAS but how can I achieve this using loop? Thanks.
Answer: Firstly, it's not clear whether you're talking about the rename statement in proc datasets or in the data step. If you don't need to do anything else to the data, you should definitely use proc datasets to do this, because otherwise (in a data step) you're unnecessarily reading/writing every record in the dataset, just to alter variable names.
If you are using the data step, just use
rename col1-col15=new1-new15;

I'm not sure if you can use that shortcut in proc datasets. Which brings us to your looping question. Unless you're doing this lots of times or dynamically, it's probably just as easy to copy/paste the code 15 times. Here's a way to generate the statement you want, put it in a macro variable, and use that macro variable in the rename statement:
data _null_;
  length myVar $ 1000;
  *myVar='';
  do i=1 to 15;
    myVar=catx(' ',myVar,' ',cats('col',i,'=','new',i));
  end;
  call symput('rename',myVar);
run;

%put &rename;

proc datasets library=mylibrary;
  modify mydataset;
  rename &rename;
run;

Answer: Here's a way to do it in the case that your variable names fit a nice, easy naming pattern:
 DATA out;
 SET  in;
 ARRAY oldnames (15) col1-col15;
 ARRAY newnames (15) new1-new15;
 DO i = 1 TO 15;
      newnames(i) = oldnames(i) ;
 END;
 RUN;

Or, more generically:
 DATA out;
 SET  in;
 ARRAY oldnames (4) abc def ghi jkl ;
 ARRAY newnames (4) mno pqr stu vwx ;
 DO i = 1 TO 4;
      newnames(i) = oldnames(i) ;
 END;
 RUN;

Comment: You'd need to add a drop statement, otherwise you're just adding the new1-new15 variables.


Is there any IDE for eos smart contract?

Question: Is there any IDE for compiling eos smart contract? for example ethereum have remix to compile and run solidity based smart contract.
Comment: you can basically use every C/C++ compatible Editor/IDE you want. Common ones apart from EosStudio are VS Code, Atom, CLion, Eclipse etc
Comment: EOS Studio is one however keep in mind it's not open source.
Answer: Yes there is IDE for eosio you can try to this IDE https://www.eosstudio.io/
Answer: https://www.eosstudio.io/
https://dev4eos.com/
I found two interesting tools, eosstudio is way better than dev4eos. The problem i found in eosstudio is, it's not open source and got lot of bugs while deploying and checking the contract state. The latter one is a complete mess, no active support, lots and lots of bugs
Comment: Using an older Version of the cdt doesn't sound clever to me, better to switch the IDE then. @sachinmurali open a question and tell us about the bugs so we can try to help!
Comment: Bugs in eosio.cdt was the problem while compiling and deploying the smart contract using eos studio. Use older version of eosio cdt in eos studio to avoid compilation errors and bugs.
Comment: i have already tried that, eosstudio will show bugs on version 1.6.1(eosio.cdt),its will only compile smoothy over version 1.5.0(eosio.cdt). The bug I'm talking about is after deploying the contract,i cant interact with it.
Comment: error while compiling code in eosstudio?.....search this


I need simple debugger source

Question: How can I write a simple debugger for Windows? I need to launch another program (do not attach to an already running one, but launch it yourself) then to let it run and to catch it at a certain address. Moreover, the breakpoint must be set via hardware debugging registers, not by just 0xCC. I did not find any source code for an example of such thing over the Internet, alas.
Answer: Not exactly an RE question but MSDN has an example of the main loop.
I also found this tutorial:
https://www.codeproject.com/Articles/43682/Writing-a-basic-Windows-debugger
Comment: I need to write a launcher for some program so that the program unpacks itself and then stops at its unpacked code. The fact is that I can't use 0xCC, it will be overwritten during the unpacking so I need to make a stop using HDR to stop on execution at a certain address.

I saw the link to MSDN you mentioned, but it shows just a skeleton, no specifics. Thanks for the second link, it's more clear there. The question remains: how to use HDR? Am I have to modify their values via say SetThreadContext? I did not find any WinAPI for manipulating exactly the values of hardware debug registers.
Comment: And yes, the program I try to dig in is packed (protected) with Themida, so it's quite an RE question :-) I need Themida unpack its stuff first and then I get down to the program itself.
Answer: I remember reading Grey Hat Python where they take you through writing your own debugger, maybe that would be a good start.

I need simple debugger source


Snow Leopard and NAS share

Question: I bought a BlackArmor 220 from Seagate. When I start Snow Leopard the NAS shows up with its full name under shares. The problem is that when I click the NAS only a folder BA_Backup shows up, all the other folders, I created, don't. When I click the NAS, it says I'm connected as "guest".
I mean I can connect by "Go to server" and additionally add the folders to the user startup objects, so they show up when I start my Mac, but when the NAS already shows up, why can't I configure it?  Where can I change this?
Comment: I have the exact same problem, but cannot vote up. Do anyone have some info?
Answer: The issue is that if the NAS is enabled for Time Machine backup support, that supersedes everything else.
Log into the NAS as an admin, then select Storage -> Backup Manager.
On the left side of the page, under the "Backup Server" heading, select "Time Machine".  Disable that, and all your CIFS shares will now appear when you browse.

Snow Leopard and NAS share


Batch Inserting from Excel into SQL Server

Question: Is there a way to do a batch update on SQL Server from a row of data in Excel?  We have excel documents that contain 2000+ plus rows and need to be imported in SQL Server. Is there a way to do a batch insert of these guys without calling the database over and over to insert one row at a time?
Answer: SQL Server Integrations Services offers a wizard based import which can help you easily set up a package to import an excel file. You can even save the package and schedule it to repeat the import in the future.
You have other options, as well. If you save the excel file to a comma or tab delimited text file, you can use the BULK INSERT t-sql command. See an example on the sqlteam.com forums.
Another T-SQL option is SELECT INTO. Excel is a valid OLEDB or ODBC data source from T-SQL. Here's an example.
There's also a command line import tool included with Microsoft SQL Server called BCP. Good documentation on BCP and the other options can be found on MSDN at: http://msdn.microsoft.com/en-us/library/ms187042.aspx
Comment: @MikeFlynn I'm not sure where your user is uploading the Excel file, but if you can control that, you should be able to schedule a job to check the location regularly and process the files in queue.
Comment: +1 for BCP.  I used it once in a pinch, and I was amazed at how fast it imported about a half-million rows.
Comment: Will look into these links.  These options are automated, correct?  What I mean is a user uploads an Excel file and it gets processed on the spot.
Comment: So a queue would be my best bet, instead of doing it on the fly.  It would just take to long for a response.  I assume I can send an email off after the import is done stating it is complete.
Comment: @MikeFlynn it sounds like what you're after might be better solved with an "external table".  Unfortunately, that's an Oracle-based feature and (AFAIK) SQL Server doesn't have anything like it.  All the the solutions that we're discussing here are those that you'd have to automate yourself.
Comment: All this automation can be built but the issue is any Excel file which can be manually edited by a user is guaranteed to contain rubbish that will break the import process, so you need to build in a lot of workflow/reject/retry type logic which is a pain, i.e. alphas in a numeric field, and **DATES**
Comment: BCP is great but will only import CSV's (not Excel). Can you confirm these are actually XLS type files, not CSV (CSV <> Excel). Also SQL Server has `OPENROWSET` which is similar to Oracle external tables, but still has all the same issues with data quality.
Answer: Yes! Use the import/export wizard of the SSMS! Use an Excel-source and a SQL Server destination. You can also create a SSIS-Package in the BIDS or use the BULK INSERT-statement from T-SQL, if you convert your Excel-sheets in to CSV-files.
Answer: You can create an SSIS package to read your Excel file.  When you create your task, you can select a connection type of "Excel", and then it helps you create an "Excel Connection Manager".  Then you can easily send the data to your SQL Server table.  Here's a tutorial on how to import an Excel file into SQL Server (2005).  Give it a look.


Ubuntu 20.04 boot hangs at "Firmware init done" if NVIDIA drivers installed

Question: I am using a laptop with an RTX 4060. Ubuntu 20.04 was working fine with some NVIDIA drivers (I can't remember which). I changed the drivers (via the "additional drivers" gui) to fix an unrelated issue.
Since then I have not been able to boot into the desktop with any NVIDIA drivers installed, because after selecting ubuntu 20.04 in the boot manager, the screen hangs at
[0.267277] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCIO.GP18.SATA], AE_NOT_FOUND. (20210730/dswload2-162)
[0.267288] ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/ps object-220)
[0.271683] ACPI BIOS Error (bug) : Failure creating named object [\1_SB.PCIO.GPP6.WLAN._SOW), AE_ALREADY_EXISTS (20210730/dswload2-326)
[0.271687] ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220)
[0.271693] ACPI BIOS Error (bug): Failure creating named object [\_SB.PCIO.GPP7.DEV0._SOW, AE_ALREADY_EXISTS (20210730/dswload2-326)
[0.271696] ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220)
/dev/nvme0n1p6: clean, 134841/15261696 files, 3142671/61040384 blocks
[3.148636] mt7921e 0000:03:00.0: ASIC revision: 79220010
[3.207845] nouveau 0000:01:00.0: unknown chipset (19700081)
[3.284114] mt7921e 0000:03:00.0: Firmware init done

If I boot into recovery mode, uninstall all nvidia drivers (sudo apt remove --purge *nvidia*), and reboot, everything works fine.
I installed a fresh distribution, followed the instructions here to install cuda/nvidia drivers (sudo apt-get install -y cuda-drivers which installed the 550 drivers), and the problem recurred.
Am I installing the wrong drivers? I've tried some versions of the 550, 545, and 525. Is there a way to know specifically which drivers to install for my hardware?
I ran nvidia-bug-report.sh and posted the contents here.
Edit: the issue doesn't seem the depend on the driver version, so suggestions on how to diagnose the underlying problem would be appreciated.
Comment: @karel running the suggested command installed the 550 drivers, which cause the problem in the post
Answer: I neglected to mention the laptop was a Lenovo Legion. The issue was not with the drivers in particular. This reddit comment explains the problem and the solution:

I'm pretty sure it's the advanced optimus being in use. The hybrid mode is off, but the settings in NVidia control panel is on the optimus. So the laptop is set to run on the dGPU mode but the dGPU is inactive because you set optimus on, which is run by iGPU. Please try to get to the BIOS by pressing F2 while booting (while Legion logo appears) and set to hybrid mode in BIOS.


Open Source Live Migration (Clone/Imaging)

Question: I want to do a live migration of my Fedora and Windows Server 2003 into raw disk image without restart the server or shut it down. (disk image is for virtualization purpose) Is there any open source software that I can use? I've heard of VMware Converter but it have to be moved to be virtualized in VMware Server ESXi or VMware Workstation.(I'll go for either Xen or KVM after the imaging) FYI, there's also database running on my server.
Answer: The only possible hot P2V option that I have seen described is "live migration" of a Windows instance in VMware, nothing in FOSS. VMware calls this operation "Hot Cloning" and it actually uses a sort of hub and spoke arrangement between the source computer, the converter programs (client, server, worker and agent), the virtual host environment and the new guest virtual machine. Not a simple dance.
In addition to this caveat, there is a difference between a "live" physical machine and a machine that is also running applications with users, dns names and databases running. I suspect "live" only means that the OS is running, not that users are hitting it actively.
Answer: you cannot live migrate from physical to virtual hardware. What you should do is plan downtime for the VM, and when ready, image or back it up, then restore to the VM.
Comment: But I saw some software can do the whole migration process live, on Windows. Is there open source alternative for Linux?
Comment: "some software" is no argument. What software exactly are you talking about?
Comment: For Windows, there are disk2vhd, VMware converter. However, for open source I can't find any that do live imaging.
Comment: this "live" imaging does NOT provide live migration between physical and virtual. what is provides is P2V, for Linux there's virt-v2v (RHEL and Fedora) and libguestfish can cope with any other distro afaik


What describes parents who do not scold their children?

Question: What is a suitable word that describes parents who don't scold or punish their child for juvenile delinquency?
 Is "doting parents" a correct description?
Comment: *Juvenile delinquencies* sounds awfully peculiar.
Answer: Permissive is a term often associated with parents who are too "indulgent" with their children:

Permissive parenting (also known as indulgent parenting) is a parenting style that is characterized by having few and inconsistent rules and a relaxed attitude to parenting that is more like a friend than a parent.
This was one of the three original parenting styles developed by Diana Baumrind. Permissive parents exhibit very loving and nurturing behavior towards their children and frequently use bribery in order to get them to behave. There are not many demands or governing rules within a permissive parented household.

(www.alleydog.com)
Comment: This is a highly complex area of debate. But sticking to the language issue, the term *permissive* is usually employed in a disapproving sense, and *indulgent* even more so. Some people might call it *democratic* parenting, or *warm*, *loving* or *supportive* parenting. .
Comment: What @WS2 said. Likewise, *lax*.


Finding location from image

Question: if I have this google earth screenshot like this, is there a way I can match it to its location? I know for a fact that it is somewhere in Nevada. I believe it is current and not historical imagery.
Answer: If you don't have any coordinate associated with the image, you can't do anything with that. Since you mentioned that the image is from a screenshot then you probably don't have this information.

Finding location from image