Expected value of the distance square

Question: Given two points $X,Y$ on two sides of square $[0,1]\times [0,1]$ ($X:(0,1/2),Y:(1,1/2)$ (PS: My original question is $X,Y$ on opposite of a square, but I think that's not the real case) )and $n$ points distributed uniformly(i.i.d) in the square (where $n$ is large, and $A$ denotes the set of $n$ points), can I caluculate the asymptotic behavior of the value $M(n)$, where $M$ is defined as
$$M(n)=E\left[\min_{B\subset A} \sum_{k=1}^{|B|+1} d(B_k,B_{k-1})^2\right]$$
where $B_k$ is the $k$th element of $B$,$B_0=X,B_{m+1}=Y$(We let $m=|B|$), and the expected value is taken over all the possible $A$ . That is to say, I would like to compute the expected value of the minimal weight defined as sum of the square of distance.
I know that when $n\to\infty,M(n)\to 0$. And in the $1$-dim case, this is easy, since it is only a Poisson process, and the distance between two consecutive points are surely exponential distribution.(Calculation suggests it's about $(n+3)/((n+1)(n+2))$,where $n$ is number of points added) But in the two dimensional case, I got stuck and don't know how to tackle it. This is a problem arouse from the calculation of the cost of a network. Any hint or reference are welcomed, Thanks!
(Some computer experiment suggests that the weight is about $\approx 1.1/\sqrt{n}=O(1/\sqrt{n})$. I also wonder if there are some similar results?)
Comment: Here is an attempt at an upper bound. Consider only the points in the $\epsilon$-neighborhood of the diagonal $XY$. This neighborhood is approximately a rectangle $\sqrt{2}\times 2\epsilon$, and contains approximately $2\sqrt{2}\epsilon n$ points. The orthogonal projections of points within this rectangle onto the diagonal are uniformly distributed (neglecting what happens near endpoints). Apply the 1-dimensional asymptotic to them. The deviations from the diagonal contribute at most $4m\epsilon^2$ to the sum of squares (by the Pythagorean theorem).
Comment: Clearer now. Then @youcancallmeAl's reasoning with $\epsilon=1/\sqrt{n}$ indeed yields $\Theta(1/\sqrt{n})$ asymptotics (optimum on $\epsilon$ of $(n\epsilon)^{-1}+(\epsilon n)\epsilon^2$).
Comment: @Did Ah yes, you are right, this gives an upper bound. And can you suggest some probable way to get a lower bound?
Comment: @youcancallmeAl Thank you! This gives me a new view point!
Comment: @youcancallmeAl Thanks! Edited.
Comment: Notation fixes: $m=n$? $E(n)=M(n)$?
Comment: @Did $m\not = n$, and $m=|B|$,where $B$ is a subset of $A$. Thanks for your correction, edited.
Comment: The minimum is taken over all ordered subsets of $A$( named $B$), and $m$ is the cardinality of the subset. Sorry for the ambiguity.
Comment: Then $M(n)\geqslant1/m$ for every $n$ hence $M(n)$ does not go to zero when $n\to\infty$. Please explain.
Comment: @Did Well, I mean that we first generate $A$ where $n$ points are distributed randomly. Then we select a "path" with smallest weight from $X$ to $Y$, all the points in the path are selected from $A$, and $m$ is not fixed( $m$ is the number of point in the path of smallest weight). It is a number related to $A$( we can call it $m(A)$, but I don't care what it is, when two paths have the same weight, $m$ can be selected as either of the points in the two paths). Then we take the expectation when $A$ is randomly generated.
Comment: $m$ is not a number I decided earlier, maybe I should not write $m$ in the minimum symbol, sorry for that.
Answer: As was mentioned in the comments, the upper bound is easily found by the points along the straight line between X and Y (no matter where they lie on the border). The lower bound is more difficult and to work out all the details would take quite some time, but I'll give the needed ideas and some literature. First I would like to assume, that the number of points is not fixed $n$ but poisson distributed with parameter $n$. That is almost the same as you will have with high probability say between $n/2$ and $2n$ points then, which is enough for the purpose. Now you cover your square with smaller squares of sidelength $\sqrt{1/n}$ and calculate the probability that one of these squares contains no point. The number of points in a small square is poisson distributed with parameter $n \cdot (\sqrt{1/n})^2 = 1$. Hence you have for each of your small squares independently a probability of $e^{-1}$ that there is no point in it. Now there are 2 possible arguments:
We say a small square is black if it contains no points, otherwise we call it white. If there is no white path (i.e. connected set of small white squares) from $X$ to $Y$ then at least one step is larger than than the sidelength of a small square $\sqrt{1/n}$. Hence you obtain a lower bound of $1/n$. This argument may be refined, as you will have to take about $\sqrt{1/n}$ of these larger jumps.
The general topic you need here is "percolation" and there is a wonderful book about it called "Percolation" from Geoffrey Grimmett. To refine the argument, you will find the tools you need in a paper of Martin called "linear growth for greedy lattice animals". As each path from $X$ to why is a greedy lattice animal of size at least $\sqrt{n}$ and if you chose your sidelength as $\sqrt{1/cn}$ you will for large enough $c$ obtain the result, that any path of lenght $\sqrt{n}$ has to contain at least $c_2 \sqrt{n}$ black cells. Hence your bound will become of order $\sqrt{n}/n$, which is what you wanted.

Expected value of the distance square


Why restarting windows server is so important?

Question: I work on Windows Server 2008 R2. This is very busy server. I use SAS on this server and often get 'OUT OF RESOURCES' message. I restart the server to solve the problem. I want to understand in detail that, what exactly happens when we restart the window.
Comment: If the server is very very busy, have you considered - getting a better one? Or a second one? Because there is a limit of much particularly old cheap hardware can do.
Answer: Restarting a server isn't generally necessary unless you need a reboot after patching (which is a very common cause).
Your problem sounds like a memory leak due to a driver problem or something similar. You should diagnose your system and compare the freshly rebooted state to the state after a few days (using task manager, procmon, resource monitor, event log, ...). Look for process memory consumption, peak consumption, event log errors and warnings.
You might need to update system BIOS, device firmware and drivers or other software the system's got installed. It's generally a good idea to keep your system up to date - using a somewhat outdated OS is not an indication for good housekeeping...
Additionally, a "very busy server" might need moving off services to another system. It's a very good idea to use a specific server only for a single service (or a few smaller ones). To avoid buying loads of hardware using system virtualization is a good approach.
Comment: It could also be a server that is notoriously overloaded. 2008R2 is quite ancient - and it may be with a similar "timeframe" hardware, combined with small budget (as obvious from not having a proper admin) may mean there is an attempt to run too much on a too overloaded machine.
Comment: @TomTom Absolutely. Each server should have a regular schedule when it's either replaced or at least its fitness is re-evaluated.


Compare products in sidebar of category pages not showing when no products

Question: I am working on http://urbantrend.co.in/test/ project. And In sidebar on category pages compare products disappears if there is no product http://urbantrend.co.in/test/index.php/womens.html. If i have some products in compare then that block will appear.
Answer: Kishor,your compare product block is render every time at category page   ,but on that block's class template file,you may have a condition which is show block block-list block-compare block whenever you have any product in compare.
Basically this template file location  may be app/design/frontent/Your_Package/Your_theme/tempate/catalog/product/compare/sidebar.phtml.may on this file you have a condition like:
<?php if ($_items): ?>

Comment: Yes i can see that but same time i have else block where following code is exist

__('You have no items to compare.') ?>.
So, what could be the solution.
Comment: yes, that could be solution ..


Is there a formal way to aggregate the Web of Science Categories?

Question: I'm doing network analysis at the level of the author using data from Web of Science. As you might know, the column, WC has information about the Web of Science Categories, which are around 250 disciplines. I was wondering if there is a proper way to aggregate them, for instance, using the 22 disciplines from the Essential Science Indicators.
Answer: Both Web of Science Categories and Essential Science Indicators are journal-level categorizations (with some reclassification of papers in multidisciplinary journals going on in Essential Science Indicators), with the difference that each journal can belong to multiple Web of Science Categories but only to one Essential Science Indicator category. This usually means that individual papers within a journal (at least within the same issue or year) will be assigned to the same Web of Science Categories (one or many) and also to the same Essential Science Indicators category. By mapping the Essential Science Indicators categories of journals (found here) onto papers you will therefore automatically get an aggregation.
However, since journals (and papers) can have multiple Web of Science Categories attached to them (without any prioritization of what is the "main" category), you cannot have a simple one-to-one mapping between them, at least not without some further work.


nginx - if current hour is between

Question: I want to disable the access to an app during a certain period of the day.
Is it possible to do something like this in Nginx?
if(hour > '04:00:00' && hour < '05:00:00') {
    root /var/www/maintenance;
} else {
    root /var/www/site;
}

Comment: I've just thought I could use a symlink and make a bash script to change it... but I'm still interested if it's possible directly in nginx
Answer: I can only think of 2 ways of doing this (other than the cron changing the symlink):
1) http://nginx.org/en/docs/http/ngx_http_ssi_module.html#variables
2) Create a very small PHP/Python/Whatever app that returns 200 if not maintenance hours and 403 otherwise. Use the http auth module. http://nginx.org/en/docs/http/ngx_http_auth_request_module.html
Answer: Just create a bash script to update a file and set it as a cronjob, e.g:
#!/usr/bin/env bash

SiteStatus="$1"
SiteStatusConfig="/etc/nginx/status.conf"

if [ "$SiteStatus" = "maintenance" ]; then
    echo "root /var/www/maintenance;" > $SiteStatusConfig
else
    echo "root /var/www/site;" > $SiteStatusConfig
fi
nginx -s reload

Then just place into your nginx site config (replacing root directive):
include status.conf;

Then the cronjob:
0 4 * * * /opt/scripts/nginx-site-script.sh maintenance
0 5 * * * /opt/scripts/nginx-site-script.sh

Trying to do this in nginx, via an if statement and the like can slow nginx down as nginx evaluates the server block (stored in memory) with each request.
Answer: The approach I typically use for this is to include a downtime handler whenever I first enable an app in nginx. Here's example config:
location /app_1/ {
    proxy_pass http://127.0.0.1:8001/;
    proxy_set_header   Host             $host;
    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
    error_page 502 =200 /502-app_1-maintenance.html;
}
location /502-app_1-maintenance.html {
    root /var/www/html/error;
    try_files $uri /502-app_1-maintenance.html;
}

Whenever nginx cannot connect to app_1 on port 8001, it produces a 502 error. That error is redirected via error_page 502 =200 /502-app_1-maintenance.html; to a custom page in the second location block that contains a simple "App 1 Under Maintenance" message. Visitors will get this custom "Under Maintenance" page any time app_1 is down. That seamlessly handles unscheduled as well as scheduled downtimes.
In this example, the response code to the user for this maintenance page is a 200 (OK), however, you can change that to an error response if you prefer by changing =200 to the return code of your choice.
You can also add a bit of javascript to have the page reload periodically. Since the url of the maintenance page is the same as the app's url, when app_1 comes back online, it will replace the maintenance page on the next auto-reload.
In your case, since you want to disable public access during certain times, you could combine this nginx configuration with a scheduled app shutdown via crontab. If you wanted, you could then bring your app up on a different port while you perform maintenance. As long as it's not listening on its usual port, visitors will see the Under Maintenance page.

nginx - if current hour is between


What is the answer of this problem?

Question: Suppose that $f(x)$ is bounded on interval $[0,1]$, and for $0 < x < 1/a$, we have $f(ax)=bf(x)$. (Note that $a, b>1$). Please calculate $$\lim_{x\to 0^+} f(x) .$$
Answer: Assume $|f(x)|<M$ for all $x\in[0,1]$.
Let $\epsilon>0$ be given. Then we can find $n\in\mathbb N$ such that $b^n\epsilon>M$ (here we use that $b>1$).
For $0<x<1/a^n$ we find by induction that $f(a^nx)=b^nf(x)$ and hence $|f(x)|<\epsilon$.
This expresses that $$\lim_{x\to0^+}f(x)=0.$$
Note that we did not really make use of $a>1$. Also, $f$ need not be continuous anywhere.
Answer: We get $f\left(a^{n}x\right)=b^{n}f\left(x\right)$ for $0<x<a^{-n}$.
If the limit does not equal $0$ then there is a series with $x_{n}\in(0,a^{-n})$
 with $f\left(x_{n}\right)\geq\varepsilon>0$
for each $n$. Then $f\left(a^{n}x_{n}\right)=b^{n}f\left(x_{n}\right)\geq b^{n}\varepsilon$.
This contradicts the boundedness of $f$ since $b>1$.

What is the answer of this problem?


Is it sinful to watch TV series The Young Pope?

Question: Question: Is it sinful to watch TV series The Young Pope? Why? I did not watch the TV series, but from what I saw it seems morally corruptible.
I am interested in an answer from a Catholic viewpoint.
Comment: @Thom You really have to ask in the question itself, not just the tag. The show is about the Catholic Church - tagging doesn't indicate you want their perspective.
Answer: Is it sinful to watch TV series The Young Pope?
Possibly?
Go and ask your local pastor if one is in doubt.
With a lack of clear papal or Vatican condemnation on the subject of the tv series The Young Pope, each individual Catholic must follow the dictates of his or her conscience in regards to watching this series, aided with the council of a priest or pastor if necessary.

The series has received five-star reviews, in the USA and in the UK, and even the Catholic Herald raved about the "mordantly funny story-telling" – but how has this subversive and thought-provoking drama been received in Italy?
Unusually, for a Pope so brilliantly skilled in public relations, there has been no comment from Pope Francis, whose own gift for humility and skill at presentation – shunning the papal apartments for a basic hotel, driving a second-hand Volvo and washing the feet of the destitute – have won him millions of fans in spite of his ultra-conservative views on homosexuality.
From the Vatican itself, there has been a resounding silence. I wonder why? When the first episode aired on Italian television, it was a huge hit, and received the highest rating ever for the first episode of a Sky drama. The Young Pope might masquerade as a high-budget soap – but it tells us some uncomfortable truths about the hypocrisy at the top of the Catholic Church. - The Young Pope is a hit with Catholics – so why is the Vatican so silent about it?
Comment: The would be a separate question and possibly be opinion based.


How to display WorkFlow Assigned To Column in Document Library

Question: I have setup a Workflow which works really great. I can see the Assigned To column when I check the progress of the task. I want to show this particular Assigned To column in the Document Library. How can I get this done? Any help would be greatly appreciated]1
Answer: You'll have to create a user column in the associated list and write back to it during your workflow to specify who it is assigned to since the list does not have visibility into the workflow or the workflow tasks by default.
Comment: That is exactly what I was looking for. Thank you so much!!!


Anybody using SLDS Design Tokens in conjunction with React?

Question: The Salesforce Lightning Design System offers a set of Design Tokens that are described as the "visual design atoms of the design system". The Lightning Component framework easily allows you to pull these design tokens into your Lightning Components. However, I'm currently developing an application based on React JS that attempts to adhere to SLDS styling. I can achieve much of this by loading the SLDS resource bundle into my application and creating React components that render SLDS conformant markup with SLDS CSS classes applied. What I'm not able to wrap my head around is how I would incorporate SLDS Design Tokens into a React-based application. Has anyone out there done this, or even tried this? I'd be interested in any suggestions here.
Answer: Salesforce recently released this react component library for SLDS.  I haven't had a chance to try it out yet, but it seems to be actively being worked on.
Comment: Awesome. Looking forward to giving this a try.


Is an Anarchosocialist a philosophical term or a political term?

Question: I heard the term used by Noam Chomsky to describe himself.  Is this his own term or a mash up. Came very late to philosophy, and I see possible links to the under pinnings of Anarchism and Socialism.
Comment: it's not his own term no. there have been philosophers who were anarchists that write about anarchism (stirner e.g.). and you will find anarcho-socialism mentioned in philosophical work... though i can't immediately think of any, google books gives "The Philosophical Anarchism of William Godwin", who was a philosopher, and that book uses the term a few times. i don't know of any IMPORTANT anarcho-socialist philosophy though ha !
Comment: I have been following Chomsky for quite some time now. I have never heard him use this term. Though he sometimes uses the terms anarchist, anarcho-syndicalist, and libertarian socialist. These you can look up. I am being pedantic here.
Comment: Chomsky has mentioned a few times Rudolf Rocker's book Anarcho-Syndicalism: Theory and Practice
Answer: I am not so familiar with Chomsky, but I think I could be a bit familiar with the anarchism itself.
Directly answering first to your question,

Is an Anarchosocialist a philosophical term or a political term?

Neither, but since the anarchism itself as I describe later involves the total abolish of the any existing entities, that hinders men's "freedom" from outside, including the country, so it might be safer for me to say it is rather more philosophical.
His note on Anarchism, quoting mostly Daniel Guerin.
http://www.chomsky.info/articles/1970----.htm
Daniel Guerin : http://en.wikipedia.org/wiki/Daniel_Gu%C3%A9rin
In the middle, he is putting Engels to Bakunin ( probably the most famous anarchist in the centuries )

Engels, in a letter of 1883, expressed his disagreement with this conception as follows:
The anarchists put the thing upside down. They declare that the proletarian revolution must begin by doing away with the political organization of the state....But to destroy it at such a moment would be to destroy the only organism by means of which the victorious proletariat can assert its newly-conquered power, hold down its capitalist adversaries, and carry out that economic revolution of society without which the whole victory must end in a new defeat and a mass slaughter of the workers similar to those after the Paris commune.5
In contrast, the anarchists -- most eloquently Bakunin -- warned of the dangers of the "red bureaucracy," which would prove to be "the most vile and terrible lie that our century has created."6

Even though K.Marx though "at the final stage" the abolish of the country is mandatory to construct his "communism", Bakunin on the other hand said nothing about "what kind of "environment" would we live if we take the anarchism". Bakunin only criticized Marx. His "goal" seems to me, literally a "complete anarchy", no establishment existing, whatsoever that hinders human's act.
Sooooooo, I said a bit long, I think it is more philosophical rather than political, since when we talk about the anarchism, since there is no authority or entities whatsoever, only what I can imagine in the anarchism is just a bunch of groups ( even the "group" may not be appropriate to them ) of primitive human kind, such as picking nuts from trees for food, there may be not "hut" to live, but rather live under somewhere beneath the trees, urinating when they like, almost to way back to homo-sapience like, to me.
I hope to any extent I could answer in some way.
Comment: Nice answer. If you read the Dao De Jing in a materialistic light, you may see that reversal as beneficial. And there would still be hierarchies, autorithies, only in a smaller scale (though today, probably not that small anymore).
Comment: dao.url.ph/_DaoDeJing_.pdf
Comment: Thank you. Kindly allow me to upvote "for your sake" ( Since it looks I am upvoting mine myself if I do so ). I will read your recommendation.
Answer: There is no "or". Can it be studied by philosophy? There it is a philosophical term. Can it be studied by political sciences? There it is a political term. Looks like it is both.
Comment: In addition to Kentaro's answer, the relations between individuals and groups are still Politics. During the inter-dynasties period in China, there were still Politics.
Answer: In all of the political theories on the Liberal spectrum — and yes, Marxist thought is intrinsically Liberal — there are gradations in the amount of direct power citizens wield. On one end we have 'representative' systems in which citizens have indirect control and influence over a relatively independent government, in the middle we have 'direct' systems in which people play an active role in controlling and mediating an independent government, and on the other end we have 'anarchic' systems in which citizens forgo independent governing bodies and institutions and carry out political activities through citizen interactions. Adding 'anarcho-' to a term, as in 'anarcho-capitalism' (Right-Libertarianism) or 'anarcho-socialism' (Marxism, syndicalism, etc), merely points to theories on the government-independent edge of the axis. They are political theory terms, and so part of philosophy proper, but as often as not they are used by ideologues as political labels without much philosophical depth.
Dealer's choice, as they say...


In causal dynamical triangulation, what equation(s) give the distribution of angles of the triangles?

Question: I know very little about this topic, but going on what I learned in my one semester of QM, there has to be some Schrodinger-like equation they are using to get the distribution of angles of triangles then using that to run their Monte Carlo simulations of the space-time paths. Hopefully someone who knows more about CDT can understand what I'm asking.
Answer: Since CDT is not yet solved, and the partition function cannot be calculated, its not easy to answer your question.
These quantities are rather measured, depending on the coupling constants and number of simplices and the time extent of the spacetime, you measure different values/distributions. Not mentioning that there are different phases,with significantly different behavior.


I would like to publicly share the details of my investment portfolio. What websites add value in this regard?

Question: I want to have the ability to share the details of my holdings and have a website track the return over time while making this information 100% public to anyone who may be interested. What websites provide this capability?
Answer: This is going to be a bit of a shameless plug, but I've build a portfolio tracking website to track your portfolio and be able to share it (in read-only mode) as  well.
It is at http://frano.carelessmusings.com and currently in beta.
Most portfolio trackers are behind a login wall and thus will lack the sharing function you are looking for. Examples of these are: Yahoo Finance, Google Finance, Reuters Portfolios, MorningStart Portfolios, and many others.
Another very quick and easy solution (if you are not trading too often) is a shared google docs spreadsheet. Gdocs has integration with google finance and can retrieve prices for stocks by symbol. A spreadsheet can contain the following:
Symbol, Quantity, Avg. Buy Price, Price, P/L, P/L% and so on.
The current price and P/L data can be functions that use the google finance API.
Hope this helps, and if you check out my site please let me know what you think and what I could change.
Comment: @AlexB Your site seems to be down. Is your test platform up elsewhere and would it by chance support stock options too?
Comment: @Marcos, I think you meant to contact Gennadly.   It is their site, not mine.  I just made a comment.
Comment: +1  Thanks for disclosing your association with the site. :)   Also, I upvoted because not only did you list your solution and an alternative (google docs), but discussed issues with other portfolio sites.


Prospective employers promising that I can pick up product/tech responsibilities from marketing/growth role over time. How to verify?

Question: I've had a number of calls with prospective employers who, after I explain with them I want to transition to a product/tech-oriented role after some time with them, promise that I can make the transition. I understand this is probably just talk, but if an employer is serious, what are examples of evidence here?
Comment: If they 'promise' it, get it in writing with a defined timescale. Otherwise, it doesn't exist and will never happen.
Comment: Ask to speak to your future team members. They'll be able to tell you.
Answer: People who have done it before.
Check to see if anyone else has made that transition, either on LinkedIn or just ask to be put in touch with some examples.
Do they have anyone who went from marketing to tech/product on their current team? That would be the most concrete evidence.
Answer:
How to verify?

You cannot verify that something will happen in the future. It is (still) a physical non-sense.
What can you do? You make sure it will happen in the future. Or, at least, you make sure to maximize the chance of it happening in the future.
For that, there is a very simple tool. It is called contract. In the contact it must be specified something like this:

Initially, OP will work XYZ. Between dates K and L, OP will transition to role EFG. OP will fully occupy role EFG starting with date M. The transitioning plan follows: (bla blah bleah).

If it is not written in the contract, the company will be free to do anything they want, and you will have no way to enforce that.
Even more, you might add tot eh contract a clause (if the company is professional and with good intentions) that they will pay some "penalties" if the said transition does not end properly, because of reasons you cannot control.


Should all plain text files have some sort of suffix (e.g. *.txt, *.conf)

Question: I create many notes in plain text files, but after a while the .txt suffix I put at the end of them seems to be unnecessary typing and visual noise. Is appending .txt to plain text files a strongly encouraged convention or just a suggestion?
Answer: The .txt filename extension serves a purpose on Windows, where the filename extension helps determine which programs are associated with that file - which one is used to open, edit or perform other types of action on it.
On Unix/GNU-Linux, the system works out the type of a file without referring to the filename extension. It does have some uses in Makefiles. [update:] As grawity noted in a comment below, the filename extension is used by Linux file-managers (I assume this means GUI apps like nautilus and character apps like mc).
However I find it a useful convention to adhere to anyway.
Comment: Most file managers for Linux *do* use the file extensions, as it's the only method with reasonable performance.
Comment: @grawity: Ah right - I don't use file manglers on Linux (GUI, CUI, TUI or otherwise)
Comment: In windows, you can hide known file extensions. If you are using notepad for notes, it will automatically append the .txt extension to the end.
Comment: It's especially useful to adhere to an editor's default file extensions for Open/Save dialogs, if possible. Some Windows Open File dialogs will filter out all non-conforming files and you need to explicitly select *All file types* or something like that first. Inconvenient.
Comment: In the strictest sense, OS X allows you to avoid using file extensions if you want to, but using them enables you to influence the way the OS treats the file. Most of the time, OS X can attempt to guess what the filetype is, but the convention doesn't hurt. You can hide the extensions anyway if you want. :)
Answer: Nothing more then convention, IMO.
I almost never use file extensions (in Windows) for text files.
In general, I always know what is in my files, & generally always open files from within a file manager, either to view (happens to be F3) or to edit (happens to be F4) or from a context menu (to open in Vim).
The only odd time that I add an extension, is if I know the for a particular file I'll specifically want to open in something that I normally do not use (like Notepad) in which case I'll append an extension (like .doc) to the filename so that it will open in the default application (Notepad, for me).
If you want to perform an action on a set of files (as mentioned above) & if having an extension such as .txt helps, then I would do something like that for that set.  (I do something similar, though instead of an extension, I have numerically numbered sets of files, so I can select 7* to get all the files that start with the number 7, to process them further.)
Answer: Assuming you are on Windows - if you don't put a file extension on, then it won't automatically open when you double click it.  It is certainly "strongly encouraged."
Answer: Under Unix, it is useful to perform operations that are restricted to just textfiles.  For instance
ls *.txt

will show you just the text files, while
find . -name \*.txt -exec grep foo -H {} +

will search for foo in all of the text files under the current directory. Even if you don't do this often, it is useful occasionally.


Isn't LIGO basically measuring the luminiferous aether?

Question: I am bit confused about this one. I am not very acknowledgeable about gravitational waves and LIGO. But if it is basically a Michelson interferometer and can detect shifts in vacuum, doesn't this means that we detected the luminiferous aether and if not, why? Is there an analogy or direct correlation between gravitational waves and aether?
Comment: note that the Michelson interferometer can be used in [more experiments](https://en.wikipedia.org/wiki/Michelson_interferometer#Applications) that just the Michelson-Morley experiment. If you use to measure the size of a hamburger, it wont turn your food into aether.
Comment: Since LIGO does something similar one would expect them to see a seasonal effect, if it exists, and probably with much higher sensitivity than previous experiments. The details are complicated, though. LIGO is designed to have max. stability in a certain frequency range that is much higher than 1/quarter, while a precision aether experiment would have to be drift-free for multiple years. Did you look for a LIGO paper that discusses the achievable sensitivity? It's an interesting question, for sure.
Comment: I couldn't find anything about LIGO, but this seems to be one of the more recent measurements: "Modern Michelson-Morley experiment using cryogenic optical resonators", Holger Mueller et al Phys.Rev.Lett.91:020401,2003. For a tabletop experiment it's amazingly precise, setting limits at a violation on the order of 1e-15. They mention more advanced satellite experiments, which have not been carried out, as far as I know.
Answer: How a Michelson Interferometer works
LIGO is indeed a Michelson interferometer, which splits a beam of light in two, sending each new beam towards a mirror in the shape of a giant "L". Mirrors at the end of each arm then reflect the light and send the beams back to the splitter, where they merge back. An interferometer looks to find any changes in the beams. If a gravitational wave passes through the detector, it will appear to change the length of the path traveled by a beam, thus changing the result slightly.1
The Michelson-Morley experiment did pretty much the same thing. Michelson's idea was that the apparent length should change based on the Earth's supposed movement through the aether. It would take longer for the beam traveling parallel to the Earth's movement through the aether to return than if would for the beam traveling perpendicular to the Earth's movement.
The difference between the experiments
If we detect a gravitational wave, then we can still rule out the luminiferous aether. There are a couple reasons:

If the aether hypothesis is true, the movement of the Earth through the aether should always be detectable. Conditions stay the same. However, gravitational waves do not regularly travel through Earth at measurable strengths.
In the Michelson and Morley setup, the Earth is traveling through the aether in one direction, and thus changing the orientation of the interferometer should produce different results. However, gravitational waves can come from any direction, so it is possible to get the same measurement from different waves coming from different directions.

This is, of course, in addition to the fact that spacetime is not the same thing as the aether.

1 For more excellent information, see the LIGO website.
Comment: `...spacetime is not the same thing as the aether...` I have often seen it said that Einstein's concept of space and time is fallacious as he allegedly committed the logical fallacy of reification and gave the complete absence of spatial dimensionality (space) and a unit of measurement used to chronologically observe changes in the state of matter via entropy (time) spatial properties. This makes since when an object with mass only interacts with other objects with mass through exchange of inertial momentum upon contact. It begs spatial vs counter-spatial metaphysics of old.
Answer:
Isn't LIGO basically measuring the luminiferous aether?

Not quite. Instead it's measuring "waves in the aether". Take a look at the Einstein digital papers, and note this:
"Recapitulating, we may say that according to the general theory of relativity space is endowed with physical qualities; in this sense, therefore, there exists an aether".
This isn't quite the same as the luminiferous aether, but it isn't totally different. Also see this quote by Robert B. Laughlin, Nobel Laureate in Physics, endowed chair in physics, Stanford University:
"It is ironic that Einstein's most creative work, the general theory of relativity, should boil down to conceptualizing space as a medium when his original premise [in special relativity] was that no such medium existed [..] The word 'ether' has extremely negative connotations in theoretical physics because of its past association with opposition to relativity. This is unfortunate because, stripped of these connotations, it rather nicely captures the way most physicists actually think about the vacuum..."

I am bit confused about this one. I am not very acknowledgeable about gravitational waves and LIGO. But if it is basically a Michelson interferometer and can detect shifts in vacuum, doesn't this means that we detected the luminiferous aether and if not, why?

Because whilst space is the aether of general relativity, it isn't actually the luminiferous aether. I imagine your question will be What's the difference between the luminferous aether and the aether of general relativity? I'm afraid to say I don't think I can give a good answer to that. But note that Einstein described space as the aether of general relativity, not spacetime. Spacetime is an abstract thing, akin to the "block universe". See what relativist Ben Crowell said here: "Objects don't move through spacetime. Objects move through space".
Answer: Here is my less-than-scholarly answer.  Please tell me its weaknesses:  The luminiferous aether was postulated as a medium necessary to the transmission of light-waves. If the light-waves were merely a perturbation of a medium, then the motion of an observer through that medium would change the apparent speed of the perturbations through which the observer was traveling. The Michelson-Morley experiment proved that this wasn't the case.  It was the empirical proof of Einstein's premise that the speed of light appears the same for all observers in uniform motion with respect to one another, regardless of whether they are moving toward or away from the source of the light. Einstein's "aether" was not a medium, but rather represents the property of space-time that has the effect of "warping" the path of a moving object, including a light beam, in proximity to a massive body. Since the warping takes place without actually coming into contact with the body, it is somewhat analogous to the luminiferous aether in that it postulates the ability to have "action at a distance" (e.g. the "warping"), but with the luminiferous aeither, that action was a traveling perturbation through a substance.  Gravity waves represent oscillations in the warping caused by variations in the acceleration of the massive body relative to the observer.
Comment: Note that gravity waves and gravitational waves are different.
Answer: You are right, spacetime is the luminiferous aether (that kind of aether that Einstein abhorred) and gravitational waves are ripples in that aether. But, the Michelson-Morley experiment showed us in 1887 that there is no luminiferous aether, therefore gravitational waves do not exist or they cannot be detected by means of a LIGO interferometer.
Comment: The 19 century aether was supposed to be not Lorentz invariant - i.e. speed of light was supposed to depend on velocity of observer through aether. Michelson Morley experiment showed that is not the case. Gravitational waves are Lorentz invariant, so they are not in contradiction with Michelson Morley experiment.
Comment: @mpv but, gravitational waves do not exist, so they are in contradicction with reality.
Comment: Do you have some reference to relevant sources to support your claim about nonexistence of gravitational waves?
Comment: So how's your work coming on disproving the now FIFTY detections of gravitational waves, including one which had a clear optical/gamma ray counterpart?


What is the process for having a trial record corrected?

Question: I litigated a case successfully last year and some time afterwards I re-read the record, the trial transcript, and noticed that there were a lot of errors of various kinds in it.
Is there a process for having the record corrected?
Answer: The precise procedure will depend on the court, though it will almost certainly be up to the trial judge to decide. However, the principles should be the same wherever you are, and depend on what sort of "error" you are talking about.
An obvious typo ("They where going") or mishearing that is clear to the participants though not the transcriber ("dying" for "dyeing") should be easy enough to have corrected, though probably at your own expense. I would suggest you write to the judge enclosing a marked-up transcript; his clerk will probably reply telling you what action you need to take once you have the judge's approval.
Secondly, there may be "---Inaudible---" passages, or perhaps the transcript has the witnesses in the wrong order. Correcting such things will almost certainly require a formal application or the agreement of the opposing attorney; perhaps both. Before you object to the time and expense, consider that this is the official court record, obtained in the prescribed way, and you want it altered to suit your perception. If a professional transcriber could not make out a particular paragraph, "Inaudible" may well be a better record than your own notes.
There is a third possibility, which probably does not apply to you but you need to know about before going too far. There is a category of litigants (usually acting in person) who cannot accept the possibility of being wrong. If the police refused to act, they must have been bribed; if the judge dismissed the case, he must be part of the conspiracy (I remember one accusation that a typist had reversed the judgement from spite without anyone noticing). And if the court record shows that the witness did not say what she was supposed to, obviously there has been a mistake; will the court please correct it before next Tuesday? Partly as a result of this, there is no realistic chance of altering the record for anything less than complete precision. "The trancript omits the important word never before did at line 273" may or may not be approved; "this paragraph is the opposite of what was meant" will be dismissed out of hand.
Comment: FWIW, if there is a mere misspelling in a trial court transcript, I will usually just quote from it putting the corrected spelling in my brief with a citation to the record and a parenthetical "spelling errors in original corrected."


Make MediaElement support more video codecs

Question: Is there a way to make MediaElement support more video codecs like mkv, flv, mov etc.? If not, is there any other control that supports more video codecs?
Comment: using WinRT you cann add custom decoders (adding a custom MFT at runtime)
Comment: @Don'tForgettoUpvote, can you tell me how you resolved the problem ?
Answer: Have you seen the Player Framework?
It's an open source component supporting Windows 8, part of the Microsoft Media Platform, and developed by Microsoft.
It's an alternative to the standard MediaElement control, and provides a plug-in mechanism.
I'm not sure whether you can support extra codecs through this mechanism though.
Other than that, you can also extend the media platform (the extension has to be written in C++ though) as shown in these samples provided by Microsoft:

Media Extension Sample
MediaStreamSource media extension sample

The second example is very interesting as it's a sample media extension adding the MediaStreamSource mechanism as in Silverlight.
Thanks to this extension you could implement your own MediaStreamSource in C#/VB.NET providing content to the MediaElement.
Answer: It seems impossible as WinRT has completely different set of API and all existing win32 based codecs won't run unless codec owners rewrite them. One long way will be to port win32 code into winrt which will require in depth knowledge of both and seems way too long to do it. Even if somehow you will find way to make existing codec work, it will not work on arm based windows 8 tablets.
This means, there are no codecs for winrt other then Microsoft has provided.
Your options are to convert them into h.264 video, which has become a standard as h.264 plays on all devices. Apple did great job by standardizing video. Win 7 onwards, microsoft has provided inbuilt support for h.264.
Answer: MediaElement plays whatever the windows media player can play.
So if you have the right set of codecs installed on your PC it can be a pretty versatile media player.
Personally I have installed K-Lite codecs
As well as Media_player_codec_pack codecs
And now my Windows Media Player doesn't lag anymore when playing mp4 files. Just follow the suggestion of the installer and restart your PC BEFORE starting the installation process. Also... it attempts to trick you with dialogs to install secondary software so BEWARE!!
Once Installed, just remember to experiment with the "preferred acceleration" parameter in the application's video settings, to see what goes better according to your hardware. I have set it to - CUVID.
I also installed this set of codecs to support avi format
Hope this helps :)


Is it morally wrong to deny food to the mother in this specific case?

Question: A women has two sons, A and B. The son A has denied to keep her, take care of hers and give her food. The woman strongly loves Son A but not Son B. So, she decides to stay at Son A for most of the time and come to Son B for food, to sleep, to use toilet and for her medical expenses. Is it wrong if Son B denies her these services?
Comment: As SonofThought's answer alludes to, there is an enormous range of undisclosed variables which would likely impact on any useful answer to this question; so many in fact that any answer which attempts to provide you with a yes or no is likely to be insufficient in the absence of further detail. If by some chance this is a real-life scenario, professional counselling may be of great value, as might analysing the situation from a wellbeing perspective (in addition to/instead of a values-based lens).
Comment: A bunch of moral philosophies have been proposed through history. As such in philosophy "is this action moral" does not make a lot of sense. If questions are not formulated as "is it moral under this specific framework", all you are going to get is merely opinions.
Answer: Confucian ethics would say we owe our parents a debt we can never repay, and that to be respected ourselves we must have a culture of respect for those that preceded us (I argue Confucian thought emerged from a society with extra high costs to succession crisees here: Why is Confucianism considered a brilliant philosophical school of thought?). A Greek proverb says "A society grows great when old men plant trees in whose shade they shall never sit", and I think there is a human cognitive flaw around struggling to grasp the impacts of coumpound interest, in relation to repeated inheritance rather than just a single instance of inheritance.
There are various ethical frameworks to work from. I'd say you implicitly are suggesting a transactional ethic, that could be related to game-theory: son B is offering food so the mother owes a debt, son A is getting something -love- so owes something back to the mother.
Very few ethical systems support reasoning like that, even if there are realpolitik or evolutionary reasons to see game-theory selfishness as the stable equilibrium, the 'default'. Ethical theories usually try to support an unstable equilibrium of mutual benefit, eg parents offering unconditional love, and children being considerate of others rather than only thinking of themselves, as values that build a better society even when they oppose short-term personal interests. When we say someone is acting morally, and is a good person or to be admired, we generally have in mind they are raking on personal costs or problems for the benefit of others, putting wellbeing of others ahead of their own.
Stoicism is a perspective that seeks how (and why) to act well regardless of the behaviour of others, in order to cultivate inner qualities. In that perspective there is an opportunity for son B to cultivate 'being the better person', and so build inner freedom in choosing what kind of person to be, regardless of the others involved.
I think of intersubjective ethics as underlying a lot of moral reasoning, like Kant's Categorical Imperative, or Rawl's Theory of Justice. Discussed here: Is the Categorical Imperative Simply Bad Math? :) I would relate this not just to being the kind of person you want the world to have in it, but as pointing to the power and benefit of trying to put ourselves into the minds of others, as helping us move towards a stronger and more capable network.
Answer: Prima facie we will feel that the denial of services of Son B is right. But actually it depends on many factors.
To clarify this, let me ask these questions:

Why does the mother not love Son B?  Shouldn't there be a reason for this?
If Son B is richer than Son A, can anyone say that Son B's attitude (denial) is right?
Can we never say that her behaviour is to make Son B a better person?
If a son doubts his mother, will that doubt ever make him a good man?

So, IMHO, under normal circumstances, no mother should be denied these services.


Qt QFileDialog QSizePolicy of sidebar

Question: With a QFileDialog I'm trying to change the size of the side bar in a QFileDialog. I want it to have a larger width. I was looking at dir(QtGui.QFileDialog) which shows a plethora of functions/methods and dir(QtGui.QSizePolicy) which seemed like the right choice. I've not been able to manipulate the size of the side bar though.
<code>print 'sizePolicy: ',  self.sizePolicy()
urls = [ QtCore.QUrl("file:"), QtCore.QUrl("file:///usr/home/")]
self.fileBrowser.setSidebarUrls( urls )
</code>
Returns // sizePolicy:
It seems to average out the length of the names to create the width of the side bar. Anyone know a way around this? Size policy returns back a QSizePolicy object, but I don't know how to manipulate the side bar's size.
Thanks!
Comment: it does return a size policy but it has arrow brackets and got cut out of this post ;)
Answer: I would suggest using find_children and then maybe qobject_cast to get the sidebar object and the manipulate it directly.

Qt QFileDialog QSizePolicy of sidebar


How do I beat Rumble as Lee Sin at the top lane?

Question: I play a lot Lee Sin, unfortunately every single time I face a Rumble at top I lose to him.
So I was wondering, what can I do to beat Rumble?
Answer: I dont know how long you already play Lee Sin, or how recently you faced these Rumbles, but since Riot tried to make his Flamespitter more responsible (2Patches ago) it is OP. Before the Patch, the Flamespitter would hardly ever hit and therefore they gave him more dmg, but now, it always hits, and it does INSANE dmg. Its like really broken now.
So if you are only loosing to Rumble the past couple of weeks, you should just wait after the next patch, cause Riot already announced an nerf to his dmg. If you had problems before too, here are some general rules when playing against Rumble:

Max Shield. Always .Against anybody.
get an early hexdrinker
Try to shield away after he uses his flamespitter. It has a 2 sec cd after the duration is over, these 2 sec is the time where you can go aggressive
If he is bad he will probably overheat (unintentionally) while fighting, if he overheats wait till his flammespitter is gone (if active) and then attack the crap out of him.
Comment: Yep i would guess when he uses his flamespitter you shield away, when it ends you hit your Q and q again, and your aoe... then shield away again... rinse and repeat :p


Postfix: What does "If your machine is a mail server for its entire domain" indicate?

Question: Environment: Postfix 3.3, Centos 8, Digital Ocean Droplet
I'm reading the Postfix basic configuration readme and I came across a definition I don't fully understand.
Under the heading, What domains to receive mail for it goes over the mydestination parameter and includes this sentence,

IMPORTANT: If your machine is a mail server for its entire domain, you
  must list $mydomain as well.

I believe that warning is referring to this line in main.cf.  Below is the default value.
mydestination = $myhostname, localhost.$mydomain, localhost

Unfortunately I'm not exactly sure what that warning means.
On my server I have an NGINX reverse proxy, a Node.js Express server and the Postfix/Dovecot setup.
Question:  Because I only have a single mail server does that mean it covers my whole domain and I need to use $mydomain?  Or are they saying that because I also use the server as a web server the mail server doesn't represent the entire use of the domain and I shouldn't include $mydomain?  Does it mean something else?  I can't tell what they mean.
Answer: Not necessaryly, you can delegate a mail destinated to a subdomain to another server. For for instance: example.com use a diferente server than submain.example.com that's mean you are using two postfix server.
If you set:

mydestination = $myhostname, subdomain.$mydomain

You are saying "OK Accept mail destinate to "hostname" and subdomain.example.com
Edited: You can use a diferente public IPs for each postfix server or subdomain.


Partner Community Custom Button & Missing Activity

Question:
I hope someone can help me with this as I have explored all options I am aware of.
I have a custom app for quoting that we have used with no issues for years. Recently, we started a partner community pilot with an active partner.  Since migrating to partner community we are no longer able to quote using the custom buttons. All works fine in lightning, and classic, but not partner community.
I spent time with the developer who assured me it works on other partner sites with no issues. I talk to Salesforce and they are still reviewing but I need to solve this as soon as possible as the partner is unable to quote.
I even set up a custom button to go to a public URL www.google.com.  Works no problem in Lightening and Classic but just clicks and goes nowhere in partner community.
------------------------------------ In addition
Thank you Jayant, here are some additional details.
Initially I had the partner running on a full Salesforce license. No problems at all. Due to cost and another 14 partners coming on board, we moved to partner licenses. It has not been a good experience. Once we migrated, none of the activity history came over. So for the entire month of October, we are missing a large chunk of data.  I managed a "band-aid" by making the tasks "public", so they would show, but when clicking on email, it goes to an unknown URL.  Currently this is unresolved with Salesforce Level 3.
For the button issue, it maybe connected to above, I just don't know. Our set-up is pretty simple with only one custom object.
Our primary domain for all communities is https://mytaqtik.force.com/
Our first partner community is https://mytaqtik.force.com/mmv/
Nothing really special other than it is using the partner central template.  I tried creating another test community with a different template, but using same profile and same thing.
I then tried, creating a default partner profile with a new community template to see if that might work same thing.
Our primary application is the ability to create packages which basically bundle products together, so it bypasses the standard (add opportunity) products.
Not a complex setup, just the ability to manage opportunities, and quote is the primary requirements.
The partner has profiles:  MMV Admin, MMV partner.  The Admin just has access to a couple more objects.
We do not have person accounts, although we do run Salesforce for B2B, and B2C, we just have 2 record types, client and business.  This is primarily to show different fields based on client, or business.
I have read lots of documentation about inserting different scripts in the URL, but even a basic custom button called "test", with a URL to google.com does not do anything in partner community.
This works great in classic, or lightning, but click no action in partner community.
In talking to the developer, he assures me that they have no problems with any functionality in other partner communities, so cannot give any more guidance. I did contact Salesforce to open a ticket, and they keep coming back to they do not support custom buttons.  YES, I get that, but the button should still work on an external website like www.google.com as it is independent from the application.
The button appears in Quote line Items (as per screen shot).  You can see what the buttons look like, as well as the test button I created which is just a URL that points to google.
MISSING ACTIVITY - PARTNER COMMUNITY
On another case, awaiting level 3 support, the activity history disappears in partner portal.  It can be viewed no problem in Classic and lightening and is gone from partner lightening.  A short term solution was to make all tasks public, but when clicking on the email is went to unknown URL.  I am not sure if the two are related in some way.
When a partner goes to view all activity, it searches this string: https://mytaqtik.force.com/mmv/s/runtime_sales_activities/activityViewAll.app?parentRecordId=0061Q00000l1RvnQAE
Then goes to unknown URL...:(

I am not sure if that helps but open to any help from any expert.
Comment: It will be difficult to say anything unless there's a minimum implementation details provided, as how is the community implemented (the template), where on the community is the button and how is the button implemented. If you can provide some details around implementation, then someone should be able to provide some direction.
Answer: Example of original button code in Document Action:
/apex/rsdoc__GenerateDocument?id={!Lead.Id}&templateId=GDT-000004&attach=true&output=pdf&emailAction=autosend&emailTo={!Lead.Id}&emailTemplate=00X28000001SwGo
Example of how to change button code to work with Partner Community:
{!URLFOR($Site.Prefix + '/apex/rsdoc__GenerateDocument?id=' + Lead.Id + '&templateId=GDT-000004&attach=true&output=pdf&emailAction=autosend&emailTo=' + Lead.Id + '&emailTemplate=00X28000001SwGo')}


check whether user has liked the link or not in ios

Question:
I need to know whether user has already liked or not the link in Facebook.
  I am doing this thing for the first time and have to do it in short span of time so asking directly this question, I tried googling it but didn't get the satisfaction. Reply would be much appreciated. Thanks
Answer: To check whether user liked a post we need to get data form stream table instead of like table, please follow the below request
Request :
NSURL *requestURL = [NSURL URLWithString:@"https://graph.facebook.com/fql"];

NSMutableDictionary * params1 =
[NSMutableDictionary dictionaryWithObjectsAndKeys:
[NSString stringWithFormat:
@"SELECT likes FROM stream WHERE post_id = '%@'",
postID],@"q",facebookOfflineAccessToken,@"accessToken",nil];

In Response we will get Total count of likes and user_likes fileds
Response :
"user_likes" = 0 //for not liked,
"user_likes" = 1 //for like

Answer: I got the answer of my question at my own which is as below:
To check whether you have liked any url or not in Facebook first of all you need to get all the urls which you have liked in Facebook. To get the json data for the Liked urls I have called FB Graph api with following code :
NSString *url = [NSString stringWithFormat:@"https://graph.facebook.com/%@/og.likes?access_token=%@&limit=1000",fbUserID,fbUserToken];
You need to pass the user id for the user for which you want liked urls and their access token for the Facebook's current session.
This api call will return the json for the liked urls.
Do parse this json, you will get 'url' field from it. Store all this urls in one array.
Now search for the url for which you want to check whether it is liked one or not in this array.
That's it.. it has tackled out my problem.. hope it may help others too..


DC motor humming troubleshoot

Question: We are working on a robotics project employing a differential drive.We are facing problems with one of the motors .While one of the motor runs fine, the other motor humms and sometimes doesn't run when connected through L298n driver,but works fine when directly connected to a battery.Tried checking the driver and everything is fine with it when tested with the other motor.How can I solve this problem?
Thanks in advance
Motor specs- DC motor with encoder
12V , 1A ,rated torque- 7kg-cm, stall torque - 17kg-cm
Comment: What are the motor specs? How much current does it draw and what voltage does it drop when 'humming'? Does it still 'hum' when applying 100% PWM?
Comment: This may or may not apply depending on power rails and motor load current: https://electronics.stackexchange.com/questions/108686/what-h-bridge-drivers-are-preferred-for-applications-controlling-a-low-voltage-m
Comment: Any kind of motor control?
Comment: Yes, controlling it through arduino mega through pwm
Comment: So why do you think l298 is a problem?
Comment: Gregory , I think l298n is fine.
Comment: Bruce! I have updated the motor specs.
Comment: Andy thanks for the link,didn't know abt the voltage drop!.But the other motor with the same specs works fine when controlled through the driver.
Comment: You probably have a open coil, check continuity from the driver through the motor and back.
Answer: This type of problem (where you have two supposedly identical "channels" and one is working but the other is not working) is easy to solve when you have the equipment in your hands. Find the difference(s). There must be difference(s) between the two channels, otherwise their behaviour really would be identical!
It is worth noting that difference(s) might be hidden due to a faulty assumption. For example, in your case, you are assuming that the motors have identical specifications and so are identical. In fact, one motor might be different than the other e.g. mislabelled, faulty manufacturing, damaged by previous use, etc. So always check and list your assumptions.
Two approaches to find differences which are quite suitable for beginners include:

Move devices/modules, one at a time, from the "failing" channel to the "working" channel and test whether:
(a) the problem stays with the original "failing" channel (then the problem is not the component you moved to the other channel), or
(b) the problem moves with the component to the other channel (then the problem is related to the component which you moved, although it might not be the component itself, but connectors, wiring etc. that were related to the move).
One risk to this approach, is that by disturbing the electrical connections to move components between channels, you might change the problem, or it might disappear, without you knowing why (e.g. you might fix a high resistance connection when you move a wire).
Or:
Make relevant measurements between the two channels, to find where the difference is. In your case, this would include measurements with DMM and 'scope to see if the supposedly identical PWM signals being sent to drive the two motors really are identical, If not, then you can use additional measurements to narrow down whether the cause is hardware or software (PWM generation).
This approach has less risk of disturbing the cause of the problem than option 1 above (it is bad news if the problem "goes away" without you knowing why, because it could return in the future!) but it requires test equipment and ability to interpret the measurements.

Troubleshooting is not taught enough in many engineering courses. Learn fault-finding techniques at every opportunity and add them to your personal library for use later. Some good formal techniques are taught by Kepner-Tregoe and others. I have (over-)simplified their approach in my example above. Those simplified techniques would often not be appropriate in more complex cases.
An (unofficial) example of the Kepner-Tregoe "IS/IS NOT" approach is available here: http://www.itsmsolutions.com/newsletters/DITYvol6iss19.htm Although that is a software (IT) example, you can see how the possible causes are tested to see whether they match the problem description and other data.
Answer: i had the same problem.
Some info sheet of driver L298n says it can have a voltage input of 5-35V, so I connect 6 1.5 AA batteries to it. It humps but does not move.
Later I connect 10 1.5 AA Battery to it, and it works

DC motor humming troubleshoot


What do we need to do on our taxes if we are living separately but not legally separated?

Question: I'm married but we are living in different addresses in Toronto for the last 6 months. We are not legally separated and don't have a separation agreement.  What should we do when income tax period comes? Should we do separate taxes?
Comment: Before any Americans chime in with advice, please note that the tax rules for Canada regarding marriage are [*very* different](https://turbotax.intuit.ca/tax-resources/married-tax-payers/filing-coupled-income-tax-returns-tips-for-newlyweds.jsp) than the US.
Comment: My opinion is yes. Because you are not leaving together.
Answer: Here is the CRA's definition of "separated", taken from the back of their Marital Status Change Form (which you were supposed to send them after 90 days of living apart):

Separated – You are separated when you start living separate and apart
  from your spouse or common-law partner because of a breakdown in the
  relationship for a period of at least 90 days and you have not
  reconciled. Once you have been separated for 90 days (because of a
  breakdown in the relationship), the effective day of your separated
  status is the day you started living separate and apart.

So send in the form right away, and file your taxes with marital status of "Separated". In Canada everyone always does separate taxes, the only difference having a spouse makes to the filing process is whether or not you include their SIN and income on your return.


Generate a list of datetimes between an interval

Question: Given two datetimes (start_date and end_date), I'd like to generate a list of other datetimes between these two dates, the new datetimes being separated by a variable interval. e.g. every 4 days between 2011-10-10 and 2011-12-12 or every 8 hours between now and tomorrow 19p.m.
Maybe something roughly equivalent to the Dateperiod PHP class.
What would be the most efficient way to accomplish this in Python?
Answer: Use datetime.timedelta:
from datetime import date, datetime, timedelta

def perdelta(start, end, delta):
    curr = start
    while curr < end:
        yield curr
        curr += delta

>>> for result in perdelta(date(2011, 10, 10), date(2011, 12, 12), timedelta(days=4)):
...     print result
...
2011-10-10
2011-10-14
2011-10-18
2011-10-22
2011-10-26
2011-10-30
2011-11-03
2011-11-07
2011-11-11
2011-11-15
2011-11-19
2011-11-23
2011-11-27
2011-12-01
2011-12-05
2011-12-09

Works for both dates and datetime objects. Your second example:
>>> for result in perdelta(datetime.now(),
...         datetime.now().replace(hour=19) + timedelta(days=1),
...         timedelta(hours=8)):
...     print result
...
2012-05-21 17:25:47.668022
2012-05-22 01:25:47.668022
2012-05-22 09:25:47.668022
2012-05-22 17:25:47.668022

Comment: @TylerCrompton: "Explicit is better than implicit." What would be incremented in the range: days, seconds, microseconds, milliseconds, minutes, hours, or weeks?
Comment: @NoctisSkytower The step value would be a `timedelta` object.
Comment: That generator is the single most beautiful piece of Python code I have seen all day. Thank you!
Comment: Python should allow dates in `range`. It would only make sense. There's a reason it's weak typed...
Comment: Which would be required when using date objects.
Comment: Note that if your timedelta has units of hours or less, start and end must be datetimes. Using dates will cause an infinite loop.
Answer: Try this:
from datetime import datetime
from dateutil.relativedelta import relativedelta

def date_range(start_date, end_date, increment, period):
    result = []
    nxt = start_date
    delta = relativedelta(**{period:increment})
    while nxt <= end_date:
        result.append(nxt)
        nxt += delta
    return result

The example in the question, "every 8 hours between now and tomorrow 19:00" would be written like this:
start_date = datetime.now()
end_date = start_date + relativedelta(days=1)
end_date = end_date.replace(hour=19, minute=0, second=0, microsecond=0)
date_range(start_date, end_date, 8, 'hours')

Notice that the valid values for period are those defined for the relativedelta relative information, namely: 'years', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds', 'microseconds'.
My solution returns a list, as required in the question. If you don't need all the elements at once you can use generators, as in @MartijnPieters answer.
Answer: I really liked both answers by @Martijn Pieters and @Óscar López.
Let me suggest my combined solution between those two answers.
from datetime import date, datetime, timedelta

def datetime_range(start, end, delta):
    current = start
    if not isinstance(delta, timedelta):
        delta = timedelta(**delta)
    while current < end:
        yield current
        current += delta

start = datetime(2015,1,1)
end = datetime(2015,1,31)

#this unlocks the following interface:
for dt in datetime_range(start, end, {'days': 2, 'hours':12}):
    print dt
    print dt

2015-01-01 00:00:00
2015-01-03 12:00:00
2015-01-06 00:00:00
2015-01-08 12:00:00
2015-01-11 00:00:00
2015-01-13 12:00:00
2015-01-16 00:00:00
2015-01-18 12:00:00
2015-01-21 00:00:00
2015-01-23 12:00:00
2015-01-26 00:00:00
2015-01-28 12:00:00

Answer: The solutions suggested here work well for intervals of days, hours, etc. using timedelta, or anything that dateutil.relativedelta supports if you want to rely on third-party libraries. But I wanted to share my solution for the specific case of monthly intervals in the format yyyymm, asked here (but marked as a duplicate of this question).
def iterate_months(start_ym, end_ym):
    for ym in range(int(start_ym), int(end_ym) + 1):
        if ym % 100 > 12 or ym % 100 == 0:
            continue
        yield str(ym)

list(iterate_months('201710', '201803'))

Output:
['201710', '201711', '201712', '201801', '201802', '201803']

This solution is fairly specific to this particular need for yyyymm formatting (though it comes up frequently in my world, at least) and may not be the most efficient answer with the large number of continues, but has the advantages of being concise, easy to understand, and doesn't involve a number of libraries or date-conversion code.
Answer: All the solutions given here so far are specific to cases where start < stop, but you can easily adapt them to handle cases where stop < start using the operator module as the following code, adapted from @MartijnPieters's answer, illustrates.
import datetime
import operator

def time_range(start: datetime.datetime, stop, step: datetime.timedelta):
    "Imitate range function for datetimes instead of ints."
    sec = step.total_seconds()
    if sec == 0:
        raise ValueError("step must not be 0 seconds")
    if sec < 0:
        compare = operator.gt
    else:
        compare = operator.lt
    x = start
    while compare(x, stop):
        yield x
        x += step  # immutable


How to save a .txt file as .gpx

Question: This might be a little bit of a beginner question but I just can't find the answer to my problem.
I have a .gpx file with numerous gps location data. I want to edit the code directly (not with a program that writes changes for me). However when I make the changes in - for example notepad or wordpad - it is not possible to save the file as .gpx that can be recognised by software that require coded gpx data. Is there a way to edit .gpx file directly without losing its .gpx encoding?
Comment: Assuming you are on Windows try with notepad++ and respect the xml-structure of the gpx. See http://wiki.openstreetmap.org/wiki/How_to_edit_GPX_files_in_a_text_editor for more info.
Answer: Are you able to use QGIS? If so, here is a workaround which may work for you;

Load the .gpx file in QGIS (You should be able to drag-and-drop the file into Q). QGIS will ask you which features you want to load, highlight your chosen ones (eg. waypoints) and click 'OK'.
Now on the Layers panel in QGIS right-click on the new layer and choose 'Save As...' from the menu. In the first dropdown menu 'Format', select the option 'Comma Separated Value [CSV]'. Click 'Browse' and name your new .csv file in the folder you want. Make sure that your CRS projection is the one you want to use.
Open the .csv file in Excel. The first two columns are the X and Y coordinates of your points and you can now edit these manually.
Save your changes in .csv format.
In QGIS, import the .csv file following the steps detailed here. Briefly; navigate to Layers > Add Layer > Add Delimited Text Layer. Browse to your .csv file. click on the Comma Separated Value button, ensure the X field and Y field are correct. You can now see your waypoints.
To export the file as a .gpx, repeat the step above with right-click 'SaveAs...' on the .csv layer, but this time in the 'Format' menu choose 'GPS eXchange format [GPX]'. Again, highlight the features you want to save.

If you are going to be doing this sort of thing regularly, you might find it useful to look at the 'GPS Tools' plugin. Information about the GPS Tools plugin in can be found here
Hope this helps, good luck!
Answer: try using notepad ++, it is possible to change any data without changing the file format....

How to save a .txt file as .gpx


Google Sheets - searching combinations of cells for value maxes

Question: I'm trying to do some organizing for my characters in a video game I play. I'm not sure if/how I can do what I'm trying to do. Essentially, I'd like the "Max Crew Skills" cell range in the bottom-right of the attached picture to automatically update based on what I enter in the "Crew Skills" range. Hopefully the image below makes it clear. I hand-input the data as it is now but I'm wondering if there's a way to get it to dynamically update.
If, say, I fill in row 4 with new information (Skill 1 = "Armormech" and Level = "300") I'd like that to be reflected in the "Max Crew Skills" range. I can think about how one might do this manually (stack columns A+G+H, A+I+J, A+K+L together; sort by skill name and skill number; keep the combination with the highest number; print the skill/number/character name) but if I can get away with just some filters in columns P/Q that would be preferable.
Thanks!

Follow-up: I was able to accomplish this via a lot of manual manipulation on a second sheet. I'd still love to know if there's a cleaner solution! The sheet can be found here, feel free to take a look!
Answer: Please, see test sheet
Column O contains following formula
<code>=IFERROR(ARRAYFORMULA(
 QUERY(
  {$A$2:$A,$G$2:$H;
   $A$2:$A,$I$2:$J;
   $A$2:$A,$K$2:$L},
 "SELECT Col3, Col1
  WHERE Col1 IS NOT NULL
  AND Col2 ='"&N2&"'
  ORDER BY Col3 Desc
  LIMIT 1",0)),"No Character")
</code>
where we first combine all data into table form and then using QUERY() we return MAX level of skill and Character name based on Skill name in Column N


Backup YUMI Multiboot Kali Live USB

Question: I have a 128GB USB with YUMI Multiboot. I have a few Linux distro including Ubuntu and Mint. I also have AVG and Comodo and a few others. Most importantly, I have a Kali Linux Live USB with persistence. The persistence drive is separate around 80+GB. Mint has Casper-rw. Everything works fine. I have a question. I added a lot to the Kali Live with its persistence drive. I would like to backup just Kali. (Not the other Linux distros.) So how do I do that with Multiboot? I don't want the other distros (sdb) just Kali and sdb2 (persistence.) I read about the "dd" command on Linux. And "cat". But I can't back up just the Kali Live USB. "sdb" has all the multiboot Linux and tools. Not just Kali. And "dd" creates and ISO. Would it be 80+GB? That sounds wrong. I'd like to backup to an external HD 160GB. It has around 100GB free. It's NTFS and I don't think Kali can see it. Also, should I do this from inside the Kali Live or from my normal Windows 10? So how do I backup my Kali Live USB with its persistence drive? Please reply. Thanks
Answer: this question is in a way too ... simple? ... for this forum, and deviates from your other skills ... (kali, persistence, multiboot, ...)
besides that it's a quite special question, for a reliable answer one needs to have a very similar setup,

from / under which system do you want to make the backup, running kali? would be ok,

what sort of backup do you want, one-time? repeated? gandfather - father - son? evertime full? full with incrementals? full with differentials? raw-disk-data or file by file, you need a strategy,

you need some space where to put the backup, accessible by the system making the backup and!!! accessible in some way if your standard system fails, imho kali can mount ntfs, but will have problems storing appropriate file system permissions, thus a fs similar to the source is preferable, if you follow my thoughts twice the amount of source data is fine, preferably don't use the backup media for any other purpose,

find the data to back up, the kali live file wouldn't change, but note which you used, the yumi setup you can get from web, todo is 'persistence' and notes for the setup, as you already know persistence is on sdb2 you should be able to: - either find where it's mounted into the dir-tree, imho twice!, or - mount it yourself in an app. place, 'mount | grep sdb*' can be a friend,

i'd recommend rsync and a script near to 'Mike Rubels', see: http://www.mikerubel.org/computers/rsync_snapshots/

that's a good plan to do easy, quick, powerful! backups, and to do them often!, very fast and space saving for small files with some of them added or changed, also working well but with less advantages for big files with small changes every day (e.g. a 'maildir' account with 2GB of old data in old files and some small new files will backup in seconds by 'hardlinking' the old files, while a 'mbox' file which adds the new mails to one monster file which is changed and 'to archive' from that point on will take much more space and time),

reg. dd: nice tool if you want 1:1 copies of whole disks or partitions, careful, very sharp knife, writes absolutely what you defined without any check or warning, even every fault or crap!, triple-check before firing! wastes space backing devices not being full, but if a was you i'd make one copy of the actual stick and put it aside additional! to making regular backups,

i hope your persistence is encrypted? if not - do it after saving a backup, sticks get lost sometimes :-(

reg. experimenting with configs and getting kali un-bootable: i have quite good experience to access the persistence from another system, rename the folders there to something else (e.g. *_sav or *_def), boot kali 'as new', and put the info from the old folders back piece by piece ...

using sticks as targets: keep in mind that most of them are fast for small amounts of data, and much! slower for big data because they protect themself against heat-damage by 'thermal-throtteling', e.g. sandisk ultra-fit faster than 100 MB/sec for about 2 GB, but less than 20 MB/sec on the long run, fastest i know at the moment sandisk extreme pro (not! 'extreme go'), but very sensitive to mechanical kinking, use a short cable to attach them,

absolute must! everybody should know but nearly nobody cares for: a backup isn't a backup unless you:
a) did a compare run,
b) tested to be able to rebuild the whole system 'from scratch and backup',
consider either a complete fail or a complete theft, you need notes on everything. just had a case, mb with special bios with special settings for disk access, lost bios setup info, no chance to reconstruct disk setup, data is accessible, system recovery will take full raw data backup, and hours of trial and error ...

reg.
b.

Backup YUMI Multiboot Kali Live USB


Can you repeatedly heal from a knocked out creature with vampiric touch?

Question: Can you choose to just knock out an already knocked out creature when you use the melee spell attack from vampiric touch, and therefore repeatedly farm health from them?
Answer: No.
You can only render them unconscious when you "reduces a creature to 0 hit points". If you hit them when they are at 0hp you are not "reducing" them. You would score a critical hit, for which you would gain hp. After that the creature is either dead or has failed 2 death saving throws depending if they are a special NPC..
Comment: @AlexisWilke where exactly are you pulling that from? What constitutes "hit so hard it loses consciousness"? There are specific rules in 5e that state you can knock a creature out when you reduce it to 0 hit points so I'm really not sure what you mean.
Comment: Keep in mind too that this could come from the perspective of a DM having an NPC do this to another NPC or even a PC.
Comment: Knock out does not means the creatures drops to 0 hit point. Only that it's hit so hard that it loses consciousness.
Answer: Page 198 of the Player's Handbook reads:

Sometimes an attacker wants to incapacitate a foe, rather than deal a killing blow. When an attacker reduces a creature to 0 hit points with a melee attack, the attacker can knock the creature out. The attacker can make this choice the instant the damage is dealt. The creature falls unconscious and is stable.

You can definitely knock them out the first time with a Vampiric Touch. What I also read there though is the key phrase "reduces a creature to 0 hit points," because if you damage them again while they are unconscious in this way a few things happen, but most importantly you aren't dropping them to 0 hit points because they already were there.
Now let's look at a similar situation that I have thought about: A Vampire's Bite attack deals some piercing damage as well as some necrotic damage, and reduces the victim's maximum hit points equal to the amount of necrotic damage, and so on and so forth to creating a vampire spawn. What I had wondered at the time was How the heck can a Vampire produce Vampire spawn when they would just kill the victim?
The answer I concluded by myself was that they would do exactly what you are asking about doing: leaving the victim alive by only leaving them unconscious and not killing them whilst drinking their blood and dropping the victim's hit point maximum to 0 with the Necrotic damage.
So my answer is this: As it reads, it looks like you cannot repeatedly farm hit points from a creature you knocked out. However, making sense because of an interesting coincidence with actual vampires you probably could do that.
Comment: Just in case any DMs have to deal with players using rule-lawyering to farm health from an actual vampire in the near future, you can also rule that you can't gain health from an undead foe.


Ceiling fan light fixture circuit breaks after power applied

Question: Our ceiling fan light fixtures clicks and stops providing power to the bulbs after about 30 seconds, regardless of whether the chain switch is passing power to the bulbs or not. It has a separate light switch in the wall and when we flip it on about 30 seconds will pass until the fixture clicks and stops sending power to the bulbs. This occurs regardless of whether the pull chain is passing power to the bulbs or not. I don't see any obvious circuit breakers in the fixture and am unsure where the faulty breaker is. There is an audible click whenever it shuts off. Would this be repairable or should we look at replacing the whole fan?
Comment: Have you changed the bulb(s) in this fixture recently - perhaps to one(s) more powerful?
Comment: We have tried several bulbs including traditional and led
Comment: @ChristopherDiaz-Rose -- what were the total wattages of the bulbsets you tried?
Comment: Originals were 25 watt bulbs (same as the other fans in the house) but the current bulbs are 5w LED
Answer: Sounds like a faulty power limiter
Code / UL White Book require that fans have a current-limiting electronic device on any socketed lights.  The purpose is to keep people from "over-lamping" or using larger bulbs than the fixture is able to handle (thus overheating, starting fire etc.).    It sounds like that device is malfunctioning.
Code requires it be there, and spares are readily available.


Enumerate $n$ such that $GCD(n, 3(n-1)) = 3$.

Question: Is there a way to enumerate all $n$ such that $GCD(n, 3(n-1)) = 3$. I am able to see that $n$ must be of the form $3(3k+1)$ or $3(3k+2)$, but I cannot go much further.
Comment: I don't know if this works but suppose a prime $p \neq 3$ divides both $n$ and $3(n - 1).$ $p \mid 3(n - 1) \implies p \mid (n - 1).$ Hence, $p$ is a common factor for both $n$ and $n - 1.$ But $n$ and $n - 1$ are always coprime. Hence, it follows that for $n$ multiple of 3, this holds.
Answer: Its simple $n$ must be divisible by 3.
Or specifically $3|n \Rightarrow 3k=n$.
Proof: $(n, 3(n-1))=3 \Rightarrow 3|n\land3|3*(n-1)$ . Now if $3|n$ then $3\nmid(n-1),\because (n,(n-1))=1$[this can be proofed by using the properties of divisibility].
So when  $3|3(n-1)$, then $3\nmid n-1$ and $$\therefore n=3k,$$ where,       $\enspace k\in\ \mathbb{Z}$.
Answer: This isn't really an elementary answer. I did it this way just to see if I could do it this way. The idea is that, if integers $u$ and $v$ can be found such that $ua + vb = 1$, then $\gcd(a,b) = 1$.
If $n = 3k$, then $\gcd(n, 3(n-1)) = \gcd(3k, 3(3k-1)) = 3\gcd(k, 3k-1) = 3$
since $\color{red}{(3k-1)} - 3\color{red}k = 1$ implies $\gcd(k, 3k-1) = 1$.
If $n = 3k+1$, then $\gcd(n, 3(n-1)) = \gcd(3k+1, 9k)=1$
since  $k(\color{red}{9k}) - (3k-1)\color{red}{(3k+ 1)} = 1$
If $n = 3k+2$, then  $\gcd(n, 3(n-1)) = \gcd(3k+2, 9k+3)=1$
since $(5 k +3)\color{red}{(9 k + 3)} - (15 k + 4)\color{red}{(3 k + 2)}= 1$.
OK. So here is the elementary proof.
Suppose that $n$ and $3(n-1)$ are not relatively prime to each other.
Then there exists a prime number, $p$,  that is common divisor of $n$ and $3(n-1)$.
So $p \mid n$ and  either $p=3$ or $p \mid (n-1)$.
If $p \mid (n-1)$ then $p \not \mid n$. Hence $p=3$
If $p=3$, then $3 \mid n$.
Answer: Euclid's algorithm gives you that the GCD is equal to $\mathrm{gcd}(n, n-3)$, which is (by Euclid again) $\mathrm{gcd}(3, n-3)$, which is (by a backwards step of Euclid) $\mathrm{gcd}(3, n)$.
Now if $p$ is prime, we have $\mathrm{gcd}(p, n) = p$ if $p \mid n$, and $1$ otherwise.


Whether scatter can be used to replace web3?

Question: Whether I can use scatter instead of web3 metamask? In this way I do not need to add the metamask add on on my browser? And I can run the dapp on mobile for scatter because metamask does not support mobile?
Answer: web3 does not require MetaMask. Web3 can be used with any web browser, as long as you have a node that exposes Web3 API  (over http RPC or WebSocket).
Example : https://coursetro.com/posts/code/99/Interacting-with-a-Smart-Contract-through-Web3.js-%28Tutorial%29
Alternatively, you can get a free API endpoint from https://infura.io/


Adding more RAM at different speeds? Will it impact performance as much as to make it worse than without adding it?

Question: I got a new laptop with 4GBs of ram, expandable to 8GBs. It has 1 4GB stick DDR3 PC3-12800 at 1600Mhz. I can't seem to find another one exactly the same locally, the closest I've found is 1 4GB stick DDR3 PC3-10600 at 1333Mhz. So my question is, I know they will both run at the slowest speed, so even if I have more available RAM it will become slower. Is the performance loss big enough to make the upgrade not worth the hassle?
Comment: It would help a lot to know what laptop. For example, if the laptop tops out at 1333MHz anyway, then that makes a difference.
Comment: It's an HP g7-2235, I'm asumming the max speed is 1600Mhz since that's what came in the machine.
Answer: If the RAM you buy will be compatible, your laptop will run considerably faster.
I bought my laptop with initially 4GB of RAM 1600 MHz, and added 4 more (same frequency). Those 4GB make a big difference when running several applications. Even with the lower frequency the speed will be increased considerably.
The frequency does not make such a big difference.
Answer: If your laptop currently accesses the memory at its maximum speed (800MHz for default for DDR3 PC3-12800) and you add additional memory at a slower maximum speed then:

Both SoDIMMs will run at the least common dominator.
Benchmarked speed for RAM access will drop
Actual OS performance will increase as long as your OS can access all the memory. (E.g. no 32 bit windows and more than 4GB RAM).
Answer: I would not make the upgrade. Make sure that the RAM modules have the same cas latency, timings and recommended voltage.
If they don't there is a possibility that your computer won't work at all. Or your computer will just slow down the faster RAM modules to equal the frequency of the slowest.
Here's a posting that may explain a little bit about it.
http://www.lifehacker.com.au/2010/07/what-are-the-rules-on-mixing-two-different-types-of-ram/


How do we do Daw'ah to Jungle Tribal people to cover up?

Question: The people who live in the jungle don't wear much just something around their privates and the women are usually topless! If one is preaching Islam to them how do we tell them to cover up more? (You can reword my question - I'm sure it can be improved)
Answer: Assuming that the dawa crew has the Islamic clorhing to supply the tribe since you cannot ask them to wear clothing that is not available :
The first step would be to isolate the men from the women in public areas until they accept Islamic dress.
The sisters will teach the women by example, and the brothers the men.
Changing lifestyle, especially clothing is difficult.  It can only be done if the faith is strong.  Fortunately all Islamic rules are practical for the dunya as well.  The hijab protects against skin cancer, and white hijab can help keep cool.  This is in addition to assisting the men in lowering their gaze and fostering a society where it is easy to perform worship and taqwa.
Comment: hijab protection of skin cancer seems mostly as a statement, do you have backup of this claim? since hair too could be protection. And with this argument one should then force men to wear a turban to get protected from skin cancer, and that isn't the case.


How might I display a web page in a window with a transparent background using C#?

Question: How can I show a web page in a transparent window and have the white part of the web page also transparent.
Answer: If you're using a Browser control, there may be a property in it to change the background color to Transparent or to use Alpha channel layering. I'm not entirely sure how effective this would be, but it's worth a try.
Another thing to consider would be to create a small parser for the web page's HTML you're trying to view, and with that you could modify the style sheet or something to change the background color. I'm not sure you could make the page transparent doing this, however. That's all off the top of my head.
Answer: The BackColor property has an alpha property, which is the same as opacity.  If it's pure html, there should be an opacity property or style.


Is binary hypothesis testing a better statistical term than A/B testing?

Question: Is binary hypothesis testing a better statistical term for what business intelligence often refers to as A/B testing? Wikipedia suggests that this is the term used withing the statistics community but Wikipedia is unreliable and there is no tag for such a term here. Since the statistical comparison of multi-grouped randomized experiments predates the term A/B test and the field of business intelligence I would suspect there to be a term. Is it simply "binary hypothesis testing" as suggested by wikipedia? Some historical context would also be appreciated.
Answer: The Wikipedia article has accurate information about A/B testing; binary hypothesis testing is another name for A/B testing.  A/B testing and split testing are the most widely accepted terms in the business and marketing community.  The exact origins of A/B testing are not well known but can be traced back to Google during the turn of the millennium.  "Google engineers ran their first A/B test at the turn of the millennium to determine the optimum number of results to display on a search engine results page."
Comment: OK so I will use "binary hypothesis testing" if I want to be esoteric. It seems marketers have been doing "split testing" long before "A/B testing" was coined by google. The first such test I can find however was when William Sealy Gosset invented the t-test in 1908 for the Guinness brewery to compare beer. Would be interested if anybody can find something that predates this but it is rather poetic if it all started with beer.
Comment: opps seems Wikipedia was wrong. It has been updated.
Answer: "Binary hypothesis testing" is hypothesis testing when one wants to decide between two hypotheses.
"Two-sample hypothesis testing" is what is known colloquially as A/B testing.
"Paired hypothesis testing" when you compare the same sample before and after an event to find if it had an effect. Similar to A/B testing but not A/B testing.
Answer: I agree with the other very good answers. I think, it is mostly engineering backgrounds that prefer the term A/B test and the last years it has become a quite hot term especially within the context of web sites optimisation.
Have in mind that except A/B test you may encounter these terms:

A/B/C tests where you assess a control cohort against 2 alternative cohorts.
A/A tests where you empirically assess the quality and robustness of the statistical test against Type-I errors (the test should return that there's no difference in cohorts).


Libre Office Writer crashes when merging table cells

Question: This time I know for sure: I created a new document, a table, added some data in the table cells, but I want to merge 2 cells on a column.
I can merge 2 cells on a column, but if I want to merge the next 2 cells from the next column, Writer crashes.
I chose not to recover, I open my document and I can do a single merge, cause at the next merge of the cells, Writer crashes again. And so on.
Does someone else has this problem too?
Comment: Writer is 6.0.3, Linux Mint Cinammon x64.
I use an ODT document created in this version of Writer.
The table is created in Writer, no MS Word data copied in this document.
Comment: Cross-posted to https://ask.libreoffice.org/en/question/152800/libre-office-writer-crashes-when-merging-table-cells/.
Comment: @JimK, that site isn't part of the SE network, they just borrowed the concept.  There's no issue cross-posting to non-SE sites.  But thanks for posting the link; it may come in handy on future LO questions.  Additional resources are always good.  :-)
Answer: Cannot reproduce.  You may want to edit the question to give more precise instructions.  But it shouldn't crash, so it sounds like there's something wrong.
According to the website, version 6.0.3 is for the "technology enthusiast, early adopter or power user".  To me, that means, Expect bugs.  Personally, I would wait for a more stable version before reporting such a bug.
However, the developers may find it helpful if you report potential bugs that have not been reported yet.  https://wiki.documentfoundation.org/QA/BugReport.


Get rid of canned messages for closings

Question: When a question is closed, such as when it's not a real question, there are 5 possible things you could have done wrong. Why don't we get rid of the canned messages and have the users/mods actually type why. Maybe it will force them to see some questions shouldn't be closed, because they can't write out why.
Comment: Related: [Help us make "Not Constructive" and "Not a Real Question" closures more effective](http://meta.stackexchange.com/q/171732/182513)
Comment: "5 possible things" and "5 possible broad categories of things" aren't the same.
Comment: I completely agree. A user does not necessarily know why his question is closed with the canned responses.
Comment: Ouch. Just Ouch. While I get the difference of voting on meta/main site, I was question banned for asking this question.
Answer:
Maybe it will force them to see some questions shouldn't be closed, because they can't write out why.

Well, that's one possible outcome.
The other, rather more likely outcome involves folks writing exactly why they're closing. Without any of the polite and occasionally euphemistic phrasing present in the canned messages.
I don't think that would make anything better.
We're currently working on implementing some of the ideas discussed here - part of that will probably involve asking folks for clarification when none of the predefined options for closing fit the situation. If so, that'll be in addition to the canned messages... Not in their place.
Answer: I used to think this way.
I used to be frustrated when questions were closed with no real explanation and only downvotes and close votes.
Then I got enough rep on a StackExchange site to start closing questions.
Then I stuck around for months longer, closing questions as necessary and trying to help users improve their questions.
Then I realized many questions were posted with no regard to FAQs and no effort to make the life of those answering them easier.
Then I started to get better at identifying these questions based on style.
Then I started to get somewhat weary of trying endlessly to get people to make their questions better only to see people not try nor care.
Now, I see why people cast close or downvotes or delete votes without making a huge effort to post comments on every single question fitting the "no effort" category.
Answer: Questions aren't closed by mods. They are closed by 5 people with over 3000 reputation. (They can also be closed by a mod, but this is not as common.)
How would you decide whose message to use?
Also, this is a lot more effort and would take a lot longer. Less people would close, and that would be bad because more low quality stuff would stay open.
Furthermore, the canned comments explain pretty well why the question was closed. One may always type out an extra explanation in the comments, too.
If the OP is confused about why the question was closed, they can ask in the comments or @-tag one of the closers. If everything else fails, you can always ask on meta with the tag specific-question.
Comment: It would take longer, but if a) someone had to tell you why or b) clicked a button, it would be much easier to just whizz through the question
Comment: Small note: @-comments won't notify a close voter unless he has a diamond. [How do comment replies work?](http://meta.stackexchange.com/a/43020)
Comment: @Josh you could find one of the user's posts and comment on that

Get rid of canned messages for closings