Impersonating users to access hives - various methods, what are the practical issues?

Question: I am designing a Service to run under LocalSystem account on Win2000, XP and Vista. It will need access to users registry hives, sometimes for extended periods of time, both when the users are logged-in, and also, when they are not logged-in (IF the profile is local. If the profile is Roaming and not loaded, I will not attempt to load it.)
If the user is logged-on, I can get the Users access token by various means (E.g. from its Explorer process, or by receiving Logon events from the Service Control Manager) then use ImpersonateLoggedOnUser and RegOpenCurrentUser to access the User's hive. However, what are the implications if the User selects LogOff from the start menu while I am impersonating and have his hive open? Will the logoff be prevented? Will my impersonation be terminated?
If the user is not logged on, I can use RegLoadKey to directly open the hive NTUSER.DAT. (Impossible for a logged-on user). But what are the implications of this if the user decides to log-on (I suppose the hive will be locked and the logon either prevented, or may experience difficulty?)
I will be setting up some test projects to explore these ideas however, regardless of their apparent results, these questions are theoretical in terms of what type of problems might, or would, be caused by the user loggin in/out during these actions by the service.
Caveat: ImpersonateLoggedOnUser can ONLY be used either for a logged-on user (token obtained from process or SCM event) OR for a user for which I have the plaintext password to call WinLogon and obtain a token - TRUE / FALSE ? In other words although I have maximum permissions as LocalSystem and am able to change the user's password or even delete the user's account, if the user is not logged-on,  it is totally impossible to create a new token to impersonate the user without having the the password?
Answer: Apparently, there is some risk of damaging a user's profile if it is already loaded by another process when the user logs in. In that case, the system will try to create a new subdirectory for the user.


When I change slug, will WordPress create redirect from the old URL?

Question: When I change a slug from post-a to post-b, will WordPress create a redirect from /post-a to /post-b, like HTTP 301 or something similar? If not, is there a plugin for that?
Answer: I just went and tested this (WP 3.3.1), the wordpress core will automatically do a redirect if you change the post slug, even if you change the slug from post-a to post-b and then to post-c, post-a will return a 301 to post-c. That said, the redirection plugin that Mike Jolley recommended is an outstanding plugin and a great way to monitor for 404 errors and such.
Comment: Just to add a note, this built-in redirection doesn't work when the part of URL that is not the slug changes, e.g. when the pattern is `/[year]/[month]/[date]/[slug]` and the date changes, WordPress will not create a redirect. A plugin is necessary in that case.
Comment: Where abouts in the DB is this redirect rule saved? Cheers
Comment: @raison it's in `wp_postmeta` table and `meta_key` is `_wp_old_slug`. with this query you can see all of them `SELECT * FROM \`wp_postmeta\` where meta_key = "_wp_old_slug"`.
Answer: This plugin can be used to monitor URL changes like that and set up redirection automatically:
http://wordpress.org/extend/plugins/redirection/
Comment: If only it worked :( I ended up using http://wordpress.org/extend/plugins/quick-pagepost-redirect-plugin/ though it lacks some features.
Comment: Yes, it did work perfectly until at least the middle of 2012 on one of my fairly complex WP installs (always autoupdated as new stable releases are pushed by WP). However something's broken in its autosensing routine for when slugs are modified, I only just noticed today on a 3.5.1 install so can't be sure when this it first stopped automatically adding rules for modified slugs. That's a shame. :( Guess we should all donate to the dev to encourage him to fix the bug!


Change a Sql-Server (express) from a named instance to localhost?

Question: Is there a way to change a mssql express from a named instance to localhost?
When first installing the server I gave my mssql express server, a name. Now, working on a project where the web.config specifcs the localhost, or (local), I have to edit all of these before I migrate the db or run the application.
To connect to my database, I have to specify my instance instead of localhost like so: MyComputerName\Instance;Database=db_name;"
I would like to simply use: localhost;Database=db_name; This currently does not work.
I don't want to have to re-install mssql, however I have considered this an option if no other options are avaiable.
I am using "Microsoft SQL Server Express Edition with Advanced Services" version 10.50.2550.0
Answer: If you don't specify an instance name when connecting to a server, it will look at port 1433.
By default, the MSSQLSERVER instance (i.e. the default) will be assigned this static port.
By default, any named instances will be assigned dynamic ports which are discovered using the SQL Server Browser service.
You might not be able to rename an instance, but you can change its port number.
For your named instance, you need to set it to the static default SQL Server port, i.e. 1433. Obviously TCP/IP will need to be enabled for the instance:

Once you've done this, should be able to connect to localhost without supplying a name as it will just try and connect to 1433.
Comment: I only specified port 1433 on IPAll, and that works fine. Thanks.
Comment: @Ian Preston : Isnt the 1433 default port which creates a security leak? Can you please shed some light
Answer: This is what worked for me.
1) Go to SQl Server Configuration Manager
2) Open SQL Server Network Configuration
3) Click on my Named Instance
4) Open TCP/IP
5) Click on IP addresses
6) Added port 1433 to all ip's
(Edit)
It may be necessary to run the SQL Server Configuration Manager as an admin if the port is uneditable.
Answer: You can rename the Server name, but not the Instance name.  The only way to change it is to re-install.


What software can I use to make a mirror image of Ubuntu?

Question: I used to use Easeus Todo for Windows, or Norton Ghost. What options do I have for linux?
Answer: Clonezilla is great for cloning Windows and Linux. You can boot it from USB/CD/PXE and image to files on an external drive, samba, nfs,  & ssh. You can also disk to disk.
Answer: To make a backup of linux, you can use the tar or dd command.
In order to answer this question it may be useful to know if you want a regular backup that runs automatically (e.g. create a copy of the system and store it in the cloud (e.g. Amazon Glacier), or just do a quick once off backup to a local hard drive.
The beauty of linux is that there are many ways to do it, from manual to fully automated.
Tar See: [Techrepublic](http://b2b.cbsimg.net/downloads/PDF/SolutionBase_Backup_Linux_reliably_with_rsync_and_tar.pdf for some additional details.)
dd: See dd
Oh, and do take care and read the instructions thoroughly and run a test on a spare machine first, as these commands are powerful, but once you have mastered it you can save the command as your own software to run when you need to.
Answer: Just cloned my hdd, easily and quickly with no errors, i used clonzilla, a brilliant bit of software.
It allows you to clone HDD to HDD, or HDD to image, plus other options.
I can't stress how easy it is to use...
Some info here:
Top 6 Open Source Disk Cloning and Imaging Software


Suppress event times in week view?

Question: Within iCal the preferences settings let choose the use of event times
in month view.
I would like to obtain the same choice for the week view.
I'm actually using iCal on Snow Leopard, which I will shortly upgrade to Lion and Mountain Lion.
Is this choice possible within iCal on these different OS X versions?
Is there any progress on this possibility through these versions of the OS (this will be a key incentive to accelerate the OS X upgrade in such a case).
Additionally, is there any documentation about this level of tuning for iCal.
Comment: I looked at `defaults` and it's not an option there.
Answer: Yes.
It is possible from the Preferences > General menu of Calendar to activate the display of event times within the week view too:
Show event times

Suppress event times in week view?


Khovanov-Rozansky/HOMFLY-PT homology in type B

Question: The picture, as I understand it, is that Hecke algebras (of type A, i.e. associated to the symmetric group $S_n$) lead to the HOMFLY-PT polynomials, and the categorified version of this says that the category of Soergel bimodules (again of type A) leads to Khovanov-Rozansky homology. The main paper outlining this is "Triply-graded link homology and Hochschild
homology of Soergel bimodules" (Khovanov).
However Hecke algebras, and Soergel bimodules can be defined for any Coxeter group. I'm particularly interested in type B, and the paper "Markov traces and knot invariants related to
Iwahori-Hecke algebras of type B" (Geck, Lambropoulou) seems to show the connection between Hecke algebras and HOMFLY-PT polys extends to this case. Is there a categorification of this? i.e. a type B version of Khovanov-Rozansky homology? references/papers would be great if so.
Answer: Maybe take a look at the following paper of Rose and Tubbenhauer
https://arxiv.org/abs/1908.06878.


Best practise/programme to use for "in situ" design i.e van wrap, shop decals

Question: Have a new job where I am having to create "in situ" design i.e a quick mock-up of logos on vans or shop decals. I find myself fiddling quite a lot with perspective distort tool in illustrator or even trying to use and get familiar with the perspective grid tool in illustrator. Just wondering if there are any standard practises with creating design like this or even if I should be using photoshop? I chose illustrator because of familiarity and because I can scale things up and down as vectors and manipulate the shapes easily. I do know that mock-up templates use photoshop. Any youtube resources/tutorials would also be helpful
Comment: whatabout using an actual 3D program?
Comment: You can place AI files as Smart Objects in Photoshop, and apply perspective transforms non-destructively, so yes, that's a feasible way to make mock-ups.
Answer: I used Illustrator for over 10  years to mock up for signs, garments .
I used to have customers bring in the their cars and I was taping a ruler on each side before taking a picture so I can scale them accurately, One of my major problem that I encountered was when I was making a file to cut a decal for a windshield so it will follow the curvature at the top, and I end up tracing the curvature on the paper so I can make an accurate file to cut the decal.


What effect does shape of dots on a household microwave oven door have on amount of EM radiation that escapes through the door?

Question: Why are they dots and not squares, triangles, or some other shape?
Answer: Not-much- they just have to be closer together than the wavelength of the microwaves.
Generally the door has a metal grid, with holes in it smaller than the microwaves. This stops the radiation getting through but allows the much smaller wavelength visible light to pass through.
Either you are mis-understanding what you are seeing, ie the white dots are really holes in a dark mesh, or the maker has used a pattern of metal dots instead of a mesh.
Comment: Also with circles there is no need for any implicit assumption on how polarization of the waveform. A square or triangle on the other hand will be more permeable for wave polarized along a certain plane, than others.


TFS branch- marked as read only when mapped locally

Question: I had branched out from our QA branch on TFS, mapped it locally and tried making changes to the code locally. When trying to save my code changes, it gives me a warning saying that " the file is write-protected(read only). This has never happened before to me. We tried doing the same thing on my teammates workstation and it works fine for him.
Is it a permissions issue....am I doing something wrong while branching out? I am connected to the right tfs server. I'm not sure what might be causing the files in the branch to be read only.
I'd highly appreciate your help on this.
Thanks
Answer: The reason could be that your solution went offline.
What you can try is connect to your main TFS server, Load the solution then just goto File->SourceControl->go online.
Hope this will solve your problem as it solved mine.. :-)
Answer: Sorry guys...I'm going to have to answer my own question.
It was the connection to our main tfs server. I connected to the backup tfs server and it works just fine. However, what is baffling is that my teammates can work with the main tfs server just fine.Only I can't.Still puzzled.


What is Gideon's ephod, and why did he build it?

Question: In the story of Gideon (Judges 6-8), near the end it talks about Gideon building an ephod out of the gold earrings from the spoils of the battle against the Midianites. What is an ephod, and why did gideon build one. Is it significant?
Comment: https://en.wikipedia.org/wiki/Ephod
Answer: in early books of the bible, the ephod was a special piece of clothing that was made for Aaron the High priest to wear when he served the Lord (Exodus 28:5)

"They shall take the gold, blue, purple, and scarlet thread, and the fine linen, 6 and they shall make the ephod of gold, blue, purple, and scarlet thread, and fine woven linen, artistically worked. 7

When I started to research this question, I realised that everyone pretty much agrees the ephod in Judges was not a clothing, like I had always thought!
So I cant tell you exactly what it was physically, but I can answer the 2nd part of your question and explain some significance.
It says in Judges 8:24

4 Then Gideon said to them, "I would like to make a request of you, that each of you would give me the earrings from his plunder." For they had golden earrings, because they were Ishmaelites.

This is extremely familiar scene. Think back to exodus as Moses goes up the mountain to get the 10 commandments. The people think he has been gone to long, and they ask Aaron the priest to make them an idol!
Exodus 32

Now when the people saw that Moses delayed coming down from the mountain, the people gathered together to Aaron, and said to him, "Come, make us gods that shall go before us; for as for this Moses, the man who brought us up out of the land of Egypt, we do not know what has become of him."
  2 And Aaron said to them, "Break off the golden earrings which are in the ears of your wives, your sons, and your daughters, and bring them to me." 3 So all the people broke off the golden earrings which were in their ears, and brought them to Aaron. 4 And he received the gold from their hand, and he fashioned it with an engraving tool, and made a molded calf.

So the significance of the ephod in Judges, is that once again, God's people do not trust in him or give him glory for the things he has done for them, but they go astray and break his commandments by making for themselves idols and worshipping them.
Idol worship is a very very prominent theme of the Old Testament. and it was a problem the Israelites continually faced.
Answer: Gideon's ephod is well, an ephod. A priestly garment worn under the breastplate. Some translations "liberally" label it as an idol which I don't think is the case.
The bible doesn't specifically say what reason Gideon had in making the ephod. It could be one of a million reasons such as it being a remembrance to the victory they had. It could also be Gideon's way of uplifting his name and his family's considering he thinks of his family as the weakest and the least.

"Pardon me, my lord," Gideon replied, "but how can I save Israel? My clan is the weakest in Manasseh, and I am the least in my family."  Judges 6:15

I personally don't think that his purpose was one of worship as the bible never mentions him ever personally worshiping it.
Answer: I too think of a garment when the word "ephod" comes about. That said, I don't have a clear understanding of what this ephod Gideon speaks about that is then put in the city of Ophrah. You would think if it is placed somewhere that it is a replica of something rather than a garment.
Although, if you read a couple verses before the verse in question, you will see that Gideon rebuked the people for proposing he be worshiped for the victory of killing the kings. He made it clear that it was God whom they should worship. This tells me that his intentions of making this ephod was not to worship idols but maybe a way for the people to remember the victory.
Comment: Welcome to the site, Kecia. This post needs to be correctly sourced out, otherwise it may simply look like a personal opinion. Do you know of any sources to back up your statements. If so, please edit them into your answer.
Answer: The writer of the book of Judges certainly did not make it quite clear what Gideon's intentions were. He had just had a resounding victory against the Medianites. He made it clear to his people that they should look to God to be their ruler in Judges 8 verse 23 which is followed by the collection of  the golden earrings from the 'prey/ spoils' that were used to make the ephod. While there is no indication that Gideon himself worshipped it, his intentions remain unclear and so is why it is described in verse 27 that it became a snare to his house. The fall then starts from verse 29 onwards. Could this be because of the mere fact that Gideon had built the ephod? or the fact that it was worshipped by the Israelites?  or maybe that he failed to ask God before building it and hence it did not please God who could have seen ahead that it would be worshipped by the Israelites hence it was a snare?...,
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


How to remove deleted page from google indexing

Question: I had a blogger site and deleted it a month ago. But it is still appearing in Google result index , and the past content is also visible from cached option of Google search results. I have tried to remove in site site : https://www.google.com/webmasters/tools/removals , but still it is appearing in results. Is there any way that i could remove the page or the cache?
Answer: It will simply take time. If the site has been removed and you have removed it from Google Webmaster Tools, then there is nothing else you can do short of one option.
If there were not too many pages on your blogger site, you can open Google Webmaster Tools > Google Index > Remove URLs. I assume there is a limit, but I cannot find it.
Search engines are notoriously slow. It can take months before a site is removed. However, if a high number of 404 errors exist for a particular site, Google will sample the site to see if the site has been removed. It will drop in the SERPs due to a high number of errors while Google determines that a site does in fact exist or not. Not knowing blogger, I would assume that this would go faster if the sub-domain does not exist. If the sub-domain does not exist, then it may take less time since the site domain name will no longer resolve. If the sub-domain still exist, then it may take a bit longer.
As with anything dealing with search, you just have to be patient.
Answer: I think they will not take more than 30 days to remove blogger post/page, In generally, When you create any blog on Blogger, then they will create account automatically in GWT(Google webmaster Tools), If you already submit sitemap, then you will get continuously notice about your blog. So when you delete your blog, they will give you errors on GWT.
Their service is better than better, When you delete your blog, they will give you chance to recover within 90 days, Then they will permanently delete your blog, also they de-indexed your all links automatically in 90 days.
If you want result urgently, Then first undelete your blog, Go to setting << basic << Privacy, and select no option.then again use GWT and request for URL removals.


Using Kinect 360 as 3D Scanner

Question: I would like to use my old Xbox 360 Kinect as a scanner for 3D modeling and (hopefully) printing a few busts of friends/family members; however, my efforts have failed in each direction that I have taken. Has anyone had success with this,  and if so, how do I fix the issues that I am facing?
What I have done so far and the problems that I have had:

I have purchased a cable to supply 12V to the Kinect while also allowing USB to a PC.
I have installed the Kinect SDK as well as the Kinect Developers Toolkit on my Windows 10 Ultrabook.
I installed the Microsoft "3D Scan" app and the "Kinect Readiness" app (not the name, unsure of it at this point) provided by Microsoft.

**Issue: ** Neither Microsoft app detects the  Kinect when cable is plugged in. The Kinect's light slowly flashes green. Also, my cursor freezes when the Kinect is plugged in.

I checked the Hardware profiles and found a notification that I do  not have the drivers for the Kinect motor and that no suitable  drivers could be found. However, no other details about the Kinect showed up.
I uninstalled the SDK and developer toolkits and installed v1.7, ran them in compatibility mode (Windows 8) and same issues arose.
I then began looking into using a different program, found ReconstructMe. This too failed to detect the Kinect even when it was manually selected as the scanner.

Any ideas? I also have a Linux Mint laptop that I will happily use for these efforts if I knew what software to capture the 3D scan with. It seems that there are several driver options out there, just unsure of what to use besides that. It seems that Blender can be used for some motion capture with Kinect; however, I am unsure of how this relates to my goals.
Comment: For what it's worth, I had this set up (a few years ago) with a very minimal amount of fuss, using http://brekel.com/kinect-3d-scanner/
I made a few scans of household objects, friends, and then got distracted by some other shiny thing. Hopefully, the page continues to be a good resource. Figured I'd share it just in case.
Comment: Have you looked into Skanect?
Comment: In the past I've used the openkinect freenect Python wrapper in Linux to stream the Kinect's structured light sensor's depth data throught a TCP socket into an application called Blender (using its internal python API) which then received the socket data and rendered a pointcloud of vertices in the viewport, each vertex along the XY coordinate plane had its Z coordinate as a function of the depth pixel intensity. Blender would allow you to also write a custom surface reconstruction algorithm (if you desired), or you could export the cloud to a 3rd party application.
Comment: Unfortunately, the complexity of this option is limiting. I would like to implement this with my middle school students. Are there any simpler/streamlined solutions?
Comment: I think you're just slightly off with your SDK. I'm fairly certain the most stable version for **XBox 360 Kinect** on PC is **V1.6.0**. Which works fine for scanning, but lacks in some of the other functionality like skeletal tracking and faster facial recognition.
Comment: I think professional scanners have better quality. In this video I watched, you can see the quality https://youtu.be/cEJHXDsYeww
Answer: I tried the same setting old kinect (but for PC - actually with power supply and usb-cable) plug to my surface windows10.
After some troubles, it works now ;-)
The mentioned MS 3D scan and kinect readiness wont work. It is supposed for the new kinect2 model, because of the new driver. Best you deinstall both. Even the drivers and SDKs.
You need Kinect for Windows v1.8 for the old kinect. https://www.microsoft.com/en-us/download/details.aspx?id=40278
RecFusion is a software for using a single or multiple depth cams for getting 3d models. It works quite good with my kinect. It costs 99euros.  http://recfusion.net/index.php/en/download
Comment: I was hoping to use the Kinect as a way of saving money. So unfortunately, this option is a bit over my price-range. Thank you for the help though.

Using Kinect 360 as 3D Scanner


I can't login to wordpress dashboard without SSH

Question: My friend gave me a username and a password to his wordpress site. Now when I try to login to the dashboard, it tells me I have the wrong username or password. He also gave me a SSH port number and a username and password for SSH. Now I don't know what I'm doing wrong but I can't seem to log in to the dashboard. I know I have to use the SSH credentials and port number but I don't how because I am a beginner at wordpress. I've tried searching for the problem but I haven't been successful in finding the right answers. Any help will be appreciated.
Comment: Have you tried resetting password using "Forgot password" option?
Comment: Have you tried asking your friend?  General WordPress support is off-topic here.  [ask]
Answer: Check wordpress Login Trouble codex step by step. I hope you didn't make any change which affect to code(i.e. Add new plugin, .htaccess code change).
Let me know if you still facing same.
Answer: My suggestion is to reset the password via phpMyAdmin.
Step 1: Identify the Name of your Database;
The best place to look is your wp-config.php file which is located in your root WordPress Directory. In there you will find the name of your database.
Step 2: Go to your Control Panel (cPanel, from your hosting) and open phpMyAdmin;

Once you are in phpMyAdmin, you will need to select the correct database on the left hand side. Look for the name that you found in your wp-config.php and click on that. You will see a list of tables with a prefix wp_ for the most part.
Search for the table wp_users, click on it and then click on the Browse Tab.
Step 3: Locate the username(for example, admin)
When you see the username click on the Pencil (Edit) Icon to reset your Password.
Step 4: Now you will see a field that looks like this:

There is a user_pass field. Click on it to edit it.
Step 5: Set the password.
You will notice that there are a lot of random characters in the password field. Due to security reasons, WordPress stores the passwords as MD5 Hash rather than Plain text.
This means that you will not be able to enter plain text as the password. You would need to use one of the MD5 generators online to generate your password.
Step 6 Generate a new MD5 password hash.
Go to Javascript MD5 and generate a new password. Simply type your password in that tool and generate MD5 results. Copy and paste the code you get from the converter into your phpMyAdmin field and click Go to save changes.
You have now successfully changed your WordPress Password from phpMyAdmin.


How can I download the source code of kernel 3.5.0-17-generic image shipped with Ubuntu-12.10

Question: Where can I get the exact source code of linux kernel version 3.5.0-17-generic which is shipped with Ubuntu 12.10 ?
Comment: 12.10 went end of life and so the software got moved to archives. We only support questing regarding current releases. The kernel source code from the Ubuntu repositories through "apt-get" is no longer available. You can find old releases here: http://old-releases.ubuntu.com/ubuntu/dists/ but will have to manually download the files.
Comment: @Rinzwind on the link http://old-releases.ubuntu.com/ubuntu/dists/quantal/ I dont see anything that looks like a kernel source, which files to download then ?
Answer: If you are looking to just get the sources to the kernel that you are currently running you can:
apt-get source linux-image-$(uname -r)

source code for all ubuntu releases http://kernel.ubuntu.com/git/
Please check this https://launchpad.net/ubuntu/+source/linux/3.5.0-17.28 the source code and the patches are available here available here. If you want generic source code then better look for it on kernel.org.
Comment: Either he is running 12.10 and `apt-get` will error out (12.10 is EOL) or he will get either 12.04, 14.04 or 15.04 and that is not what he is asking. The last bit is a way to go though :)


Swaption Vol surface

Question: ¿How can I get the implied vol from a swaption when I have a vol surface with the maturity of the option and the tenor of the swap? For example  I want to know what is the volatility for a swaption that gives the holder the right to pay 6.2% in a 3-year swap starting in 5 years.
Answer: Swaption vol can have 3 dimensions: option expiry, underlying tenor and strike.
In your example, if nothing is said, then it's probably ATM (at the money) volatility which means it's the vol for a Swaption with a strike equal to the forward of the underlying.
So if you only have a surface, and not a cube,  you probably don't have exactly the information you need.
If you do have vol data for multiple strikes, even if you don't have the 6.2% strike, you could fit SABR parameters to the smile to determine the vol for the strike you need.
Alternatively, if you have a cap surface and a Swaption ATM surface, you could also build other Swaption strike vols with a method called lifting from caps.
Comment: Thanks a lot for your time David, I am new at swaption so, I'm trying to understand this. The exercise I want to solve is Suppose that the LIBOR yield curve (which we assume is used for discounting) is flat at 6% per annum with continuous compounding. Consider a swaption that gives the holder the right to pay 6.2% in a 3-year swap starting in 5 years. The volatility of the forward swap rate is 20%. Payments are made semiannually and the principal is $100 million. The answer from the book for vol is 0.20 so, I really don´t understand how i can get it.
Comment: The table you presented before and this question weren't really together, right? I think this simple exercise works on the assumption of flat vol. So you're given the volatility of the underlying (5y3y swap) and you're suppose to use it in the valuation (probably Black's model since the vol is in percentage and not bps) along with the other given inputs: strike, forward (flat curve), time to maturity and tenor.
Comment: You mention a flat curve @ 6% p.a. but the strike for your payer is 6.2% i.e. +20bp OTM. Most likely the vols in your table are ATMF so unless payer skew is flat (which is possible), I don't see how you have enough info to answer the question.

Swaption Vol surface


When the F16 is landing the AOA will be at 11 degrees, but speed modulates more. How is possible to have fixed AOA but not the speed?

Question: The speed in landing pattern is not fixed one due to the weight/drag of the aircraft at the moment(loads of bombs and fuel). But if you speed up then you're going to go upwards don't you(if you keep the11 AOA) ? Because any changes in pitch increases the amount of the lifting force. See my point of view? If change one must alter the other. So if you're not happy with the glide slope (to steep or to shallow adjust the throttle (for F16 only) but automatically within that case the AOA will decrease or increase.
Answer: Using AoA as reference gives a simple way to maintain a safe stall margin. If approach speed was used as reference, there would have been multiple speeds to memorize, as the weight is not the same from mission to mission.
Remember, wings basically always stall a certain AoA, not certain speed. Specifying a AoA to maintain, the weight of the plane is automatically compensated for.
The pilot does not need to worry about speed. If he/she wants to go higher, add throttle, maintain AoA -> plane goes up. If one is too high, decrease throttle, maintain AoA -> plane descents. The airspeed is out of the equation, so simple. Just remember to keep AoA at 11 degrees.
As you stated, depending on mission, military aircraft have huge variation in takeoff and landing weights. They also have very reliable AoA metering, so it' s best to go this way.
Comment: Yes. And you do not want to fly approach anywhere near stall AoA.
Comment: Of course the wings stall angle will be 29 AOA for F16but you don't want to be at that attitude on touchdown(because scrape the tail on runaway and main wheels don't have any contact with the ground). F4 land at14- 17 AOA(has a enough clearence aft to do that). But not so much for F16
Answer: Correct that changes to one performance parameter will affect others, but it isn't totally clear what you are asking.
If you are in the pattern at 11 deg AOA and level flight you are in equilibrium.  11 deg AOA correlates to a certain airspeed at a given weight.
That airspeed will vary depending in weight, and the correct indicated airspeed must be for each landing weight and cross checked against the AOA gauge for accuracy.
If you "speed up", you won't be at 11 deg any longer.  If you just pitch up, you will increase AOA, climb, and decelerate unless you add power.
If you are light, your airspeed will be lower at 11 degrees AOA than if you are heavy.  So, "multiple airspeeds to memorize" is partly true, but generally there are basic rules of thumb that make it easier:  For example, if you know your 11 deg airspeed at your base weight, you simply add fuel and stores weight, multiply by some factor, (in my case 1.5 Kias per 1000 lbs) then add this to the base approach speed.
The reality is that your "on-speed" approach and landing speed will typically only vary +/- 10 knots from "normal", and the quick calculation plus fuel gauge accuracy probably has a tolerance of a few knots as well, so as long as airspeed is in the ball park enough to trust your AOA gauge, then that is what you use.
Comment: P.S.  I went ahead and edited my answer to clarify and add details.  Please let me know if you have any further feedback or questions.
Comment: That's why I'm asking the question:how it's possible to do it (11 AOA) at different weights, alrports altitudes, and in summer and winter without alterning 11AOA?Jpe61 answer me.
Comment: The airspeed varies.  For each weight the pilot must calculate the correct indicated airspeed that correlates to 11 degrees.  That is how you cross check the AOA gauge accuracy.  Does that clear up your confusion?  Because if so I will edit the answer to emphasize that point.
Answer: The original question states:

The speed in landing pattern is not fixed one due to the weight/drag
of the aircraft at the moment(loads of bombs and fuel). But if you
speed up then you're going to go upwards don't you(if you keep the11
AOA) ? Because any changes in pitch increases the amount of the
lifting force.

This is a flawed premise.
Any time that the aircraft is travelling at a nearly horizontal trajectory with a constant airspeed and vertical speed, lift is very nearly equal to weight.
Given these conditions, if we prescribe a target angle-of-attack, then we are essentially prescribing that the airspeed should vary according to the square root of any change in wing loading.  Any variation from this target speed will cause in imbalance between (the vertical component of) of lift and weight, which will cause the flight path to curve upwards or downwards.
If we are holding 11 degrees angle-of-attack, and our weight suddenly increases by a factor of 2 for some mysterious reason, and our airspeed increases by a factor of 1.4 for the same mysterious reason, no, we will not "go up". As long as the airspeed varies according to the square root of the change in wing loading, the forces on the aircraft can remain in balance.


Can I set same display templates for word, PDF and more files in Search Results - Problems

Question: Why result types and display templates for word, PDF, power point and more files are different? What will be the problem if I set search results of word, PDF, power point files to the same display templates?
Comment: Why do you want to do this?
Comment: Actually I need to change the view of Search Result Items.So, instead of editing all the display templates(PDF, power point,Word,...) why can I create new display template and set the same display template for all search result items.In order to choose the best one I need answer for the above question
Answer: Different file types have different display templates because they are rendered differently in search results. For e.g. for PPT files, you get to see preview image of the pptx document. Upon hover you can also see the interactive slideshow view in the preview thumbnail in hover panel. For word document you are able to see docx preview in the hover panel. For people search, you get to see the profile image and profile properties for each search result.
If you want to use same display template regardless of the result type, you can modify the search results web part and under web part tool pane, expand Display Templates and select option "Use a single template to display items" and select the display template from the drop down menu that you want to associate for all result types.
See this link to know more on display templates and result types
Comment: There is no link.....What will be the advantages and disadvantages of using same display template?
Comment: I have updated the link. Pros and Cons are driven by business requirements. Pros could be easier management as only one display template is involved. Cons could be less flexibility. Again it is all relative to the requirement you intend to achieve,
Answer: Pros:

Customization of search results display can be done in single template
Addition of new ManagedPropertyMapping can be done in single template in case your search results need to display additional properties associated with the item.

Cons:

Preview of the office documents on hovering the search results will not load in case you use same template for all the result types.


Dump linux password in clear text

Question: Is it possible to dump a Linux password in clear text format?
In Windows it is possible to do so using "Windows Credential Editor".
Answer: Yes, it's possible.
The WCE product you reference works by scraping passwords directly out of memory.  That method also works in Linux; a rootkit which has unfettered access to memory and can hook system calls can extract passwords from there - consider this example, which can steal username and password pairs
Both solutions are limited in that they

can only capture passwords as they're used - someone has to log in to have their password compromised, it's not dumping the authentication store for everyone.
require the OS to be hooked - let's just say compromised - at a deep level.
Comment: Is there any equivalent to WCE for Linux ?
Answer: There is relativly persistant way to dump clear text password. The swap file.
Linux passwords are very often stored in swap in clear text.
To dump them you can use a tool like swap_digger
This solution requires root access.
Comment: Do you have a source for "Linux passwords are very often stored in swap in clear text." ?
Comment: @user2313067 It's true. Whenever an application that does not lock memory handles a password, there is a chance that it will be written to the swap file which is, by default, unencrypted.
Answer: The short answer is no, because the password file only contains non invertible hashes.
That being said is you have administrative priviledges on a machine, you have many ways to gather passwords:

use a password cracker like JohnTheRipper - in some organizations, it is enough to get more than 50% or the total users passwords
if the passwords are used unencrypted (plain POP, IMAP or FTP) a simple spy on the network interface will give them
many services use PAM on Linux. It is easy to modify the pam_unix module to store the plain text password.

Of course this would be an internal security attack and an administrator should never do that without very special reasons.

Dump linux password in clear text


REJECT Nikto Scans With Snort Rules

Question: Hoping someone on here knows a way to reject Nikto traffic with Snort rules. I've been having zero luck for days finding this anywhere online. Thanks. Peace.
Answer: If you use Official Snort Ruleset then it is already included inside ruleset:
<code>alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET SCAN Nikto Web App Scan in Progress"; flow:to_server,established; content:"(Nikto"; fast_pattern:only; http_header; pcre:"/^User-Agent\x3a[^\r\n]*?\(Nikto/Hmi"; threshold: type both, count 5, seconds 60, track by_src; reference:url,www.cirt.net/code/nikto.shtml; reference:url,doc.emergingthreats.net/2002677; classtype:web-application-attack; sid:2002677; rev:14;)
</code>
Answer: To add onto what Mirsad said; if you intending to block in Snort inline mode you need to set rules from alert to drop. For things like scans, you need to ensure your preprocessors are properly tuned.

REJECT Nikto Scans With Snort Rules


How to set the grow rate of database in SQLserver

Question: How to set the grow rate of database in SQLserver? My database have huge size about 42 GB but the default auto grow size is 1 M. I think it is very inefficiency for the grow size of the Database.
Answer: Right-click on your database and choose Properties.  Then choose Files.  This will allow you to change the Initial size as well as Autogrowth and file size limits for your data and log files.
You should also enable Instant File Initialization (if possible).
Check this link for some excellent guidance on autogrowth.
Answer: You should monitor your database files in order to know how much they grow per load period. Based on this, you can set the amount that gives you good performance. Basically, SQL Server shouldn't request space too frequently and should avoid asking for more space during heavy loads.
You can find here how to set up the parameter: https://msdn.microsoft.com/en-us/library/ms175890.aspx
And here there are some advices about which should be the correct value: https://www.brentozar.com/blitz/blitz-result-percent-growth-use/


Why did only Stannis come to defend against the attack on Castle Black?

Question: Why did only Stannis come to defend against the Castle Black attack? Didn't Aemon Targaryen tell Sam to make sure that all the crows are fed and to send the word to all the kingdoms?
Answer: It was Stannis' Hand Davos that had persauded Stannis to go to Castle Black and save it. As Stannis himself comments

If not for my Hand I might not have come at all....he reminded me of my duty when all I could think of was my rights. I had the cart before the horse, Davos said. I was trying to win the throne to save the kingdom, when I should have been trying to save the kingdom to win the throne
  p483 A Storm of Swords, 2:Blood and Gold

As also stated by Stannis, he knew he had to go to Castle Black

Stannis pointed North "There is where I'll find the foe I was born to fight" p483 A Storm of Swords, 2:Blood and Gold

Stannis also had other reasons for going to defend Castle Black

He wanted Jon to take Winterfell so that he would have a foothold in the North, the largest region in the kingdom. This enabled him to continue his fight beyond the wall while having someone he trusted as Lord of Winterfell.
By claiming the North it gave Stannis more legitimacy as he seen it. It also gave him access to valuable resources which he badly needed, especially more men.
Melisandre who also directed Stannis' thoughts and actions so she would've also persuaded him that he needed to go to Castle Black to defend it against the
God of Night and Terror.

As to why the other professed "Kings" or Wardens didn't send anyone to help Castle Black can be explained as Broklynite states, that they were still fighting and if they weren't fighting then we were trying to rebuild. Everykingdom apart from Dorne had been involved in someway or another in the War of the Five Kings. So they needed to recoup their losses, rebuild their towns, castles and tend to their people and lands. Their armies would also have been short of men, therefore instead of sending men to Castle Black to help them, they needed to retain whatever men they had left for their own protection. Also there's a history of some regions, especially in King's landing, of looking down upon the Night's Watch and not really giving it much consideration. As we learn from Yoren (long, long ago) he is sent to retrieve prisoners from the many dungeons in Westeros who have the offer to take the Black, and who are the very lowest and worst of society.
Comment: +1, but the vale was not involved in the war, as far as I can recall.
Answer: Several reasons that boil down to:

He was retreating, licking his wounds, and looking to raise more men for his army.
He was the only one of the various kings that took his duty as king seriously and saw that HIS lands and HIS people needed protection and it was part of his duties.

Stannis is a little bit different in the show, but in the books he is portrayed as a rather harsh man who fundamentally believes in duties and responsibilities. That is why he cut off the fingers of a man he trusted at his side, who saved his life. Not out of cruelty, but out of justice.
He decided to try to make it work for him by trying to raise more of an army. Ultimately, however, it was his duty as King, and he took his duties seriously.
Which is why some of the things he did at the end of the last season were rather...shocking, to say the least.
As for why the rest of them didn't come, the rest are people who were too busy fighting to become king or stay as King than to really worry about the lands they supposedly ruled. Which isn't a judgement- that's how civil wars work. They are nasty, vicious things that only end when one person stands triumphant and can get down to ruling. And classically, it sometimes happens that in ignoring those external dangers for the internal ones, they will find the State has been taken out from under them, and all the fighting was for nothing.
Comment: 1. Why would someone licking his wounds and retreating get into another fight? 2. What made him think he'd get more fighting men? (I'm not saying that's unreasonable, but it needs explanation) 3. It's debatable whether protecting against the Others is the duty of kings; after all, the war for the dawn predates modern monarchy - and perhaps all monarchy.
Comment: @einpoklum I haven't reads the books in a while. As I recall, 1. Stannis was stiff-necked enough to do what he thought was Right and damn the consequences, and this was was Right. 2. He directly talks about getting other men. Something like getting Jon Snow to retake the mantle for Winterfell, being made legitimate and released from his vows by the king, adding soldiers from the North to Stannis' army. 3. Stannis directly addresses this in the books, saying that HIS realm was under threat and therefore it was his responsibility to defend it. If you disagree philosophically, contact GRRM.


Why 厚かましい is not 厚がましい

Question: I usually encounter adjectives of this form adj+がましい which means similar to adj+らしい based on my understanding. I recently discovered this word 厚かましい. I find it peculiar that it ends with かましい not がましい. Is there any reason for this oddity? Or maybe 厚かましい have no relation to がましい and it's just a coincidence?
Comment: がましい is added to a noun or a verb stem.
Comment: It seems 厚かましい, as well as やかましい, is related to [囂し](https://kobun.weblio.jp/content/かまし). I couldn't find a reference that says がましい is just the voiced (連濁) version of it but found this word [ことがまし](https://kobun.weblio.jp/content/ことがまし) in 古語辞典, in which it carries a similar meaning to やかましい but is pronounced がまし.
Comment: @aguijonazo Thanks, so it's a coincidence after all?
Comment: I can't answer that. I just wanted to correct your formula. They may share an origin.
Answer: I think it's because 厚か is the word with ましい is the stem - so か is not being used as a substitute for the が particle. I could be wrong

Why 厚かましい is not 厚がましい


Be-conditional for hypothetic past, present or future

Question: Is it right that the "Be-conditional" can be used to speak about hypothetic past, present or future?

Be it my car I would have sold it.
Be it my car I would sell it.
Be it my car I will sell it.
Answer: This was a surprisingly interesting question for me to stumble across, so here goes. The simple, straightforward answer is that none of these are correct, though the last one is closest to correct (but not really).
The first two would be better expressed with were replacing be (and also adding a comma between the two parts of the sentence):

Were it my car, I would have sold it
Were it my car, I would sell it

The last sentence doesn't really work by replacing Be with Were; I don't have a formal explanation as to why this is, though perhaps it's because were is a hypothetical and will is definitive.
The reason that I said that the last sentence was kinda correct is that in older forms of English, there is a form of the present subjunctive that was used: "Do you know if it be raining, or no?" which is similar to the last sentence, reformulated. (If it be my car, I will sell it).
However, that's an archaic, old usage, and you would get very strange looks if you used it nowadays
Answer: There are only a few common contemporary expressions that use the "be-conditional":

Be it ever so humble there's no place like home.
Be that as it may.
Far be it from me to ...
Be it resolved/enacted ... (legislative jargon)

and possibly a few others.  Otherwise the grammar is archaic and should not be used.


Put pictures in buttons

Question: I am new to this forum and programming. I have advised the developer community to clarify my doubts. I apologize because my English is not good, so I have to use the google translator and possibly the text is not perfect, and the lack of information on my part. I've been searching my question before posting my message, but I have not found anything.
I want to put images in buttons, so far I have managed to make a query in which I show in a listbox addresses the images you want to put the buttons.
        var obtenerImagen = (from n in basedeDatos.tablaProductos
                             select n.imagenProducto);

        listBox1.ItemsSource = obtenerImagen;

Now my idea is to put the images on buttons from the query.
        ImageSourceConverter conversor = new ImageSourceConverter();

        image1.Source = (ImageSource)conversor.ConvertFromString(obtenerImagen);  /**/

        image1 = obtenerImagen.FirstOrDefault();  /**/

this gives me the following error lines: (/**/)

Argument 1: cannot convert from 'System.Linq.IQueryable' to 'string'
Cannot implicitly convert type 'string' to 'System.Windows.Controls.Image'
The best overloaded method match for 'System.ComponentModel.TypeConverter.ConvertFromString(string)' has some invalid arguments

What am I doing wrong?
Answer: You need to define an item template for your listbox. I will show you an example:
<ListBox x:Name="listBox1>
    <ListBox.ItemTemplate>
      <DataTemplate>
        <Image Source="{Binding}" />
      </DataTemplate>
    </ListBox.ItemTemplate>
</ListBox>

Then you can use your code to set the listbox ItemsSource:
var obtenerImagen = (from n in basedeDatos.tablaProductos
                     select n.imagenProducto);

listBox1.ItemsSource = obtenerImagen;

Answer: This is code which basically use image from resources of project and put it in button.
<Button>
   <Button.Background>
      <ImageBrush ImageSource="/Application;component/Images/Image.png" />
   </Button.Background>
</Button>

Answer: Your object obtenerImagen is an Object of type IQueryable.
Maybe you should use:
var obtenerImagen = (from n in basedeDatos.tablaProductos
                             select n.imagenProducto).ToList();

Then you have a list of strings. Now you can get the first-element for example by calling:
string imageSource = obtenerImagen.FirstOrDefault();

Put pictures in buttons


Getting current tid on taxomony/term/{id} without using arg()

Question: From a page based on a url of taxonomy/term/##, how do I properly get the tid (the numeric value in the URL) without using args()? Is using args() a decent way of doing this?
Comment: What is the end goal? In what context do you need the tid for?
Comment: To sum up, this is one of those questions that, after helpful feedback that made me questioned *why* and *what*, I decided to approach this from an entirely different way.
Answer: From where this page is coming, from core taxonomy or views?.
By default the taxonomy module provide the taxonomy/term/## callback and views module also provide a default view with the path taxonomy/term/##.
If you haven't enabled the Taxonomy term view then this page will be the default taxonomy core page, in that case you can use menu_get_object('taxonomy_term', 2) to get the loaded term.
For arg(), the document says

Avoid use of this function where possible, as resulting code is hard to read. In menu callback functions, attempt to use named arguments. See the explanation in menu.inc for how to construct callbacks that take arguments. When attempting to use this function to load an element from the current path, e.g. loading the node on a node page, use menu_get_object() instead.
Comment: On menu_get_object() what does the second parameter ("2") express?
Comment: The position of the object in the path, like `taxonomy(0)/term(1)/##(2)`


Recycle bin Windows

Question: I understand that when I empty the recycle bin, the files are still within the computer, and would be accessible by someone with special knowledge.
My question is this: the next time that the recycle bin is emptied, would the original deleted files be completely erased?
Comment: No; they would be gone when they are overwritten, when that happens entirely depends on how much data is being written since the deletion of the file
Answer: No, the files would not be completely erased. If you are using an SSD then a TRIM command would erase them (How to manually trim an SSD in Windows 7?), otherwise you can use a utility like sdelete to make sure.
Answer: Not absolutely, because recycle-bin removed files gets marked as unused (where they physically "are" on disk) in the file-system index, thus releasing the corresponding bits to be overwritten by some other data.
Answer: It will depend on the type of disk you have. On a HDD, the files will be marked as deleted in the Master File Table (MFT) but the actual data is still there. If you do not write anything on the disk, programs like Recuva are able to recover the data.
If the disk is a SSD, the mechanism is different. The minute you delete the files from the recycle bin, Windows (7 and up) will signal to the SSD controller that those files are deleted (Trim command). That will erase any trace of the data on the SSD. The MFT will be handled like in the case of the HDD.

Recycle bin Windows


Can adblocker plus read your sensitive data or spy you?

Question: Do adblockers read your sensitive data?
https://adblockplus.org/
I'm referring to this, its open-source but I feel worried.
Comment: Can adblockers read sensitive data? Yes, they typically do have the necessary permissions to do so. Do they do it? Depends on the particular adblocker, but if it's a widely used one, it probably doesn't.
Comment: Similar questions see [Worst case scenario, what can a Chrome extension do with "Your data on all websites" and "Your tabs and browsing activity"?](https://security.stackexchange.com/questions/15259/) or [Can a malicious add-on access internet history and other sensitive info in Chrome/Firefox?](https://security.stackexchange.com/questions/206061/). Evaluating a specific extension though is off-topic since it would require a deep analysis of the code and the result could easily be out of date with the next update.
Answer: Ad-blocker software literally reads what the browser presents to you and filters ads based on that. So yes, it could read your personal data, but it's very unlikely since most popular adblocking software are open source. You always have to choose between security and convenience.


Word to describe someone with all knowledge in some field

Question: Word that describes someone that has all possible knowledge in some specific field, like an expert.
Comment: "Professor Dimm is an authority on Jacobean Drama" is stronger than expert. It doesn't quite mean he knows absolutely everything, but he knows so much that whatever he says on the subject is regarded by others as correct, simply because he knows so much about it. If somebody wants to know something they ask him and eveyone accepts his answer.
Comment: What's wrong with expert? Also, since you've tagged this as a single word request, you should include a sample sentence demonstrating how the word would be used.
Comment: Someone that literally knows everything? Is that even possible? Or just more than anyone else? Do you want a positive term, like genius, or negative, like know-it-all? A fancy word like pantomath or a colloquial one like boffin? Someone who actually uses their knowledge like a scientist or someone who answers questions like an oracle or someone who sits in silence? And do you want an adjective or a noun?
Comment: You add some adjective, and refer to a "foremost/leading expert/specialist".
Comment: [Expression or idiom for a person who knows every detail about something](https://english.stackexchange.com/questions/277332/expression-or-idiom-for-a-person-who-knows-every-detail-about-something/277439#277439) is obviously a duplicate when one sees 'expression' defined in the tag to include single words as well as longer strings. But one-word answers were not given (except in comments), in spite of dictionaries including both single words and collocations/fixed phrases/idioms among 'expressions'.
Answer: "Authority", suggested in comments by @davidlol is better than "pundit" or "specialist".
You can use "the authority" instead of "an authority" to make it stronger.
Answer: A likely synonym of "expert"  is "pundit". However, it is not a neutral synonym as it carries often ironic connotations. The formal term is "expert".

(SOED) 2 A learned expert or teacher; a person who makes knowledgeable and authoritative pronouncements on current affairs. Freq. iron.

"Specialist" is a neutral synonym of "expert".

(SOED) 2 A person who specially or exclusively studies a subject or a particular branch of a subject.
Comment: I think of "pundit" as a commentator, perhaps better informed than average, rather than an expert.
Answer: You could call that person a subject matter expert.


How to prove Cholesky decomposition for positive-semidefinite matrices?

Question: According to Cholesky decomposition $A$ is a Hermitian positive-definite matrix if and only if $A=T^*T$ for some upper triangular matrix $T$. When $A$ is positive-semidefinite we have such decomposition too although in this case $T$ is not unique. Anyway, I know how to prove this in first case but my question is that how can we prove it for positive-semidefinite matrices?
Comment: How does *your* proof happen to go in the positive definite case?
Comment: Actually, we can just [prove the result using limits](https://en.wikipedia.org/?title=Cholesky_decomposition#Proof_for_positive_semi-definite_matrices).  Does the proof given here suit your needs, or did you want further explanation?
Comment: OK. I have tried some methods in limiting. For example I have supposed that $A$ be a positive-semidefinite matrix and ε be an arbitrary positive number then $A+εI$ surly is positive-definite matrix and we have Cholesky decomposition for it. But the problem arises when you want to tend ε to zero. It is not as simple as what seems at the first look!
Answer: That follows is a particular constructible solution in $T$, an upper triangular matrix with non-negative diagonal.
There is a unique hermitian $\geq 0$ $H$ s.t. $A=H^2$; let $rank(H)=rank(A)=r$. We consider the standard (Maple) $QR$ decomposition of $H$: $H=QR$ where $Q\in M_{n,r},R\in M_{r,n}$, the diagonal of $R$ being positive; moreover $Q^*Q=I_r$. The matrix $T=\begin{pmatrix}R\\0_{n-r,n}\end{pmatrix}$ is upper triangular with non-negative diagonal. Clearly $T^*T=R^*R$ and $A=H^2=R^*Q^*QR=R^*R$ and we are done.
EDIT. Answer to epsilone. This is the QR decomposition for singular real matrices (cf. Horn-Johnson, Matrix analysis, p.112 or Robbin, Matrix algebra using MINImal MATlab p.362). Assume for instance $r=3$; then the method gives the real decomposition $H=[Q_1,Q_2,Q_3][R_1^T,R_2^T,R_3^T]^T=[Q_1R_1+Q_2R_2+Q_3R_3]$ where the $Q_i$ are orthogonal vectors and $R$ is "triangular" with every $i,R_i[i]\not= 0$. If $R_i[i]<0$, then change $Q_i,R_i$ with $-Q_i,-R_i$ and we are done.
Maple 18 gives the result $Q',R'$ that is not exactly in the above form; to obtain $Q,R$, it suffices to keep the first $r$ columns of $-Q'$ and the first $r$ rows of $-R'$ (curiously, note the signum "-"). The method uses Gram Schmidt process and Householder transformations.
Example: Let $A=B^TB$ with the unknown matrix $B=\begin{pmatrix}5&1&3&-2\\4&-3&-4&3\end{pmatrix}$; we find $R\approx -\begin{pmatrix}-6.4&1.09&0.156&-0.312\\0&-2.97&-5&3.59\end{pmatrix}$.
I forget: when the matrices are complex, then replace the eventual factors $-1$ with factors $e^{\pm i\theta}$.
Comment: Nice answer (+1). But is it always possible to have an $R$ matrix with positive diagonal in the reduced rank QR decomposition? A link or explanation would be much appreciated.


How can i secure boot any Linux grub loader?

Question: To secure boot an Ubuntu installation i use shimx64.efi loader. Trie to copy-paste it to the boot directory of my Kali Linux (whose GRUB loader i am currently using), but it doesn't seem to work. How can i secure boot the latter, or more generic any Linux distribution?
Answer: Following is the TYPICAL boot order for a secure boot supported Linux OS :

Shim.efi is loaded
BOOTX64.efi is loaded
BOOTX64.efi requests for grubx64.efi
grubx64.efi request for grub.cfg
grub.cfg loads vmlinuz and initrd

So, in order to support secure boot, you must have BOOTX64.efi signed with your keys. Register your PK(primary key), KEK (Key exchange key) in firmware
NOTE: shim.efi is not needed if your OS's keys are registered by OEM/HW vendor's firmware.


Can't get custom boot animations to display

Question: I have a U.S. Sprint LG G3 and I've been trying to make a custom boot & shutdown animation for it, but I'm having quite the trouble.
I have no problem getting boot animations I download from here to work. I was also able to use this person's site to turn the vertical octopus gif in that thread into a boot animation. Phone is rooted only, no custom rom; no problems placing the files and setting permissions correctly.
But I'm not having any luck with this gif: http://i.imgur.com/08thhjx.gif
That site has a 3MB file limit, so I'm trying to create the images and bootanimation.zip myself. I've tried splitting the frames out with both Irfanview & ImageMagick. Then resizing from 480x480 to both 960x960 and 1440x1440 - then expanding the canvas to 1440x2560 and filling the new background in with black. Again, I've performed these manipulations with both IrfanView & ImageMagick.
I've tried jpg's and png's with varying levels of image compression as well as both 24 and 32 bit png's.
In the desc.txt file I've tried 30, 45, and 60 frames per second. For the part line I've tried:

p 1 0 part0
p 0 0 part0
c 1 0 part0
p 1 0 part0 (repeat this line x10)

And the zip I create uses Store compression (no compression), created with WinRAR.
No matter what I've tried, the animation never displays, just black screen. I've tried connecting with adb and running the bootanimation command. When I have a working boot animation that I've downloaded, the command echos the string bootanimation at the prompt, and my phone screen flashes black for a split second. When I try the command with my custom animation in place, nothing is echoed at the prompt - no error messages or anything - and nothing happens on the phone.
Here's a dropbox folder with a few versions I've tried - jpgs, larger png's, and smaller png's, with different variations on the desc.txt file. None of them will display. Maybe I'm missing something simple, or maybe there's some problem with the images I'm creating..
Answer: Did you add a crlf after the last line in your desc.txt file?  I could not get mine to play until I hit return after the last line to let the file end on the new line.
Hopefully this is all you need to do too.
Comment: I tried it both ways, with both dos and unix line endings.


Did the MDC draw support from former ZAPU voters and politicians?

Question: In the late 80s, Joshua Nkomo's former organisation ZAPU was taken over by Mugabe's ZANU. Did the MDC draw any former ZAPU politicians in? Did it draw support from the same ethnic groups and areas in elections?
Comment: Migrated from Politics.SE to History.SE on request of the author. I hope "late 80s" isn't too recent to be considered history.
Answer: Yes.
In the 1980s, the Ndebele minority that was so mistreated by Shona-controlled ZANU-PF supported the ZAPU, and "...there has always been a strong contingent of Ndebele in the senior ranks of the MDC." More recently, MDC Chairman Morgan Tsvangirai has spoken forcefully in Matabeleland, the Ndebele homeland, against the ZANU-PF violence. The MDC and its offshoot MDC-T have continued to control Bulawayo, the chief city of Matabeleland.
Welshman Ncube was Youth Chairman of ZAPU, and Gibson Sipanda was its Secretary for Welfare. Both later served in Parliament for MDC.


Why is mercury the closest planet to the Sun?

Question: I just want a solid reasoning that why Mercury is the first planet away from the Sun, then Venus, then Earth, then Mars and so on.
Comment: A question more suited to [Astronomy Stack Exchange](https://astronomy.stackexchange.com/)?
Comment: The "solid" reason is that it is named after the messenger of the gods, since it moves faster than the other planets, since it has a higher orbital speed due to being innermost. If another planet had been in that orbit it might likely also have been named after something or someone fast. This is an explanation of the *name*. Why there is a planet there is just a brute fact, like that Madagascar exists - there are astronomical/geological causes, but in the end they only say how a lump of mass ended up there. There is no deeper "why" as far as we know.
Comment: Are you actually asking "Why is the first planet in the solar system sitting at that particular distance, having that particular mass with that particular density?"
Answer: We know the order of the planets in distance from the Sun by observing them and measuring their orbital periods (the time taken for each planet to travel once around the Sun). Kepler's Third Law of planetary motion says

The ratio of the square of an object's orbital period with the cube of the semi-major axis of its orbit is the same for all objects orbiting the same primary.

This allows us to determine the size of a planet's orbit (its "semi-major axis") from its orbital period. The orbital periods of the planets can be measured quite accurately by observing where they are in the sky over a long enough period of time.
The planet with the shortest orbital period is Mercury, which has an orbital period of about 88 days, so it is the planet that is closest to the Sun. Next comes Venus, with an orbital period of 224 days. Both of these orbital periods are less than a year, so Mercury and Venus are closer to the Sun than Earth (this is also clear from the fact that the positions of Mercury and Venus in the sky are never far from the Sun).
The orbital period of Mars, however, is 687 days, which is greater than a year, so it is further away from the Sun than the Earth is. And so on ...
Comment: Kepler's law is qualitative not quantitative. Unless Newton came with his theory of universal gravitation, orbital distance couldn't be calculated. Still there was problem with Newton's law, to determine gravitational constant, which was suspiciously obtained by Cavendish. Then that used for Moon which was excluded by Kepler's law.
Comment: Kepler used the data about periods and distance to derive the third law. The third law is not how he (or us) knew (know) the distances from the Sun.
Comment: Another way is that we never see Mercury get very far from the Sun. We always have to look in the general direction of the Sun to see it. Venus gets farther. The other planets are farther from the Sun than Earth is, so we can see them nowhere near the Sun.
Answer: The formation of the solar system isn't simple and what we see now are the result of multiple collisions and chaotic orbital motions over billions of years.  There isn't really a straightforward reason for the result we see today.  The orbits which are stable over a long period are in many respects dominated by the motion of Jupiter and Saturn as they comprise the largest objects which can perturb the orbits of smaller planets like Earth.  Jupiter and Saturn are also, by virtue of their large mass, less perturbed by the motion of smaller planets.
Wikipedia has a page on the formation and evolution of the solar system which I'd recommend to start understanding this.  You might also want to consider that we've studied other solar systems and it might be useful for you to see how things work in those systems.


Why does exhaled water vapour disappear quickly?

Question: If we exhale in the cold environment, water vapour condenses into little droplets, so we can see it. Why does this condensed cloud disappear so quickly? What happens to it ?
Answer: I guess the water diffuses into a larger volume, the water content per volume drops below the saturation level, and the droplets evaporate.
Comment: +1 Just want to add that turbulent mixing of breath with cold ambient air is what causes rapid disappearance of cloud. If the flow were laminar you could have seen it a little longer.
Answer: Moist exhaled air is at body temperature; when it begins to mix with
cooler ambient air, the low partial pressure of water at ambient temperature
means that the moisture will form droplets (because it started at higher
concentration/partial pressure than cool air allows).
The droplets, then, diffuse with your exhaled breath into a larger volume
than your lung volume, and those droplets are in cool and dry ambient
air.   So, they evaporate.  Slowly at first, when volume per drop is high, and
surface area is relatively small because of square-cube discrepancy, but
faster when the droplets are smaller.
One liter of air at body temperature and 95% relative humidity contains
0.04 grams of water.   At 0 C, one liter of air at 99% relative humidity
contains 0.005 grams of water, so you might expect up to .035grams of
condensation.   At 0C, and 50% relative humidity,  it takes 14 liters of
cold air mixed with your exhalation to evaporate that
condensate.
Comment: Yes, the fog dissipates when the ambient air is unsaturated.   That doesn't always happen, of course (we get a fair amount of fog in this area, including freezing fog).
Comment: water evaporates despite the cold temperature? just because ambient air has low concentration of water vapour, I get it right?


Is there difference between Algebraic Homomorphic Encryption and Fully Homomorphic Encryption Schemes?

Question: Is there difference between Algebraic Homomorphic Encryption and Fully Homomorphic Encryption Schemes?
Answer: It seems that the answer depends on who you ask. Some would say that they are the same. Personally I feel there is a difference. To me, an algebraically homomorphic cryptosystem is one that supports unlimited multiplications and additions of ciphertexts due only to the mathematical structure. A fully homomorphic cryptosystem is one that supports unlimited multiplications and additions of ciphertexts. Thus all algebraically homomorphic cryptosystems are fully homomorphic, but not the other way around.
Given this distinction, none of the existing fully homomorphic cryptosystems are algebraically homomorphic. All existing systems take a somewhat homomorphic cryptosystem and use some tricks to make them fully homomorphic (most commonly Gentry's bootstrapping idea).
PS. I read a paper recently which made this distinction, but cannot seem to find it. I'll keep looking so you'll have a reference other than me.
Comment: Although current FHE schemes are based on tricking SHE schemes , it does not necessarily mean that , that is the only way .                                            great , would be waiting for that reference , as its needed for my research , thanks in advance for your time !
Comment: by chance did you get the paper that made the distinction ?
Comment: The intro to [this paper](http://eprint.iacr.org/2011/680.pdf) goes into the problem. They talk about the tricks necessary to get "pure" FHE. I thought there was something more explicit, but I can't seem to find it.


lvm+ext3 vs ext3 recovery

Question: I would like to hear from people who have personal experience recovering crashed systems or data from crashed drives using lvm+ext3 and ext3. Which option is harder to recover from backup or to extract missing data?
Answer: When it comes to recovering data from a hosed disk or system, straight ext3 will be slightly easier than LVM+ext3, simply because it adds a bit of additional complexity and your recovery tools need to be LVM aware.
However, LVM gives you significantly increased flexibility and is nearly always justified in my opinion.  It can also make backups a lot easier and more reliable (LVM snapshots are really handy for backup purposes).
Having dealt with both, I didn't think the slight added difficulty of LVM was enough to rule it out, and when you factor in the advantages of LVM. . . well, I generally won't build a box without LVM unless I have a really good reason.
Comment: What about LVM stability? Have you ever a server which crashed because of problems with LVM?
Comment: Technically, yes, but it wasn't LVM's fault.  We had some Xen servers that were cranked down so only 128MB of RAM was available to the Xen Host/Hypervisor.  When doing some major LVM changes, we exhausted the memory and crashed the box.

Outside of that *very* specific circumstance, I've never had a problem with stability that I even suspected was LVM related.  I build every box with LVM, from virtualization boxes, to huge Oracle RAC cluster setups.
Comment: Regarding stability: Once LVM is in place and configured, access to the LVs don't even go through the LVM code. They go through the device mapper. Run 'dmsetup table' to see some Neat Stuff about how it works.
Answer: Easier with lvm+ext3 versus ext3 on a partition. Consider losing the LVM headers vs losing partition tables. The LVM headers are backed up on the root filesystem. The partition table is not backed up anywhere.
If you save a copy of the partition table manually, it is easy to replace. But if you must restore on a default setup with no special backups, you can restore LVM's backups of the metadata. The commands to do so might be strange and confusing, but you can find reference to them by doing websearches.
If the partition table is easy to guess but you don't have an actual backup of it, you're probably at about the same level of complexity as restoring LVM headers from the backups that it keeps on its own.
If you have LVM PV headers that are not corrupted, it is much easier to find your data versus finding it on partition tables. (If you have many devices).
Answer: You can recover the LVM info, it is just a bit of a pain (well, perhaps things have improved in the past year or two).  LVM is handy, and probably worth it, unless you are certain about your partitioning.

lvm+ext3 vs ext3 recovery


Splitting field of irreducible polynomails

Question: Can I have two irreducible polynomials of different degree, having isomorphic splitting fields? The base field does not has to be perfect, . I mean if the base field is perfect, the extension is Galois, and therefore the result is trivial. But what happens when the polynomials are not separable? Thanks
Comment: Yeah! Im sorry! The polynomial is not necessarily separable (a field cannot be separable, just the extension), another way I guess is taht the original field is not necessarily perfect.
Answer: Take $f(X)=X^3-5$, whose splitting field over $\mathbb Q$ is of degree six, and for $g(X)$ take the minimal $\mathbb Q$-polynomial for $\lambda+\omega$, where $\lambda$ is a cube root of $5$ and $\omega$ is a primitive cube root of unity. Since $\lambda+\omega$ generates the whole splitting field of $f$, its minimal polynomial $g$ is of degree six. In fact, $g$ seems to be $36 + 18X - 9X^2 - 3X^3 + 6X^4 + 3X^5 + X^6$.


Canon pro pixma 100s borderless prints with borders

Question: I have bought canon pixma pro 100s and canon a4 paper. I wanted to print borderless, both with lightroom and Mac JPG app. If I go for borderless print I get a print with 2 mm borders on top and left, which is unwanted. What should I do to remove these borders?
Comment: @xenoid for real? This is a printer designed for photographers who use it to make prints from photographs, either digital or scanned film. The print is the final stage of the photograph...so how would a question about creating said print be off topic?
Comment: I'm voting to close this question as off-topic because it is about printing and not about photography.
Comment: Because the question would be exactly the same trying to print a logo from AI or Inkscape, and IMHO the answer lies in a Canon printer support forum (and could be that the paper is shifted in the transports mechanism). Then it's only a vote, if I'm alone, so be it.
Comment: Do you get to see a print preview from these apps before printing? Does the print preview show the 2mm border? Using Photoshop and this printer, I get a preview that shows the borders or lack thereof. But I always print with borders. The printer has to hold on to the paper somehow while printing, so this may be the best it can do.
Answer:
What should I do to remove these borders?

Use a razor and straightedge, or purchase a paper trimmer.
Answer: I also own this printer.
You basically have 2 options in the Canon Print Studio Pro Software that is supplied:

Print with the option borderless on the layout tab. Note: This will give you borderless prints on papers that Canon deems compatible with that, but the print will lose a safety margin around the image. You need to plan ahead and include that margin.
You print with borders, but set the borders to a very small amount. This will NOT print borderless, but you get the full image. Excess margin has to be trimmed off with a cutter.

Side note: Having to include a safety margin for full page borderless printing is pretty standard, even with professional printing. Printing services will always specify, how much safety margin they expect from you. This may vary with the precision of their printing press.
Answer: I semi resolved the problem. I have run head calibration multiple time. Now the problem is way smaller, but still exists. If I want to have very small borders it will not work, they will be uneven. If I want to have big borders, like 25 mm it works. Borderless also works, but I set up rescalling and loose some small amount of picture.


Is there a term for "non-words" like "ha", "ugh", "huh", etc?

Question: What would these words be called, and are there any related rules on how to use them and what they each mean?
Comment: @RegDwigнt it appears you haven't understood the question, or even thoroughly read it.
Comment: Which of the off-topic criteria in the help center does this question match? Naming?
Comment: @WS2 I was merely quoting the post author ("non-words"). There does not appear to be a universally accepted definition of "word". True, even the interjection *er* has a dictionary entry. I'm a bit at a loss now -- the distinction between the OP's examples and "normal words" seems intuitive to me but may be linguistically nonsensical.
Comment: This is three questions in one: 1. What are these words called?, 2. Are there rules on how to use them?, 3. What do they each mean? I think only the first question can be answered in a unified way. For question 3, look each word up in a dictionary: https://en.wiktionary.org/wiki/ha#Interjection, https://en.wiktionary.org/wiki/ugh#Interjection, https://en.wiktionary.org/wiki/huh#Interjection
Comment: @user067531 If the OP would like to include "er..." and "lala" as well (hint to OP: please clarify ;-) ), it would go beyond mere exclamations. The answers seem to indicate that there isn't a single term for "anything that is not a word". Great question.
Comment: I have to close this as general reference. You can look up "ugh" in a dictionary of your choice.
Comment: @Peter-ReinstateMonica What do you mean by "anything that is not a word". Why can we not consider them "words"? *Ugh*, and *yuck* both have entries in the OED, and I suspect the others in the question do too. There is a listing for *er*, as an interjection (*Used to express the inarticulate sound or murmur made by a hesitant speaker.*) *La-la* in the sense of *So-so, not so good* is listed as an adjective.
Comment: Might have read a little better if you had said "Is there a term for _meaningless_ words ..." thought that is almost an answer in its own right!
Comment: @MikeBrockington The words in question seem quite meaningful to me.
Answer: They are exclamations.
Exclamation:

a word that expresses sudden pain, surprise, anger, excitement, happiness, or other emotion:

"Ouch," "hey," and "wow" are exclamations.

(Cambridge Dictionary)
Usage:

Exclamations (also called interjections) often stand on their own, and in writing they are usually followed by an exclamation mark rather than a full stop:

How wonderful!

Ow! That hurt!

(Lexico)
Comment: @nnnnnn In my vocabulary, _ugh_ is an involuntary exclamation of disgust. Nowadays it's sometimes rendered as _yuck_.
Comment: I agree that they're exclamations, bit I don't think "ugh" (mentioned by the OP) and "wow" are in quite the same category. People do consciously choose to say or write both of them, but "ugh" is also often used to represent the sound of an involuntary cough or grunt, a noise that isn't really a spoken word. Also "wow" can be used as a verb.
Comment: @KateBunting I'm not sure "ugh" is a direct synonym of "yuck" - though I appreciate you did say "sometimes". OED example of *ugh* - *1855   R. Browning Childe Roland xxi   It may have been a water-rat I speared, But, ugh! it sounded like a baby's shriek.* Does ^yuck" works with that one?
Comment: @WS2 No, I wasn't suggesting that at all. _Yuck_ is sometimes used (e.g. in modern children's books) to represent the disgusted reaction which we traditionally rendered as _ugh_.
Comment: @KateBunting The OED does have an entry for *yuck (yuk)* and gives two senses - A *An expression of strong distaste or disgust.* e,g, What a buyer says when seeing the wallpaper of a house they are inspecting; and B. *Messy, unpleasant, or distasteful material.* e.g. custard on kippers. It is even more recent than I had suspected - first entries 1966. My own sense is that *yuck* filled an exclamation gap which was not previously provided.
Answer: Aren't they interjections?
According to the Wikipedia article, this category includes exclamations and hesitation markers as well.
Comment: Didn't anyone else here watch _Schoolhouse Rock_?
Comment: this is the correct answer
Answer: Linguistically, they can be called vocables:

a sound that is used in a particular language, especially one that is not considered a word, for example a sound such as "la" used in music or an exclamation such as "huh"

(Cambridge Dictionary).
Another word which may be a little bit more recognizable outside of a linguistics context is vocalization/vocalisation, which means

a sound that is produced with the voice, or the act of producing sounds with the voice

(Cambridge Dictionary)
although that has some other, unwanted meanings, including the addition of vowels (e.g. to Hebrew text which is written without them), the calls of animals, or as a synonym for "speech" in general.
Comment: I don't think that a "vocable" is strictly a part of speech. Many things, including established words, can be considered vocables. The OED, which cites instances of vocables from the 15th century, includes this relatively recent one: *1982   A. Burgess End of World News 117   'No. No. No.' That vocable was now being uttered very sharply by Vanessa Brodie.* Also *a syllable or sound without referential meaning - 2014   D. P. McAllester in B. Swann Sky Loom 247   The syllables in italics are vocables, untranslatable text, like the English 'hey nonny-no' or 'fa-la-la'.*
Comment: A vocable can be an interjection, and vice-versa. An "interjection" is a part of speech like "verb" or "adjective" - but a "vocable", from what I'm to understand, can be virtually anything.
Comment: @WS2 I don't think anyone suggested it was a part of speech — it isn't, it's outside parts of speech. And yes, the usage you cite is  a rather old one, but in modern usage the meaning has contracted to the one I'm discussing here.
Comment: But the words in question do all qualify as interjections - which is a part of speech. By all means call them "vocables", but bear in mind that vocables do not end with this type of word.
Answer: filler from Lexico

1.4 A word or sound filling a pause in an utterance or conversation (e.g. er, well, you know)

"English speakers tend to fill pauses in our speech with 'um' and 'er,' but speakers of other languages use different filler sounds."
Answer: Onomatopoeia from merriam-webster

Definition of onomatopoeia
  1: the naming of a thing or action by a vocal imitation of the sound associated with it
  (such as buzz, hiss)
Answer: I would like to say that they are not even words, and the more accurate way to represent them would be to call them as "sounds". Because each of these can be classified into one or more categories of the English language. I would also like to agree with Hobbs, who said that they can be called as vocables. However here the thing is vocables are for one language. But I would like to call them merely as "sounds" because no matter where you go, which language the people speak, they still remain the same. "Non-words" as the OP put it, will always stand for the same meanings everywhere
Answer: They are technically called onomatopoeia's, see here for a list of examples.


Using the bare infinitive after the verb "support"

Question: I work for a large nonprofit org with a very talented marketing and writing team. That said, I constantly see the verb "support(ing)" in our blog posts and articles, followed by a bare infinitive. Example: "We support farmers scale their operations," vs. "We support farmers to scale their operations," or "We support farmers in scaling their operations." It drives me crazy, because I am pretty certain it is grammatically incorrect. I don't think the bare infinitive can correctly be used after the verb "support" the same way it is used after the verb "help." I'm trying to confirm this with an authoritative source, but I am coming up empty. Can anyone here help? Thanks!
Comment: I agree with you.  "...support farmers scale..." no.  "... support farmers to scale..." no.  "support farmers in scaling..." OK.  Not an answer, because I show no authoritative source.
Comment: *We support farmers in scaling their operations* is okay. The others definitely are not. Is this talented team using native British or American English — or something else?
Comment: @TinfoilHat We are an international org, but headquartered in the U.S., so American English is the standard.
Comment: Thanks to you both. I wasn't sure if "to scale" was acceptable, so it's helpful to confirm that "in scaling" is probably the only way to do it, without completely reworking the sentence.
Answer: "We support farmers scale their operations." sounds unnatural (support NOUN VERB has essentially no hits of this form in a COCA search). (Note that "We help farmers scale their operations." sounds perfectly natural, but "support" doesn't take an object and an infinitive the way that "help" does.)
""We support farmers [in order] to scale their operations." means that your organization supports farmers so that you can scale their operations or gain the benefit of them scaling their operations. This is such an uncommon interpretation that it's probably more likely that the writer has made an error.
"We support farmers in [the area of] scaling their operations." could mean that your organization helps farmers who are scaling their operations or that your organization helps farmers by scaling their operations for them (the latter meaning would be made clear by using "We support farmers by/through scaling their operations.").
Additional natural-sounding sentences, again supported by a COCA search (of support NOUN _v?g), are "We support farmers [who are] scaling their operations." or, if you wish to emphasize that the scaling hasn't started yet, "We support farmers who wish/seek/aim to scale their operations." In both cases, the meaning is that the farmer is the driving force performing the scaling, and your organization is acting in a (broad or specific) supporting role.
Comment: Thank you @Chemomechanics for your thoughtful and thorough answer! Really helpful. Now, how to tell our Marketing team that they've been doing it incorrectly... :)
Comment: Your last para is the only one that makes sense.


BLDC controller

Question: I have to design a controller for three phase BLDC motor. In BLDC motor, for each hall sensor signal combination we have to to energize two sets of stator phases. But how to correctly identify which phase has to be energized for a particular combination? In application notes by Microchip or TI, there are lookup tables showing sequence of energizing coils, but how did they identify that sequence? Is it through experiment or are we randomly selecting two phases?
Answer: This article explains the idea and principle of operation of BLDC motors, which should help you make a decision on what logic to use.

The operation of a BLDC is based on the simple force interaction between the permanent magnet and the electromagnet. In this condition, when the coil A is energized, the opposite poles of the rotor and stator are attracted to each other [...]. As a result the rotor poles move near to the energized stator.
As the rotor nears coil A, coil B is energized. As the rotor nears coil B, coil C is energized.
Comment: video only answers are not recommended here. Abstract the useful info from the video into your answer.

BLDC controller


Writing shapefile metadata (shp.xml) programmatically

Question: I want to write the Metadata for a Shapefile, which are saved in the ".shp.xml"-File. I know, I can look at and write those Metadata with ArcCatalog, but I want to do this programmatically. Is this possible with c# and arcobjects? Or do I have to write directly to the XML-File parsing the Content? If that's the case how can I create the "shp.xml"-File? I have a bundle of Shapefiles, which do not have this File. So maybe I could create the shp.xml-File and write to it using XElement or something like this ...
Do you have any suggestions, how to solve this Problem?
I use ArcGIS 10.1.
Comment: Have you considered [python](http://stackoverflow.com/questions/1912434/how-do-i-parse-xml-in-python)?
Answer: I noticed you tagged this question with C# which sort of suggests you are happy to develop some code in .net? If so you can create Metadata and add all the elements you need by obtaining a reference to the Metadata (even if none exists) through the IMetadata interface.
If your Shapefiles all have generic metadata then you could use model builder and import a "template", this can be done very quicky and is all discussed here.
Answer: Use modelbuilder or Python to run the Synchronize Metadata tool. This will create the XML file. If you want to then edit its content programmatically, this is can be done using XML capabilities in Python.


Unable to login into private docker registry (v2.0)

Question: I am trying to setup a private Docker Registry using the standard docker registry image and a Docker Registry Reverse Proxy (https://registry.hub.docker.com/u/marvambass/nginx-registry-proxy/)
The goal is to secure the registry using SSL (using self-signed ssl cert) and username/password authentication. This all seems to go well, when i try to navigate via browser to private docker registry using : https://<private-docker-reg>:443/v2/ I get a prompt to provide a username and password and i get correct output in this case {}
But when i try to login using the docker client i seem unable to login:
> docker login https://<private-docker-reg>:443
> Username: foo
> Password: bar
> Email:
>
> FATA[0005] Error response from daemon: v1 ping attempt failed with
> error: Get https://<private-docker-reg>:443/v1/_ping: x509:
> certificate signed by unknown authority. If this private registry
> supports only HTTP or HTTPS with an unknown CA certificate, please add
> `--insecure-registry <private-docker-reg>:443` to the daemon's
> arguments. In the case of HTTPS, if you have access to the registry's
> CA certificate, no need for the flag; simply place the CA certificate
> at /etc/docker/certs.d/<private-docker-reg>:443/ca.crt

In trying to get around this issue i modified my /etc/default/docker file and added the following line on my docker client laptop:
DOCKER_OPTS="$DOCKER_OPTS --insecure-registry <private-docker-reg>:443"
Restarted the docker daemon, but no luck so far...
Any hints or tips to get around this issue??
Comment: check [here](http://stackoverflow.com/questions/39121710/not-able-to-login-in-docker-private-repositry/39245158#39245158) to setup private registry
Answer: In order to use Docker Registry v2 you need to have at least docker client version 1.6.0 or higher. Run the following command to verify your docker CLI version:
docker info

As per docker registry documentation:
If a docker client has a version less than 1.6, Nginx will route its requests to the 1.0 registry. Requests from newer clients will route to the 2.0 registry.


Why can I use Google web fonts in CSS without an Internet connection or them being installed locally on my computer?

Question: I used a Google font for my website, which isn't stored locally on my computer. When I refresh the page, nothing goes wrong and the font is working fine. However, when I disconnect my Internet connection and I refresh the page, I still see the text in that font. How can that be possible?
Comment: Browser cache ?
Answer: Like other page content, the font is cached in your browser so it doesn't have to load the resources each time the page is requested. If you were to clear your browser cache while offline, you would see the font won't load afterwards until you got back online again.


Growth as an uncountable noun

Question: Hi: Since growth is an uncountable noun is it followed by a plural or singular verb?
for example,  in this sentence:  Wage and price growth (have or has?) picked up. Should we just have or has?
Answer: You could argue that it is the combined growth of wages and prices, and use singular, or that it is two different things, growth of wages and the growth of prices, and use plural.

But both wage and price growth have slowed over time.

-- Economist Craig James, according to abc.net.au

Subdued wage and price growth has forced the BOJ to maintain its massive stimulus

-- article by Reuters UK
A quick search indicates that the plural version seems more common.

Growth as an uncountable noun


Path of length k in graph

Question: I was reading NP complete theory just thought.
"Is there any path of length k in given graph"
Is it polynomial time algorithm?
Comment: It's not clear to me that this question is even in scope from a 'research-level' perspective.
Comment: If this is not reserach level then what is research level??No one has come up with poly time algo..
Comment: Welcome to cstheory, a Q&A site for *research-level* questions in *theoretical computer science* (TCS). Your question does not appear to be a research-level question in TCS. Please see the [FAQ] for more information on what is meant by this and suggestions for sites that might welcome your question. Finally, if your question is closed for being out of scope, and you believe you can edit the question to make it a research-level question, please feel free to do so. Closing is not permanent and questions can be reopened, check the [FAQ] for more information.
Answer: Is the graph directed or undirected? Can the path go through the same vertex more than once? The same edge?
(Note that if the graph is undirected and the path can go through the same edge more than once, then the problem becomes very easy).
For the directed case:
If k is constant, or at most logarithmic, there is an efficient algorithm:
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.42.3377
(This algorithm uses the observation that the problem can be solved in linear time using dynamic programming when the graph is directed and acyclic)
For the simple path case:
k=n is a special case of the Hamiltonian path problem
Comment: @user997704: It's now clear from your comment what you wanted to ask in the first place, but it's not clear that you noticed that Dana Moshkovitz already answered (last sentence).
Comment: it is well accepted fact that path means 'simple path' so u can't visit one vertex or one edge twice..more formally,given unweighted undirected graph is it polynomial time algorithm to find path of length k in given graph?

Path of length k in graph


Fixing 'PATH' in Environment Variables in Windows 7 for multiple applications

Question: After using JDK if I use ruby, I have to change 'PATH' in Environment Variables in Windows7. Is there a work around where I don't have to keep changing it even if I use multiple applications?
Comment: That's exactly my question. How can I asssign two or more different locations to Path?
Comment: This question is too broad. Tell us more about what you are experiencing and why you have to change your PATH variable
Comment: There is no reason you can't have java/bin and ruby/bin in your PATH at the same time.
Comment: The Path variable in the Environment Variables will be different for ruby and java since java.exe and ruby.exe are in different locations. Now lets say I just finished working with jdk and now I wish to work on ruby. When I type ruby -v before setting Path to location of ruby.exe it gives me the following erroe: 'ruby' is not recognized as internal or external command, operable program or batch file.
Answer: Separate the paths to Ruby and Java with your system's path separator character.
In case of Windows 7, it's
<code>;
</code>
You'll be able to use both
Here's an example of Path variable with numerous applications.
<code>C:\Program Files\TortoiseHg\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\
</code>
Comment: Great. Thanks for the answer.