Memory usage PHP peak=40.25 MB -- too much for a single request?

Question: I am developing a multilingual - multidomain site ( using i18n and Domain Access and several extra modules - CTools, Colorbox, etc. ). I have installed Devel because I thought the site was very memory consuming. I have seen peaks of PHP peak=40.25 MB in many of the pages. Is that too much? What happens if there are many concurrent users? Will the 128 PHP memory limit be able to handle many requests, will it use hard-drive memory instead of RAM ?
Comment: Please include a question in the title of your question. :)
Comment: @Cesar No problem there. Drupal Commerce is known to use much more at times, and doing module upgrades can really push it to the limit. A good caching strategy can help.
Answer: The memory limit setting (often 128MB) is per process, so you're only using around third of it. If a single request needs more than 128MB of memory, it will fail. This doesn't appear likely in your case.

What happens if there are many concurrent users?

That depends on your total amount of RAM. You can in theory handle up RAM / 128 MB users.
If you have 15 concurrent users, each using 40MB, and you have 512 MB, then you'll go over that limit, because 40 * 15 = 600.
The normal configuration is then to use the hard-drive, often called swapping. This normally means the death of all performance, and should always be avoided, to the level where it's better to out right reject more incoming connections.
Comment: Thanks for the reply but I find difficult to reconcile this: "you're only using around third of it" with "If you go over that limit [...]  should always be avoided", so I only understand that if I am expecting many concurrent users, I should allow for several Gigabytes of physical RAM. Is it right?
Comment: @Cesar I'm not sure what precisely you can't reconcile, but I updated the answer a bit, more clear now?
Comment: Yes, I realized later that it was clear from your original reply, but in this way it is better exposed, thanks for the update.


How can I create a recurring event that spans multiple days in a Sharepoint 2010 calendar?

Question: I am currently using a workaround where I create recurring events for each of the separate days in the event, but I would like to just create one recurring event that spans over 7 days. As is, the events show a separate visual block for each day, creating more visual noise than is desired.
Answer: You can't.
Recurring events that span multiple days are not supported in SharePoint 2010 Calendars.
To test I tried creating one with a SharePoint 2010 Calendar connected to Outlook 2010. On an Exchange Calendar in Outlook, I can create this type of recurring event. When performing the same creation activity on a Sharepoint calendar I received the following message:

The recurrence pattern you selected for the current appointment is not
  supported by SharePoint. Select another pattern or remove the
  recurrence.
Comment: Note that no subsequent version of SharePoint supports this, either. Even in SharePoint Online this is not possible.
Answer: Here is another (tedious) workaround:

Create your event
Check Recurrence

Set your pattern

Set Start Time to the first day's start time
Set End Time to the last day's end time
Save the event series
For each event in the series:

Click the event, click Edit Item
Change End Time date to last day for that event's recurrence
Click Save

This will create all the events in the series so they are manageable from a single event and change the events to better reflect its' time span.
NOTE: If you Edit Series after editing each item, those changes will not be reflected in each event. But you can Delete the entire series.
At least this way, you don't have to create a series for each day in the recurring event (managing separate series is annoying) and it gives the single bar look. A major drawback is if you have a lot of events to manually adjust.
I use this method to create a lot of similar events, but they span multiple days and they don't exactly fit the pattern set (e.g. Every 3rd Thurs except some months it needs to be the 2nd Thurs).
Comment: Might as well just create each item individually if you have to go back and touch each one to correct it, anyway. For creating something like an on-call calendar (which we can't do in Exchange because of issues due to ownership and employee turnover), this will be very tedious either way.


What are the advantages and disadvantages to doing higher rep squats?

Question: It seems like most routines call for sets of 5 reps. Is the 8-12 rep set completely dated or does it still have a place?
Answer: Personally, I think doing many reps of squats is so tough on your general endurance that the endurance will be the limiting factor, not muscle strength in the muscles I want to target, it will also make you much more tired during the rest of the workout, which is bad if it's part of a whole-body workout.
Also, deadlifts, and to some extent, squats, are so critical to get right form-wise that many people keep the reps low to be able to get push themselves strength wise while maintaining good form and not injure themselves.
Third, programs like starting strength that mimic powerlifting are "in" right now. People want functional strength, not those body building muscles that obviously aren't functional at all... ;)
Comment: I would disagree with your comment that "body building muscles that obviously aren't functional at all...".  Even though some body builders indulge in steroids, they still must work hard in the gym.  Their resulting strength is just as 'functional' as those on "starting strength".
Comment: @rrirower, isolation exercises, at least in the case of the legs, are a lot less effective at increasing functional metrics, such as vertical jump and 40yd sprint time. Leg extensions/presses will make you really good at leg extensions/presses, but not much else, from what I've read.
Comment: Sorry rriower, I was being sarcastic, sometimes that's not so obvious in text :)
Answer: The general answer towards rep ranges has been written about previously, and it's fairly proven.
But since you're asking about squats in particular, I'd offer this up:

The Madcow 5x5 (non Olympic lift version of the Bill Starr 5x5) program has a set of eight reps to finish up the intensity day. So even on classic "5x5" programs, you'll still run into reps higher than that.
I find the higher rep ranges good for warmups and fiddling with your form. At your 5RM (the most you can lift five times), you really shouldn't be noodling around playing with your form. At ~10 reps, the weight is light enough that you can adjust some things and think about more than total concentration.
In one of his books Mark Rippetoe talks about doing 20 rep squat sets, and they are indeed brutal. I don't know if there's a place for them if you're on a dialed in training program, but it's something I toss in every now and again just to remind myself what they feel like.

My fundamental disagreement with hypertrophy training is that by going for strength your not going to end up being "small" and benching 400 pounds while pulling 600 off the floor, and squatting 500 on your back. Plus, the path to such strength gains is in the wake of professional athletes. This is in contrast to the rather steroided/injured/chemistry experiment that makes up most body building.
In no way am I implying that every bodybuilder is on gear with torn rotators, but you don't hear about a lot of strength athletes dying in their early 20's in a Thai bath house. You can be a natural and safe body builder, but the gyms of the world are littered with broken connective tissue and substance abuse from the pursuit of "aesthetics".
Comment: The last part of you answer is a little bit of a rant not related to the question.
Comment: @TimothyPuffer It's rant-ish, but nested in with the type of person who's typically doing high reps.


Non isomorphic smooth cubic surfaces?

Question: Smooth cubic surfaces are known to have many wonderful properties in common. However, this means I cannot easily show any two to be non isomorphic. Presumably there are non isomorphic (over C) pairs of smooth cubic surfaces... Can someone exhibit a pair with proof?
Comment: Pick $6$ points in general position on $\mathbb P^2$. The blow-up in these six points is a smooth cubic surface. Now, let $P_1,\ldots,P_6$ be six points in general position and let $Q_1,\ldots, Q_6$ be six points in general position. Under which condition on the points are the associated cubic surfaces isomorphic?
Comment: The fact that there exist non-isomorphic smooth cubic surfaces can also be seen via a moduli count. Let $H$ be the space of homogeneous polynomials in four variables of degree 3. (What is its dimension?) This comes equipped with an action of $GL_4$ (which is of dimension $16$). The dimension of the moduli space of smooth cubic surfaces is therefore $\dim H - 16$.
Comment: @AriyanJavanpeykar I was asking myself the first question, but couldn't see anything. Do you have a hint? Also, for the moduli count, is it clear that isomorphic smooth cubics must be projectively equivalent?
Comment: @AriyanJavanpeykar I mean, what I can say is that there is an automorphism carrying the first four of one to the first four of the other. So we in general have a space that is 4 dimensional. It's not clear to me that an isomorphism between the surfaces will descend to an isomorphism between the arrangements of points on the plane after blowing... though perhaps that follows? Will think... if so then that proves it.
Answer: This is just an expansion on one of Ariyan's suggestions above.
We can indeed show that cubic surfaces up to isomorphism form a 4-dimensional family just by counting moduli. The tricky point is precisely what the OP asked in comments: why must an isomorphism of cubic surface come from a projective equivalence? Let me answer that.
Every smooth cubic surface $S$ is anticanonically embeddeded in $\mathbf P^3$, meaning that $O_{\mathbf P^3}(1)_{\vert S} = -K_S$.
Moroever, since the codimension is 1, this embedding is linearly normal, meaning that that the restriction map $H^0(\mathbf P^3, O(1)) \rightarrow H^0(S,-K_S)$ is an isomorphism.
An isomorphism $S \cong S'$ of two cubic surfaces will induce an isomorphism $$H^0(S,-K_S) \cong H^0(S',-K_{S'}),$$ hence an automorphism of $H^0 (\mathbf P^3,O(1))$, and hence a projective equivalence of
$$ \mathbf P^3 = \mathbf P \left( H^0 (\mathbf P^3,O(1))^\ast \right).$$
Keeping tabs on the various maps, we see that this projective equivalence induces exactly  the original isomorphism between $S$ and $S'$.
Remark: notice that this proof doesn't use the description of cubic surfaces as blowups of $\mathbf P^2$.
Comment: It's clear to me why $H^0(P^3, O(1)) \to H^0(S, -K_S)$ is injective ($S$ is contained in no hyperplane), but its not clear why it is surjective - I don't know how to compute its dimension. Can you suggest an approach? I think the rest is fairly clear -- I think is the same reasoning that shows isomorphic elliptic curves are projectively equivalent.
Comment: Surjectivity comes from the long exact sequence associated to the short exact sequence $O(-S) \otimes O(1) \rightarrow O(1) \rightarrow O(1)_{\vert S}$. This is the ideal sheaf sequence associated to $S$, twisted by $O(1)$.
Comment: @AreaMan I think you might find it to be an interesting exercise to show that the group of projective automorphisms of a smooth hypersurface $X$ of degree $d\geq 3$ in $\mathbb P^n$  ($n>2$) is in fact equal to the group of automorphisms of $X$, if we assume $(d,n)\neq  (4,2)$.

Non isomorphic smooth cubic surfaces?


How do i create a new account in Draw Something Free?

Question: I really want to play Draw Something, but i need an account. There is no such button as "create account" or anything like that in the home-screen  when i enter the app.
Answer: You just log in with Google Play. It should automatically log you in if you have Google Play Games account. You can find out how and why it works here:
https://support.google.com/googleplay/answer/2954594?hl=en
If you already have the account, try reinstalling and accept the screen to login with Google Play.
Answer: Put your email in but not username press log in it will say password tap on the little forgot my password and it will send an email to you with your password in blue letters hope this helped


Bernoulli numbers in the general series-expansion formula for sums of powers?

Question: We know the series-expansion for these "sum of powers":
$$\sum_{i=0}^n i = \frac{n(n+1)}{2} = \frac{1}{2}n^2+\frac{1}{2}n$$
$$\sum_{i=0}^n i^2 = \frac{n(n+1)(n+2)}{6} = \frac{1}{3}n^3+\frac{1}{2}n^2+\frac{1}{6}n$$
$$\sum_{i=0}^n i^3 = \frac{n^2(n+1)^2}{4} = \frac{1}{4}n^4+\frac{1}{2}n^3+\frac{1}{4}n^2$$
$$...$$
But can we come up with a general formula?
$\sum_{i=0}^n i^P =$ "Compact form" = "Series form"
Using Mathematica, I generated sums of higher powers to look for overall patterns in the coefficients and the polynomials. I could not find anything significant in the "compact form" but I found several in the "series form." Take a look:
Series expansion formula for sum of powers from P=1 to P=15 ;; Coefficients only
So what I found was that the "sum of powers" formula has this general equation $S(n)=An^{P+1}+Bn^P+Cn^{P-1}+Dn^{P-2}+...+En $. If we include the fact that some of the coefficients are $0$, then there are $P+1$ terms in this polynomial equation. I was tackling this problem with the assumption that $P$ was a natural number but it turns out that this general equation is valid for any real number $P$. Also, the general series expansion formula is equivalent to the series expansion for the generalized harmonic number (https://en.wikipedia.org/wiki/Harmonic_number).
Anyway, here are the patterns I found in the coefficients:
$$A = \frac{1}{P+1}, B=\frac{1}{2}, C=\frac{P}{12} $$
$D=0$ and every second letter after D is $0$.
$$E=\frac{-P(P-1)(P-2)}{720}, G=\frac{P(P-1)(P-2)(P-3)(P-4)}{720},$$ $$I=\frac{-P(P-1)(P-2)(P-3)(P-4)(P-5)(P-6)}{1209600},...$$
And so on. It appears that for every coefficient letter, this is the numerator: $$\frac{P!(-1)^{0.5k+1.5}}{(P-k)!}$$ where k is the $k^{th}$ letter after B with k starting at 1 (and k is odd in this formula since every second letter after D is $0$). But where does the denominator come from? If you examine more coefficient letters, the denominator seems to be growing exponentially (factorial?), but that is all I could find. $$$$
Update! I later found the generalized formula here: https://en.wikipedia.org/wiki/Faulhaber%27s_formula. This is what the denominator equals:
$$\frac{(k+1)!}{|B(k+1)|}$$ Amazing how the Bernoulli numbers belong in this formula. That explains the alternating sums and the coefficients of $0$. So here is the complete equation:
$$\sum_{i=0}^n i^P =\frac{1}{P+1}n^{P+1}+\frac{1}{2}n^P+\sum_{k=1}^{P-1} \frac{B(k+1)P!}{(P-k)!(k+1)!}n^{P-k}$$
This can be further condensed, assuming $B(1)=+\frac{1}{2}$:
$$\sum_{i=0}^n i^P =\sum_{k=-1}^{P-1} \frac{B(k+1)P!}{(P-k)!(k+1)!}n^{P-k}$$
Interesting. The equation kind of resembles the binomial expansion formula (https://en.wikipedia.org/wiki/Binomial_theorem). But why do the Bernoulli numbers appear in this formula? I looked at several sites (https://en.wikipedia.org/wiki/Bernoulli_number, http://math.ucr.edu/~res/math153/s12/bernoulli-numbers.pdf, https://ncatlab.org/nlab/show/Bernoulli+number), but the explanations are not intuitive. From what I see it, "they just do" but I do not understand why. Let me know if there are any mistakes with my equations or if there is anything I am missing.
Answer: Consider the identity $$1+e^{x} +e^{2x}+\ldots+e^{nx}=\frac{e^{(n+1)x}-1}{e^x-1}=
\frac{e^{(n+1)x}-1}{x}\frac{x}{e^x-1}$$ for power series and note that $$\frac{x}{e^x-1}=\sum_{k=0}^\infty\frac{B_k}{k!}x^k.$$


What's the best way to attack a base full of mortars and AA sites?

Question: How should I attack a base full of mortars and AA sites?  This means any VTOLs won't be a solution to attacking the base.
Answer: Have you tried designing fast Long range units (like Mortars) so that you can do hit an run tactics while using VTOL to cover them, that way when the enemy mortars fire back you can pull your strike team back quickly.
ofcause you may still loose some in the retreat since adding Mortars will slow your units down and compensating them with lighter bodies or faster treads/wheels will give them less HP than a probably designed Mortar Platform like unit (using the best body and treds/wheels but making it slow as hell)


C# Project Management with Maven

Question: Anyone had experience of managing C# based projects with Maven?
If yes , please tell me a few words about it , how weird would it be to create such a setup.
Thanks
Answer: Maven is language agnostic and it should be possible to use it with other languages than Java, including C#. For example, the Maven Compiler Plugin can be configured to use the csharp compiler. There is also a .NET Maven plugin and there was a maven-csharp on javaforge.com (seems dead).
But Java is  getting most attention and man power and there is not much done with other languages. So, while using Maven with C# is in theory possible, I wouldn't expect much support and feedback from the community (i.e. in case of problem, you'll be  alone). I don't know if using Maven for C# would thus be a good idea. I wouldn't recommend it actually (I may be wrong of course).
Answer: I work with a suite of C# and C++ components and applications that are dependency-managed via maven. The general rule of "If it can be done via command-line, it can be done in maven" holds, so we end up having a lot of .bat, .exe and powershell "glue" to get all the pieces playing together.
The biggest problem with using maven for a Microsoft stack is a complete lack of familiarity with the build/deployment/ALM cycle for ANY new developer. You can find many developers with MSBuild, TFSBuild, ANT, etc., experience, but it's a rare thing to find a C# or C++ dev who's worked with maven in a pure Microsoft shop. The rollout of maven for dependency management and build process is consequently extremely difficult, since you end up spending a LOT of time training developers (what's the difference between a snapshot and a release?), over-componentizing the product then scaling it back to get it right, etc.
I've also found that we've had to work around maven to do something resembling continuous integration and continuous delivery. About 70% of our technology stack is C# (the rest being C++), and we want to deploy most of that to QA servers every single night with the latest-and-greatest code by default. To balance the value of release builds vs. dev productivity via snapshots, we ended up constructing a build process where we create a release build of every component each night, followed by a snapshot build. This let the developers not have to worry about bumping POMs to consume snapshots in the morning. Overall, it's a royal pain, at least for someone coming from robust continuous integration, "build and deploy everything" environments.
Maven holds a lot of promise for dependency management and isolating breaking changes (particularly in interface components where the consumer and producer have to agree). Those problems have been solved other ways (svn externs, deployment builds, interface version management, etc.). But it is relatively nice to download any component, run "mvn compile", and see the code compile (assuming a basic level of build portability). For me, though, the overhead and the meta-conversations about getting the build right (as opposed to focusing on customer value) minimize the value of maven overall.
Answer: For .NET Core, you can use the dotnet-maven-plugin which drives the dotnet and nuget commands, as well as adds support for e.g. cleaning, releasing etc. in the "Maven way".
Here's an example plugin configuration:
<project>
  [...]
  <packaging>dotnet</packaging>

  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.eobjects.build</groupId>
        <artifactId>dotnet-maven-plugin</artifactId>
        <version>0.11</version>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

(Notice the packaging type set to dotnet).
This will then read from the project.json file and run dotnet and nuget commands according to the maven lifecycle phases such as clean, compile, test, install etc.
Comment: Updated my answer with an example
Comment: You may want to mention you wrote it.
Answer: You might also check out NPanday (it is a project I am involved in). While it still needs some work to more closely align to Maven's best practices, it is the most complete and active alternative available now. One feature that is unique to it is the existence of a Visual Studio Add-in for generating the correct pom.xml from the IDE.
Answer: There is a NMaven project at codeplex but it doesn't seem to be active or popular. See also these questions:

maven for .NET (DroidIn.net's  link to his tutorial looks promising)
Why is there no need for maven in
.NET
Is there a Maven Alternative or port
for the .NET world?
Answer: maven-compiler-plugin with plexus-compiler-csharp works just fine with the following configuration. Of course you'll have to point to an actual C# compiler on your machine with the "executable" parameter.
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.0</version>
    <configuration>
        <compilerId>csharp</compilerId>
        <fork>true</fork>
        <executable>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe</executable>
        <outputFileName>myDLL</outputFileName>
    </configuration>
    <dependencies>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-compiler-csharp</artifactId>
            <version>2.2</version>
        </dependency>
    </dependencies>
</plugin>

Answer: Check this out: http://interfaceable.blogspot.com/2019/01/how-to-mavenize-visual-studio-project.html
At the time i developed those scripts/solution i was unaware that such csharp support existed from Maven, but i do recommend using Maven for the build since it enables you to automate/orchestrate everything such as IIS + ActiveMQ + MongoDB bring-up on the pre-integration-test phase, and then we are able to run tests using vstest. Not to mention that you can integrate it with Jenkins and run your builds on a remote machine.
I personally recommend it, but bear in mind that you will be faced with some challenges sometimes.

C# Project Management with Maven


Avoiding InnoDB transaction overhead in table copy using INSERT ... SELECT

Question: Instead of doing ALTER TABLE I prefer to create a new table, copy the data to it, and then move to use it. When doing so in InnoDB I always have a hard time performing:
INSERT INTO new_huge_tbl (SELECT * FROM old_huge_tbl)

Because of the natures of transactions, if at any time I need to stop this operation, the rollback isn't easy, to say the least. Is there any way I can perform this operation in InnoDB without it being a transaction?
Answer: No, it's not possible to avoid the transactional overhead in a simple way. You would perhaps have two options:

In your own application, use many smaller transactions (of e.g. 10k rows each) to copy the data in small batches.
Use an existing tool which does the copy for you using the same strategy. I could suggest pt-archiver from the Percona Toolkit.

Internally, when doing table copies for e.g. ALTER TABLE, InnoDB does in fact do exactly that, batching the copy into many smaller transactions.


iptables rules for botnet (UDP flood) protection

Question: I'm currently experiencing a massive UDP attack on my server. I host a couple of gameservers, mainly Tf2, CS:GO, CS 1.6 and CS:Source, and my 1.6 server is being flooded.
I tried different rules in iptables, but none of them seemed to work.
I'm on a 100mbps bandwidth tariff, but the flood i receive is 500+mbps.
This is the log of the latest tcpdump -> http://pastebin.com/HSgFVeBs
Packet length varies throughout the day.
Only my gameserver ports are being flooded - 27015, 27016, 27018 via UDP packets. Are there any iptables rules, that might prevent this?
Comment: If your gameserver is also using UDP, you have to think about how you are going to distinguish genuine game packets vs. fake game-like packets that are sent by the attacker(s).  Which of those lines in your tcpdump paste are genuine and which are attacks?
Comment: DDoS attacks tend to be effective because it is hard to set up a smart filter at the internet end of your link. WHile you might find an ISP that can handle this in their network and host the server there, this is still possible to saturate the server itself to take and ignore/reject all those UDP packets while the game server processes also run on it. A dedicated high power filter machine is needed that can figure out what each packets is.
Comment: All of those in the log I gave are unwanted. The log was 2+gb big and I greped only the ones with 1428 length.
Answer: The only iptable rules that would help you even remotely would be dropping all traffic coming in on those ports. The problem with that is that your service will go down as well. The only thing you can do is talk to your ISP and ask them to drop all incoming udp traffic before it reaches you.
Comment: The thing is, that UDP traffic is needed for HLDS.
Answer: If you have a separate (or separated) means of game users to login with (not by UDP), you can leave all UDP ports denied, and set up a means to dynamically allow the source addresses of logged in users. As Lucas Kauffman said, your would need to do this upstream to avoid your link from being saturated. It would be even more complex to arrange for the upstream to let you do dynamic allows on the logged in source hosts. You'd probably need to run your own router (that can handle 500mbps of attack) that you can engage dynamic filtering on.
Comment: So what your's saying is, that a software firewall (iptables) won't do the trick?
I'd need a router to filter the packets before they reach the server. But won't the router be useless once the bandwidth reaches 100mbps (channel gets filled)?
If not, what router would you suggest (I'm on a budged...). What rules should I add on it?
Comment: If you are on a budget, you can forget it I'm afraid. DDoS mitigation at 500 mbps is not easy nor cheap to mitigate.
Comment: You could use a sufficient powered server with a paid of gigabit ethernet cards to do that filtering at the location where you 100mbps comes from.  The idea is to avoid saturating your link.  But this is also new development to set up a means to automatically whitelist your known users in an efficient way.


Replacing a single tire

Question: Is it safe to replace a single tire on the front axle and if yes should the new tire be moved to the back? We replaced a front right tire, after picking up a screw. Now we hear that it's not safe to replace a single tire on the same axle.
Answer: First rule of tires: Tires with the deepest tread go on the rear.
Second rule of tires: On vehicles with All Wheel Drive (AWD) tread depths are not to vary by more than 2/32".
Rule one is required because vehicle control can be lost if the rear tires hydroplane before the front tires.
Rule two is required by most manufactures of AWD gear because the equalizing clutch unit can be damaged if the tires outside diameter varies too much.
Having a tire of larger diameter on one side of an axle is generally OK because the differential unit is designed to compensate.
Keep in mind the principal that the tire with the shallowest tread depth will hydroplane first on a wet road. This breaks grip and can cause loss of control.
Ideally all the tires on a vehicle will be rotated in such a way that tread depths will be kept close together.
For optimal braking traction and reduced loss of control due to hydroplaning replace tires worn to 4/32" tread depth remaining.
Answer: It's unsafe only if the other tires are quite worn out. Otherwise, there's no problem, the only thing to keep in mind is that the new tire should go in the back.

Replacing a single tire


Redirect Old domain & posts to new domain homepage

Question: I am closing my previous site so i want to redirect old domain's  homepage & all posts to new domain's homepage. I tried using Cpanel redirect but it only redirects homepage not posts. I want to redirect all posts also. Any solution ?
Answer: There are many useful threads on StackOverflow on how implement this, but here's a small WP solution that you can apply without modifying your .htaccess file:
add_action('init', function() {

    $redirect_to_domain = 'google.com'; // without protocol
    $https = false; // redirect to https ( default: http )

    // don't change the following unless you know what you're doing
    $domain = str_replace( array('http://', 'https://'), '', get_site_url() );
    $uri = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

    wp_redirect( ( $https ? "https://" : "http://" ) . str_replace( $domain, $redirect_to_domain, $uri ) );
    exit;

});

Remember, WordPress will still be initiated until the redirect is performed.
Hope this helps.


Dropbox.com as backup system for my Ubuntu

Question: Can I have multple drop boxes (dropbox.com) or Ubuntu One accounts on a single machine (Ubuntu 9.04 or 10.04) to backup multiple projects ?
Comment: To backup multiple projects you don't need multiple accounts, you need a larger storage for them.
Comment: @Lipis Obviously I'm trying to find a free solution.
Comment: For your projects you could also use https://bitbucket.org which has unlimited storage and it's for free. But for automatic sync I'm afraid that you will have to pay something. It's too expensive to built and support something like that for free.
Answer: Even though there are some workarounds it's strongly not recommended, because either of these services were designed to handle that. Also if it's used to get some extra quota it's against Dropbox's ToS and I'm pretty sure that it is against the Ubuntu One's as well.
Here is what a Dropbox dude (N.N.) said on this matter:

HELLo!
Note that in the vast majority of cases where people are asking about multiple accounts is best solved by Shared Folders. Unless there are two different people using the same computer, which different OS accounts is the proper way of handling it.
Third party applications and hacks that are designed to get multiple Dropbox instances running at the same time for one user is not recommended, not only because they are completely unsupported (by the Dropbox team at least), but also because Dropbox is not meant to be utilized in such a manner. So the chance of issues is a lot higher than running Dropbox as per normal.
PS: Also, please keep in mind that using multiple Dropbox accounts to circumvent our quota limitations is against our ToS.
Happy syncin'!


Is my guppy pregnant if so how long has she been and how long has she got left of the pregnancy?

Question: Yesterday I got a female guppy from a pet shop and when I put her in my tank I realised how much fatter she was compared to my other females is she pregnant if so how long has she been pregnant and if ur really clever how long has she got left of the pregnancy?
Answer: yes your guppy is pregnant,judging from the first picture it is less than a week before it gives birth.
a guppy is pregnant for five weeks.
they are pregnant all the time.
what you see is the dark spot around the anal area of your fish is the babies.
to see how far the pregnancy have come you look at the spot in the anal area of your fish,in the start of pregnancy it is light red/pink but as the pregnancy progress it gets darker and when it gets allmost black the babies are ready to get born.
the babies are born whitout color,they are grey or yellow when born.
the dark spot on the female is actually the eyes of the babies visible thru the skin of the mother.
a single guppy can give birth to more than 20 babies at a time but the normal is 6-15,so take care you might end up with a lot of guppies.
guppies will eat their young so you shuld get a breeding tank if you want to keep the babies.
the longer you wait to put the guppy in the breeding tank the less stress for the guppy,but when the spot on your guppy is allmost black it is time to put it in the breeding tank.
Comment: We had some guppies and never had a birth tank. But if there are enough plants to hide, some of the babies will survive. So we never had to rebuy guppies, even when some died due to natural age.
Comment: Thanks also when should I put her in my breeding tank ?
Comment: i put this information in the answer now.if you have lots of plants or other hiding places you will probably not need a breeding tank.


pavucontrol is not launching in xubuntu

Question: I have the xfce indicator plugin in the system tray.  When I click on speaker icon > sound settings...:
Nothing happens.  This used to work.  pavucontrol is not launching, any suggestions on how to fix?
Using Xubuntu 15.04.
Answer: Pulseaudio is not running :
Type pulseaudio  in a terminal and see if pavucontrol is ok.

If yes , the problem is that pulseaudio is not starting automatically when session starts:
then  run these 2 command in a terminal :
mkdir .pulse
echo autospawn=yes > ~/.pulse/client.conf
Restart session and test.
If no, something prevents pulseaudio to start:
Copy and run this command in a terminal to reset pulseaudio config:
rm -r ~/.config/pulse/* ; rm -r ~/.pulse*; ~/.config/pulse
and reopen session.
Test also this to reinstall pulseaudio :
sudo apt-get install --reinstall pulseaudio
If not ok,  likely a program is using soundcard : run this command to display this program:
sudo fuser -v /dev/snd/* .
If you see "sound-dispatcher', remove it running
sudo update-rc.d -f speech-dispatcher remove
Comment: I have this problem even though pulseaudio is running (using 14.10). pavucontrol runs fine from a terminal but doesn't seem to be hooked into the indicator plugin. Anything else I can try?
Answer: This almost surely happens because the user's session is not Xubuntu.  To find out what your desktop session is, type in a terminal:
$ echo $DESKTOP_SESSION

If the terminal does not reply with xubuntu (or ubuntustudio, for that matter) then pavucontrol will never launch when the user clicks on the Sound settings option in the sound indicator.  This is because of the following line of code in service.vala:207 (function activate_desktop_settings), part of the indicator-sound deb package:
    var env = Environment.get_variable ("DESKTOP_SESSION");
    string cmd;
    if (env == "xubuntu" || env == "ubuntustudio")

Thus to solve this, you must ensure you log in to Xubuntu desktop on the lightdm screen.
To solve this, there are two aspects to consider.  First you should ensure that lightdm's default session is set to xubuntu.  To do this, edit the file /etc/lightdm/lightdm.conf with root privileges and assign the value xubuntu to the key user-session (if it isn't already so), as follows:
user-session=xubuntu

However, you most likely got into this snag because you previously logged in to a desktop session other than xubuntu. To fix this you will need to select the appropriate option from the list of sessions available on the lightdm login screen.  Log out (or start your computer) and click on the fourth icon from the right in the top panel.  Then select "Xubuntu session" from the menu.

pavucontrol is not launching in xubuntu


What does this sign before the notes mean and how does its placement affect the notes?

Question:
This is from Kiss The Rain by Yiruma but the sign before the notes keep bugging me as its position on staff keeps changing and likewise the octave keeps changing and I can't understand how to play it.Like the notes in box are same but the one on the right is of higher octave
Comment: I don't want to condescend and am sort of curious @ParthTaggar. How did you get to the point of reading this sort of piece without ever having encountered a sixteenth note rest?
Comment: When you google *music signs* the first link is:

https://en.wikipedia.org/wiki/List_of_musical_symbols
Comment: You'll have to show us more than just that tiny part.
Comment: Thanks for the edit. I didn't speak up, but I had wondered before whether there were multiple voices at work. Note that the beginning of the measure has two "voices" in the top staff; the Eb half note is followed by the half rest that is printed on the first space of the staff, and the sixteenth-rest is raised because it belongs to the upper voice.
Comment: @Tim I'm sorry sir for not being able to provide full details I hope this edit might clarify my problem
Comment: You'll find more at [this question](https://music.stackexchange.com/questions/15929/rest-above-a-note-in-a-piano-piece) and the many that are marked as duplicates of it.
Answer: That symbol is a "one sixteenth musical rest".
In the notation you supplied, there is a sixteenth rest followed by three sixteenth notes. The four events all fit inside one quarter note.
The two little tails on the sixteenth rest are like shortened versions of the double beams that connect the three sixteenth notes together.
Often the typesetter will move rests vertically up or down the stave so they align better with the phrase they belong to. The vertical position on the stave doesn't affect the duration - it's to make the music easier to follow.
Comment: Maybe emphasize the part where **you don't play the (16th) rest**? I'll note that the question says "its position on staff keeps changing and likewise the octave keeps changing", lightly implying that the question asker is prone to treating it like a note.
Comment: +1 for answering the question without judgment and including in your answer an explanation of why the symbol moves up and down the staff as the OP asked.
Comment: @Dekkadeci - I've always considered a rest to be a note - a silent note, 'played' for as long as the comparable dot would take. 'Its position' is likely it being placed vertically in different places on the stave, rater than placed in a sequence differently.
Comment: Great answer, but since the updated image, I recommend an edit to mention the multiple voices.


Moveit 2 On Windows 11: ROS2-Humble Hawksbill

Question: Has anyone tried installing MoveIt 2 on windows? When I go to the official website it says nothing about compatibility with ROS-humble version. It's very similar to how it doesn't mention anything for compatibility with ROS-Iron and it is still compatible in Linux. I tried this tutorial but it has lack of information. Can anyone tell if there is any way to install MoveIt 2 on windows for ROS-Humble? I didn't find any resources online.
Answer: You can look at installing via Robostack and see if your needs can be met that way:
https://robostack.github.io/GettingStarted.html
https://robostack.github.io/humble.html
Some core MoveIt packages are available for binary installation. I successfully installed ros-humble-moveit on an existing Robostack Humble installation. I can add a motion planning panel to RViz.
However, moveit2_tutorials is not available to try a more functional test per the quickstart documentation. I briefly looked into building it from source, but it looks like I'll have to try to build a number of its dependencies from source too.
EDIT: I added a number of packages from source and got the moveit2_tutorials RViz quickstart working:

moveit2_tutorials depends on a number of packages that as far as I know aren't available on Windows and might be hard to build.
I currently removed the dependencies moveit_task_constructor_core, moveit_ros_perception and moveit_servo from the CMakeLists.txt in moveit2_tutorials and commented out all the add_subdirectory() calls except for add_subdirectory(doc/tutorials/quickstart_in_rviz)
I will fork it and make a Windows branch to share later, and update with another edit, as well as share a .repos file. I needed to build graph_msgs, moveit_resources, moveit_visual_tools and rviz_visual_tools from source.
--- End Edit ---
You might give it a try and see if you can get a working installation. You can also check out https://github.com/ms-iot/ROSOnWindows/issues and see if there's any information about MoveIt.
Are you planning to control real robot hardware? Even if you get MoveIt working with demos/simulation, hardware driver support tends to be limited.
Comment: Yes I was trying to to control real robot hardware and as linux system was not available I wanted to build this on windows.
Comment: I think it's worth trying Robostack. I'm having issues building `moveit2_tutorials` with a fresh Robostack installation because the tutorial code now seems to rely on `ros2_kortex`, the Kinova driver package. The screenshot above with the Franka Emika Panda is using an old Robostack installation I haven't maintained in a while. However, basic MoveIt is available and if you can get your robot driver to work on Windows, I bet you can get MoveIt to work with it at some level.


How to give an arbitrary name for a register in vim

Question: Is there any possible way to give an arbitrary name for a register in vim. I am able to use "[a-z]p while pasting. But, I would like to know, if there is anyway by which we can use arbitrary names for a register. for eg. something like "foop, where the name of the register is foo
Comment: http://vimdoc.sourceforge.net/htmldoc/change.html#registers implies register names are limited to a single-character
Answer: No, but you can copy any register contents to a Vim variable, and then use these as "virtual registers".
<code>" Copy the default register.
:let foo = @"

" Use it; from normal mode: "=foo<CR>p
:put =foo
</code>
Answer: No, you cannot do this with registers.  It is vi-compatible, which makes registers use a single character (otherwise, the command-syntax would be different).  According to the documentation:
<code>There are nine types of registers:          *registers* *E354*
1. The unnamed register ""
2. 10 numbered registers "0 to "9
3. The small delete register "-
4. 26 named registers "a to "z or "A to "Z
5. four read-only registers ":, "., "% and "#
6. the expression register "=
7. The selection and drop registers "*, "+ and "~
8. The black hole register "_
9. Last search pattern register "/
</code>
If you want to hold chunks of text in something with a longer name, you could investigate these features:

abbreviations:

Abbreviations are used in Insert mode, Replace mode and Command-line mode. If you enter a word that is an abbreviation, it is replaced with the word it stands for.  This can be used to save typing for often used long words.  And you can use it to automatically correct obvious spelling errors.

maps

Key mapping is used to change the meaning of typed keys.  The most common use
  is to define a sequence commands for a function key.


Difference between "on the level" and "at the level"

Question: Specifically I'd like to know when you would say "at the behavioral level" and when "on the behavioral level."  It feels like there is a difference, but I can't put my finger on it.
Comment: "At the level" is often used in a description of how high something is, while "on the level" is often used to described flatness or fairness. Both'll work behaviorwise. The phrasing feels different because of differences in usage in other contexts.
Comment: @WayfaringStranger - You refer to the OP's context, however the OP hasn't given any context.  Johannes, please say where and how you want to use these expressions. English is a context dependent language.
Comment: Thanks. So, if I understand correctly, for the 'behavioral level' it does not matter?  I don't understand the flatness or fairness part. Do you have an example?
Comment: Yes, does not matter in your context. Examps: "The deal that used car salesmen is offering me actually seems to be on the level" "Jessica usually lies about how rich she is, but today, when she said she couldn't afford bus-fare to Seattle, I think she was on the level".
Answer: Google's Ngram shows that "at the [something] level" is more idiomatic than "on the [something] level":
Comment: "*This site is plagued by anonymous downvotes, with no explanation given and no explanation other than pure malice possible.*" https://english.meta.stackexchange.com/a/10241/194459
Answer: This is a lot like being "on a bus" as opposed to "in a car". If you are able to move around, then "on" is preferred, although there's a grey area for middle-sized conveyances,  e.g.

He arrived on an A380.
He arrived on a Learjet. He arrived in a Learjet.
He arrived in a Cessna.

"At" fits into a scheme of movement, e.g. you get on an elevator and go up.  You arrive at the fifth floor.  When you step off the elevator, you are on the fifth floor.
For a general term like level it depends on context.  If you want to emphasize that your description has moved from one level to another, use "at".  If you are intending to talk at length about a level, use "on".
Comment: #Global Charm is coming close. One must accomodate the "on the level" idiom in an answer. Beyond that, there are at least a few common usages where *at* and *on* are interchangeable. #Global Charm, I think, hits on the right scheme by trying to identify when *at* and *on* are NOT interchangeable.
Answer: Well, first there's the idom "on the level," which means fair, not cheating, not corrupt.
"Can I trust him?" "Definitely. He's on the level."
"At the level" can mean "operating at this level of skill" - for example: At the level of softball my girls play, you're just happy they run from first to second without getting distracted by a passing butterfly.


Easy Italian literature

Question: When I was learning French, I used my several months of knowledge to read L'Étranger by Albert Camus. What easy literature is there to read in Italian? Some examples in French are Le Petit Prince, Le Petit Nicholas, and L'Étranger. I'm not looking for children books, but fairly easy literature.
Comment: Not sure whether it is an actual duplicate, but you can find some pointers in [this question](https://italian.stackexchange.com/questions/5634/an-italian-book-suitable-for-a-beginner).
Comment: Welcome to Italian.SE!
Comment: Just to be clear: you are specifically looking for Italian literature (as in, written by Italian authors) and not for literature whose Italian translation is easy, correct?
Comment: @Easymode44 è corretto!
Answer: These are some Italian books recommended by the Official Language Schools of Catalonia to students who have an A1 level and are learning to acquire an A2 level:

Andrea Camilleri: La relazione.
Rossana Campo: Il matrimonio di Maria.
Chiara Sasso: Riace, terra di accoglienza.
Chiara Gamberale: Per dieci minuti.
Luigi Garlando: Per questo mi chiamo Giovanni.
Niccolò Ammaniti: Io e te.
Fabio Volo: Quando tutto inizia.
Natalia Ginzburg: La strada che va in città.
Stefano Benni: Margherita Dolcevita.
Italo Calvino: Marcovaldo.
Massimo Carlotto: Niente, più niente al mondo.
Gianrico Carofiglio: Testimone inconsapevole.
Geppi Cucciari: Meglio donna che male accompagnata.
Natalia Ginzburg: Caro Michele.
Amara Lakhous: Scontro di civiltà per un ascensore a piazza Vittorio.
Dacia Maraini: Dolce per sé.
Paola Mastrocola: Facebook in the rain.
Francesco Piccolo: Momenti di trascurabile infelicità.
Gianni Rodari: C'era due volte il barone Lamberto.
Fabio Volo: Un giorno in più.
Comment: @DaG: Are you suggesting to remove these authors from the list? In fact I read a book by Volo some years ago and I didn't like it at all.
Comment: Sorry, I didn't mean to censor that list. I'm just saying that I wouldn't especially recommend those authors. To be more positive, I highly recommend other of them, especially Calvino, Ginzburg, Rodari, Benni.
Comment: If by any strange accident Gamberale, Lakhous and Volo (no less than two titles!) slipped away from the list, I don't think that the average level would drop dramatically.
Comment: @DaG: Adesso me n'accorgo che non ho letto nessun libro di Fabio Volo. Il libro che avevo in mente quando ho scritto quel altro commento in realtà è di Sandro Veronesi: non so perché ho avuto questa confusione.
Answer: Actually, Il piccolo principe and Lo straniero are just as good in Italian as in French - perhaps, a bit less difficult, as is usual with translated texts. Also, junk literature is much easier (and often more entertaining) for a beginner than classical texts - I mean detective novels, love stories, fantasy, etc. This might be hard to find abroad, but if you are in Italy or Switzerland, you will have a great choice in any bookstore.
Comment: I'm not sure I'd suggest junk stuff or translated texts to someone who studied French by reading Camus, but why not.
Comment: @DaG The advantage of the junk stuff is that it is available in great abundance. Honestly, my French and German began to progress really quickly once I stopped being snobbish and settled for junk - which is admittedly, the kind of literature that I wouldn't read in a language that I know well.
Answer: I am not sure it's really super easy but you may want to try Le città invisibili written by Italo Calvino. It describes imaginary cities and since there is no ultra twisted plot may be ok to understand, even if sometimes some old words are used.
Comment: I've read both *Marcovaldo* and *Le città invisibili*. *Le città invisibili* is certainly a masterpiece, but I think it could be a bit hard to understand to someone who has studied Italian for not many time. If such an Italian student would like to read something by Calvino, I believe *Marcovaldo* would be easier to understand.
Comment: Welcome to Italian.SE!

Easy Italian literature


Rails remember form details without ActiveRecord / ActiveModel

Question: In my forms, users are displayed a specific view in a sequence depending on a value in a session. This is all working great except when users go back to a previous form, the form is not pre-filled with data from the session.
My model does not extend ActiveModel as I am not using local DB's for anything.
<%= form_tag do %>
    <%= field_set_tag do %>
        First name:
        <%= text_field "form", "firstname" %>

        Surname:
        <%= text_field "form", "surname" %>

        Date of Birth:
        <%= date_select("form", "dob", :start_year => 1912, :end_year => 1994, :order => [:day, :month, :year], :prompt => { :day => 'Day', :month => 'Month', :year => 'Year' }) %>

        # and many other fields including radio/check/text/select ...

        # next / back buttons...
    <% end %>
<% end %>

My question is how can I get the form to remember data from the session and pre-populate the field?
For text fields, I can add a value attribute like so, but I am not sure this is the best way to go about it:
Address:
<%= text_field "form", "address_line_1", :value => session[:quote]['policyholder']['address_line_1'] %>

I am also not sure how to apply this to radio fields etc as the following would not work (although it makes sense to me):
<%= radio_button_tag 'form[homeowner]', 'yes', :checked => 'checked' if session[:quote]['policyholder']['homeowner'] = 'yes' %>
Yes

<%= radio_button_tag 'form[homeowner]', 'no', :checked => 'checked' if session[:quote]['policyholder']['homeowner'] = 'no' %>
no

Answer: Use your back button in your view to render the previous form and not redirect to it...
so try this rather than redirect_to: render 'your_controller_action'


Where does hyperledger fabric store the database for the blockchain?

Question: I have hyperledger fabric network setup on my local machine with a single validating node.  I am developing a chaincode and would like to clear my blockchain.  I have read that the hyperledger fabric stores the database under /var/hyperledger.  However, I do not see this hyperledger directory under /var.  Is there another location for this directory?  My development platform is MAC and I am using docker-compose to start my hyperledger fabric network.
Answer: The Hyperledger Fabric stores the database in /var/hyperledger/production/db within the file system for the validating peer.  You can navigate to the validating peer file system by using a command like  docker exec -it substitute_container_name bash.  I am not aware of another location of the database.  If the instructions at https://hub.docker.com/r/ibmblockchain/fabric-peer/ for using Hyperledger Docker images are followed, then the database location should be /var/hyperledger/production/db.
Comment: Andrew, thank you very for the helpful answer.  I was able to get to the /var/hyperledger/production/db directory on my validating peer.  I tried to remove the db directory but that didn't seem to clear my blockchain.  I then deleted the /var/hyperledger/production directory.  This now causes the fabric peer node failing to start.  The memberservices process starts up but I get the following error when it tries to start the fabric-peer:
Comment: vp0_1 | 02:40:56.262 [crypto] Errorf -> ERRO 02d [validator.my_vp0] Failed invoking CreateCertficatePair [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set].
vp0_1 | 02:40:56.263 [crypto] Errorf -> ERRO 02e [validator.my_vp0] Failed getting enrollment certificate [id=my_vp0]: [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set]
vp0_1 | 02:40:56.263 [crypto] Errorf -> ERRO 02f [validator.my_vp0] Failed retrieving enrollment data [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set].
Comment: @shaggy do you solve this problem? I face the same problem about modifying database but nothing changed...... :(
Answer: To clear the blockchain, the easiest way is to stop and run docker container again, given that you only have 1 validator peer you should not be worried about data consistency. Also, try to use the latest version of fabric releases since they improved a lot these kind of problems. And regarding the issue,
no rows in result set
make sure that youe have specified the right organization name and department when requesting user validation agains CA. The parameters you send, must exist on CA database, otherwise, you will receive that error.


how do I calculate rate of return on call options that are spread

Question: I want to do a leap spread on an existing covered call option. How do I calculate the rate of return to determine if it's worth doing the leap spread?
Answer: Outside of software that can calculate the returns:
You could calculate your possible returns on that leap spread as you ordinarily would, then place the return results of that and the return results for the covered call position side by side for any given price level of the stock you calculate, and net them out. (Netting out the dollar amounts, not percentage returns.)
Not a great answer, but there ya go. Software like OptionVue is expensive
Answer: You don't necessarily have to use a LEAP to do a spread. Since you are doing a covered call, I'm assuming that you would be comfortable with having that call exercised and you are bullish on the stock. So doing a spread trade with the short call option would essentially be capping your maximum profit without risking the obligation to sell the stock below market value.
An example for the payoff from a bull call spread: long lower strike call, short higher (covered) strike call can be found here


Altered Carbon, why is Kovacs the last Envoy?

Question: I have started watching Altered Carbon on Netflix. I have read the books long time ago. Why is Kovacs the last Envoy?
Answer: This is an invention of the Netflix series entirely.  It stems from the change of "Envoy" from being the name of the Protectorate Peacekeeping force that is sent out to pacify rebellions and other such things (as it was in the book) to being the name of Quellcrist Falconer's specific rebellion (generally called Quellists in the book).
Takeshi Kovacs is, in the Netflix series, called "The Last Envoy" because Quell's followers are all considered permanently dead. Kovacs was caught at some point later and sentenced to storage until he was brought back in the first episode.
In Episode 7, it is revealed

Everyone else was taken out by a viral weapon that destroyed their stacks, except Kovacs, Reileen, and Quell herself.  Quell and Reileen were on a shuttle that exploded shortly after.

It is of course also revealed in the course of the series that

Reileen survived and possibly Quell's stack did as well, which means Kovacs isn't the Last Envoy in fact, although according to the historical record it is still true.

In the books, Kovacs wasn't even "The Last Quellist," as it was a philosophy that had many adherents and many survivors of the actual rebellion, instead of a weird tiny revolutionary movement living in the woods that somehow had skills nobody else has seen since.
Comment: It's one of those cases where it largely stays very close to the book but there are a few big differences.  IMHO, while a couple of the changes they made worked, some are real shames and the parts that aren't directly from the book usually badly written.
Comment: I did not read the book and just found out about the differences. However the story(of the tv-show) stands nice on its own foots. I found it good and closed and would like to see a season 2.
Comment: Well, the changes compared to the book seems rather larger than I expected. I hope the story makes some sense in the end.
Comment: @starpilotsix This is usually done to enable spectacular action sequences. Books don't usually need them but movies and shows need them nowadays to prevent people from being bored. Prime example are the Harry Potter movies, which include many action scenes which are not in the books just to keep dynamic pace although they often violate the logic of the books.


How do I change the coordinate system from x-y to n-t or r-theta by using Matrix?

Question: How do I change the coordinate system from two dimensional cartesian to two dimensional curve linear and polar by using Matrix?
Comment: Welcome to Engineering! This question seems like a bad fit for this SE. Feel free to ask again at [Math.SE].
Comment: @Wasabi Matrix transformation of cartesian to polar is indeed a pure mathematical question and beyond the scope of the this community, however cartesian to curvilinear transformation, is related to dynamic. The mathematical approach, is systematic, you follow the rules, you'll find the answer. The physical interpretation here, provides OP more insight than pure mathematical approach to the problem, which is almost abstract.
Answer: The coordinate transformation of polar to cartesian is given by:
$$\begin{pmatrix}
r \\
\theta
\end{pmatrix}
=
\begin{pmatrix}
\cos\theta & \sin\theta \\
-\sin\theta & \cos\theta
\end{pmatrix}
\begin{pmatrix}
x \\
y
\end{pmatrix}$$
For a point mass, moving along a path in space, we can define an arbitrary point, and call it origine. Notice that the polar and the cartesian coordinate systems, have the same origine. And the $(x, y)$ or $(r, \theta)$ represent the position of the the point mass relative to that origine.
The tangent/normal (n-t) or curve linear coordinate system, moves with the point mass along the same path, notice that the origine of the new coordinate system now moves with the point mass.
Now, you want to express the position of the point mass in the curve linear coordinate in function of the old (cartesian) coordinates, but the position of the point mass coincide with the origine, so there is no explicit transformation here.


Shortcut to particular document in Google Docs app?

Question: Is there a way to make a shortcut to one particular document? I frequently need one particular document from a secondary account, so it's always a pain to come out of current document, change accounts and load the required document. Any ideas?
Comment: Have you considered sharing the document with the other account?
Answer: Workaround - use Google Docs via a browser, and bookmark that page.
Comment: It's easy to add bookmarks to the home screen, too.
Answer: These days you can add a widget that directly links to a Google Doc. It seems like it doesn't work on all devices (or perhaps all home screens?) though, as on my girlfriend's phone the widget doesn't appear even though Google Drive (the app that allegedly provides the widget) is installed.


Why do whips hurt so much?

Question: What exactly is the mechanism that makes a whip deliver such a strong impact? Elasticity, torque, or pressure? Just hitting something with a plank doesn't deal nearly as much damage. What's the difference?
Comment: I think it has to do with something similar to what Prathyush stated: [impulse](https://en.wikipedia.org/wiki/Impulse_(physics)). For a whip to be effective, you have to pull back after the tip is launched outwards.
Answer: The reason, a Whip hurts so much is that the tip of whip moves extremely fast, causing the skin to tear.
The reasoning behind this is easy to analyze from momentum conservation. Lets take a convenient approximation, that the mass per unit length($\rho$) does not vary through the length of the whip. This is not how real whips are, but it will not affect the conclusion very much.
Initially, the whole length of whip moves, say with velocity $v$, if you observe the motion of the whip closely, then you will see that as time elapses, the initial momentum is concentrated on a smaller and smaller section of the whip, while the rest is almost static.
Now if the whip length is $l$ then intial momentum is $\rho l v$. If we look at a snap shot at some later time, and say we observe that $l_0$ is the length of the whip currently in motion.
Then by momentum conservation,
$\rho v_0 l_0 = \rho v l$.
This implies that the velocity of the moving end, $v_0 =\frac{v l}{l_o}$
as time elapses $l_0 \to 0$, $v_0 \to \infty$. The tip is moving at a very large speed,  therefore it is capable is piercing. A thin tip makes the effect more dramatic (due to smaller $\rho$), but does not change the essential mechanism.
You may enjoy this video
Comment: @tony I dont quite understand the intention behind comment 2, perhaps you should clarify. Momentum conservation is the reason. one end of the whip is held constant, and the other is set in motion. so end result is the static end gets larger and larger while the moving end gets smaller and smaller.
Comment: Why would a high velocity matter if the mass is relatively low. And what factors limit the speed from 'going to infinity.' The tip must cap out at some relatively low speed, that, while fast, is not nearly as fast as infinity.
Comment: And also, what factor allows the momentum to transfer to the tip? It's clear that it occurs, but I see no reason why it should occur in that way.
Comment: @tony there will be effects due to fluid mechanics which will be hard to analyze, and but effects like air drag, viscosity will be important. then there will be effects due to tension and so on, which will cause the tip to slow down and not allow it to reach infinity. In the extreme  and unlikely  cases the whip could snap into 2.(which can happen with noodles for instance, its only a matter of scales)
Answer: The speed of the tip of the whip can exceed the speed of sound.  From Wiki:

The crack a whip makes is produced when a section of the whip moves
  faster than the speed of sound creating a small sonic boom. The
  creation of the sonic boom was confirmed by high-speed shadow
  photography in 1927.1
There are at least three "modes of motion" that can produce the
  necessary speed in a whip to cause it to crack. The three are: a half
  wave, a full wave and a loop. These names are indicative of the shape
  of the bends in the whip as it is thrown. In all three, the initial
  motion is applied to the handle, and the resultant shape moves down
  the whip's body to the tip. The high speed of the tip is explained by
  the law of the conservation of momentum. Since momentum is a vector,
  it has a direction, and does not pass through any bend that reverses
  the direction of movement in the body of the whip − such as the one
  that occurs when a half wave shape moves down a whip.
When a whip is thrown, the initial motion of the handle adds some
  amount of kinetic energy to the body of the whip. If the whip is going
  to crack, the handle movement must also produce one of the modes of
  motion that create a reversal of direction in the whip's movement. As
  the reversal of direction moves down the whip, the momentum and the
  kinetic energy in the whip, are concentrated in the segment of the
  whip between the tip and the moving bend. As the bend approaches the
  tip, the mass of the moving part approaches zero while the energy
  remains relatively constant. Since the momentum is the product of the
  mass and speed of the moving object, the smaller the mass, the higher
  the speed. Hence the end of the whip moves extremely fast, easily
  reaching the speed of sound.
Many published popular science explanations capitalize on the fact
  that the general shape of a whip is tapered: thick at the handle and
  very narrow at the tip, hence the decrease of the mass. While tapering
  does contribute the decreasing mass, it is not a deciding factor. Even
  "flat" un-tapered whips will crack. The actual decrease of the mass of
  the moving part occurs simply because the whip ends: the closer the
  moving bend is to the tip, the less mass is in the part that's moving
  in the given direction.
Comment: I don't think it's that important that the edge of the whip moves so fast, since it has vanishing mass. In fact, I don't think a whip hurts more than an equivalently thin, long stick.
Comment: Is that true jjj?
I'm still really confused, Wiki didn't help me much. Moving the whip forward gives it some initial Kinetic Energy, and momentum. It's then moved in an opposite direction creating some kind of bend, now, some force is applied so I'm not positive why momentum has to be conserved, but if it is, then I what I understand is that the kinetic energy and any deformational energy of the whip moves towards the tip?
The problem I then have is, how would one calculate the actual speed of the tip? It's limited by existing energy, and the elasticity, correct?
Comment: And I suppose the only thing that could make it hurt more than a thin long stick is if the energy is somehow being squeezed towards the tip, which is what Wiki is saying, but I'm not sure the mechanism that causes it.
Comment: paint not proportional to energy.
Answer:
Just hitting something with a plank doesn't deal nearly as much damage.

Generally, a plank can be much more damaging than a whip. Whips may look cooler, but that seems to be about it.
http://en.wikipedia.org/wiki/Whip#As_practical_weapons
Differences in pain need not reflect the amount of damage done (if we can even define that properly). Soft-tissue bruising, abrasions, lacerations, fractures, etc. probably all cause pain, but possibly (I don't know), the pain levels are not in that order. I would think that whips are good at bruising and lacerations, whereas planks potentially cover a more wide range of damage. (There is a lot of stuff on the internet about surprisingly painful paper cuts, which might also be related somehow.)
Answer: It doesn't  actualy hurt here is an article about the type of whips jockeys use:
 http://www.guardian.co.uk/sport/2011/oct/18/jockeys-whip-didnt-hurt
But I think you mean why does it seem to hurt.  As @Alfred said this is because it exeeds th speed of sound. Sounds are traveling vibrations in the form of pressure waves in an elastic medium. In gases, sound travels longitudinally at different speeds, mostly depending on the molecular mass and temperature of the gas, and pressure has little effect.
 wiki says:
 Some common whips such as the bullwhip or sparewhip are able to move faster than sound: the tip of the whip breaks the sound barrier and causes a sharp crack—literally a sonic boom.
Sonic booms generate enormous amounts of sound energy, sounding much like an explosion.
This is exactly the situation of the whip.

Why do whips hurt so much?


Is Rearing and selling fish for meat a sin?

Question: I want to start a fish Rearing business. I understand that meat is tamasic and eating it effects the guna of human body. But isn't the soul same in case of whether if it is an animal or a plant. How is killing an animal not any different from killing a plant? Doesn't that make all farmers as plant-killers and Animal-killers? (Some farmers do rear goats and fish for meat)
Comment: Others will tell you about what scriptures say, but at least scientifically plant cannot be killed, they do not sense the way animals do. Plants dont have receptors to sense pain and suffering. Secondly what makes things sin is not killing, but the purpose.
Comment: Killing for eating is sin that is why even in plant based diet one had to offer it to Sri Krishna and consume it as prasad
Answer: Yes, it is but you might be surprised to know that an apparently harmless job like ploughing the field (for agriculture) is even a bigger sin. Because several organisms like worms are getting killed in the process.

What sin a fisherman incurs in the course of one full year, — the same is incurred by the driver of a ploughshare made of iron in the
course of a single day.

Parashara Smriti, Chapter 2; Verse 8

From the above it is clear that some amount of sin is incurred by the fisherman. Now, one owning the fishery business mustn't be doing the fishing himself but he still commits the same amount sin that a fisherman commits because the owner is approving the killing and he is also earning money by selling the fishes.
This will be clear from the following verse:

Manu Smriti 5.51. He who permits (the slaughter of an animal), he
who cuts it up, he who kills it, he who buys or sells (meat), he
who cooks it, he who serves it up, and he who eats it, (must all be
considered as) the slayers (of the animal).
Answer: The idea that fish and meat are bad is a post-Buddhistic idea. A spiritual aspirant has the option of eating fish and meat if he wants. There is nothing wrong in rearing and selling fish.

He who thus knows this Yajnayajniya Saman, woven in the limbs of the
body, is endowed with all the limbs, and is not crippled in any limb;
he reaches the full length of life, lives gloriously, becomes great
with offspring and cattle and great also with fame. His holy vow is
that he should not eat fish and meat for a year, or rather, he should
not eat fish and meat at all.

Chandogya Upanishad 2.19.2
There are other scriptures that reject the idea that meat eating is bad.

Are there no asses and the like to whom home and forest are the same
and who wander about naked without shame? Do they become yogins
thereby? If men could get liberated by coating themselves with mud and
ashes, are all the country-folk who live in mud and ash, freed?
Denizens of the forest like deer and other animals live only on grass,
leaves and water; do they become yogins thereby? Frogs and fish live
all their lives in rivers like the Ganges; do they acquire special
merit thereby? Pigeons eat nothing but stone; the chataka bird does
not partake of the water on earth; are they too yogins thereby? Truly,
such privations and the self-denials are only for deceiving the world.
The only means for liberation is the knowledge of the Truth, the
Divine.

Kularnava Tantra, Human Birth and Life, Readings by M.P. Pandit
Comment: Your claims are not well supported by the texts you are quoting


Run appium scripts without using Eclipse or any IDE

Question: I developed appium scripts for my Android app in Eclipse and using this IDE to execute. But I wonder there's any way to run appium scripts on other PC without installing Eclipse or any IDE. I also integrated TestNG and run by TestNG.xml
Answer: Convert your project to Maven project and use the surefire plugin. Inside the plugin mention the testng.xml file as the test suite. Now you can run your scripts in any environment using below commands.

mvn install - This will install all the dependencies
mvn test - This will run your scripts

<code>  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>3.0.0-M4</version>
    <configuration>
      <suiteXmlFiles>
        <suiteXmlFile>testng.xml</suiteXmlFile>
      </suiteXmlFiles>
    </configuration>
  </plugin>
</code>

Reference: https://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html
Comment: Tried your way but it display error:  No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
Comment: you have to install maven first
Comment: Maven was installed! But error is still existing
Comment: Sorry you should install JDK in the target system. Java JRE is for running application and doesn't contains compiler . Please install JDK also (JDK contains JRE + compiler)
Comment: JDK 13 was installed but error still existing
Comment: @phongtran https://www.guru99.com/maven-jenkins-with-selenium-complete-tutorial.html follow these steps
Answer: @PDHide
Tried your way but it display error

I also changed the path to installed JDK on my PC


Generalization of a Result on Modular Inverses

Question: Yesterday, I attempted to solve the general system of linear congruences (I'm not sure why I've never tried this before.)
\begin{align*} x &\equiv a \pmod{A} \\
 x &\equiv b \pmod{B}.\end{align*}
I let $x = a + pA$ and $x = b + qB$ for some $p,q\in\mathbb{Z}$, and I got
$$a + pA = b + qB \implies a \equiv b + qB \pmod{A} \implies q \equiv(a - b)B^{-1}_A \pmod{A}.$$
where $B^{-1}_A$ is the inverse of $B$ modulo $A$. Then $q = (a - b)\cdot B_A^{-1} + rA$ for some $r\in\mathbb{Z}$, so
$$ x = b + (a - b)B_A^{-1} B + rAB\implies x\equiv b + (a - b)B^{-1}_AB \pmod{AB}. $$
However, note that by symmetry, we can also conclude that
$$ x \equiv a + (b - a)A^{-1}_BA \pmod{AB}.$$
Thus,
$$ a + (b-a)A^{-1}_BA \equiv b + (a - b)B^{-1}_AB \pmod{AB}.$$
If $\gcd(a - b, AB) =1$, then
$$a - b = (a - b)(BB^{-1}_A + AA_B^{-1}) \pmod{AB} \implies BB^{-1}_A + AA_B^{-1}\equiv 1 \pmod{AB}.$$
Can this result be generalized to product rings? Also, if there is a generalization, does it have any uses?
Answer: I always use your method to solve these equations, but your result is just the standard formula for the Chinese remainder theorem.
If $\gcd(a-b,AB) = 1$:
  $\gcd(qB-pA,AB) = \gcd((x-pA)-(x-qB),AB) = 1$.
  Thus $\gcd(A,B) = 1$ and hence $A_B^{-1},B_A^{-1}$ exist [which you already assumed].
[Note that the converse is clearly not true! $A,B$ could be coprime while $a,b$ are both zero.]
If $\gcd(A,B) = 1$:
  Thus $A \mid AA_B^{-1} + BB_A^{-1} - 1$ and $B \mid AA_B^{-1} + BB_A^{-1} - 1$.
  Thus $AB \mid AA_B^{-1} + BB_A^{-1} - 1$ and hence $AA_B^{-1} + BB_A^{-1} \equiv 1 \pmod{AB}$.
[So the result you got holds under the usual more general condition that $A,B$ are coprime.]
The chinese remainder theorem also holds for principal ideal domains in the way you want, namely product rings, and generalizes to the product of any coprime quotient rings of a commutative rings. (You can take a look at the Wikipedia article.)
Answer: That is a simple form of CRT = Chinese Remainder Theorem  that I call Easy CRT. Below is one simple way to present it. You can find many example applications in prior posts here.
Theorem $ $ (Easy CRT) $\rm\ \ $ If $\rm\ m,\:n\:$ are coprime integers then
$$\rm \begin{eqnarray}\rm x&\equiv&\rm a\,\ (mod\ m) \\
\rm x&\equiv&\rm b\,\ (mod\ n)\end{eqnarray} \ \iff\ \ x\, \equiv\, a + m\ \bigg[\frac{b-a}{\color{#c00}m}\ mod\ n\:\bigg]\ \ (mod\ m\:n)$$
Proof $\rm\,\ m,n\,$ coprime $\:\rm\Rightarrow\, \color{#c00}{{\large\frac{1}m} = m^{-1}}\!\pmod{\! n}\, $ exists, by Bezout or Euler's $\phi$ Theorem.
$\rm\ (\Leftarrow)\ \ \ mod\ m\!:\ x \equiv a + m\left[\cdots\right] \equiv a,\ $ and $\rm\ mod\ n\!:\ x \equiv a + m\,\color{#c00}{\large\frac{1}m}\,(b-a) \equiv b$
$\rm (\Rightarrow)\ \ $ The solution is unique $\rm\, (mod\ m\:\!n)\, $ since if $\rm\ x',\,x\ $ are solutions then $\rm\ x'\equiv x\ $ mod $\rm\:m,n\:$ hence $\rm\ m,n\mid  x'-x\ \Rightarrow\ m\:\!n\mid x'-x\  $ since $\rm\ m,n\:$ coprime $\rm\:\Rightarrow\ lcm(m,n) = m\:\!n$.
Comment: This is clear enough, though actually it didn't answer the original question (about generalization). Personally I would never write $\frac1m$ when in a non-field, but that's just pedagogical preference.
Comment: @user21820 Algebraists and number theorists frequently use fractions in rings that are not fields, e.g. look up "localization". You can find many examples in my posts. When I teach elementary number theory I strive to introduce these ideas very early since they can lead to great simplifications.
Comment: Yes I can see the advantage of the fraction notation. It's simply that students who don't have a solid grasp of logic tend to write things that make no sense, and sometimes conventional notation is unhelpful. For example I never write $\sin^2(x)$ for $\sin(x)^2$ because there's also $\sin^{-1}$. It is just a personal preference to keep notation as uniform across all areas of mathematics as possible. (Of course, one needs to also be able to pick up on the fly notation that other people use.)
Comment: @user21820 Yes, certainly it needs a careful exposition to help students avoid pitfalls.


Want to give Ubuntu 18.04 more disk space -- dual XP boot

Question: I looked at that "Disks" tool, and my main linux partition (26 GB - partition 8) and then Partition 6 (3.7 GB - Linux Swap).  I need to give Linux more space, isn't there a simple way to merge that space?
Is Linux using that swap space?
How can I figure out where to expand it to so it doesn't take over my XP space?
I don't know if I know enough to ask a more succinct question.
Thanks for your patience.
Comment: Ubuntu 18.04 LTS does not use a swap partition by default, but can be configured to use it. Normally it will use a swap file. The command `swapon` will tell you what kind of swap that your Ubuntu is using. Would you consider taking part of parttion 1 or 5 for Ubuntu (for example as a separate `/home` partition? Or are you only considering the swap partition (nr 8)? In any case, editing partitions is risky, so you should have a good and current **backup** of everything you cannot afford to lose before starting on this adventure.
Comment: 333 GB swap partition is kinda overkill :)
Comment: Well, certainly most Linux uses the SWAP partition (they can work without it, but you may find your OS stopping functioning correctly), even more, I imagine that your machine, if has windows XP, must be old. ¿Can you post an image of your disk partitions layout? Use **gparted** or **Disks**. [Edit](https://askubuntu.com/posts/1166149/edit) your anwser using the *image tool*, don't post it on a third party website.
Comment: @guillermochamorro yeah, that huge swap partition is almost as absurd as using XP in 2019.
Comment: I could only use part of that partition.  I don't know how to do either and to have Linux use it.
Comment: The OS is old but the computer is a new motherboard.
Comment: Do you have unallocated space on the 1TB Hard Disk. You could just create a new partition there and mount in Ubuntu and use without messing with existing partitions.
Comment: I wish I knew how to add a picture to this comment but I looked at that 1TB drive and it has 333 GB partition that isn't listed in the "files/other locations"  but when you select it in "disks" it says it is a linux swap partition.  How can I get ubuntu to use it?   swapon says it is using /swapfile 1.1 G.  I'd like linux to start using that huge partition on the 1TB drive
Answer: You have several options (IMHO), some more advanced than others:

Backup your data!!, as @sudodus commented "In any case, editing partitions is risky, so you should have a good and current backup of everything you cannot afford to lose before starting on this adventure"

Get rid of windows xp (do you really need it?), wipe your disk, and make a fresh install of Ubuntu in your HDD.
Format your second NTFS partition, which is larger, to EXT format, and mount <code>/home</code> in it.
Use your second NTFS partition, and make a fresh install of Ubuntu in it. Merge the last partitions, (except the FAT one, which may be aercovery partitin used by windows?) in the format you prefer.
Wipe your disk and install windows 7/10, given that you have modern hardware, and then install Ubuntu alongside it.
Other options available depends on what you actually need from your systems.

You can always make a backup image of your disk with clone tools like
  clonezilla, so you can retrieve your system to it's previous state.

And you can always come back here to ask new questions.
Comment: I'd like to get rid of XP, but have to figure out how to get all my emails and addresses from Thunderbird and onto Linux.  I tried how T-bird said to do it and their directions weren't correct.
Comment: Another question if that's OK or should I make a separate question out of it?
Comment: I had only been saving files to the Linux partition, but realized I can put files on my other drives.  BUT, the problem is that even if I set the permissions on the folder on one of those other drives, I can't see it from the other win7 computer over the network.  What I have to do is copy the file from the other drive  on Linux to the folder on the linux partition that I have shared and then I can access it on the other computer.  Any way to set the permissions on the NTFS folder so that it can be accessed from the other computer?


How does a Jnani forbearer various unpleasant events from perspective of Atman?

Question: Swami Sarvapriyananda while quoting Gita 2.14, 2.55-57, writes , "Events which would make most ordinary men miserable, leave him unshaken, for he sees the same infinite Atman shining through (or, to put it in other words, events, fortunate or unfortunate, have no intrinsic reality apart from the Atman)". Can there be more elaboration on this?  How to see the same Atman and how to not get shaken by difficulties?
Answer: Gita wants us to strive for evenness of mind.

Engage yourself in action with the mind steadfast in Yoga. Abandon
attachments, O Arjuna, and be unperturbed in success and failure. This
unperturbed sameness in all conditions is Yoga.

Gita 2.48

O Arjuna, mere action (with attachment) is far inferior to action done
with the mind poised in evenness. Seek shelter in this state of
unperturbed evenness (which can arise only in a desireless mind in
communion with the Divine). Those who work for selfish gains are
indeed pitiable.

Gita 2.49

One endowed with this unperturbed evenness of mind abandons the
effects of both good and bad actions even here itself. Therefore,
strive for this state of Yoga. Yoga is skill in action.

Gita 2.50
Such evenness of mind can occur only in a desireless mind which is in communion with divine. This state leads to sthita-prajna.
Definition of Sthita-prajna

O son of Pritha! When all the desires of the heart have been
abandoned, and the Spirit finds joyous satisfaction in Itself (without
dependence on any external factor) – then is one spoken of as a person
of steady wisdom.

Gita 2.55

Whose mind is not agitated in adversity, who is free from desire, and
who is devoid of attachments, fear and anger – such a person is called
a sage of steady wisdom.

Gita 2.56

Whoever is without self-centered affection for anything, who rejoices
not in favorable situations and hates not in unfavorable ones- such a
person's wisdom is firmly set.

Gita 2.57

When a person can withdraw his senses from their objects just like the
tortoise its limbs on all sides, his wisdom is firmly set.

Gita 2.58

From the abstinent soul sense objects fall away, but not the taste for
them. When the Supreme Truth is realized, even the taste departs.

Gita 2.59
How to see the same Atman and how to not get shaken by difficulties?
This can only be achieved through prolonged spiritual practices and reaching the state of vijnana.
Jnana and Vijnana

I consider that as knowledge (Jnana) by which one perceives, through
all beings from Brahma to the ant, the continuing persistence of the
causal categories – the groups of nine (Prakrti, Purusha, Mahattattva,
Ahankara, and the five Tanmatras), the eleven (the five organs of
action, the five organs of knowledge and the mind), the five  (the
five gross elements), and the three (the three Gunas) – and further
sees that all these causal categories and their effects, the embodied
beings, are interpenetrated by one Consciousness. Vijnana or immediate
experience is this: In Jnana or contemplative experience one sees the
presence of the one Substance persisting through numerous changing
modes. When the permeating Substance alone is seen to the exclusion of
all changing modes apprehended as different from It, then that
understanding is called Vijnana. One should perceive all these modes
of the triune Gunas as originating, subsisting and dissolving (in and
by that Substance alone). Only that which thus persistently continues
in a series of effects passing from one to the next without
discontinuity, and remains the same at the end of the series as it was
at the beginning, that alone is the essence (Sat).

Srimad Bhagavata Purana XI.19.14-16
One acquires evenness of mind and sees the Atman everywhere in the state of vijnana.
Answer: Acharya Shankara in Katha Upanishad 2.2.11 writes,

Seeing that if one be the atman of all, he may be regarded as subject
to the grief of samsara, this is said. As the sun benefiting the eye
by its rays and manifesting even unclean things such as urine, ordure,
etc., though being the eye of all, the world seeing them is not
tainted with sins and other blemishes due to seeing unclean things,
etc., and by stains caused by physical contact with unclean objects so
the one internal atman is not tainted with the misery of the world,
being outside that; for, the world by ignorance superposed on the
atman, suffers misery arising from desire and karma. But that is not
really in the atman, just as, the serpent, silver, water and dirt
superposed on the rope, mother-of-pearl, barren spot and the sky,
respectively, do not really exist as blemishes in the rope, etc.; from
the superposition, by false notion, they are perceived as blemishes in
the true objects connected (by the notion); the true objects are not
tainted by such blemishes because they are external to the false
notion so superposed. Thus the world having superposed on the atman,
the false notion of deed, agency and fruits like the notion of the
serpent (on the rope), suffers the misery of birth, death, etc., due
to that. But the atman, though the atman of all the world, is not
tainted by the misery of the world arising from the superposition of a
false notion. Why? being external. Because he is like the rope, etc.,
external to the false notion superposed on him.


Quickbooks Online "restore point"?

Question: I am considering redoing a large portion of the way I have been managing my books in Quickbooks Online.  I would like to create a "restore point" of some kind though, in cases I end up messing things up.  Is there a way to do this so if I do anything wrong, I can always go back to a specific point in time?
Answer: Unfortunately, Quickbooks Online does not offer this feature.  You can make a backup in the event that you want to switch to the Desktop version of the software, but that backup cannot be restored to the Online Edition.
I would suggest, at the very least, exporting some reports to your system, either to Excel or PDF, so that you have a record of what was there before you started changing things.  In the event that you want to 'undo' your changes, that would have to be done manually, but at least you'd have a record of where you'd want to get back to.
Quickbooks Online also keeps an Activity Log that tracks changes that are made to your transactions.  To access this feature:

Choose Company > Activity Log.
From any listed transaction, click the icon under the History column. This will take you to its Audit Trail page.  Data that was changed is shown in red text.

PS - Be careful not to change transactions from past years for which tax returns have already been filed.  If you need to do this, it may be wise to speak to your accountant, as it can end up giving you (and them) a big headache next tax season!
Answer: You can restore your data with QuickBooks on the desktop version.
If you want to do backup data from a hard drive or a network folder, go for the following steps.

Open QuickBooks and click open the File menu.
Open or Restore Company to open the restore wizard.
Click on- "restor a back up copy"
This takes you to the Backup copy window.
Opt the drop-down option and select the backup file saved location.
Backup file saved location will always have a .qbb extension.
Select the file and open it.

Quickbooks Online "restore point"?


Why am I all of a sudden not able to copy a list from one site to another?

Question: A couple of weeks ago I was one site, went to add new list, and it gave me all sorts of options for copying a list on another site. Doing this also, as a by-product, added the list to the list template gallery.
The options for this seem to have gone when trying to add a new list today. Has there been an update that have removed these options in the last two weeks?
Answer: What option has gone? Do you mean that you cannot add the list template into the list template gallery?
Could you please provide more details and screenshot about the issue?
And per my test in my SharePoint online environment, then I can upload the list template into the list template gallery in different site.


How to start firefox in safemode?

Question: How to start firefox in safemode using terminal,Because I don't see any safemode option for firefox in Ubuntu
Answer: Open a terminal (Ctrl+Alt+T) and run :
firefox --safe-mode

Do not forget to close any Firefox instance before running this command.

Refer to MozillaZine for more information.
Or show all options via
firefox --help

Usage: firefox [ options ... ] [URL]
       where options include:

X11 options
  --display=DISPLAY  X display to use
  --sync             Make X calls synchronous
  --g-fatal-warnings Make all warnings fatal

Firefox options
  -h or --help       Print this message.
  -v or --version    Print Firefox version.
  -P        Start with .
  --profile    Start with profile at .
  --migration        Start with migration wizard.
  --ProfileManager   Start with ProfileManager.
  --no-remote        Do not accept or send remote commands; implies --new-instance.
  --new-instance     Open new instance, not a new window in running instance.
  --UILocale  Start with  resources as UI Locale.
  --safe-mode        Disables extensions and themes for this session.
  --jsconsole        Open the Browser Console.
  --jsdebugger       Open the Browser Toolbox.
  --start-debugger-server [port|path] Start the debugger server on a TCP port or Unix domain socket path.  Defaults to TCP port 6000.
  --browser          Open a browser window.
  --new-window  Open  in a new window.
  --new-tab     Open  in a new tab.
  --private-window  Open  in a new private window.
  --preferences      Open Preferences dialog.
  --search     Search  with your default search engine.
  --recording  Record drawing for a given URL.
  --recording-output  Specify destination file for a drawing recording.
  --setDefaultBrowser Set this app as the default browser.

      -g or --debug          Start within debugger
      -d or --debugger       Specify debugger to start with (eg, gdb or valgrind)
      -a or --debugger-args  Specify arguments for debugger
Comment: was enough to let it fix itself, I just restarted w/o safemode and it worked again (with some extensions that got auto-disabled as I did nothing in safemode) thx!
Answer: You can open Firefox in safemode, but you can't directly see the safe mode option.

Open Firefox.
Open the menu.
At the bottom of the menu you will see a ? (help) - click on it.
Select start with add-ons disabled.

A pop-up appears.

Click on restart.
Now another pop-up appears.

Click on start in safe mode.
Answer: Help > Troubleshoot Mode is the newer alias for "Safe Mode".
For more details on how to use Troubleshoot Mode, refer to Mozilla Support.
Answer: Hold Shift while Firefox is starting. A dialog will appear with two buttons: Start in Safe Mode and Refresh Firefox.

How to start firefox in safemode?


Is a debt collector allowed to make a hard inquiry on your credit report?

Question: Under what circumstances is this permissible? What is the purpose of this anyways?
Answer: According to the Fair Credit Reporting Act:

any consumer reporting agency may furnish a consumer report [...] to a person which it has reason to believe [...] intends to use the information in connection with a credit transaction involving the consumer on whom the information is to be furnished and
  involving the extension of credit to, or review or collection of an account of, the consumer

See p12 (section 604). The usual interpretation of this that I've heard is that a debt collection agency that owns or has been assigned a debt can make hard pulls on your credit report without your consent. This link seems to support that (and references the same part of the act, among others):

According to the Fair Credit Reporting Act, [...], any business can access your credit history without your permission provided the business has a valid "permissible purpose." The FCRA notes that one such permissible purpose is to review your credit information in connection with the collection of a debt. Thus, if you owe money to a debt collector, the debt collector has the legal right to pull and review your credit report.

If they haven't been assigned the debt or own it outright, I believe you have a legal right to dispute it. Consult a lawyer if this is actually a situation you face.
Once use for this is if the debt collection agency has trouble locating you; since your credit report normally contains current and past addresses, this is one way to locate you.
Comment: Let's assume the debt is valid, but it is reasonably believed that they should have correct contact information on file. What other reasons could they attempt a pull for? Or are they allowed to do blanket pulls on all debtors for whatever reason they wish, if the debts are believed to be valid?
Comment: @Bigbio2002 If you owe them a valid debt (by right of the debt being assigned to them), I believe they can make pulls at their discretion, as many times as they wish. While usually these are soft pulls, I don't think there is a limit to the number of hard pulls they can conduct either. I don't know too much about this area, however, so a lawyer could give you better advice.
Comment: Fair enough, I'll take your 10 points back, muahahaha! Seriously though, I thought your answer was pretty straightforward and hit it on the head.


Convexity Adjustments Futures - Sensitivity

Question: If the market prices of SOFR futures are obtained from CME, do we still need to compute convexity adjustments when computing the sensitivity of the IR future?
Comment: The sensitivity to what? Rates? No. An 3M SOFR interest rate future has a sensitivity of 25 USD per bp per contract. This is a static value. Or is it something else you are after?
Comment: @Attack68. i guess sensitivity to the NPV. You're right yes sensi to payoff is like what you described above.
Answer: Short answer: you still need to compute for financing bias, and there will still be some nonlinearity to account for in the 1-month (but not the 3-month) since it uses arithmetic averaging instead of geometric averaging as in the case of the 3-month. But in any case, the adjustment amounts are likely smaller than with LIBOR/Eurodollars.
Long answer: see Chapter 6 of Huggins & Schaller's SOFR Futures & Options (Wiley Finance) (you can get 30% off by using CME's discount code).


Install MDT application based on Make/Model using SQL Database

Question: I am trying to install applications using Deployment Toolkit (MDT) 2013 Update 2, based on the specific Manufacturer and Model of the client computer. But the applications are not installing.
I have installed SQL Express using the default settings (which creates a database called SQLEXPRESS)
I have installed SQL Management Studio and given access rights to the database to an account called MDT_BA. As per the following article.
https://technet.microsoft.com/en-gb/itpro/windows/deploy/use-the-mdt-database-to-stage-windows-10-deployment-information
I have gone into the SQL Configuration Manager and enabled 'Named Pipes'
I have created an inbound Firewall rule for TCP port 1433 and UDP port 1434 and also added an inbound rule for "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\Sqlservr.exe"
I manually started the "SQL Server Browser" service.
I have created my MDT database using the following settings.

Server Name: testmdt01.test.local
Instance: SQLEXPRESS
Port: (blank)
Network Library: Named Pipes

I have run a Powershell command to query the Make/Model on my client machine.
Get-WmiObject Win32_Computersystem `
| Format-List Name, manufacturer, model, SystemType

...and then added the returned values into the MDT 'Make and Model' table

Make = HP
Model = HP ProBook 450 G4

Finally, I added a Task Sequence to "Install Applications" (Not sure if this is required) and set the value 'SkipApplications=YES' in the Custom.ini to skip the applications screen.
I have also checked the applications packages by installing in the traditional way using the Task Sequence.
Any pointers/help greatly appreciated.
Answer: Open the properties of the HP ProBook 450 G4 inside the MDT database's Make/Model registrar and add the applications manually in the "Applications" tab as a "LiteTouch Application".