Are Kaladesh cards still Standard legal?

Question: I am still seeing deck recipes with cards from Kaladesh block like Botanical Sanctum and Metallic Mimic. I thought that Kaladesh block was rotating, are the cards still legal?
Answer: Standard currently consists of the following sets

Kaladesh
Aether Revolt
Amonkhet
Hour of Devastation
Ixalan
Rivals of Ixalan

The next rotation will occur when the set after Core 2019 releases. At that time Kaladesh, Aether Revolt, Amonkhet and Hour of Devastation will rotate.
Answer: We are still in the Ixalan block with the most current release of Rivals of Ixalan, and it is in the current system the most recent three blocks that are standard legal. That would mean Kaladesh, Amonkhet and Ixalan.
Also, according to Gatherer, both the Sanctum and the Mimic are legal in standard. So even if the Kaladesh block had rotated out, if Gatherer isn't up to date, how could you expect that every single contributor to deck sites is?
Also note that Rivals of Ixalan is the last release of the two-set block paradigm that has been the release model of MtG since Battle for Zendikar in October 2015. From now on, beginning with the release of Dominaria in April, they will release three expansions and a core set each year, going back to something similar to what was before Battle for Zendikar, only not separated in blocks. You can read what Mark Rosewater has to say about the change here.
The Kaladesh block will be standard legal until the release of the set codenamed "Spaghetti" is released in the fall of this year, and the Amonkhet block will also rotate out simultaneously.


How to get the sending email address from outlook 2007

Question: I am working on outlook add-in project using Visual studio 2008 for MS
Outlook 2007 in C#. Here I am explaining my problem...
I got multiple accounts (3 Accounts) with my outlook 2007. I need to get
accounts form Account box in New Mail Message window.
When we click New Mail Message, a new window will appear from which we can
send a new mail. Here (On this window) we can see Account Dropdown (Left
side) under the Send Button. If we have multiple accounts with outlook, we
can see all the accounts in Account Drop Down if we click on Account Box. If
we click on the particular email, a right mark will appear to that Email
Account and a message can bee seen on the top of the Send button is "This
message will be sent via email@example.com".
So, I want to get these email accounts into a string and that particular
email account (which has right mark) into another string.
I got these 3 email accounts into a string. But, I am not getting the
particular email account(which has the right mark when we send a new email).
I am using this code....
<code>using Outlook = Microsoft.Office.Interop.Outlook;

using Office = Microsoft.Office.Core;

using Microsoft.Office.Interop.Outlook;

Outlook._Application myOutlookApp = new Outlook.Application();

Outlook.Accounts myAccounts = myOutlookApp.Session.Accounts;

foreach (Outlook.Account account in myAccounts)
                    {
                        string emailAddress = account.SmtpAddress;
                    }
</code>
I am able to get all the accounts from the above code..But, I just want to get the email address which we will use for sending an email at that particular moment..
Comment: The button with 1s and 0s (0101) allows you to format code.
Answer: Check out MailItem SendUsingAccount  property
Or you can grab it from the window name as you say.
Marcus
Answer: Solution is easy:
<code>...
your code
...

    foreach (Outlook.Account account in myAccounts)
                        {
                            string emailAddress = account.CurrentUser.AddressEntry.Address;
                        }
</code>
Email is stored in AddressEntry propery, under CurretUser object. That object is under account - how simple :-)


UTP 1236 wiring

Question: can someone tell why UTP 10/100 is wired 1236? why not 1234, 3456, 5678? (i know that on old adapters only 1236 pins were connected)
which was the rationale of 1236?
Comment: Unfortunately, *historical trivia* is off-topic.
Comment: @RickyBeam its not only trivia.. i wired all my cables 1-2,3-4,5-6,7-8; they work for short distances.. that i needed since 20 years.. not so for long distances; so given this huge mistake i wander of the rational of 1236; i kept my question short and on point.. don't assume its pointless
Comment: @RickyBeam btw.. google doesn't know.. from 1 day searching i can only assume it came from 4 pins phone line.. but why didn't they put ethernet 1-2, 7-8, assuming 3-4,5-6 were phone line arrangements, and why did they wire phone line 1-4,2-3 instead of 1-2,3-4; in the same order visible spectrum is ..green.. orange.. but UTP pair2 is orange and pair3 is green; whats the catch? i'm asking proffessionals.. they should know.. lol section
Answer: EIA/TIA-568 defined the pairs 1-2, 3-6, 4-5, and 7-8 long before twisted-pair Ethernet came up in the form of StarLAN which was designed to utilize the already existing cable plants.
Possibly, StarLAN developers left the 4-5 pair out to simplify coexistence with the previous twisted-pair application POTS. Unless there's a good source that is guesswork and off-topic here.
10BASE-T and 100BASE-TX inherited that pinout. 1000BASE-T onwards uses all pairs, not just 1-2 and 3-6.
Comment: regarding 1000BASE-T the pairs still persist 1-2, 3-6, 4-5, 7-8, only difference .. it uses all of them; i'll also look into EIA/TIA-568 standard for rationale; ty for the hint

UTP 1236 wiring


Position sort order for products in any category not working on Magento 2.4.1-p1

Question: Magento 2.4.1-p1
9 extensions from Amasty
Smartwave Porto theme

I just noticed that assigning position numbers to products in any category does not reflect on the front page = it does not sort based on position. I have deleted Cache and reindexed.

I googled this and apparently, this was an issue in Magento 2.2.7 and also with Mageplaza_LayeredNavigation. I don't believe we have anything from Mageplaza. Would this be caused by extensions from Amasty or our Smartwave Porto theme?
How to fix it?

Updated on October 13th, 2021:
I just checked and we do have the following:
MAGEPLAZA EXTENSIONS --> Layered Navigation

Is this something that came standard or did I install it?
How to fix the problem then?
Porto theme comes with Mageplaza_Layered_Navigation + Mageplaza_Ajax_Layer extensions which interferes with the product sort on category pages.

I found the following solution here:
"I am using Porto theme too and had encountered this problem on Magento 2.4.2. After the above comment by @tabunsa, I looked up release notes for mageplaza's layered navigation module and ajax module and realized that they had newer releases that were compatible with 2.4.2 and they fixed the bug. I used composer update mageplaza/* to update the latest 4.1.1 module for layered navigation the issue is now resolved for anyone else who encountered this problem."
https://github.com/magento/magento2/issues/31758
How do I update the Mageplaza's Layered Navigation module??
Answer: for update the Mageplaza's Layered Navigation module try this on project directory
composer update mageplaza/layered-navigation-m2


Induction due to solenoid

Question: The electrical energy produce inside the coil due to changing magnetic flux on a coil . The mechanical energy of magnet or coil get converted into electrical energy(law of conservation of energy)  . But , if we use solenoid instead of permanent magnet and change the magnitude of current through solenoid it induces current in the coil.
so my question is , from where this electrical energy come from?
It doesn't get produced by the conversion of mechanical energy.
Answer: In effect your have a transformer which is powered by a changing current which might be produced by a generator and hence mechanical energy is a possible source.
Other sources might be sound (microphone), light (photocell), etc.

Induction due to solenoid


Is a bench top jointer better than no jointer?

Question: I've love to get a nice big 6" jointer but I don't have the space for it so I've been looking at bench top models that I can store when not in use but man are the reviews horrible. On multiple sites I've seen reviews saying that it's actually worse to use a crappy jointer than no jointer at all so I don't want to spend the money and not use it because it doesn't work well. I have a planner and have tried sled method but it's too much work for the amount of lumber I want to mill so a dedicated jointer would be nice. So, is having a cheap bench top jointer better than not having one at all and using alternative methods? Any recommendations?
Comment: I've got a basic big box store Porter & Cable jointer and it works well for me on small stock.
Comment: I thought about getting one off craiglist but since I don't know how to fix them I'm worried it would be worse.
Comment: There is not a lot to fix on a jointer, they are pretty simple and straight forward. You can find old ones on craigslist that are in pretty good shape
Comment: Have you considered doing it the old-school way, with a plane? If the price of a true jointer is part of what has put you off you can do a great deal with one a 5 or 6.
Comment: One of the joys of most woodworking tools is how they are designed to be serviced. I put together a wood shop via purchases on Craigslist, knowing that I'd be tearing down and putting back together each tool I bought. Don't be afraid to dive in and figure out how they work; that helps you understand their operation better, anyway.
Answer: Every tool has it's abilities and limitations. The benchtop models do not have the table length and rigidity for jointing long and heavy boards. By using the machines within the range intended you can achieve acceptable results. Where the frustration will come is from trying to stretch the envelope of the machines capabilities and some of the capabilities are quite limited. Because the benchtop models are often designed to a low price point you may find that blade quality is lacking as are other components.
Yes you can do all of your work with a couple of hand planes and having developed the skill you will have a jointer suitable for infinite length and width boards. Not to mention your arms will have good muscle tone and it is quieter.
Answer:
Any recommendations?

I think most of the alternative approaches are covered in my previous Answer, Methods of jointing without a jointer.
I would suggest the hand-tool route as there is so much going for it, but obviously planing is not practical for everyone. Assuming you wouldn't be doing it manually routing would top my list of how to do the job with a power tool other than a jointer.
There are numerous router jigs and setups out there so you can pick the one that appeals to you most and/or suits the materials you have at hand and the process is fast and as accurate as you could want it.
If you don't currently own a router this is as good a reason as any to acquire the most versatile power tool there is! Routers have come down a lot in price over the years so a decent enough one shouldn't break the bank. A minor additional point given most glue joints are stronger than we need but the routed surface can be superior (will be if you do it right and your bit is sharp) to that produced by a power jointer, so bond strength can be better.


My 94 Honda Civic..which is a manual..will crank but not start... but it will clutch off

Question: My 94 Honda Civic..which is a 5 speed manual..will crank but not start..It will clutch off and runs and drives well after that. I have to pump the clutch several times before it will even start to crank.  I have changed out both of the switches on the clutch housing and even joined the wires together of the lowest switch together. I have changed the battery, fuel pump, fuel relay(the one that mounts near the hood latch), spark plugs, ignition coil, distributor cap and rotor button, and the electronic portion of the ignition switch. Once it jumps off it runs well despite a little surging when it idles( I'll ask for help with the idling problem after I get passed this).
Comment: Does the cranking sound normal (except that it never actually starts of course)? Just to be sure, when you say "clutch off" you mean rolling the car down a hill or pushing it and popping the clutch to get the engine to turn over, is that right?  And thanks for adding to the site, welcome!
Answer: Get the schematics for your car and trace out the starting circuit with a test light. Wondering in the clutch is 'false positive' and the issue is actually somewhere else, or if the clutch is moving a wire.
Your clutch switch will not allow the starter to turn, so if the starter is turning, it is not related to the clutch switch.  Your issue sounds to be related to spark or fuel.  This sounds like bad grounds to me, but it is hard to be sure without poking around with a test light.
Answer: @paulster.. Yes.. The start sounds normal and yes jump off refers to getting a rolling start and Poppin the clutch.
I do still have to pump the clutch several times before it will turn over..


Pick a random name from a text file in VB

Question: I have a file that has names of competitors. I want to write a VB code that selects a random name from the file.What I need is show the names moving quickly once I press enter it will select the name. I hope you got the idea.
Answer: If i understand your problem correctly you want to show every names on the file to the user on a button which name is chances rapidly.
If you want to do this little trick you need to load all the names from the file at the begging and keep them in a array so you will not need to reconnect to the file, that contains your names, every time you change the name of the button
Once you get the names you will need to create an infinite loop and attach a timer so the loop will wait for a specific time to change the name of the button.
last thing that you need to do is write a set of code under the button. That breaks the loop and gives the name of the button which was the assigned name at the time of the clicking.
I hope that helps  you!
Have a good day


How to have an external DB read and get data from my wordpress database

Question: I'm building a Chrome extension and I would like it connected to my wordpress site. What I'm trying to achieve is to have a user register on my wordpress site, and then be able to login using the same credentials on the Chrome extension. How can I achieve this?
Answer: You should check the rest api http://v2.wp-api.org/ you can access data remotely even update posts, etc.
Comment: Note that WordPress cannot be used as an authentication provider on its own. You're going to need a plugin. See this section of the (correct) documentation: https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/#authentication-plugins


QField GPS position

Question: I would like to put a .png image on QField and navigate with the GPS over it, on an Android smartphone. I managed to do this in an older version, but now the GPS does not move in the image, anyone know why?
Comment: (Have you enabled position by long click on the gps-icon (crosshair)?)
Comment: Is you png file georeferenced?
Answer: have you checked if there is an incorrect GPS positioning displayed in QField, which is about 5000 km further south? On some devices this error occurs since the update to QField 2.0.x. The position cursor is then near 0°W/0°N and not where it should be, even if all CRS are correct. I had this error on e.g. an older China cell phone. All the edits I did in my projects were in the correct place, it was only the GPS cursor that was in the wrong position.
The problem disappeared after deinstalling/reinstalling QField.

QField GPS position


Is Science Publishing group (http://www.sciencepg.net) a genuine publisher related to the Science journal?

Question: I received an email requesting me to apply for a reviewer/editor position at Science Publishing group. But I found that Science Publications have a different website, hence I feel that the email is a fraud. Please help to clarify matters.
Comment: Looks like it's a predatory publisher, see this list: http://beallslist.weebly.com/
Comment: @Stephan Sturm: I have to agree. Your example beats mine hands down: *The study of DNA in relation to Cosmos, and in turn to Vedic Astrology, may open new doors in understanding the planets' role in bringing about a particular event in life.*
Comment: Still better than the their newest publication in statistics and actuarial science, http://article.sciencepublishinggroup.com/pdf/10.11648.j.ijsas.20170103.15.pdf
Comment: Science Publishing != Science Publications would be my first guess... It doesn't look like one of the sites is trying to copy the other one, they have different journals, etc. So I'd guess that this is just an ordinary publisher, spamming people to get reviewers/editors, which happens rather regularly. As I'm just guessing from the websites and I don't know either publisher, I will leave this as a comment rather than an answer...
Comment: I'm not particularly impressed by [this paper](http://thescipub.com/PDF/jmssp.2016.271.276.pdf), which I found by looking through the titles of one of the mathematics journals. The editing is poor -- even a basic electronic spell check would have caught some misspellings. The results are not very deep -- most any beginning graduate student could come up with the proofs. No motivation is given for why one would be interested in this particular metric space generalization and the generalization they study is not compared with any other generalized metric space notion.
Comment: Why are people voting to close this? Whether or not "Science Publishing Group" is the publisher of the magazine "Science" is a simple matter of fact.
Answer: Science is the official magazine of the American Association for the Advancement of Science, which has nothing to do with two publishers you mentioned. It is common these days that new publishers (usually publishing online open access journals) use the names, which are similar to the famous publications.
Science and Nature are the most reputable journals (though they are technically magazines) in cutting-edge research. Both have impact factors over 30. The publishers you mentioned publish journals, which are not even properly indexed. Most of the journals by such publishers have an impact factor of around 1 (just mentioned to highlight the difference).
In any case, no reputable publisher asks you to apply. They choose their editors/reviewers directly based on your works. When an email asks you to apply, this is a general advertisement email sent to a long mailing list.
Comment: "Science and Nature are the most reputable journals" That depends very much on your field.
Comment: They are not "new publishers".  I know because they have been emailing me for years.  Do not work with them.
Comment: @AnonymousPhysicist new in comparison with AAAS or other old publishers. These 'new' publishers have formed in the era of online publishing industry.


Analog and digital input pins

Question: What is the difference between digital and analog input pins declared on microcontroller? In which situations we use analog and in which digital input pins? What will happen if we put an digital signal into into analog input pin, and vice versa?
Comment: Use an analogue pin for an analogue signal and a digital pin for a digital signal.
Comment: This might be more appropriate for arduino.SE
Answer: The difference is that a digital pin is only able to detect whether there is a voltage present on a pin or not, while an analog pin is connected to an internal Analog to Digital Converter (ADC) and can measure the actual voltage on the pin.
A digital pin is suited to detect if a button has been pressed, while an analog pin might for example measure the position of a potentiometer.
Comment: But can we use analog input pin for button-pressed detection?
Comment: @ParadoxECE Yes, you can. Analog ports are capable of performing digital functions, but you would usually avoid doing that to make available the extra functionality that an analog port offers. Note that the inverse is not true, digital only pins do not have analog (ADC) functionality, but might have other uses for things like I2C, UART, SPI, etc.
Comment: Analog pins often cannot trigger interrupts.
Answer: You can easily apply a digital signal to an analog pin. But be aware that detection of an analog value via ADC is normally slower than reading out a digital pin. What you get is, depending on the value, a quite low or a quite high value, but nothing in-between.
If you apply an analog signal to a digital pin, however, things are not so easy. Depending on the circuitry used for reading out that pin, it may happen that you have a CMOS situation where both transistors are conducting, a situation which is conntected to high losses of power.

Analog and digital input pins


What does のの mean?

Question: I'm reading おぼれかけた兄妹 by Areshima Takeo and I've come across the following phrase けれども二人がこっちに来るののおそいことおそいこと。Why this double のの? And what about こと? A man is saving a girl's life in the sea and the two are approaching the shore very slowly because of the rough sea.
Comment: Related/dup https://japanese.stackexchange.com/q/90471/45489
Answer: The こと is a particle, expressing exclamation in particular.

1 感動を表す。「まあ、きれいに咲いた―」「大変な人出だ―」

As for のの, your understanding is fine. 来るのの is equivalent to 来ることが.
Putting together, the part translates to (their) coming is so slow!.

What does のの mean?


POE and AC power

Question: Could there be any issues having both POE and AC power attached to a WAP? I'm curious because I found a few WAPs that had both...wondering if I should pull AC or just let it ride?
Answer: The Powered Device should recognize it has "local power" and not request PoE power. This assumes that you're talking about 802.3af compliant devices (sometimes called "active" devices) and not "passive" power injectors and their associated devices (they just throw voltage "out there" without regard for necessity, destination, or compatibility).
What you should do about this depends on your environment. If your PoE switches are heavily loaded, a few devices operating off local power is likely a good idea. Same for devices that require more power than your switch can provide.
For devices that use passive power injectors, they should absolutely not have two sources of power going to them. This could create feedback loops, ground loops, and all kinds of potential for misbehaving or fried equipment.
Answer: The PoE spec says that a device that can accept both PoE and power from another source must isolate the power sources so as not to send power back through the Ethernet connector. So if you're using reputable stuff, then your network gear should be OK.
That being said, the spec do not address what the device should do when it has power via PoE and another source. You will have to consult your product documentation as to the behavior of your device when it has multiple power sources available.
Comment: The key word is "reputable". There is a lot of gear out there with shoddy electrical isolation, especially on moments that the power-drain is close to maximum. And if both are connected which one is actually used is anybody's guess. Some equipment defaults to mains, others to PoE and others are configurable. I have even seen some that kept using whatever they where booted from, even if they had a preference if both were connected. How stuff reacts to passive injectors (which don't have sensing circuits) is another matter (see answer from Chris S too).

POE and AC power


Delete unused Empty

Question: in my scene I had an object with a mirror-modifier attached. I made several copies of it. Now I discovered that it also copied the empty I used as the mirror object. I want all new objects using the same empty as mirror object. So I changed (most of) them to point to the original emtpy. Now I want to delete the unused copies of the empty. Is there a way to figure out which empties I can delete and which I have to keep because some are still used for mirroring.
Answer: If you want to delete all empties in the current scene, which are not used as mirror object by a mirror modifier, you can use the following script:
<code>import bpy

scene = bpy.context.scene
obs = set()

for ob in scene.objects:
    for mod in ob.modifiers:
        if mod.type == 'MIRROR':
            obs.add(mod.mirror_object)

for ob in scene.objects:
    if ob.type == 'EMPTY' and ob not in obs:
        #scene.objects.unlink(ob) # version < 2.8
        bpy.data.objects.remove(ob) # do unlink is default
</code>
Note that it will remove empties even if they are used by other modifiers for instance. There is no direct way to figure out all dependencies to tell what users a certain object has.
Answer: This method works for me:

Export as .fbx, unselect "empty" from object types
Import .fbx in to a new Blender project

et, voila
Comment: Exporting and importing is rarely a correct solution for anything. Gone are any materials, modifiers, and properties your objects had

Delete unused Empty


What's a "constitutionally small penis"?

Question: I'm reading some urology papers and came across one involving penis growth (Kim & Song, 2008); here's an intro passage that I'm confused about:

A total of 58 patients with constitutionally small penises, without chromosomal anomalies and gene-associated syndromes, intersex, and hypospadias, were included in this study. The average patient age at their first visits was 10 years and the average follow-up period was 2.2 years.

What's a "constitutionally small penis"?
Edit:
I've read the paper in detail and I don't see where the authors distinguish between a small penis and a "constitutionally small" penis.
Would a "constitutionally small penis" be the same thing as a "micro-penis"?  If not, then where do we draw the line?
References
Kim, K. S., & Song, G. G. (2008). Penile Growth After Puberty in Patients with a Constitutionally Small Penis. Journal of Pediatric Urology, 4, S63. doi: 10.1016/j.jpurol.2008.01.174
Answer: "Constitutional" refers to the physical state of the concerned individual (Merriam-Webster).
In biology, it most probably means a trait that is not pathological or environment induced.
This is in the context of size of babies:

Small for gestational age (SGA) can occur following a pathological
  process or may represent constitutionally small fetuses.
From: Ananth & Vintzileos (2009)

Between18-22% of infants SGA by population
  standards are reclassified as normally grown by customized standards
  and as the perinatal mortality of these reclassified babies is similar
  to those who are normally grown they can be considered to be
  "constitutionally  small.".
From: McCowan et al. (2018)

In most cases, it is difficult to differentiate between
  constitutionally small head size vs pathologic microcephaly, and
  available data regarding prenatal diagnosis of microcephaly are based
  on small numbers of cases of varying etiologies.
From: Ultrasound screening for fetal microcephaly following Zika virus exposure.
   American Journal of Obstetrics & Gynecology, Volume 214, Issue 6, B2 - B4

Regarding constitutionally small penis: Since the article you mentioned is the only source (scientific or otherwise) of this term, I would believe that it is based on the population average (of possibly South Korea from where the authors are). Moreover, since it is not defined rigorously, it is most likely an arbitrary classification.


Finding the library an imported function is from in IDA

Question: I'm fairly new to reversing, and I have even less experience with IDA Pro. I am wondering if there is a way to figure out from where an imported function is imported, i.e. a memory location I can find with ldd or even better a .so name.
Answer: When I had the same problem (I was working on ELF binaries from Linux and QNX systems) I had to do the following:

run ldd on the executable to get the list of loaded libraries
obtain a list of exports of each mentioned library (by running nm -CD full_library_name | grep " T " on the system)
If your function is there - it is there
If you are working with C++, take demangling into consideration

If you don't have an ability to use shell on your system, you can automate getting list of exports using IDAPython ( idautils.Entries() ) and -S ida command line option.
If the library is loaded dynamically (by using dlopen/dlsym for example) you'll have to find corresponding dlopen call and find out its arguments.
Answer: Created this plugin recently, you can use https://github.com/0xMirasio/AutoResolv. This is an IDA plugins for resolving imports and show the library origin. You can also refactor code by importing function signature from the libs.
Comment: Welcome to RE.SE. It is customary to disclose one's affiliation with a recommendation. In this case you seem to be the owner of the repo, right? Note: there's _nothing_ wrong with promoting a solution you created, but it's good style to say that you are the one who made it _when_ you are promoting it (also holds for noncommercial offerings like yours). Thanks.
Comment: Ok , going to edit


unforget bluetooth device osx 10.9.5

Question: I accidentally told my Mac laptop to forget my bluetooth speaker. Now I can't undo the 'forget device'? Can i reset it so i can reconnect my wireless speaker?
I have tried to find a reset button in settings but I can't find one?
Answer: Forgetting a bluetooth device should just mean that it no longer automatically connects. Just do whatever you did to connect the first time if you want to reconnect. There are probably instructions that came with your bluetooth speaker.

unforget bluetooth device osx 10.9.5


Are drug-gene interactions predictable?

Question: I have been reading about drug-gene interactions and pharmacogenetic tests. I haven't been able to find many resources that define the process of testing for possible drug-gene interactions without performing trial and error method. For example, drug-drug interactions can be predicted by using several parameters as noted here. Are there any parameters similar to the ones described in given paper for predicting drug-gene interactions if drug characteristics and genetic data is available? Please describe process or provide source.
Comment: You need to add more details or else the question is quite broad. Yes you can find drug-gene interactions. Google the terms *pharmacogenetics* and *pharmacogenomics*.
Answer: One can list candidate genes based on their functions.
If a drug acts by inhibiting the expression of gene G in order to reduce process P, then, gene G, all its regulatory elements and all sequences involve in process P are good candidates for such interaction and should be investigated. If there is known genetic variation in the population at these loci and if we know this genetic variation affect phenotypic variance, then definitely, those are good candidates.
However, to my knowledge, this is the extend at which we are able to go. We can list candidates but it does not mean in the absolute that a candidate must present an interaction with the drug of interest and it does not mean that a non candidate gene would necessarily not have an interaction. Only a statistical testing for such interaction would allow one to solve the mystery.
Comment: Is there a study where the above works or is this hypothetical?

Are drug-gene interactions predictable?


jQuery ajax (with rails): specify dataType at runtime

Question: I have a rails 3 app w/ jquery-ujs and I was wondering if its possible to dynamically specify the datatype of an ajax call at runtime. My links are all unobtrusive by binding the ajax events as such:
item.bind("ajax:beforeSend", function(e, request, settings) {
    ...
});

But unfortunately, the default dataType is json, and I was wondering if I could change this right before the ajax call. I know I can do this as such, on a per link basis:
<%= link_to('My Link', path,
        :remote => true,
        :method => :put,
        :id => 'my-link',
        'data-type' => 'html',
        :class => 'button') %>

But that isn't very DRY as I would have to do that on every link.
I found that I am able to set this field globally as such:
$.ajaxSetup({ dataType: 'html' });

But I was wondering if anyone knows how to do this inside the bind method, or on the item itself?
The only thing that comes to mind (as I write this), is adding the data-type attribute to the tag in JS, but I'm not sure if the ajax has already been setup by the time the JS executes.
Any ideas?
Comment: @ThiefMaster Most of my open questions don't have solid answers to them, hence the reason I haven't accepted them.
Answer: for me, a quick and dirty way:   add the suffix to the url:
"#{link_to some_path}.html"
"#{link_to some_path}.js"


Add Request Field to CC email

Question: When starting a workflow it allows me to CC people. When I CC people they do not get the Request put in the email (the Request field states "This message will be sent to the people assigned tasks."). Is it possible to ALSO include the message in the emails sent to the people who are CCd?
This is a SP2013 WF.
Comment: Are you using SharePoint 2010 workflow or SharePoint 2013 workflow? What is the Request field? please provide some screenshots or steps to reproduce this issue.
Answer: This is by design as they have no task to complete on the item.  The individuals in the CC field are only to receive notice, not complete a task, which is what drives workflow.  If you would like to change the message sent by a workflow, you will need to create/modify it in SharePoint Designer.

Add Request Field to CC email


Why is this way of deriving a cone volume formula by integration wrong?

Question: To derive a formula for the volume of the cone I used integration with respect to slant.
I wanted to sum the areas of circles at all heights of the slant (as in standard way with respect to height). Let $x$ be the specific length of the slant measured from the top of the cone. Then the area of the circle at height $x$ is equal to $\frac{\pi r^2 x^2}{l^2}$ where $r$ is the base circle radius and $l$ is the slant height. So the volume of the cone is equal to:
$$V_{cone} = \int_0^l{\frac{\pi r^2 x^2}{l^2} dx} = \frac{\pi r^2 l}{3}$$ which is obviously wrong. What is the reason of it?
Comment: Slant height is a synthetic length, $L^2=r^2+h^2$. The central axis of the cone is along the x axis,  x=L is arbitrary, not the bound you want, likely outside of the cone. First integrate from 0 to H then substitute slant height.
Answer: If by "slant height" you mean the length along the slant, the circular cross-section of thickness $dx$ has area $\pi r^2L(x)^2/l^2$, where $l$ is the distance along the slant to that cross-section. Thus $L(x)\ne x$; in fact $L(x)=lx/h$, with $h$ the cone height. So the integral becomes $\int_0^h\pi r^2\frac{x^2}{h^2}dx=\frac13\pi r^2h$.


probability of a word in a string

Question: What is the probability of a word n characters long appearing in a string of m characters, in an alphabet of x characters? A word here is simply a string of characters contained in another string of characters. A string of characters of length L  is an ordered L-tuple of characters, where characters are members of a set A called an alphabet. An alphabet contains n characters if it has n members that are all mutually not equal.IMPORTANT: If the alphabet in question has x characters, each character in a string has exactly 1/x probability of being a given character.
Comment: n is necessarily less than m, so if n=m, then we have P= 1/(x^n). If n+1=m then we have x ways the given word can appear in our string if our word occupies the "leftmost" n characters, and x ways with our word occupying the "rightmost" n characters, each with a probability of occurring of P= 1/(x^m), so we have a total probability of P= 2x/(x^m). Once we have n+2=m, all methods I have tried start double counting, and this is where I need help.
Comment: I think you might want to try working some explicit examples.  What if $x=2$?  Try listing the possibilities for small $m$ and $n$ so that you'll have some reliable examples to check the formulas you come up with. Maybe try a few with $x=3$, too.
Comment: I have tried many explicit examples and cannot solve the problem of double counting. I also was informed that the answer depends on the specific sequence and I'm wondering if a word can be characterized in terms of the range of characters it uses (the subset of the alphabet whose members are included in the word), and the symmetries of a word (the subsets of a word that are equal to their reverse: the reverse of an L-tuple {$x_1$,$x_2$,...,x$_L$}being an L-tuple equal to {x$_L$,x$_{L-1}$,...,$x_1$})
Answer: The answer is it depends in the sequence. Suppose we want to find the probability that the word 11 is inside a 3-letter word in an alphabet of 3 letters.There are 5 such words that contain it. Now lets look at the probability the word 12 is inside a 3-letter word. there are 6 words that contain it. Not all words have the same probability.
Now for a fixed word:
let w be your m-letter string in a k letter alphabet. Let $x_n$ be the number of words of lenth $n$ (also in x letter alphabet) containing w.
At first sight we would consider the following recurrence relation:
$x_n=kx_{n-1}+k^{n-m}-x_{n-m}$ Since every word of length n can be created in the following way: for a n-1 word that contains w just add any of the k letters at the end $kx_{n-1}$. For a $k-n$length word just add w at the end to get one that does work. This seems really great. There's just one problem:
Sometimes when you add w at the end of a n-k word that doesn't contain w you get a word that contains w even if you remove some of the last digits. Let me explain: for example consider $w=1,2,1$ then the word $3,1,2$ clearly doesn't contain $w$ so we add w to this letter to get $3,1,2,1,2,1$ notice that this word is obtained through both the process of taking an (n-1) word that contains w and taking and n-k word that does not. Thus we are counting it twice? Can you refine the recursion so it works?
Comment: Maths is amazing! I thought this was going to be a simple problem when I first started! What characteristic of a word makes it different, its symmetry?
Comment: I've tried multiple examples, and the more complications I think I've dealt with, the more that arise. I also found a formula (non-recursive) that seemed to solve the problem, but again, didn't take into account double counting. It is the step of dealing with double counting where the specifics of the word come into play as well.

probability of a word in a string


sunspot heroku websolr authorization

Question: We are using sunspot-rails to connect to websolr on Heroku. Websolr provides an authorization feature to protect read and update calls. This authorization feature requires three additional  http headers to be present in every call to SOLR. I am trying to find out a way to add these http headers to every call going from sunspot. The following article shows how to do it for rsolr but not sunspot - https://github.com/onemorecloud/websolr-demo-advanced-auth. The official heroku doc at https://devcenter.heroku.com/articles/websolr has very little info about authorization. Is there a way to alter http headers through sunspot?
Answer: You can customize the connection class used in the Sunspot session. You have see an example in this gist:
https://gist.github.com/nz/6243059
Comment: As the founder of websolr, contributor to Sunspot and author of that gist: Yep, exactly right.
Answer: I had to adapt @polmiro's gist a little bit to make it work: https://gist.github.com/alfonsocora/e1f979621bbfe98e10dc

sunspot heroku websolr authorization


Why my app use so much GB

Question:
I don't know why my apps use so much storage I haven't downloaded anything.
Comment: You can't have 1.59 **T**B on a 250 **G**B disk, so something seems wrong here. Does the problem remain after a reboot?
Comment: Also, please run `sudo du -sm /Applications/* | sort -n` in Terminal and add the last 10 lines of output to your question.
Comment: I voted this question down because it does not ask a specific question or the question is unclear. Please take a moment to read [how to write a good question](http://apple.stackexchange.com/help/how-to-ask) and see if you can edit your question to be more clear. Don't forget to indicate what platform you're using (Mac, iPhone, iPad) and the OS version. What "app" do you think is filling your hard drive?
Comment: @Frysk I think the problem is perfectly clear, especially considering the screenshot. OP could further clarify by responding to Patrix's requests.
Answer: Your spotlight database (or worse - filesystem) is corrupted.
I'll link to some other situations that cover this.

About This Mac -> Storage is wrong?
How can I figure out what's slowly eating my HD space?
Mac OS is reporting bad free space
Noticebly larger amount of free space reported compared to the graph in Storage view

The simplest way to resolve this would be to make a backup (if you don't have one), boot to Recovery HD and use Disk Utility to check / repair your disk. Then you can restart the Mac and let it rebuild the spotlight database overnight. Worst case, you can purge the spotlight database if the situation isn't a transient problem with the calculations.

Why my app use so much GB


What is the word for "something that needs prompt attention and resolved quickly"

Question: We usually encounter some cases at workplace "something that needs prompt attention and resolved quickly" ,is there a professional word we can use for this casE?
Comment: Many occupations have specific names that are nomenclature for critical issues. I've worked in a warehouse where we had "Expedites" and in facilities with "STATs" and "Urgent Work." You may find that your specific field has such nomenclature by asking around or reading literature specific to your profession. I would recommend listing your profession and asking if there is a profession-specific nomenclature for such an issue if that is your intention.
Answer: The word emergency  fits fairly well.  An emergency is a fairly urgent matter, and urgency seems to be at the heart of your question.
You could use the phrase urgent matter if you want to be a little less dramatic.


Batch converting NAD83 Z12 to NAD83 Z13

Question: I have a need to to convert a CSV file that was surveyed in NAD83 Zone 12 to NAD83 Zone 13 coordinates, is there an online tool that can do this for me?
Answer: You might try the National Geodetic Survey Coordinate Conversion and Transformation Tool (NCAT). It has a multi-point option and an API as well. I haven't used the API.
When using the single point option, you can override the output UTM zone in the bottom, output portion.

Batch converting NAD83 Z12 to NAD83 Z13


After flushing, toilet bowl fills before tank fills

Question: After flushing, the bowl on the toilet fills too high, nearly to the top before the tank does.
I do not know what to try first.
Answer: You have a partial drain blockage, probably in the S shaped toilet trap.

Wait.  The things that go down toilets should disintegrate quickly in water.  Sometimes they disintegrate slowly.  People who are highly constipated or who use facial tissues instead of toilet paper can cause this.  Sometimes waiting solves the problem.   Other things don't disintegrate at all ... rags, sponges, tampons, etc ... then go on to #2.

Try a *good *plunger.

Try a toilet snake

If those don't work, you have to remove the toilet from the floor an examine the trap.  Look on youtube how to remove and replace a toilet or call a plumber if you're not comfortable with it, or if it is your only toilet.
Comment: That's just a random picture I found that already had "The Trap" written on it.  I'm not suggesting that you, OP, or anyone does or should have a trap in this shape or in any particular shape.  Disclaimer over.  :)
Comment: [It's a trap](https://en.wikipedia.org/wiki/Admiral_Ackbar#%22It's_a_trap!%22) But seriously, this is the right answer, because if the trap/etc. was all totally clear then when the toilet got even a little over the "normal" level it would drain (to the normal level, not an actual flush) automatically.
Comment: I would never buy a toilet with that weird of a trap.   Seems like a logjam waiting to happen!
Comment: @jay613 - that would really be a trap.   Also what do you think makes a good plunger?    Honestly.   I have seen some plungers work great for some toilets and some for others.
Comment: @dmoore A good plunger is not too soft and not too hard and conforms nicely to the shape of your toilet bowl.  I find that a fairly thick rubber one with a neck like in my picture often works nicely, better than vinyl, plastic, or bell shaped ones.   The ones that come packaged in pretty ceramic or metal holders from home decor outlets are usually crap.  The ones in supermarkets and dollar stores are usually crap.
Answer: Muriatic acid is a choice if a plunger doesn't work.   I am not a fan of the toilet snake because sometimes it pushes the clog worse, and if you use enough force you can crack things and find out later.
Muriatic acid is some serious stuff.   You need to be wearing gloves and eyewear and a mask but it is easy and quick.   If the toilet is "full" you can just pour a cup of the acid directly in the toilet - don't splash it.   As the water settles, flush.   If it still won't go down keep adding a cup each time.   Never had a toilet go past 3 tries and most in 1.   Also the acid will make cleaning the toilet easier.


What workflow (application or suite) is best for digital cinematography?

Question: Doing composites creates a workflow. This workflow may consist of various components that proliferate or enhance the larger composite. Composites build all components of post-production. Digital cinematography generally compiles in real time; using macros, scripts, etc. The question; What graphic design workflow (application or suite) is best for digital cinematography?
Comment: Your question is off topic here. Try http://video.stackexchange.com
Answer: The best workflow for presenting a story:

Create a story which is interesting and novel enough worth making a movie
Hire a creative professional capable enough to find and define a good way to present your story in the media you want
Hire more professionals to make it real

If it happens that you are the only professional that you can use, start with pen and paper. If you can make a solid cartoon of your story, maybe not so finely drawn, but at least the result is solid as a story, start to refine it with more complex tools. Adobe CC set has a good collection (drawing, painting, editing video, making animations) if you do not need 3D modelling nor kinetic character models. But other sites than GDSE surely can give much finer hints of using Adobe CC set andmore advanced tools in motion picture applications.
Do not waste your time with the software if the pen and paper version isn't interesting. In theory it's possible that your creation is abstract - colors, forms and movements which are nothing without rich enough presentation, so scatching something on paper with a pen may look useless. It' isn't. If you have such idea you should still be able to put its skeleton (=what makes it novel and interesting) on paper. It's not especially highly probable that any program could create it for you without your own idea.


Is there a way to assign a shortcut key to nautilus' right click context menu?

Question: Does anyone know of a way to assign a shortcut key combination to the menu items in the context menu that pops up in nautilus when you click on a file?
Comment: Looking to create custom key combo for items that are in the context menu that comes up when you right click on things in Nautlius. I'm on Gnome 2.x.
Comment: You can check out this answer (for Ubuntu) I am not sure what else you are running http://askubuntu.com/questions/88010/assigning-shortcuts-accelerators-to-nautilus-3
Answer: There already is one. It's Shift+F10.
This is a standard keystroke and works in many apps. And of course many keyboards have a dedicated context-menu key; it's the complement of the Windows key.
Either should work. Both do for me on Ubuntu 14.04 with Unity & Nemo.
Answer: You could look through ~/.gnome2/accels/nautilus and edit and uncomment the appropriate key bindings. The bindings should be available after restarting nautilus (nautilus -q).
E.g. to activate the hotkey for creating a new folder change
; (gtk_accel_path "<Actions>/DirViewActions/New Folder" "<Primary><Shift>n")

to
(gtk_accel_path "<Actions>/DirViewActions/New Folder" "<Primary><Shift>n")

Comment: See `~/.config/nautilus/accels` in Ubuntu 20
Answer: Why don't you just use the context menu key? Most keyboards have it beside AltGr. If you keyboard does not have it, you can use .Xmodmap (merge it on the fly with xmodmap ~/.Xmodmap afterwards to test) to enable a right click shortcut for all programs.
Answer: Have a look at this blog post giving many examples on how to customize GTK  keybindings via ~/.gtkrc-2.0.  This should do what you intend,
binding "gtk-binding-widget" {
    bind "m" { "popup-menu" () }
}
class "GtkWidget" binding "gtk-binding-widget"

by binding m to the context menu.  (However, I just tried it with Firefox and it didn't work... No nautilus to test it, sorry.)  You could try other classes, too.


adding container tags or tracking pixels

Question: How do i add container tags or tracking pixels? I need to add code provided by third party digital media company so I can track conversions.  How is this done on EE?
Answer: Add it your template (s) that you use to display content.
Here's some info from the official docs


Is it possible to set different scale dependent visibility for one layer classifications?

Question: I'm working on a sewer and water network, so I need to set different scale visibility for primary, secondary and tertiary network.
Comment: Welcome to gis.stackexchange! Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and - if applicable - code so far. For more info, you can check our [faq].
Answer: You need to use Rule based style to set the scale for primary, secondary and tertiary network, as you can see below (but with different data):

You can double-click each styled label to get more details:


Is it safe update WordPress 3.4.2. to 3.5?

Question: My wordpress 3.4.2 site have 25 activated plugin, so which is safest way to update ?
Comment: You know the amount of WordPress plugins currently is 22,768? And that doesn't count any plugin not ín the official repository (I host most of my stuff only on GitHub). So how should we tell if they work or not?
Answer: Back up all your files and database
And then install wp3.5 and activate each plugin one by one and see whether they are compaitable or not
OR
you can install a wp3.5 in any other subdomain(domain.yoursite.com) and then activate all those plugins and see if they are compaitable or not
Comment: What shoud I first update plugin or wp?
Comment: WP and then plugin. Update a plugin one by one and see whether they are compaitable or not
Answer: Load it into a development / test environment and test every function on every page. If things break, turn off plugins until they stop breaking. If that doesn't work, switch theme to Twenty* and try again.
Since the release of v3.5, there's been a spate of plugin updates trying to catch up. If you are worried about incompatibility, wait a few weeks while all the major plugins catch up, and WP 3.5.1 comes out.
Even then, I suggest you test in a development / test environment before updating your live site. It only makes sense!
Answer: If I have doubts if updating is safe, I wait until the next version is available - for example in this case 3.5.1
It is not just the functionality I am worried about. With the major releases WordPress ships a bunch of new functions, and if there are any security issues, they are usually fixed in the 3.5.1 version.
Most of the time, it is safe to update, speaking just of the WordPress installation.
So if you run a lot of third party Plugins, be sure they are updated regularly. This advice is not just for Updating WordPress, it is general for using Plugins. If you are dependent on one Plugin, and it is discontinued, you could be in big trouble.
For updating the plugins, as @vaibhav mentioned, do it one by one, if you are not sure.
If running multiple Websites (not Multisite, just a few different Websites), create one Test System where you use the Plugins used on most of the Productionsites, and update them - this saves you a lot of time compared to checking each Plugin on every Website.
Be aware of what your Plugins actually do, and check if WordPress made updates to this functions. For example, with the new Media Library in WordPress 3.5 a client of mine could not find the "Replace File" function that was added by a Plugin. I did not notice that, because everything worked fine on the Website, and I did not check the full environment if all the functionality is still there. Keep an eye on that :)
cheers!
Answer: You can also look for the plugins' page whether they support Wordpress 3.5 or not.
Comment: That only tells that the author added the string to the plugin. Sadly nothing else.


Where is Netbeans installed on Ubuntu?

Question: I installed Netbeans on my Ubuntu 11.10 machine. I used the combined method, so Netbeans and JDK are installed from a single file. However, now that it's installed I can't figure out how to start Netbeans. If I try to reinstall it says that Netbeans is already installed, but if I look in /usr/share/netbeans there are the installation files but nothing else. How do I run Netbeans?
Comment: What is `Logitech`?
Comment: I tried editing this, but I couldn't figure out your second paragraph at all
Answer: Look for it:
sudo find / -name netbeans 2> /dev/null

If you get a location, it's installed. If not, I would suggest trying to use apt to install instead of the one-file method.
Comment: You made my day.
Answer: looks like the netbeans installer forgot to add a symlink
ln -s /usr/local/netbeans-7.0.1/bin/netbeans /usr/local/bin/netbeans

It would have made life easier for users if the install script did this.
(don't forget to update symlink when you upgrade netbeans version)
Answer: Java before Netbeans...
#!/bin/sh

#Delete the line below if you only want the "open" JDK & JRE
sudo apt-get install openjdk-7-jdk openjdk-7-jre;

#Makes the /usr/lib/jvm in case...
sudo mkdir -p /usr/lib/jvm

#Clean out /tmp...
sudo rm -rf /tmp/*
cd /tmp

#Update this line to reflect newer versions of JDK...
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.tar.gz;
tar -xvf ./*gz;

#Move it to where it can be found...
sudo mv /tmp/jdk1.7.* /usr/lib/jvm/;

#Add the new Java to the bin
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_01/jre/bin/java 3;

#User chooses
sudo update-alternatives --config java;

exit 0;

Netbeans...
#!/bin/sh
# @author Yucca Nel
# Update as needed for newer Netbeans releases :D

#!/bin/sh

#Clean out /tmp...
sudo rm -rf /tmp/*;
cd /tmp;

# Update this line to reflect newer versions of Netbeans or replace
# 'javase with 'javaee' or add jee manually via Netbeans 'plugins as needed.
wget http://download.netbeans.org/netbeans/7.0.1/final/bundles/netbeans-7.0.1-ml-javase-linux.sh;
sh /tmp/*sh;

# Add Netbeans launcher to your PATH. Doing so allows you to run
# 'netbeans' command from the terminal
sudo ln -s ~/netbeans-7.0.1/bin/netbeans /usr/local/bin/;

# If you use VirtualBox , you can share your projects between
# Host and guest. Name of shared folder must match 'NetBeansProjects'
# Remove this if you don't need...
sudo mkdir ~/NetBeansProjects;
sudo mount -t vboxsf NetBeansProjects ~/NetBeansProjects;
exit 0;

Answer: cd /usr/local/netbeansx.x/bin
./netbeans

Answer: Oracle had stop supporting netbeans and this project is being taken by Apache.
Executive which command to locate where is netbeans installed on your system.
which netbeans

this would give path
/usr/bin/netbeans

If you now open this file in some editor or just cat the output of this file.
cat /usr/bin/netbeans

this would show that (as of today) apache netbeans is installed in
/usr/lib/apache-netbeans/

whereas the config files are in
/home/$USER/.netbeans

Answer: You're running Unity in 11.10 by default, if you press the Meta (windows key), and type in netbeans,
You should be able to see few entries related to netbeans.
Answer: you use the which command to find out location of any application (binary) installed.
e.g.
$which netbeans

Where is Netbeans installed on Ubuntu?


Overlapping subnetworks with Google Cloud IPSec VPN

Question: My company's infrastructure is hosted on Google Cloud. We'd like to connect a network of one our clients with site-to-site (IPSec) VPN. I've setup one on Google Cloud but we have a problem. Our subnetwork (10.10.0.0/16) is overlapping with their subnetworks (10.10.0.0/24). We have to solve this on our end, so on Google Cloud. Any idea how we can achieve this? I tried to add a new network interface to our VMs, but it's not possible with already existing VMs on Google Cloud.
Answer: You can setup Cloud VPN tunnel to GCP even if your on-prem ip address range (10.10.0.0/16) subset is overlapping with GCP vpc ip address range (10.10.0.0/24), based on guide [https://cloud.google.com/vpn/docs/concepts/order-of-routes#routing-examples].
But if your on-prem ip address range is subset of the GCP VPC ip address range, you cannot setup VPN at this situation, so you need either change your on-prem ip address range or GCP VPC's.
Current GCP doesn't support adding additional network interface to existing VM. It can only be done during VM creation.
Answer: You can't use Cloud VPN with overlapping subnets. The Cloud VPN documentation claims that you actually may connect client's infrastructure but routing will not work as you need.
Since another NIC can't be added to the existing VM instance, VLAN compliant with the IEEE 802.1q standard could be a solution. VLAN Attachments are supported for Dedicated Interconnect and Partner Interconnect.
If you prefer to stick with Cloud VPN, using static NAT for the whole subnet could be considered to shift it to another address range.


how do I choose the font/s I want in what programs I want?

Question: As recommended by Bobby Phoenix, I had copied the fonts folder from Windows to Ubuntu and put it on my desktop. I installed Fonty Python from the USC and I then made a Pog of the fonts I want to include in Mozilla Thunderbird (to start). How (by what process/es) are the new fonts (within the newly created Pog) placed within the particular program that I want (in this case Thunderbird)?
P.S. what does Pog stand for?
P.P.S.Thanks for your help Bobby
Answer: Fonts are installed in your font folders. All installed fonts should be available in the programs. To install a font just double-click on the font-file (on your desktop, as you said) and install. There are also lots of fonts available from the Fonts-Section in the Softwarecenter! There is a package called ttf-mscorefonts-installer, which installs all default Windows-fonts on your system (Arial, Comic sans, Helvetica etc.).
It is not neccesary to use programs like Fonty Python, but it helps to manage huge font collections. What does Fonty Python? It just stores groups of fonts (pogs), to install and uninstall them easily. This can be usefull, if you want to use a set of rare fonts in a design project, which you will never again use. Finishing your project, you can uninstall all those fonts in a pog with one click.
Where are your fonts? You can see a list of your fonts in the file /etc/fonts/fonts.conf. In the first part, it should show this:
-- Font directory list --
/usr/share/fonts
/usr/X11R6/lib/X11/fonts
/usr/local/share/fonts
Most important directory is /usr/share/fonts. With gnome-font-viewer you can see all installed fonts. For non-professional use, I wouldn't recommend Fonty-Python, but the program font-manager.


Replace fluorescent lights with LED lights

Question: Can I replace fluorescent lights (30W, 36" long - F30T12 H998) with LED lights?
Comment: Yes you can.   anything else ??  NOT enough info. What led lights? replace the whole fixture ?  Please add ALL  the details.
Comment: they even make retrofit tubes, or you can replace the ballast with an LED driver and use LED strips.
Answer: I searched f30t12 LED replacement, the first lamp that came up is a 3' t8 lamp 13w 5000k for $6.88. These are plug-and-play, you swap the t8 lamp in and they work with the ballast. (A t12 lamp and t8 lamp use the same size tombstone)  So yes there is an easy one and there may be direct wire out there that bypasses the ballast, but 3' lamps are less common so there may not be as many choices but these did state 120-277v. I just did not look further, the vendor was 1000bulbs.Com I use them for some of my lighting, and I like DLC certified lamps as these have a 5 year warranty.
Comment: I have used 1000bulbs.com a few times - highly recommended.
Comment: I really hate my fluorescent bulbs... will definitely have to give them a go for LED replacements!


Virt-Manager, QEMU/KVM, "paused" VM still uses CPU?

Question: I "paused" the VM. If I understood it correctly, it is like "sleep" mode of a real computer. But in the performance tab,the VM's CPU usage is always about 2%~4% and never goes down to 0. How come it's not 0%?
Comment: Probably because of some kernel threads that must not be suspended. Can you run top or htop on host ?
Comment: I can run htop, but I'm not sure what I am supposed to see. The command that is using 13% CPU is a white qemu-system-x86_64 with long arguments.
Answer: The graphs are showing the CPU usage of the whole VM process. When the VM is paused, the emulated VM CPUs are stopped, but the whole emulator binary on the host is still running and consuming CPU time, libvirt is actively communicating with it, etc.
If you top on the host you'll see a qemu binary still using CPU. That's what the graphs are showing


Aren't 「から」 and 「ので」 closer to the meaning of "because" rather than "so"?

Question: To my understanding all particles affect the word or clause that appears before them: 「駅から家まで行く。」 means "I'll go from the station to my house" rather than "I'll go the station from house to go".
So if this logic applies, shouldn't it also be true for 「から」 and 「ので」? 「私は忙しいから行けません。」 To my understanding, here 「から」 is connected to the first clause and not to the second one. So the sentence is worded similarly to: "because I'm busy, I can't go." When Japanese doesn't need a comma between the clauses because they're already connected together by 「から」. If it was connected to the second clause instead of the first one it's meaning would become more of a "so". Also the literal meaning of "from" for 「から」 and "in of" for 「ので」 is much closer to "because" than "so".
Is my understanding correct?
Comment: The reason they say that isn't a particularly conceptual reason, but just to help beginners get used to the word order.
Comment: They're generally *taught* as meaning 'because'.
Comment: @AeonAkechi Yes, but many learning sources say it's better to think of them as "so", so I'm asking if my understanding here is correct.
Answer: It is your choice what to want to keeep and what you want to lose when you translate from one language to another.
If you seek an English equivalent of ので, you cannot preserve both the ordering of clauses and the position of pauses.
If you privilege the ordering of clauses, than "so" or "therefore" will be preferrable, because they come after the causal clause, and before the statement of its consequence.
The price for this, though, is that you have to pause before the conjunctive particle, as is not done in Japanese. Moreover, you lose the hierarchy of the sentence structure by turning hypotaxis into parataxis.
If you privilege the position of pauses instead, and if you want to keep clause subordination as such, you should use "because", "since", which cluster with the causal clause as ので does. This way you are also preserving the hypotactic structure.
Same with から、and with a lot of Japanese particles. For example のに, which has a concessive meaning but structurally works in the same way, and can prompt similar doubts as to whether you should translate it with "but" or "although".
Answer: Your understanding is correct.  The words 「から」 and 「ので」  effectively function like particles.


$E$ in a solid uniformly charged conductor: Is my reasoning here correct?

Question: Suppose we take spherical conductor which is having both positive and negative charges but as a whole is electrically uncharged and is not under the influence of any external Electric  field, We can say that the
E
outside the conductor is zero by gauss law if take the gaussian surface outside the solid conductor as
q
enclosed by the gaussian surface is zero. But if I take the gaussian surface inside the conductor which is centered around the center of the conductor the
q
enclosed by that gaussian surface would still be zero as the enclosed volume still has equal positive and negative charges and hence the net enclosed charge is zero and hence
E
(electric field) inside the conductor is zero.
If the conductor is composed of only positive or negative charges then there will be
E
inside the conductor as
q
enclosed in this case by a gaussian surface would not be zero as the conductor contains only 1 type of charge. the value of this electric field can easily be calculated by using the gauss law.
Answer: No, the E-field within the conductor, and by extension the E-field on the Gaussian surface, will be zero, regardless of the net charge on the conductor. This is true as long as the radius of the Gaussian surface is less than that of the conductor.
If the conductor carries a net charge, this charge will flow to the surface of the conductor. This is what conductors do: charge is free to move around inside the conductor. The charge collects at the outer surface because the conductor must have the same electrostatic potential everywhere, and hence the E-field inside must be zero.
The charge will affect the E-field outside the conductor. A positive net charge will cause an outward E-field and a negative charge an inward E-field.
Comment: Ok but is my reasoning in the case of the neutral conductor correct
Comment: Yes, as I said the Gaussian surface will enclose no net charge, regardless of whether the conductor is charged or not, so the E-field on it will be zero.


Can the Belkin WeMo switch be attacked without the attacker knowing my WiFi password?

Question: The Belkin WeMo switch lets you turn on and off electric sockets over WiFi using an app. Apart from the WiFi password, is there another potential vulnerability of this device that could let an attacker control my socket?
Answer: Most of the remotely accessible power strips I've been looking at for a current project have either http or telnet access (no encryption on either) for control so any time you access it, you're sending credentials in the clear.
They are in the IOT minimum security zone, anyone on the local segment can packet-sniff your credentials if they're determined to flip switches. So the only protection you have is often a sniffable password if they don't have the ability to change from a hardwired admin and  user account name. And often, no brute force timeout either.
And my experience on contacting the manufacturer about minimal security is "we keep having customers ask these questions, but the unit doesn't really have the processing power to enable (ssh, https, bad login timeout, etc.)
Specific to WeMo, it uses UPnP which has security concerns discussed in this question on security.stackexchange. One of the recommendations to increase router security is to turn off UPnP and manually configure port forwarding.
WeMo had some security issues with its cloud based control, firmware updates and protocol used back in 2014 which have been patched.
Several websites on the internet discuss scripts using curl to post SOAP commands to the WeMo device to control it. That's unencrypted http over whatever port (49152/49153) the device is set to and via UPnP port opened through the router for remote access. No authentication is mentioned in these scripts either, so you use UPnP to open a port for internet access and there's no gatekeeper for toggling the device.
WeMo appears to hide behind a phone/tablet App via a cloud service that requires UPnP to open a forwarded port on your router for communications. Getting any information off their website as to how this communications is protected other than how easy it is to use is proving difficult.
Comment: Ports 49152 and 49153 appear closed but 49154 is open as seen here -- http://websec.ca/blog/view/Belkin-Wemo-Switch-NMap-Scripts -- and a lot of info can be gained from these scripts when targeting Wemo devices
Comment: https://download.bitdefender.com/resources/files/News/CaseStudies/study/87/Bitdefender-2016-IoT-A4-en-EN-web.pdf


How to show that the composition of two surjective functions is injective?

Question: I know how to show the composition of two surjective functions is surjective or two injective functions is injective, but I don't understand this case problem.
Comment: Is your task to prove it, or is your task to determine whether it is true and then prove your answer?
Comment: Have you looked at examples?  I mean, suppose one of the functions is the identity.
Answer: That's not true in general.We can take a counterexample to show one case when it is not true:
Let $f:A\to B$ and $g:B\to C$ be two surjective functions and let $h:A\to C$ be their composition such that: $A=\{a,b\}$,$B=\{c,d\}$ and $C=\{e\}$ then
$f(a)=c$; $f(b)=d$ and
$g(c)=e$; $g(d)=e$
It is obvious that $h(a)=e$ and $h(b)=e$ so $h$ is not injective.
So we found an example where the composition of two surjective functions is not injective, therefore your statement is not always true.
Answer: You can't, because it's not true. Here is a counter-example.
Simplifying Linda's answer, take sets $A=\{a,b\}$ and $B=\{q\}$
and constant function $f: A\to B$ and identity function $g:B\to B$.
Then
$$g\circ f$$
is a surjection but not an injection.


Negate the following statements

Question: 1) For every shape A, there is a circle D, such that D surrounds A
2) There is a circle C, such that for every line l, l intersects C
This is what I got are my answers correct
1) There is at least one shape of A that no circle D surroundings.
2) There is at least one line I which does not intersect this circle C.
Comment: (2) Needs some statement about what $C$ you think this statement applies to
Comment: Your answer for (1) is not quite grammatical.  Assuming you mean "there is at least one shape $A$ such that no circle $D$ surrounds $A$", the meaning is correct.
Comment: Got something from an answer below?
Answer: The negation of 1) is correct. The negation of 2) is: For every circle C, there exists a line L which does not intersect C.
One might take this occasion to mention that there is an automatic procedure to negate logical sentences. Let me give an example. Let $f:\mathbb R\to\mathbb R$ denote a function. The assertion that $f$ is continuous can be written as:
$$
\forall\varepsilon\in\mathbb R_+^*,\ \forall x\in\mathbb R,\ \exists\delta\in\mathbb R_+^*,\ \forall y\in\mathbb R,\ |x-y|\leqslant\delta\implies|f(x)-f(y)|\leqslant\varepsilon.
$$
How to negate this? One can work sequentially, starting from the leftmost end of the formula, and making its logical structure apparent. The original formula is:
$$
\color{red}{\forall}\varepsilon\in\mathbb R_+^*,\ \color{red}{\forall} x\in\mathbb R,\ \color{red}{\exists}\delta\in\mathbb R_+^*,\ \color{red}{\forall} y\in\mathbb R,\ P(x,y,\delta,\varepsilon),
$$
for some logical assertion $P(x,y,\delta,\varepsilon)$. Thus its negation is:
$$
\color{red}{\exists}\varepsilon\in\mathbb R_+^*,\ \color{red}{\exists} x\in\mathbb R,\ \color{red}{\forall}\delta\in\mathbb R_+^*,\ \color{red}{\exists} y\in\mathbb R,\ \color{red}{\lnot} P(x,y,\delta,\varepsilon),
$$
That is, starting from the left, one replaces each $\forall$ by $\exists$, and vice versa. Finally, one should negate $P(x,y,\delta,\varepsilon)$, but perhaps you already know how to do this?
Answer: Your negation of (1) is fine, though you may want to end the statements:

"There is at least one shape A [such that] no circle D surround[s] [A]." - brackets mine

(2) There is a circle $C$, such that for every line $\mathcal{l},\;\,\mathcal{ l}$ intersects $C$

Let the domain of concern be all geometric objects (lines, shapes, points, etc.).
Let $C(x)$ denote "x is a circle"
Let $L(y)$ denote "y is a line"
Let $I(x, y)$ denote "x intersects y".
Then we have, essentially, "there exists an x such that for all y, [(x is a circle and y is a line) and y intersects x", which we can write:
$$\exists x \forall y [(C(x) \land L(y) \land I(y, x)]\tag{1}$$
Now we negate $(1)$: $$\lnot\exists x \forall y [(C(x) \land L(y) \land I(y, x)]\tag{2}$$
$$ \equiv \forall x \lnot\forall y[(C(x) \land L(y) \land I(y, x)]\tag{3}$$
$$\equiv \forall x \exists y \lnot[(C(x) \land L(y) \land I(y, x)]\tag{4}$$
$$\equiv \forall x \exists y \left[\lnot[C(x)\land L(y)] \lor \lnot I(y,x)\right]\tag{5}$$
$$\equiv \forall x \exists y \left[(C(x) \land L(y)) \rightarrow \lnot I(y, x)\right]\tag{6}$$
That is, we end with a statement such as the following: For every x there exists a y such that (x is a circle and y is a line) and y does not intersect x:
Less formally: For every circle $C$, there exits some line $L$ such that $L$ does not intersect $C$.
Comment: maximilian0: Does this make sense? the negation of (2)?

Negate the following statements


Samsung Galaxy S7 Edge camera glitch

Question: My friend has the Samsung Galaxy S7 Edge for about 2 months and her front facing camera is turning all her pictures a red negative effect on it. I will show an example  the other camera settings work perfectly fine, it's just the front facing camera with the selfie function. The video front facing camera works fine also. She is going to take it back to the shop but she said her old phone, a Note 4, had a similar problem. Occasionally when she is using her front facing camera, it'd go to the red negative effect. I hope I can get a reasonable answer on why this is happening other than her supernatural belief of ghosts. I'll include another picture that is using her back camera.
Comment: She is glad to hear that it should not be a ghost problem! Though, I couldn't really see any settings in the camera she may have accidentally changed. I'll look at her settings again to see if I missed anything. Thank you for your suggestion :)
Comment: If video is working fine camera should work fine. It must be the modified settings. PS - There are no  ghosts.
Comment: Just a few days ago her phones 'Selfie' portion of the front facing camera started working though. Though once in awhile it will randomly go back to the weird red inverted look. She claims to not have touched anything at all. I went through her camera setting and messed with them all and I have not found anything what's so ever that supposedly made her pictures turn into this.
Answer: I too getting the same problem.I restarted the phone then it's works again properly.

Samsung Galaxy S7 Edge camera glitch


What would cause a system freeze from navigation to /proc?

Question: This is really driving me crazy, if I pull up nautilus and navigate to /proc, my system will completely freeze up. The only way to get out seems to be to SysReq RSEINUB, but sometimes even that doesn't work and I have to hold the power button. This happens even if I gksudo nautilus, I even created another user and I get the same thing. If I open up a shell and navigate there; no problems, same with using MC and I installed dolphin; no problem using either. I reinstalled nautilus and reinstalled the kernel; no dice. I don't even know what to provide as clues, as I cant find anything that seems significant in the logs. I've tried changing graphics drivers removing purging and reinstalling various components, all to no avail. My understanding is that /proc is a virtual file system created by the kernel and therefore recreated at every reboot. What could be causing such a problem?
Comment: I'm actually on 14.04 just ticked the wrong flag.
Comment: Not sure, but you're on an unsupported release of Ubuntu. It's probably a bug in that version of Nautilus or some underlying component of it. You should probably upgrade to 14.04 if you want a supported system though.
Comment: You tagged your question with 13.04. 13.04 was end of life three months before 14.04 was released. Also, I just opened /proc in nautilus on my 14.04 system and had no issues at all.
Comment: On my crappy netbook with Ubuntu 14.10 (upgraded from 14.04), the entire system will freeze when I try opening /proc, even though I can do `ls /proc` and stuff just fine. Navigating to file:///proc/ in Chromium also works fine. However, on a completely different computer, using a Ubuntu 14.10 live USB, I can open /proc perfectly fine. I'm also really curious about why this happens. Also, I thought it was SysRq REISUB to reboot a system.
Answer: Just found https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1395880 - it seems to have something to do with a bug in Broadcom's proprietary Wi-Fi drivers.
The first thing that comes to mind is /proc/brcm_monitor0, a non-standard Broadcom interface that allows putting the Wi-Fi card in monitor mode. There was another bug that causes the entire kernel to crash when attempting to write to that file; I wouldn't be surprised if Nautilus tries to read the file to thumbnail it, triggering that bug and causing the kernel to crash. However, I have no idea if the two bugs are related or not.
EDIT: looks like reading the file triggers the bug too, and the file is chmodded 644, meaning that any user can read that file and thus trigger the bug. Simple hack to test this (too lazy to potentially crash my computer right now) would be to run sudo chmod go-r /proc/brcm_monitor0 in a terminal and see if Nautilus still freezes.


Custom js builder for ExtJs

Question: We are using ExtJs 3.4. I would like to build a trimmed version of ext-all.js so that the file size will be reduced. Is there any automated way to build this custom file or should I manually dig into the file and search for dependencies.
We have a page that use the following components.

Tab Panel
Panel
XTemplate
Radio Group
Button

And we use 'view port' to render the components. Can any one suggest how can we achieve this?
Even before that, given our case where we use these components, is it advisable to go for this customization ?
Comment: In extjs 4 package there is `jsbuilder` attached. This tool can build ext from sources using jsb file as input. You can modify jsb file and try to build release, but I'm not sure if it'll work with ext 3.4
Answer: See http://www.sencha.com/learn/legacy/Tutorial:Building_Ext_From_Source

Custom js builder for ExtJs


Brightness setting not remembered after boot -- rc.local "fix" not working

Question: Using Lenovo X220 laptop. I installed 12.04 on it.
Every time I boot the display's brightness sets to the highest setting: maximum_brightness 15. This is way too bright and want to set it to 4.
I have spent a long time trying to fix this. Tried editing rc.local file by adding the "echo 0 >" line before exit 0. But it never works. laptop always resets to level 15 after boot. I tried everything here: Desktop doesn't remember brightness settings after a reboot
Why isn't rc.local working for me?
Does anyone know how I can edit the maximum_brightness down? Can I set a lower maximum_brightness?
Answer: You need to set the script rc.local to start automatically at start up. If that doesn't work go to /sys/class/backlight/ and run the "echo 0" to the "brightness scripts" in the folders there and if your brightness changes instantly then you know where the brightness config is and just note its location so that you can modify your rc.local again.
Comment: sniper.338. How do I set rc.local to start automatically at startup?
Comment: I have Intel integrated graphics (sandy bridge).
Answer: I also am affected by this. It is a bug that the rc.local file does not execute at startup.
Here's a link to the bug report: Launchpad Bug Report
Answer: Temporary fix that should work:

Add this line just before exit 0 line in /etc/default/rc.local file:
cp -f /etc/default/brightness-customized /sys/class/backlight/acpi_video0/brightness
Create a file named /etc/default/brightness-customized with the content of file being just a number on a scale of 1 to 12. I am not sure about scale, but lets say you want low brightness. Then, put a number say, 2 in the file. So on running command:  cat /etc/default/brightness-customized it should output:
2

i.e. #brightness level you want to have
Now things should work atleast everytime you boot (start/restart) the machine.


How often do you need to create a real class hierarchy in your day to day programming?

Question: I create business applications with heavy database use. Most of the programming work is just to connect components to the database and modifying components to adapt to general interface behaviour. I mostly use Delphi with its rich VCL library, and generally buy components needed. I keep most of the business logic in the database. I rarely get the chance to build a nice class hierarchy from the bottom up as there really is no need. Anyone else have this experience?
Answer: For me, occasionally a problem is clearer or easier with subclassing, but not often.
This also changes quite a bit in a given design as it's refactored.
My biggest problem is that programming courses and texts give so much weight to inheritance, hierarchies, and polymorphism through base classes (vs. interfaces or dynamic typing). This helps create legions of programmers that subclass everything and their mother.
Comment: mother extends progenitor - there, fixed it for you ;) Yes, great point about the of subclassing for its own sake problem out there.
Answer: The answer to this question is not totally language-agnostic;
Some languages like Java have a fairly limited set of language features available, meaning that subclassing is fairly often used because it's a convenient method for re-use, technical inheritance.
Closures and lambdas of C# make inheritance for technical reasons much less relevant. So normally inheritance is used for semantic reasons (like cat extends animal).
The last C# project I worked on, we more or less made all of the class hierarchies within a few  weeks. After that it was more or less over.
On my current java project we create new class hierarchies all of the time.
Other languages will have other features that similarly affect this composition (mixins come to mind)
Answer: I put on my architecting/class design hat probably once or twice a month. It's probably the best hat I have and is the most fun to wear.
Depends what stage of the lifecycle your project is in though.
Answer: When your tackling problem domains you are well familiar with and already have a common code base to work from, you often have no need to create a new class hierarchy. It's when you stumble upon problems you have no ready solutions for, that you start building your own.
It's also very dependant on the type of applications you develop. If your domain already has well accepted conventions and libraries to work from, there probably isn't any need to reinvent the wheel (other than personal / academic interests). Some areas have inherently less available resources to work with, and in those you'll find yourself building everything from scratch most of the time.
Answer: A majority of applications, especially business applications, contains at least some kind of business logic in it.  I would contend that business should not be in the database, but should rather be in the application.  You can put referential integrity in the database as I think this is a good choice, but business logic should be only in the application.
By class hierarchy, I suppose you mean do you always have to end up with some inheritance in your object model, then the answer is no.  But chances are you can often find some common code, factor it out and create a base class to contain the common code.
If you agree with me on the point that business logic should not be in the database, but should be in the application, then I recommend you look into the MVC Design Pattern to guide your design.  You will find your design contain classes or objects.  Your VCLs will represent your View, and you can have your Model classes map directly to the database table, i.e. each member in the class in the model corresponds to a field in a database table (again, this is the norm but there will be exception, where this simplicity fails to apply).  Then you'll need a layer to handle the CRUD (Create, Read, Update, Delete) of the Model classes to the database tables.  You will end up with an "layered" application that is easier to maintain and enhance.
Comment: In Delphi we have had datamodules for the last 10 or so years. They represent the controller in the MVC model. MVC have been a natural way of doing things in Delphi. There is a lot of controversy putting BL in the DB. I like it that way and it makes it easier to create both a web and desktop version
Comment: The business logic should be in the database, but that means the database should be an OODB.
Answer: It depends on what you mean by hierarchy - inheritance or layering?
When object oriented languages first came out, inheritance was overused.  Complicated hierarchies were common.  Now, interfaces (as in Java and C#) provide a simpler way to get the benefit of polymorphism without the complications of inheritance.  I rarely use inheritance anymore.
Layering, however, is vital when creating a large application.  Layering prevents general low-level classes (like lists) from directly referencing specific high-level classes (like web browser windows).  As far as I know, there isn't a formal way to describe layering, but there are general guidelines (model-view-controller (MVC), separate GUI logic from business logic, separate data from presentation, etc.).
Answer: It really depends on the types/phases of the projects you're working on. I happen to do that everyday because I'm working on database internals for a new database, creating related libraries/frameworks. I'd imagine doing that a lot less if I'm working within a mature framework using other people's libraries.
Answer: The time that I find class hierarchies most beneficial is when the relationship between objects actually does match a true "is-a" relationship in the domain.
However if I can avoid large hierarchies I will due to the fact that they are often a little more tricky to map to relational databases and can really complicate your database designs. Since you say most of your applications make heavy use of databases this would be something to take into consideration.
Answer: I'm doing Infrastructure for our companys' product, so I'm writing a lot of code that will be used later by guys in other teams. So I end up writing lots of abstract classes, interfaces, hierarchies and so on. Mostly it's just a pattern of "default behaviour in an abstract/virtual class, which other programmers may override".
Very challenging, I must say.


Prove that the set of all matrices is direct sum of the sets of skew-symmetric and symmetric matrices

Question: Let $W_1$ be the subspace of $\mathcal{M}_{n \times n}$ that consists of all $n \times n$ skew-symmetric matrices with entries from $\mathbb{F}$, and let $W_2$ be the subspace of $\mathcal{M}_{n \times n}$ consisting of all symmetric $n \times n$ matrices. Prove that $\mathcal{M}_{n \times n}(\mathbb{F}) = W_1 \oplus W_2$.
I couldn't really figure out why the sum of an $n \times n$ symmetric matrix and $n \times n$ skew-symmetric matrix would form a $n \times n$ matrix (to satisfy the direct summand property $W_1 + W_2 = \mathcal{M}_{n \times n}(\mathbb{F})).$ Browsing online, I found that $$ M = \frac{1}{2}(M + M^{t}) + \frac{1}{2}(M-M^{t}),$$ where $\frac{1}{2}(M+M^{t}) \in W_2, \frac{1}{2}(M-M^t) \in W_1$, and $M \in \mathcal{M}_{n \times n}(\mathbb{F})$.
This reminds me of a formula on how odd and even functions may be be added together to form a generic function. $$f(x) = \frac{f(x)+f(-x)}{2} + \frac{f(x)-f(-x)}{2}.$$
However, to me it is disturbing to use unless I know how it was derived. If anyone could show me why a skew-symmetric matrix may be represented as $\frac{1}{2}(M-M^t)$ and why a symmetric matrix may be represented as $\frac{1}{2}(M+M^t)$ than I may sleep better tonight.
Thanks.
Answer: Rather than asking why a symmetric matrix may be represented as $\frac{1}{2}(M+M^t)$, you need to ask yourself the following three things:

Is $\frac{1}{2}(M+M^t)$ symmetric, for every $M$?
Is $\frac{1}{2}(M-M^t)$ skew-symmetric, for every $M$?
Is the sum of these equal to $M$?

After you have answered "yes" to the above three questions, you will have proven that $M_{n,n}(\mathbb{F})=W_1+W_2$.  Then, you merely prove that $W_1\cap W_2=\{0\}$, and then you have $M_{n,n}(\mathbb{F})=W_1\oplus W_2$.

Ultimately, there are many matrices $M$ that all have the same symmetrization via the above formula.  The reason those two formulas are used is that they make the above three questions all have the right answer.
Comment: I see. Maybe I was overcomplicating this then. Good answer.
Comment: How to show $ W_1∩W_2=\{0\}$
Comment: @ClairSymmetry Suppose a matrix is both symmetric and skew-symmetric. Then $A = A^t = -A^t = -A$ and so $A = 0$.
Answer: There is nothing mysterious about these decompositions. Any linear operation $T$ on a vector space over a field$~F$ not of characteristic$~2$ that is an involution ($T^2=I$) is diagonalisable with eigenvalues $1,-1$ only, and the space is therefore the direct sum of the eigenspaces for $1$ and for $-1$. One may take $T$ for instance to be transposition of matrices, or argument reversal $f\mapsto(x\mapsto f(-x))$ in a vector space of functions. These eigenspaces are the cases of symmetric and anti-symmetric objects.
In fact in situations like this (operators satisfying a polynomial equation, where the polynomial splits into distinct linear factors corresponding to the potential eigenspaces) the projections on the eigenspaces can be expressed as polynomials in $T$. In the case at hand this means one can express symmetrising and anti-symmetrising operations for $T$ in terms of $T$ itself, and that is what the expressions giving components in $W_1$ and $W_2$ do. While in general such expression can be complicated, they are quite simple for involutions: the projection on the eigenspace for $1$ is $P_+=\frac12(T+I)$ and the projection on the eigenspace for $-1$ is $P_-=\frac12(-T+I)$. One easily checks $T\cdot P_+=P_+$ and $T\cdot P_-=-P_-$, confirming that on the images of the projection $T$ acts as$~1$ respectively as$~{-}1$. Of course one also has $P_++P_-=I$, so that a value (matrix) can be reconstructed from its symmetrised and anti-symmetrised parts. The fact that all this is quite similar to decomposing a function into an even and an odd function is therefore no coincidence.
Comment: Thanks for the addition here.


Travel questions for non US citizens residing in the U.S

Question: While filling the application for a UK visa, they ask if we have traveled in certain countries which includes the US. Since I am a non US citizen living in the US should I give details of my visits to the US every time?
Answer: If the question is to list all countries visited prior to this visit to the UK, then you should include the US.
If they ask you to give details of each stay then yes you have to include arrival and departure dates. If you arrived once and never left the US then you may be able to fill the From field and leave the To field as current.


Shimano FC-RS500 11 speed chainset with 10 speed cassette and chain

Question: Is it possible to use a Shimano 11 speed crankset FC-RS500 with a 10 speed ultegra cassette and chain. I will be using 105 5700 front deraileur and a 105 5701 rear. Thanks
Answer: If you are using shifters that match the derailleurs (i.e 105 5700 series), then yes this will work.
11 speed cranks have a slightly closer chainring spacing than 10 speed to accommodate the narrower chain. Consensus on this site is that you can go one speed difference on the crank and get working front shifting.
I like to point out that the non-series RS500 cranks are somewhat heavier than 105 5700 and I would not call them a great match, but if you are looking for a way to get an affordable compact 110mm BCD crank to work with the rest of the drivetrain it will provide a workable solution.
Comment: Upvoted, but you could/should mention that a common result of this kind of mismatch is you get rub between the chain and the large ring in more small/small combos than you would otherwise, and you can usually fix it such that it works perfectly with thin chainring spacers. (I usually wind up doing it with the .6mm wheels mfg ones, but they're thicker than needed for the purpose.) This can get pretty bad on bikes with short chainstays; to put it in perspective, tri bikes with exceptionally short stays can have a lot of this kind of rub even with the right chain. Not much margin for error.


Does every Entity in an XNA game need it's own BasicEffect instance?

Question: From what I see, the position/matrix is stored in the BasicEffect instance, so it makes sense to me that every object has it's own position matrix, but I'm not 100% sure it's correct to let every Entity have it's own BasicEffect instance, so I'm asking here.
Answer: Probably not. But you could...
First of all, you'll note that BasicEffect in fact has 3 matrices: World, View, and Project. World is per-object. But view and project are per-camera - so these should not be duplicated in different places around your program (for reasons of maintainability).
Secondly: You should usually treat states that go onto the GPU as write-only. The upshot of this is that you generally store the information to generate those states (such as effect parameters) yourself - in your own classes. Then, for each object you draw, you generate the appropriate state and set it on the GPU and follow it up with a draw call.
So with a single, shared BasicEffect, what you'll usually do is set the projection matrix once at the start of your game. Then set the view matrix at the start of each frame. And then set the world matrix right before you draw each object.
But - there are scenarios where you might want an Effect for each object. For example: you might have completely different settings for different objects. But at the same time - you still don't want to waste GPU resources by having multiple copes of the same effect program in existence.
To solve this, use the Effect.Clone method (MSDN), which gives you a copy of the Effect object that shares the underlying GPU resources.
(Note, of course, that BasicEffect is an Effect.)
Comment: There are several things to consider here.
1. BasicEffects take up alot more memory than a simple matrix [World] or vector+quaternion [Pos+Rot], it's not very memory-efficient. Having 200 BasicShaders in your scene just because you have 200 entities is overkill.
2. Using a rendering specific resource just because it contains a datastructure you need instead of using the datastructure directly is a bad design choice.

@ProgrammerAtWork It seems to me that you have reusability in mind but you are taking it a bit too far in this case.
Comment: I see, so for classes that need the same View & Project, but a different World matrix, I just send these classes a cloned Effect, and before they are drawn, I set the world matrix that belongs to that class.
Comment: @ProgrammerAtWork Personally I recommend storing just the `World` matrix (or translation, rotation, etc required to create the world matrix) with your entities, and then setting it on a single, shared `BasicEffect`. But, yes, you could clone the effect and it would work (but then what will you do when the camera moves and you need to change the View matrix across so many effects? - kind of messy).
Answer: BasicEffect is shader program. So it is resource it must be single( to save memory etc). And parameters are passed same as in function.
Comment: I understand that textures/shaders are loaded once and then assigned to a BasicEffect, but does every entity get a BasicEffect instance?
Comment: not an instance but reference or pointer to that instantiated effect.
Answer: You have different WVP matrices for each object. But you can create a single BasicEffect instance to render all the objects. You just have to make sure that before rendering, you assign the correct matrices to the BasicEffect properties.
for every object
{
    basicEffect.World = obj[i].world;
    basicEffect.View = obj[i].view;
    basicEffect.Projection = obj[i].projection;
    GraphicsDevice.SetVertexBuffer(obj[i].vertexBuffer);
    foreach (EffectPass pass in basicEffect.CurrentTechnique.Passes)
    {
        pass.Apply();
        GraphicsDevice.DrawPrimitives(PrimitiveType.TriangleList, 0, 1);
    }
}

Check this
Comment: I see. Do I also assign other things to a basiceffect, like different textures/shaders while looping?
Comment: Yes! you can assign
Comment: Okay, I'll try this out when I get off work.