$\sum\limits_{k=1}^{\infty} {1 \over k}{1 \over 2k-1}$ how to show that this is $ 2 \ln 2 $?

Question: Maybe I'm just blocked currently, I think I had it done myself some weeks ago but cannot find/recover the derivation of this equality:
$$\sum_{k=1}^{\infty} {1 \over k}{1 \over 2k-1}  =  2 \ln 2 $$
I have the result in my sketchpad and just checked at Wolfram Alpha, that it is correct. But I cannot remember how I did find it; the numerical approximation needs much more terms than I would use normally for a heuristic. So maybe I've taken this from Wolfram Alpha from the beginning; but anyway: I think the derivation cannot be too difficult. I'm stuck at the moment - could someone help with the derivation?
Comment: Are there similar series for algebraic multiples of logarithms?
Answer: $$\ln2=\sum_{n=1}^\infty\frac{(-1)^{n+1}}{n}=\sum_{k=1}^\infty\left(\frac{1}{2k-1}-\frac{1}{2k}\right)=\frac{1}{2}\sum_{k=1}^\infty\frac{1}{k}\frac{1}{2k-1}\;.$$
Comment: Ah, that was really a quick answer. And simple, thanks!
Comment: @GottfriedHelms It's MERCATOR SERIES TIME.
Comment: @David: yes, true. After I asked the question I gave it another try myself, assuming a simple solution based on the mercator series. But Joriki was much quicker and even has it in a one-liner! :-)
Answer: Expand ${1 \over k}{1 \over 2k-1}$ in partial fractions to ${2 \over 2k-1}-{1 \over k}$. Do some cancellation and end up with twice the alternating harmonic series, which converges to $\ln 2$.
Comment: The downside of this approach is that you're cancelling elements with indices that are apart by a factor of $2$, so you have to make some arguments why you're allowed to do that -- in my approach, you're only combining elements with successive indices, which is more obviously OK.
Comment: @joriki, you're right, of course.
Answer: Joriki has given an excellent answer. Here is another way to do it.
Consider $$f(x,y) = \sum_{k=1}^{\infty} x^{k-1} y^{2k-2} \tag{$\clubsuit$}$$ We then have from the formula for geometric series$$f(x,y) = \dfrac1{1-xy^2} \tag{$\spadesuit$}$$
Now integrate $(\clubsuit)$ and $(\spadesuit)$ to conclude what you want. Below are the details.

Integrate $(\clubsuit)$. We then have
\begin{align}
\int_0^1\int_0^1 f(x,y) dx dy & = \int_0^1 \int_0^1 \sum_{k=1}^{\infty} x^{k-1} y^{2k-2} dx dy\\
& = \sum_{k=1}^{\infty}\int_0^1 \int_0^1 x^{k-1} y^{2k-2} dx dy\\
& = \sum_{k=1}^{\infty} \dfrac1k \dfrac1{2k-1} \tag{$\diamondsuit$}
\end{align}
The change of infinite sum and integration is justified since the convergence of the series is uniform in any closed set of the form $[0,1-\epsilon_1] \times [0,1-\epsilon_2]$.
Now integrate $(\spadesuit)$. We have
\begin{align}
\int_0^1\int_0^1 f(x,y) dx dy & =\int_0^1 \int_0^1 \left(\dfrac{dx}{1-xy^2}\right)dy\\
& = -\int_0^1 \dfrac{\log(1-y^2)}{y^2} dy\\
& = \log 4 \tag{$\heartsuit$}
\end{align}
where we make use of the fact that $$\int \dfrac{dx}{1-xy^2} = - \dfrac{\log(1-y^2)}{y^2} + \text{constant}$$ and $$- \dfrac{\log(1-y^2)}{y^2} = \dfrac{\log(1-x^2)}{x} + \log(1+x) - \log(1-x) + \text{constant}$$
Now comparing $(\diamondsuit)$ and $(\heartsuit)$, we get that
$$\sum_{k=1}^{\infty} \dfrac1k \dfrac1{2k-1} = 2 \log 2$$


Status of the application

Question: In reference to the patent: US20070257041
Hello
What is the status of this application?
Thanks
Answer: The best place to determine the status of US patents and applications is the US Public Pair site. In the case of US20070257041, the current status is "Abandoned -- Failure to Respond to an Office Action".  The status date is 10-15-2008 which means the applicant failed to respond to an office action (in this case a non-final rejection) in 2008. While it may be possible to resurrect the application, at this point I'd rather doubt it will happen.

Status of the application


Validate hmac with hashed stored key

Question: What if an HMAC is correctly generated and sent with the data to the server, so far I know the server needs to know the original data with which the MAC was created in order to re-create the MAC and compare, but in this scenario the server has everything except that the key is hashed and not stored "plain". How can the server validate the MAC?
Comment: You can't that's the point, it verifies that the HMAC was generated from a particular set of data with a particular key. Well, with a high probability. Chances of collisions are low if done properly.
Comment: Anyone verifying the HMAC must *also* know the secret key.
Answer: If you don't know the key, you can't generate the HMAC. That's the whole point of a HMAC - it's a quick way to provide message integrity using existing key material. If you could regenerate the HMAC without the key, an attacker could simply generate a HMAC for a different message and alter the payload.
Comment: my question was edited and lose the sense, what I wanted to say is: if the server has all the data needed to re-generate the HMAC but the key is stored hashed not "plain". Is there anyway to validate and compare the HMAC sent to the server ?
Comment: No. If you hash the key, you can't use it. You no longer have the key at that point.
Answer: The significant difference between a (H)MAC and a hash is the key component. The idea of a MAC is, that it should only be possible to generate a specific MAC for a specific input by knowing a specific key. So if someone can generate a specific (given) MAC output for a given message input, he proves having the same key that was used to generate the given MAC output.
In other words: If someone calculates the MAC x of the message m by using the key k (but only publishes m), everybody who can generate x proves to have knowledge about the key k.
To answer your question: If you need to generate the MAC without having the key on your server, you probably want to use a hash instead of a MAC.
Comment: Or the server must also know the secret key.
Answer: If you want a kind-of MAC which is such that it can be verified by using a "transformed key" which is itself not sufficient to compute other MAC values, then you do not want a MAC. What you want is a digital signature algorithm. One way to describe a digital signature algorithm is the following: it is like a MAC where the key for generating new MAC values, and the key for verifying a MAC value with regards to some data, are distinct. The two keys are mathematically linked with each other (the verification key works for MAC values which were generating with the corresponding generation key, and none other), but it is not feasible to recompute the generation key from the verification key. The verification key can thus be made public, while the generation key is kept private.
The most widely used signature algorithm is RSA (RSA is actually two algorithms, one for encryption and one for signatures; I am talking about the one for signatures; both algorithms share the same core mathematical operation, but are still quite different in their usage details).
HMAC is not a digital signature algorithm (despite what sloppy terminologists occasionally pretend).

Validate hmac with hashed stored key


Audio files/regions randomly changed in length on garageband

Question: I was recording my electric guitar into garageband, I noticed I was recording in a different track so I deleted the recorded track, then that action suddently changed the length of my audio files. I hit the exit button, clicked dont save, and then re-entered to see if it was just a bug. When I re-entered, a pop up message said 51 audio regions changed in length with no explanation. Has anyone who uses garageband to track instruments had ths problem? How can it be fixed. (Also, I had this issue many times, but in all those times only one or two audio files were changed, not 51 times like now. And I already tried restarting my Mac.)
Answer: With a bit of luck, you can undo those actions that caused your issue with CMD+Z (repeat it until you get the deleted track back).
The only other thing I can think of, is that your projects' BPM changed. If the BPM is increased, it will also speed up all audio- and midi parts, making them appear shorter. But I am sure you would have noticed this as the tempo changes and everything sounds faster.


2D sprite is 'blinking' when animation is playing

Question: When I fire a bullet, instead of frames 4 and 6, the sprite selector in the sprite renderer component says "Missing (Sprite)" and 'blinks' for a frame, not showing anything.
Comment: You renamed something. Just gotta redo those frames in the animation.
Comment: You must provide more content and detail to receive an answer to your question. Screenshots of your animator will help. Also, what you have tried saves people from wasting their time, also.
Answer: Check what layer the sprite is on. Make sure it's not on the same layer as the background. Otherwise it might occasionally draw behind the background instead of in front, making it look like it's blinking.
Comment: This doesn't account for the "Missing (Sprite)" message mentioned in the question - what would you recommend to solve that?
Answer: This sounds like an issue with your script.
If you are using a script to cycle through your sprites, make sure that the variables containing your sprites are assigned.
Comment: I'm not using a script, it's just a .anim with mechanim animation. Thanks though!
Answer: This problem occurs when you have two objects lying in the same layer.
Changing the 'order in layer' in the objects Sprite Renderer fixed this for me. 0 for the layer you want at the backmost and higher value for objects you want at the front.


Setting up axis2 soap server

Question: I am trying to create a simple SOAP webservice (calculator) to learn the basics of this technology. I am new to SOAP so I have already done some things but I am not sure what to do next.
I have chosen a top-down approach, which means creating a wdsl file first and then generating the code automatically.
I have created a wsdl file with the service description and used that to generate java files. I have it both in 1.1 and 2.0 format. To get 2.0 files I used the wsdl2java tool of axis2, for 1.1 I used java wsimport tool.
From the wsimport tool I got the following files:

package-info.java
ObjectFactory.java
CalculatorService.java (name of my service)
Calculator.java (name of my portType)
Input.java (name of a complex type)

The wsdl2java tool gave me the following files:

services.xml
CalculatorService.wsdl
Output.java (name of output element)
Input.java (name of input element)
cInput.jaba (name of input complex element)
ExtensionMapper.java
CalculatorServiceCallbackHandler.java
CalculatorServiceMessageReceiverInOut.java
CalculatorServiceSkeleton.java (includes implementation of interface)
CalculatorServiceSkeletonInterface.java
CalculatorServiceStub.java

In the wsdl2java files I guess I have everything I need excpept the server implementation. As for the wsimport ones they are missing an implementation and I am not sure where to add it. The server implementation is also missing.
At first I would like to run it as a local service (local server) to test that it is working and also write a client later.
I found an example of a server implementation here: In-process SOAP service server for Java.
It seems quite simple and if possible I would like to use this approach. But I am not sure if it would work with the files I have generated (wsdl2java or wsimport). I also have an Apache server installed if it would be of use. So I am looking for advice, which set of files to use to set up the server and what would be the easiest way to do it.
Also I am wondering if the namespaces used in the wsdl file affect the service availability? Becuase they have to be URI-s but I do not have one for my service at the moment. So for targetNamespace, xmlns:tns, endpoint address, etc I used random URL-s. Would it work if I am trying to run it locally or would it create issues?
Answer: Ok, I think I found the solution myself.
Used Tomcat server and eclipse axis2 plugins to get the server and client working.
This was a good tutorial in my opinion: http://eclipse.dzone.com/articles/web-services-development-with-

Setting up axis2 soap server


Wheel rim ID to match tire. Am I reading this chart correctly?

Question: I need a replacement wheel for my kid's 24" mountain bike. I want to keep his front tire the same width 2.25", and just need to know the right wheel rim dimensions. I was referencing a wheel chart from WTB to make sure I'd be buying a wheel with the right rim width for a 2.25" tire, but the chart is a little confusing in that size as it seems to condense all 2.1-2.3" tires down the same rim range. So, according to this chart, I should get any wheel with a rim ID between 20mm and 25mm, right?
https://www.wtb.com/pages/tire-rim-fit-chart
Answer: I completely agree that the WTB chart for mountain bikes is confusing. This is because the tire section widths in inches and the tire section widths in mm are inconsistent: the Medium category of 2.1"-2.3" should actually extend up to 58mm whereas it appears to only include 54mm. Given the inconsistency, I'd be inclined to go with the mm values since it seems to be these that determine the recommendations.
A 24" by 2.25" tire corresponds to ETRTO size 57-507 (see e.g. here, How many tire sizes are there?). And, according to the WTB chart, 57mm implies a suggested optimal rim width range of 25mm-35mm. The chart by Schwalbe available here suggests a wider range of 19mm-40mm.
Comment: Yeah, in the WTB chart I couldn't tell if I should just round to the nearest mm or if WTB was specifically trying to make a point that for MTB tires in that range a narrower rim is better. I guess the take-home is that something like a 30mm rim would be a sweet spot, but at this tire size just pick the best bang-for-your-buck wheel that's within 10mm of that.
Answer: Based on the WTB tire and rim fit chart, you are correct that for a 24" tire with a 2.25" width, the optimal rim inner width range is 20-25mm.
Specifically:

Your tire size of 2.25" falls under the ETRTO size of 54-559. The first two digits 54 indicate a tire section width of 54mm, which converts to approximately 2.25 inches.

For a 54mm/2.25" tire, the chart shows optimal performance with rims that have an inner width of 20-25mm.

So when looking for a new 24" wheel, you'll want to find one with a rim inner width in that 20-25mm range to match well with your 2.25" tire.

Any 24" wheel with a rim ID measurement between 20-25mm should provide good fit and performance with your existing 2.25" mountain bike tire based on WTB's recommendations.

So in summary, yes, according to WTB's tire and rim fit guidance, a 24" wheel with a rim inner width of 20-25mm is what you'll want to get for optimal compatibility with a 2.25" tire. That range will give you good options.
Comment: This is not correct: a 24" by 2.25" tire corresponds to ETRTO size 57-507. The size 54-559 corresponds to 26" by 2.10".
Comment: Also: this answer is likely generated by AI given its style and the pattern of this user's contributions across the SE network.


Spontaneous breaking of Lorentz invariance

Question: Is it possible to spontaneously break Lorentz invariance, i.e., have a Lagrangian that respects LI but a vacuum which does not? If it is possible, why isn't there even the slightest hint of the Minkowski vacuum not being Lorentz invariant? (Or in other words, would this pose another fine-tuning problem?)
Answer: Dear D-brane, yes, in principle, one could have theories that spontaneously break the Lorentz symmetry. Just add a vector field (or another non-scalar field) and some potential of the form
$$(V_\mu V^\mu - v^2)^2 $$
which will drive $V_\mu$ towards a vector of the right length, i.e. $(v,0,0,0)$ which would pick a preferred reference frame at each point much like the Higgs boson picks the "right" direction in the space of doublets.
The Lorentz symmetry has been checked at an incredible accuracy, so because the breaking above would break the Lorentz symmetry and introduce Lorentz-breaking coefficients for all terms in physics, it is not just one fine-tuning. It would be a collection of dozens of fine-tuned quantities - for each term in the Lagrangian that we can measure, there would be at least one fine-tuned quantity.
As far as I can say, this is clearly excluded, at least for any microscopic value of $v$.
Comment: What exactly do you mean by "this is clearly excluded"? Isn't having dozens of fine-tuned parameters a serious problem? If the term you wrote doesn't affect renormalizablity or introduce anomalies, shouldn't we expect it to really exist in the Lagrangian so that the fine-tuning problem is magnified enormously?
Answer: I find it interesting to read the other answers. It shows the great gap between high energy and condensed matter physics. If you write down a simple relativistic model for your favourite solid then it obviously should break Lorentz invariance spontaneously (both boosts and translation as well as rotation). And yes it is physical as most objects around us are in fact in their solid phase.
Answer: It's easy to write down such models, but they don't describe our universe. We can study models which don't describe our universe, but we have to make clear they are not about our universe.


When should I use fatherland instead of motherland?

Question: Is it politically correct to use either word (fatherland, motherland) to refer to the country of birth? Which one is more appropriate and when?
Answer: Let's look at a subtle difference between these two nouns:

Fatherland (n): an individual's native country. But it is used more to show patriotism.

And,

Motherland (n): individual's native country.

The YourDictionary gives an example for fatherland that reflects patriotism -
He called upon them to defend the socialist fatherland.
Comment: I didn't downvote, but it's helpful to link to the dictionaries you take the examples from :)
Comment: Any reason why it got a down vote? Those who did it should mention it. There is also a reference from Oxford.
Comment: @WendiKidd. I asked the one who downvoted it! Anyway, links given.
Answer: Both of these terms are a little loaded. In particular in my mind "fatherland" conjures up Nazi Germany, so I would never use it (but maybe that's just me). I guess I could use "motherland" if I was feeling particularly sentimental, but "homeland" conveys the same with less baggage.
Comment: +1 for calling the terms loaded and for the "homeland" alternative. I would suggest that at least in America, these terms are used for parody or mockery more so than for sincere intents. We associate the terms too strongly with cold-war era Soviets (our enemies) and WW2-era Nazis (also our enemies) which makes them hard to use now. "Homeland" is much better and has no particular baggage that I can perceive.
Answer: They both been "native country." But with some slight differences.
"Fatherland" is more of a reference to NATION, that is the concept.
"Motherland" is more of a reference to the physical "land," that makes up a country. Think, "Mother Earth."
Answer: The main semantic difference in English is that while all terms refer to one's native land or country of origin, motherland and fatherland also have the connotation of the land of one's ancestors.
Therefore, motherland/fatherland aren't as often applied to countries in the Americas, even if many of us have lived here for a dozen generations or more.
The source for the below paragraph can be found here.

Motherland is the national personification of the concept of indonesia. The hindu religion, referring to the mother earth goddess earth or mother earth. The sky father is the father or lord of the sky. Meaning motherland for indonesia is none other than my fatherland, my blood spilled soil, shelter, land that is holy, sacred lands, fields and forests of the mountain lake, store of wealth. The motherland into the figure of a beloved mother, mother who cradles and raise their children, who can grieve, grieve, tears, moaning and praying, rejoicing, and a place to to worship and serve. All citizens of indonesia for the child, the child or his beloved son, since this is a national concept, the meaning of the context to talk about the concept of statehood. Indonesia is indonesia and is absorbed and interpreted the concept of special significance in the realm of national struggle indonesia.

As to a "rule" for the use of fatherland vs motherland, I think the choice would depend upon the connotation sought by the author in a particular context.
Fatherland suggests government and order.
Motherland connotes birth and nurturing.
Comment: -1 for not citing where you took that quote from.
Comment: Also see the answer's source [here](http://english.stackexchange.com/a/105735/11482), and [here](http://assamnet.org/pipermail/assam_assamnet.org/2010-January/024731.html) (or [here](http://www.dailywritingtips.com/motherland-or-fatherland/)).
Comment: I have checked out your answer
Comment: I'd never thought about that difference, but I like it.
Comment: Fine i have mentioned.


Xkill command renders wine useless

Question: I play Skyrim on a Ubuntu 16.04. Every once in a while the game freezes so I searched online for a solution. I discovered the Xkill command from the terminal. When I use this command, Wine won't open any more programs, even those not Skyrim. If you could figure out a solution for this, please answer. Also if you could figure out why my Skyrim keeps freezing I would be very happy.
Comment: What is the command line that you used and what is your system. Also please only ask one question per post.
Comment: All I type is 'xkill' and click on my frozen game. What do you mean by system?
Answer: The xkill command is a little bit primitive, although sometimes useful.
Much more sophisticated is the pkill command (pkill man page).
For example, shut down all Firefox browser instances can be done with :
pkill firef

(Yes, only the relevant part of the application command is needed)
Shut down all commands running by user Dominico :
sudo pkill -u dominico

Sometimes pkill will not work when an application is called in a script or through an interpreter, e.g. bash or python here. In that case you can consider shutting down the "program helper" which starts the other program.
Note : Beware, using pkill command to kill bash processes would be very counter productive on your local computer as all your login processes might be killed, and it would be much worse on a server!
Comment: how do I figure out the name of the program
Comment: Did you try : pkill skyrim   or pkill wine when it froze again ? The ps auxw|less command can also help ?
Comment: Well, I just typed pkill wine and the game froze. I tried pkill skyrim and pkill wineprogramloader (because that is what shows up on the sidebar).
Comment: I just discovered that if I use the pkill command and then the xkill command, I can get back on without having to restart my computer.

Xkill command renders wine useless


iCloud web interface still on Daylight Savings Time

Question: Although my settings are Pacific Time (Cupertino), the time shown on incoming mail messages is one hour too late, using the web interface. The message time on my iPhone is correct. Hunh?
Answer: BY web interface I assume you mean being logged into icloud.com.   If thats the case check your timezone for icloud.com
Find your name on the right end of the top title bar at iCloud.com then click the V symbol to the right of your name to find "iCloud Settings" and open these settings.  There are very few settings here, but one of them is in fact "time zone".
Comment: and it's Pacific Time (Cupertino)!


Why does my clarinet play a "Bb" when the music shows a "C" and I finger for a "C"?

Question: I am trying to learn to play the clarinet and was doing fairly well until I tried to play a tune with my granddaughters on flute and piano.  My clarinet was not in tune with their instruments.  I have a "Teach yourself" type of book that includes fingering.  When the music indicates a "C" and I set my fingers to what the book says is a "C" it actually plays a "Bb".  Why doesn't the music show a "Bb" for that fingering?  Do I need to transpose all my music to enable me to play with other people on other instruments?  Why did my book tell me that a certain fingering plays a "C" when it actually plays a "Bb"?
Comment: You may start with [this question](https://music.stackexchange.com/q/5374/2600) and its answer to learning about transposing instruments.
Comment: If you teach yourself book about clarinet doesn't mention it's a _transposing_ instrument, get another book. It may take some time to wrap your head around the concept, but a descent book about clarinet definitely needs to explain it.
Answer: Pretty sure this is a dupe, but - the clarinet, like several other instruments, is a transposing instrument. Yours makes the sound a whole tone lower than the music says. So when you see and play a C note, a B♭ comes out. There are other clarinets, but the 'B♭' is the most common.
You'll have to either learn to play by transposing up a tone from your music, (like I did with trumpet - a similar idea), or get the piano music transposed down a tone, either physically, with a good reader - or, these days, by hitting the transpose button on the keyboard.
Answer: The reason is about professional play of similar instruments of different sizes (and therefore pitches).
Think of "C" as a finger position: you read a C, you put your fingers in that position.  If you pick up a B-flat instrument or whatever, then the same finger position will play a B-flat.
It's up to the COMPOSER to figure out the right transpositions, so you don't have to transpose in your head while you're playing your part from sheet music.  I mean, some pieces even have multiple instruments played by the same person!
Comment: This starts out on the right track and then gets lost, failing to explain anything relevant. For one thing, there are Bb, C, Eb, and A clarinets (and I think a rare D as well)
Comment: In fact, this is the *whole* motivation for having transposing instruments at all. The entire business of notating X as Y would be totally pointless if there weren't a large number of people who routinely play different instruments of the same class and can profit from it.
Comment: I'm not sure what the disconnect is for you.  Maybe you can explain what you think I neglected to mention?


Analyzing a V/V Measure in a Mozart piece

Question: Please help me understand this. Thank you in advance.
Screenshot attached.
From Mozart's "Hafner" Serenade (K 250 ), Andante (2).
In measure 8, the harmony is A7b9 / Bb.
My current understanding is that A7b9 "should" function as a pre-dominant to D minor.
Yet the next measure is D Major. And it sounds magnificent.
I have changed the F# to F (D minor) in measure 9, and it does not have the melodic quality inherent in that passage.
Should I understand that a V7alt. -when in a pre-dominant function in a classical piece- is not always bound by post-modern music theory?
And that the "chromatic" movement (A7b9 / Bb [as a V7/V] to D MAJOR) is actually not uncommon?
Hopefully this will help me analyze other Mozart pieces, where his chromatics are daunting.
Comment: Btw, Gary, I wonder where you found this edition. It's full of mistakes. If the horns really are in F, these bars sound awful! Their bar 9 would work if they were in horns in C, but then their bar ten would need to be written a tone higher. Shouldn't they BOTH play bar nine? If not there should be a rest for one of them. Why are 1st and 2nd flutes swapped? Likewise the bassoons. The first C natural in the flutes should be a semiquaver. Flutes and strings should all have slurs over that dotted figure: Dee-a dum: not Tum ti tum.
Comment: (Smiling) Excellent! The mistakes are all mine. I was playing with graphical software and slapped the measures together in a minute to provide a visual. I should have put the just the Strings, for that is the passage where the harmony baffled me. (Another typo of mine: the measure marked 9 is actually measure 8....). I am using the following link to formally analyze the piece, (page 33): https://archives.nyphil.org/index.php/artifact/1eecea56-9eb2-4126-84ad-5a515bcd1a4c-0.1/fullview#page/50/mode/2up
Comment: Ha! When you said "it sounds magnificent", I looked at it and thought, "It doesn't sound THAT good!!" Yeah - just the strings would have worked :-) That looks like an interesting site, btw.
Comment: :-)Thank you for your assistance. I'll need more of it over the summer. I'm brand new here. That was my first question. Can I somehow include you in a future request for assistance with theory?
Comment: Welcome to the group, Gary! You can't ask a specific person a question, but you could write a comment to your question and include an 'at'-sign, followed by a user's handle (e.g. _@Old Brixtonian_). This alerts that person and draws their attention to your question.
Comment: Thank you, sir! I'm grateful for your courtesy. I am neither a performer, nor a composer, nor an academic. Just an Old Upstate New Yorker, mesmerized by Mozart's genius, and absolutely overwhelmed with the thought that he could "hear" -and orchestrate- what he wrote alone at night.....@OldBrixtonian
Comment: @OldBrixtonian the horns are originally notated in G with written pitches C-D-C-(GD)-(GD), so sounding pitches G-A-G-(DA)-(DA).
Comment: @phoog: Yes. That'd work :-)
Answer: It's not unusual for a dominant chord to move to either the major or minor (relative) tonic chord, even in the presence of the chordal b9, which can be justified through modal mixture. Consider that even the presence of the leading tone in minor is the result of an alteration.
In this case, since D major is itself the dominant, that's where Mozart wants to be. D minor would serve a different function.
Comment: This answer is concise, and explained three key aspects of the chordal situation clearly.  Your response is very much appreciated.  Thank you.
Answer: Perhaps the more interesting question is how Mozart works B♭ into the eighth bar of a movement in G major.  That the phrase ends with a V-I cadence in the tonic, therefore using a D major chord, is not at all surprising.
First, I disagree with the analysis of A7♭9.  The A appears only in the second beat of the measure as a passing tone.  It isn't structural.  A more natural analysis is C♯º7/B♭, so it's the third inversion of viiº7/V.
This is also a pre-dominant harmony, of course; the main difference with this analysis is that it relegates A to a less important role.  It's also expressed in terms more favored by classical theory, but that is not particularly critical here.
It also doesn't answer the question.  To do so, let's analyze the whole phrase.  In the first five measures, the harmonic rhythm is slow. The harmony changes every two measures.  We have six beats of G major, six beats of D7, and a cadence on G major.  In the sixth bar, the harmonic rhythm changes: there is a new harmony on each beat:
G - C/E - G/D - A7/C♯ - F♯ø7/C♮ - G/B - C♯º7/B♭ - A - C♯º7/G - D/F♯ - D7/F♯

In Roman numerals, that's
I - IV6 - I(6/4) - V(6/5)/V - vii(4/3) - I6 - vii(4/2)/V - V/V - vii(4/3)/V - V6 - V(6/5)

There are two things of note.  The first is easier to see in the chord/bass analysis, which is the descending bass line G-E-D-C♯-C♮-B-B♭-A-G-F♯.  This helps to explain how Mozart introduces the B♭.  The second is increased instability and ambiguity of the harmonies in the passage where the harmonic rhythm is faster.  You could argue a bit about it; for example, you could analyze the progression from the third or fourth chord relative to the dominant, in which case the fifth and sixth chords are not vii(4/3) and I6 but vii(4/3)/IV (of V) and IV6 (of V).  This gives us a progression of
[G maj:] I - IV6 - I(6/4) (= D maj: IV(6/4))
[D maj:] V(6/5) - vii(4/3)/IV - IV6 - vii(4/2) - V - vii(4/3) - I6 (= G maj: V6)
[G maj:] V(6/5)

When you look at it this way, you see that the progression has the standard functional pattern of movement to subdominant to dominant to tonic.
In any event, the C♯º7 chord has a secondary dominant function as you correctly note.  I would suggest, however, that thinking of it as the dominant of D minor is slightly off the mark; it's better to continue to think of it as a pre-dominant.  Since it has a B♭, you can think of it as a pre-dominant "borrowed" from the parallel minor key of G minor.  After all, this passage still makes musical sense and still sounds like Mozart if we use B♮s instead of B♭s.
Looking at it this way, we can say that the B♭ is a feint toward G minor, not D minor.  But since we have to go through the dominant of D major (especially D7), we're not fully committed to G minor, and in fact when we leave D for G, we go to G major instead, back to the home tonality.

As a postscript, this use of the fully diminished seventh chord to introduce the dissonance and tension of minor tonality into major-key music is fairly common.  The first thing I thought of was the Recordare from Mozart's Requiem, but of course Bach also loved his diminished seventh chords, and, sure enough, there are several in the first prelude from the Well-Tempered Clavier.  Those in measures 12 and 14 are, in particular, part of a similar chromatic descent.
Comment: Just read this. My sincere gratitude, Phoog. I must take some quiet time and study your much deeper analysis ( "...The A appears only in the second beat of the measure as a passing tone. It isn't structural..."). That caught any attention immediately.  It's a Holiday weekend here. But I am looking forward to diving into it as soon as I can.
Comment: BTW:  Don't know if you caught this from me in another reply: ""The mistakes [in the graphic] are all mine. I was playing with graphical software and slapped the measures together in a minute to provide a visual. I should have put the just the Strings, for that is the passage where the harmony baffled me...."" I am using the following link to formally analyze the piece: https://archives.nyphil.org/index.php/artifact/1eecea56-9eb2-4126-84ad-5a515bcd1a4c-0.1/fullview#page/50/mode/2up - Again: Thank you.
Comment: @GaryAndrews I did notice that but was working from a different score so didn't pay much attention.  Functionally, the A major is also a secondary dominant to D major-or-minor (it shares with the C♯º7 the two common tones of C♯ and E), so it's not really critical whether you count it as a structural chord (in which case the harmonic rhythm remains in quarter notes) or a passing harmony (in which case the harmonic rhythm has slowed down to the measure).  I am leaning toward the second option, but in any event A7♭9 seems wrong: it implies that A and B♭ sound simultaneously, which they don't.
Comment: "....the descending bass line G-E-D-C♯-C♮-B-B♭-A-G-F♯. This helps to explain how Mozart introduces the B♭. " Indeed. I missed going up an Octave (B♭) on the weak beat before continuing downward. To me, this chromatic line harmony is captivating, as is the harmony in Lacyrmosa (Requiem). Lastly: "you can think of it as a pre-dominant "borrowed" from the parallel minor key of G minor. After all, this passage still makes musical sense and still sounds like Mozart if we use B♮s instead of B♭s." Yup. Your analysis will surely help my future studies. Now on to the Prelude in Bach's WTC....
Comment: @GaryAndrews I'd be curious to know what you make of the passage where the bass goes F-F♯-A♭-G (where someone later added an extra measure in the middle, accounting for its inclusion in Gounod's Ave Maria).  I've never been satisfied with any Roman numeral analysis of this progression, which helped to lead me to the conclusion that although RNA is a useful tool for analyzing Bach's music, one should not be surprised that it breaks down in some places because it is after all anachronistic.


Special relativity and Newton's 3rd law

Question: When we think about Newton's 3rd law we assume that a change in action leads to a simultaneous change in the reaction. If there are two objects at a distance and this change happens at the same time at an inertial frame of reference , at one other this change does not happen at the same time. How can we explain that? Do we consider that Newton's third law still works but the change just does not happen at the same time? I do not know if this thought is right. I would appreciate if you could explain to me the relation between special relativity and the 3rd law.
Answer:
If there are two objects at a distance and this changes happens at the same time at an inertial frame of reference at one other this change does not happen at the same time . How can we explain that ?

You have identified the key problem with action at a distance. This is explained simply by saying that forces acting at a distance is not permitted in the laws of physics. This is usually called "locality".
The main reason that Newtonian gravity is incompatible with relativity is this notion of locality. Newtonian gravity is non-local so it needed to be replaced by a local theory of gravity, like general relativity.
Answer: As @Dale points out correctly, this is certainly a problem for forces like this whose effects are felt instantaneously. Events that are simultaneous for one observer are necessarily not simultaneous for any observer moving relative to them, and so if two events happen "instantaneously" in one frame, they won't happen instantaneously in any other frame!
This has an important consequence to the notion of rigid bodies in Special Relativity, for example. Our naive idea of a rigid body says that when we push one end of it the other end moves simultaneously, but as should be clear from the above argument, the object would not appear rigid in any other frame!
More importantly, the third law (as usually understood) is not true in general in Special Relativity. The best example (well, the only one I know) for this is given in my favourite chapter of the Feynman Lectures Chapter 26, where he shows that the forces on two charges moving perpendicularly to each other are not equal and opposite. (See Fig. 26-6 of the link posted.)
The reason for this is that in classical mechanics I believe the third law is just a restatement of the principle of conservation of momentum. It turns out (as often happens in physics) that while the third law does not hold here, momentum is still conserved: electromagnetic fields have energy and momentum, and the total momentum of the field and the particles is conserved, it's just that some of the momentum of the particles has been transferred to the field.
Comment: The answer is basically right, and good enough that I don't feel prompted to give another +1. In relativity it is much easier to use conservation of momentum, whereas care is needed to give a correct definition of force. We don't usually talk of force in relativity, because conservation of momentum covers both the second and third laws.
Comment: If something's wrong with this answer, do let me know. I don't see anything incorrect in it, but I could be wrong.
Comment: @CharlesFrancis I agree, thanks for the comment. The answer initially had only a negative score, so I was concerned that there was something wrong in it that needed to be corrected. :) Indeed the four-force seems to be much a more more annoying four-vector to work with than the four-momentum, and with much less physical intuition associated with it. However I'm not sure what you mean when you say that the conservation of momentum "covers both the second and third law". Wouldn't one still need the second law to quantitatively associate a force with a phenomenon (say the Lorentz Force)?
Comment: Yes, if one wants to associate a force, for example to show the Lorentz force, then one uses the second law. The second law can be seen as a definition of force, but as a definition it doesn't add anything fundamental to conservation of momentum which is the underlying physical principle. For example, conservation of momentum holds in qm, and can actually be proven in relativistic qm, but concepts like velocity and acceleration do not even make sense in qm.
Comment: But we don't AFAIK have any examples of forces whose effects are felt instantaneously.  Even without considering special relativity, when we push on one end of that rigid bar, the force isn't transmitted instantaneously to the other end.

Special relativity and Newton's 3rd law


Data Sampling while preserving the underlying distribution

Question: I have a large 10-15 dimensional data set with close to 10 million points. I want to test some algorithms over a chunk of this data. But I don't want the character of this data to be lost by selecting a random chunk (say first 100 thousand points). I want to get a sample of this data such that if in some part of space the data points are distributed densely as compared to some other part of the space, then this character should be preserved in the sample also. Are there any open source tools for doing this or any algorithm that can quickly be implemented ? The exact distribution of this data (as a mathematical expression) is not known.
Comment: Why not _more than one_ chunks, and compare the results of the algorithm?
Comment: Are all dimensions equally important? If not, can you roughly rank them in importance?
Answer: Use reservoir sampling. It's really simple, and it will give you a random sample in one pass over the data set, without needing random access.

Fix your sample size. Say 10000.
Take the first 10000.
Initialize i to 10000.
For each following sample, increase i. If random(1...i)==1, replace a random one of your existing samples, otherwise discard the new sample.

The chances of an object surviving in the reservoir until the end is the same as being chosen by random sampling without replacement.

Vitter, Jeffrey S. (1 March 1985). "Random sampling with a reservoir". ACM Transactions on Mathematical Software 11 (1): 37–57. doi:10.1145/3147.3165.

http://en.wikipedia.org/wiki/Reservoir_sampling
Answer:
I want to get a sample of this data such that if in some part of space
  the data points are distributed densely as compared to some other part
  of the space, then this character should be preserved in the sample
  also.

If I understand correctly, you want the probability distribution of the sample you pick from your large dataset to be similar (to approximate) the distribution of the large dataset. But this is guaranteed if you select the 100K points at random. Just pick sufficiently many rows between 1 and 10 million, without replacement (without picking the same row twice).
This is usually referred to as simple random sample.


No sound and volume icon

Question: I have a Mac mini and the sound has disappeared.  I have also lost the sound icon off the toolbar.  I went to preferences for the sound and see that mute is checked.  I can't un-check it because it is in gray-scale.  Any ideas?
Answer: Try to open the system preferences then click sound,on the sound you can see the Internal Microphone below the Name,on the lower,beneath the output you can see the Show Volume in Menu Bar,you can put some check on it and everything's gonna be alright :)
Answer: I had it once before. You should check your audio-input. Good chances there is a red light inside your input.
Inside your audio jack, there is some kind of spring which controls your output (internal speakers or headphones). And for some reason, this switch inside the audio jack is stuck. Try using a toothpick (if you dare) and try to unlock the quill.
If using a toothpick did not work, you need to take the computer in for service, because there is probably something wrong with your I/O board.
If there is no red-light, my answer expires.
About the disappearing of the icon in the menu-bar, you should try and reset your PRAM.
Comment: @Michiel I doubt the PRAM is going to help the menu bar icon much. The OP needs to check the "Show volume in menu bar" in the Sounds preferences.
Comment: Would that also explain the icon disappearing from the toolbar and not being able to un-check mute?
Comment: It explains the fact you can't uncheck mute. About the icon disappearing, you should reset your PRAM (see my edit)

No sound and volume icon


How to add ImageJ to list of apps that can access system's camera (or other USB wecams)?

Question: I would like to add a program to the list of apps that can access my laptop's camera.  I have a MacBook pro with OS 11.1.  Specifically, I want to use the ImageJ's webcam plugin to control a USB endoscope.  I can get the endoscope to work with PhotoBooth, but I want to use the features in the webcam plugin.  ImageJ just says "No webcam detected" and I can't find a way to add programs to the list of allowed apps in the Security & Privacy settings. I looked through some previous threads and didn't see a solution.
Answer: There is not a process to "request" camera access–instead, applications simply try to access the camera. ImageJ need not know about the approval process to try to access the webcam.
You cannot add an app that has never tried to use your camera to this list.


Can your previous employer force you to help them with something?

Question: I got an aggressive call from my former manager, and he wants me to tell them how to fix something. The problem is that I don't remember and I no longer work for them, so can he sue me for not helping them? Do I even have any obligation towards my former employer even if I could help? It sounds ridiculous and I've experienced seen something like this before. Assume that this takes place in the U.S. or Canada.
Comment: If they are asking you to fix a problem that you originally caused deliberately, or through negligence, or by doing something outside the scope of your employment, then conceivably you could have some liability for the harm caused by the problem, and helping fix it might reduce that liability.  In that case, though, you would really want to talk to a lawyer before doing anything at all.
Comment: What does your contract say?
Comment: If you contract does not have a clause concerning this, then no, I don't think they can force you to do anything. (I am NOT a professional)
Comment: @NateEldredge negligence? Really?  Wouldn't that make any programmer liable for any bugs in any code they ever wrote?
Comment: @grovkin: "Negligence" is a specific legal standard.  Ordinary mistakes do not necessarily rise to the level of negligence.
Answer: It is not uncommon for an employer to ask a former employee to assist with something as a courtesy, and sometimes the former employee will choose to do so. If it requires more than a small amount of time, this may be done under a short-term consulting contract for pay.
But unless there was a contract of employment requiring such post-employment advice, there is no legal obligation for the former employee to provide such assistance. The most the former employer could do is give a poor reference if asked by potential future employers, and most large corporate employers now only give job title, salary range, and dates of employment to avoid claims of incorrect or defamatory statements in such references.
Answer: Short Answer
No (with exceptions and qualifications). It might be wise to try to help and there are narrow circumstances where it might be required.
Long Answer
In general, there is no legal obligation to do so, although it could result in a negative reference from your past employer if you don't, which could be quite economically damaging to you as a practical matter.
Also, in some professions (generally licensed professions), such as law or psychiatry, there may be an ongoing professional ethical obligation to the firm's customer to prevent prejudice to the client/patient related to work you were involved in, even if there is not an ongoing legal obligation to the firm itself. Failing to honor these professional ethical obligations could cause your license to be terminated or suspended. But you are entitled to fair market value compensation from the firm, in most cases, if you provide that help, under a theory called quantum meruit.
It is common for sophisticated and moderately sophisticated employers to require some kinds of post-employment cooperation without charge or at a set rate, in an employment contract, most often with litigation related to intellectual property or other matters (where you might be needed as a witness), or by establishing a consultant contract for a fixed monthly sum of money when terminating a key employee or taking over ownership of a company.
Answer: Normally, if you leave a company, the company either decides that your work wasn't needed, or they hire someone who will replace you. If they decide not to replace you, or your replacement isn't up to scratch, that's their problem, not yours. If there are jobs to do where only you knew how to do them, bad luck for your previous employer. It was up to them to make sure that all such information is handed over during your last weeks at work.
The only situation where you might have to help is if you have required passwords in your sole possession, if you signed up for third party services under your name and not the companies name etc. For example, my work laptop is protected with a password that I created - I'd have to give them that password if it takes them a while to figure out that they don't know the password.
Normally your old company would ask politely, and offer you payment for your services; you are then free to help them or not, but should then ask your new company if they are Ok with that.


What $E=mc^2$ has to do with nuclear formation?

Question: I am a bit confused that what actually the Einstein's equation meant to describe binding energy wht is that $c^2$ for as when nucleon combine what is the need of speed of light in equation?
Comment: The $c$ in relativity isn't really the speed of light. See https://physics.stackexchange.com/q/35404/ . Also, $E=mc^2$ is not specifically about nuclear reactions. It also applies when you burn a match. It applies to any form of energy.
Answer: The equation E=mc^2 is useful when  it relates energy and mass in special relativity, when m is the specific rest mass of a particle or a nucleus, i.e. the length of any four vector that would describe the particle in all Lorentz covariant frames.
c is not the velocity of the particle described by the equation. It is a constant imposed by the algebra of special relativity, a scale factor, that happens to be the velocity of light in vacuum. In particle physics one often works in computational systems where c is set equal to 1.
The general formula has m as the relativistic mass, where the velocity of a particle enters as v.

This is not useful for nuclear and particle physics, where the sums for binding energies have to use the m_0, invariant mass to Lorentz transformations.
Comment: Thanks Anna for feedback though I am a highschool level buddy but still got I think some of it.


How to implement Openid connect and Spring Security

Question: I am beginner of authentication and authorization but I have to connect to a openid connect provider on my job. I know a little about how to use Spring Security.
First, I got UserInfo object thanks by following nice direction.
https://oauthssodemo.appspot.com/step/1
And then I found a great implementation named "spring-security-oauth" below. I could run the app on tomcat and connect to facebook successfully.
https://github.com/SpringSource/spring-security-oauth
As next step, I want to connect google by using "spring-security-oauth" but I do not know how to do that completely. (To be honest, I do not know how differences openid connect and aouth2..)
give me a clue. Any help will be appreciated.
Comment: Any return on your experience? Reference or example? Thx!
Answer: here is a sample minimal project integrating Google Open Id Connect with Spring Security: https://github.com/fromi/spring-google-openidconnect
The key point for me was to rely heavily on Spring OAuth2 to minimize the configuration required.
Answer: The OpenID Connect basic essentials specification is for the time being at http://openid.net/specs/openid-connect-basic-1_0.html
For Spring specific details to implement individual steps, frame new questions further detailing the exact task w. r. t. this procedure.
Answer: You could use the spring-social-google projet to implement a "Sign in with Google" functionality. It's use OAuth 2.0 under the hood but right now it's use to Google+ API to retrieve profile informations. I did a fork to make it use the Google Authentification and Authorization API which is basicaly the openconnect Id standard


How to Load a library from the main app snap to a library snap?

Question: I would like to make a snap with a .so file only, and make this library dynamically loaded from the main application itself in a snap package.
The library snap is an extension of the main application that could be installed after the main app snap on user request. When the library snap is installed, the ideal is to write its registration somewhere in the system (otherwise, we should have to list all the installed snap, searching for the library snap).
Answer: You would likely need to create an interface for your application snap and library snap to connect via.  You will need to file a bug with the tag 'snapd-interface'[1]  You can learn more about interfaces, plugs, and slots here [2].
[1] https://bugs.launchpad.net/snappy/+filebug
[2] http://www.zygoon.pl/2016/04/snappy-interfaces-plugs-slots-connections.html


Where can I rent a mountain bike in Puerto Vallarta, Mexico?

Question: I'm traveling to Puerto Vallarta, Mexico soon and I'd like to do some mountain biking while I'm there. I've heard the country side is quite beautiful there. I would like to avoid being alone so if there are; perhaps, guides or group adventures, that would be a place.
Comment: you can rent a bike at baby vallarta gear rentals. free delivery
Answer: I was in Puerto Vallarta last week, and did some asking around, but with very little success. Cycling doesn't seem to be popular there.  The closest I found was some motorcycle and 4-wheeler rental places.  I know it's not quite the same experience, but at least you could be "out in nature" on some wheels...
Also, in my experience in other parts of Mexico, mountain biking just isn't popular. Hiking is, to a degree, and cross-country biking.  But I've never seen or heard of mountain biking, per se.  And I've never seen any trails suitable for mountain biking (but maybe they're kept at great distance from the hiking trails where I've been... shrug)
Here are a couple places I found:
Harley Davidson Rentals
322-118-8800
322-185-1984
On the corner of Avenida México & Calle Nicaragua

Cool Rentals & Cool Tours
322-223-3239
On Avenida México between Calle Honduras and Calle Panamá

Avenida México is the main street that runs one-way north to south through the main part of Puerto Vallarta, so both of these places should be easy to find.
They were both closed when I went by, so I was not able to go in and ask for any details or prices. Likewise, I cannot make any actual recommendations.
I hope this is of some use to you, even though it's not related to bicycles directly.
Have fun in Puerto Vallarta!
Answer: I definitely would recommend going with a group. I don't think mountain biking is that big in Mexico but you might want to check with the hotel you're staying.


How to create Bar Chart for Ipad application in Xcode?

Question: Can anybody let me know how to create Bar Chart in Xcode for Ipad Application?
If anybody can post sample code or a sample it would be helpful.
Thanks in advance.
Krish
Answer: You need to use Quartz, it will take some time to create it.

Subclass a UIView
Put your Quartz code inside the drawRect: method.

Ask specific questions if you get stuck, I would be happy to help.


Test for synergy using Bliss independance model for two drugs

Question: I have a dataset of 40 patients which receive 4 different treatments, group 1, is placebo, group 2, drug A, group 3, drug B and group 4, drug A+B. Only one dose from each drug and combination. I would like to use Bliss independence model to test for synergy of drugs A and B. My response variable is tumor growth from baseline, so values are ranging between 20-1500. I first caluculated tumor inhibition rate for each group (1-mean(tumor growth for group i)/(mean growth for placebo)), i = (A,B,A+B). Next I calculated the expected tumor inhibition for drug A+B as: E(AB)=E(A)+E(B)-E(A)*E(B), where E(A) and E(B) are the observed tumor inhibition rates which I calculated earlier. And finally I calculated Bliss independence index as BII=(O(AB)-E(AB))/(1-E(AB)), where O(AB) is the observed tumor inhibition rate for A+B. I get positive value for this BII, so apparently the combination is synergic, but is there any statistical way to test for this? I would like to get some confidence interval or p-value to test how significantly the combination is synergic. Or is it possible if we have only one dose? Would it make sense to use e.g. bootstrap method to create variance for the BII value? Any other method than Bliss also would work.
Answer: This could be quite a long answer as it's something I've also been working on recently. The Bliss Independence model (Bliss, 1939; Greco et al., 1995, Geary, 2013) is an Effect-Based method (in contrast to Dose–Effect-Based method which I will discuss below) that compares the effect resulting from the combination of two drugs ($E_{AB}$) directly to the effects of its individual components ($E_A$ and $E_B$). If the actual observed effect of the drug combination is greater than the expected effect under the Bliss model, it suggests synergy between the drugs – the combination is more effective than expected from their independent actions. If the observed effect is less than the expected effect, it suggests antagonism – the drugs interfere with each other, reducing their overall effectiveness.
To test for synergy using the Bliss independence model in your dataset, and, given the nature of your study design (single dose for each treatment and combination), a bootstrap method may be a reasonable approach to estimate the variability and confidence intervals for the Bliss Independence Index (BII). However, with this fairly small dataset, there's a risk of overfitting, and the results might not be robust and statistical power to detect an effect might be limited. I will talk about bootstrapping in a bit of detail, then mention some alternative to bootstrapping, and alternatives to the BII method. Here's a general outline of how you could approach this using a bootstrap method in SAS:

Perform bootstrap resampling to create multiple simulated datasets. For each bootstrap sample, randomly select patients with replacement from each treatment group (including the combination group) to create a new dataset of the same size as the original.

For each bootstrap sample, calculate the tumor inhibition rates for each treatment and the combination, the expected inhibition rate for the combination under the Bliss model ($E_{AB}$), and the Bliss Independence Index (BII).

From the distribution of BII values across all bootstrap samples, estimate the standard error, confidence intervals, and potentially a p-value for the BII. The p-value can be approximated based on the proportion of bootstrap BII values that exceed the observed BII from your actual data (or are more extreme in the direction indicating synergy).

In SAS, you can use  PROC SURVEYSELECT for bootstrap resampling and PROC MEANS or similar procedures for calculating the necessary statistics within each bootstrap sample. Here is a simplified example of how you can approach this in SAS:
%MACRO BOOTSTRAP(n = 1000);
   %do i = 1 %to &n;
      PROC SURVEYSELECT DATA = mydata METHOD = srs SAMPSIZE = size_of_your_data out = bootstrap_sample;
         STRATA treatment_group;
      RUN;

      /* Calculate tumor inhibition rates and BII for the bootstrap sample here and Store the results */
      DATA bootstrap_results;
         SET bootstrap_results;
         BII_samp = calc_BII; /* Replace with BII calculation from previous step */
         OUTPUT;
      RUN;
   %end;
%mend bootstrap;

%BOOTSTRAP(n = 1000);

/* Calculate the SE and CIs */
PROC MEANS data = bootstrap_results mean stddev clm;
   var BII_samp;
run;

This just provides a basic framework and would need to be adapted to your specific situation. The main point is to replicate the calculation of the BII across many bootstrap samples and then analyse the distribution of these BII values to assess the significance of the synergy.
As mentioned, the small sample size is a cause for concern for bootstrapping, so I would suggest considering other approaches, such as permutation testing or Monte Carlo Simulation

Any other method than Bliss also would work.

Other Effect-Based Strategies are:

Combination Subthresholding Approach:

This is a straightforward statistical significance test method that relies on the idea that combining ineffective dosages of medications produces significant effects. The main criticism of this approach is that it lacks consideration of clinical significance (Foucquier and Guedj, 2015). While this strategy is occasionally employed, the observed effects may lack accuracy and may not necessarily reflect substantial differences if the distinction between what is significant and what is not is not inherently significant (Foucquier and Guedj, 2015). This approach risks over-interpreting marginal differences in p-values.

Highest Single Agent Approach:

Here, the combined effect ($E_{AB}$) is compared with the effects of the individual components ($E_A$ and $E_B$). The method focuses on whether the combination effect $(\frac{\max{E_A, E_B}}{E_{AB}})$ is greater than the highest effect produced by the individual components. While this approach offers an improvement by focusing on the magnitude of effects rather than just statistical significance, it fails to assess whether the combination effect is synergistic beyond what would be expected from a simple additive effect of the drugs.

Response Additivity Approach:

This approach compares the observed effect of the combination ($E_{AB}$) to the expected additive effect ($E_A+E_B$). It assumes linear dose-effect curves with zero intercepts. The major drawback with this method is the assumption of linearity in dose-effect relationships, which is often not the case in pharmacological studies. This can lead to misleading conclusions about synergism or antagonism, especially when dose-effect curves are curvilinear.
Each of these methods has its conceptual basis and can be useful in specific contexts. However, they also illustrate the complexity of accurately assessing drug interactions and synergy.
Dose–Effect-Based Methods:
In contrast to the above Effect-Based methods, which primarily focus on the overall outcomes or effects of drugs often irrespective of dosage, Dose-Effect-Based methods emphasise the relationship between drug dosage and its therapeutic or adverse effects. This approach is key for determining drug potency, optimal dosages, and understanding how drug interactions - such as synergy or antagonism - vary with different doses. It's particularly useful in scenarios like isobolographic analysis (Greco, 1995), where understanding the dose-dependent nature of drug interactions is crucial. Dose-Effect-Based strategies for analysing drug combinations, especially in the context of your study involving two drugs, focus on comparing the concentrations of drugs that produce the same effect. This approach is particularly relevant when dealing with nonlinear dose-effect curves, common in pharmacological and pharmacokinetic studies. One popular approach to this is the Loewe Additivity framework (Loewe, 1953). Based on the principles of dose equivalence and sham combination. It allows for the calculation of an expected additive effect of drug combinations, providing a basis for defining synergy, additivity, and antagonism. In your case, you would use the dose-effect curves of drugs A and B to calculate the combination index (CI). A CI less than 1 indicates synergy (the combined effect is greater than expected), while a CI greater than 1 indicates antagonism. On limitation of this approach is the assumption that the dose-effect curves of each individual are well-described by a sigmoid function.
Zero interaction potency (ZIP), proposed by Yadav et al (2015), is a recent dose-effect reference model used to evaluate predicted reactions in medication combinations. It combines elements of the Bliss Independence and Loewe Additivity models, making it a hybrid method. This method assesses the interactions of medications by comparing the alterations in the effectiveness of the dose-response curves when the drugs are administered individually versus when they are administered together. This evaluation is not influenced by the combined effects of the compounds on the pharmacodynamics. It posits that medications are autonomous and do not mutually influence one another when combined, leading to negligible alterations in their response curves when combined (Yadav et al., 2015). Therefore, it is essential to precisely fit the dose-response curves in order to determine parameters such as the relative half-maximal effect concentration and the slope. However, this might be a challenging task if the data is of low quality (Vlot et al, 2019).
In practice, a full assessment of drug synergy frequently entails a combination of these methodologies, as well as careful consideration of the medications' pharmacological features. Experimental designs that incorporate several pairings and alter doses can provide more robust data for evaluating synergy. In all circumstances, the interpretation of synergy should be done with caution, taking into account both statistical and biological importance.
References:
Bliss CI (1939). The toxicity of poisons applied jointly. Ann Appl Biol 26: 585–615.
Drusano, G. L., D'argenio, D. Z., Preston, S. L., Barone, C., Symonds, W., LaFon, S., ... & Bilello, J. A. (2000). Use of drug effect interaction modeling with Monte Carlo simulation to examine the impact of dosing interval on the projected antiviral activity of the combination of abacavir and amprenavir. Antimicrobial agents and chemotherapy, 44(6), 1655-1659.
Foucquier, J., & Guedj, M. (2015). Analysis of drug combinations: current methodological landscape. Pharmacology research & perspectives, 3(3), e00149
Geary N (2013). Understanding synergy. Am J Physiol Metab 304: E237–E253.
Greco WR, Bravo G, Parsons JC (1995). The search for synergy: a critical review from a response surface perspective. Pharmacol Rev 47: 331–385.
Greco, W. R. (1995). The search for synergy: a critical review from a response surface perspective. Pharmacol Rev, 47, 331-385.
Loewe, S. (1953). The problem of synergism and antagonism of combined drugs. Arzneimittel-forschung, 3(6), 285-290.
Rodríguez-Vázquez, G. O., Diaz-Quiñones, A. O., Chorna, N., Salgado-Villanueva, I. K., Tang, J., Ortiz, W. I. S., & Maldonado, H. M. (2023). Synergistic interactions of cytarabine-adavosertib in leukemic cell lines proliferation and metabolomic endpoints. Biomedicine & Pharmacotherapy, 166, 115352.
Yadav, B., Wennerberg, K., Aittokallio, T., & Tang, J. (2015). Searching for drug synergy in complex dose–response landscapes using an interaction potency model. Computational and structural biotechnology journal, 13, 504-513.
Vlot, A. H., Aniceto, N., Menden, M. P., Ulrich-Merzenich, G., & Bender, A. (2019). Applying synergy metrics to combination screening data: agreements, disagreements and pitfalls. Drug discovery today, 24(12), 2286-2298.


Downloading Website in Python

Question: How would I go about downloading web pages using Python in such a way that I could view them offline as well as sift through their html code for information?
Just like right clicking and clicking Save-As on any web page.
Comment: Checkout beautifulsoup
Comment: @UmangGupta I did, how would you go about it? I see alot of example s on how to get parts of the website but not the entire thing. Thanks.
Answer: You should definitely look into Requests and Beautiful Soup.
The simples example would go something like this (note: both of these libraries you have to install first using pip python -m pip install <library>):
import requests
from bs4 import BeatifulSoup

res = requests.get('www.example.com')
soup = BeautifulSoup(res.text, 'html.parser')

print(soup.prettify())

The last line will print out the entire html of the website but it will also format it in a readable form just like when you look at the html by inspecting element on a website.
If you want to download the page and put it in a separate html file you can do that like this:
with open('example.html', 'w', encoding = 'utf8') as webSite:
    webSite.write(soup.prettify())

webSite.close()

Downloading Website in Python


The need for a current source in an emitter follower

Question: What is the need for adding a current source (\$I_\text{E}\$) at the output of an emitter follower topology at the emitter leg of the transistor?
Comment: Where did the picture come from?
Comment: The current source reduces 2HD caused by the transistor being better able to source current via the collector than sink it via RE.
Comment: Wikipedia, https://en.wikipedia.org/wiki/Common_collector#/media/File:Voltage_follower.svg
Answer: When biasing a transistor, you want to Q point to be stable. Since \$\beta\$ varies a lot, you want to design in such a way that changes in \$\beta\$ do not disturb the bias point.
By placing a current source there, \$I_E\$ will not depend on \$\beta\$ (and \$I_C\approx I_E\$) and that way you can keep the transistor in the active region regardless of changes in \$\beta\$.
Answer:
what is the need for adding a current source (IE) at the output of an emitter follower topology at the emitter leg of the transistor?

increasing the gain closer to 1x;
setting the bias point for the BJT;
maintaining better linearity towards the ground;
lower production cost in a chip - a CCS is much easier to make than a resistor on a chip.
...

Basically, very limited benefits, so they are not as widely used.
Answer: The wiki page (on common collector topology) that the picture in the question comes from says this: -

Figure 4: NPN voltage follower with current source biasing suitable
  for integrated circuits.

In other words, inside a linear integrated circuit, current source biasing is usually preferred over the use of a resistor. In some instances this is beneficial for maintaining stability against temperature changes however, in this instance, the use of a bias current at the emitter is less advantageous. The wiki article also says this: -

sometimes an active current source is used instead of RE (Fig. 4) to
  improve linearity and/or efficiency1.

At the end of the quote it links to the design of a 20 watt class A amplifier but it's all rather tenuous given the type of output stage it has and the amount of negative feedback it uses: -

So, my personal opinion is that the use of a current source in the emitter is justified inside a chip (because they are easier to fabricate) but on an amplifier like this it might be pushing the boat out a little too far in favour of the audiofools I mean philes.
Comment: The current source makes the class A  Amplifier more efficient than it would be with a resistor .The circuit as shown would be less than 25% efficient .If the current source was somehow modulated with the Audio signal then your theory max efficiency would be 50% .
Comment: I agree but the wiki article is tenuous in its justifications.
Comment: that circuit has three "ccs": 1) the lower leg of the output stage; 2) the bootstrap circuit; 3) that 6.8k resistor.


Is there a way to auto turn-on Linux machine?

Question: I know that there are many ways to auto-shutdown, but I'm concerned about auto turn-on. Is there a command or a small piece of software to turn on the system at given time?
Comment: Automatically booting your PC is a BIOS feature, not an OS feature. What's the make and model of your motherboard?
Answer: One alternative is to not shutdown, but to hibernate or suspend the system and then automatically wake it up using rtcwake utility.
For example
rtcwake -s 3600 -m disk

will immediately hibernate (suspend to disk) the system and resume it in 1 hour. Similarly
sleep 600; rtcwake -s 60 -m mem

will suspend to ram in 10 minutes from now, and then resume after 60 seconds.
You can also wake up the system at given time with -t option. It takes seconds since 1970 as an argument, but you can use date to convert from human readable format, e.g.
rtcwake -m disk -t "$(date -d '2015-02-26 16:12:00' '+%s')"

Comment: `rtcwake` can be used to wake the totally shut down PC when it's supported by the BIOS: `rtcwake -m off -t $(date -d '20161111 11:11' +%s)`. Sleeping is not necessary.
Answer: Check out the Wake-on-LAN (WoL) feature. Arch Linux has nice documentation  on using it, and do not worry; it is Linux general. In Ubuntu you have the wakeonlan package to send magic packets to your machine. Here is Ubuntu documentation on using WoL.
So to turn your machine automatically, you will have to use another machine that will turn it on with WoL.
Comment: Wake on Lan only works well if you shut down properly. if you get a power outage or something. WOL will fail. BIOS scheduling will work every time. Look in your BIOS.
Comment: It does require a second machine but it doesn't have to be a computer. You can send magic packets from an android (and presumably iOS?) phone/tablet.
Comment: Can I install it on ubuntu 12.04
Comment: WOL requires another machine to send the packet, so rtcwake is the better solution here. Here's a duplicate question on AskUbuntu: http://askubuntu.com/questions/61708/automatically-sleep-and-wake-up-at-specific-times.
Comment: @Trengot: yes. You can send Wake-on-LAN messages from iOS device.
Answer: As far as I know, automatic boot is a feature that has to be provided and set up in your BIOS or UEFI and is independent from the OS (like Ubuntu) installed.
Look at the manual of your BIOS/UEFI or mainboard.
Comment: I don't know and I will not do a long research on this, as you are also able to google. Usually yes, unless it is a very old/ancient machine. But you always need a trigger. This can be either a specified time (not available on every machine), a signal from LAN (wake-on-LAN function as described in other answers), switching on the AC power, a keyboard/mouse event, etc... You have to think of how you want to start it and then check whether your BIOS/UEFI/mainboard/device supports this. Google is your friend!
Comment: I'm using Dell Inspiron 1545, can it be configured?
Comment: Actually, I find out that it support wake on lan option in power management in the BIOS menu
Comment: @remassido You may need to enable wake-on-clock in your BIOS, but after that, you should be able to configure an actual wake-up time with a tool like `rtcwake`.
Answer: It depends on whether the BIOS/UEFI of your computer supports this feature.
If it does, you can use the Ubuntu package nvram-wakeup to set the wakeup date/time.
Read the documentation of the package before using it (/usr/share/doc/nvram-wakeup/README.mb.gz) as it is possible that you need to do some work to configure the tool.
Comment: nvram-wakeup's last release was 2010 (v1.1), and many newer motherboards are not supported.


Can I use satirical fake reviews attributed to major publications to promote non-satirical, but humorous writing?

Question: In the same vein as when SNL attributes fake reviews by major publications to promote fake movies and books in taped skits. For example, if I say "New York Times calls it 'the poor man's Old Man and the Sea'," to promote a humorous piece, which is not necessarily fiction or satire itself, and the fake reviews is so ridiculous that nobody would mistake it as a real review (one can hope, given what people believe in now), is it legal and/or ethical with or without a disclaimer?
Answer: "The New York Times" is a trademark. The name of any other "major publication" is highly likely to be a trademark. Using someone else's trademark, without permission, to promote your own work (or the work of a third part) is trademark infringement, or it can be.
If the satire is so obvious that no reasonable person could be confusing into thinking that the NYT is actually reviewing the work, then that is probably not infringement, but many companies have no sense of humor about their trademarks. Doing this could well cause you to get a "cease and desist letter" from the tiems or a law firm on their behalf, and if you don't stop could cause them to sue. You might win on the grounds that the fake was obvious, but you would likely incur significant costs along the way.
A statement that this was a fake review, not actually published by the Times, and that you don't own the trademark and aren't affiliated or endorsed by its owner might help in arguing that no one could have been confused, and might avoid a suit.
By the way, looking at the "trademark" tag over on Law.SE will give lots of answers on topics relates to this.


Why is there more energy in a gamma wave vs. lower frequencies?

Question: If energy is a function of frequency and amplitude, why are microwaves and lower frequency waves considered "less energetic" than gamma waves only as a function of their frequency and wavelength?
Answer: One always refers to the energy per quanta (photons). However, you can, of course, transport a given amount of energy by a lot of photons each having a very small energy i.e. large wavelength. But you can also pack all energy in only one single photon of extreme small wavelength and transmit all energy at once.
Comment: Case study: a handheld UV light emits photons with more energy per photon... but the flames of a fire emit so many "lower energy" photons that they can warm your body when its cold outside.
Answer: One reason is Wien's Displacement Law, which states the maximum emission in the blackbody spectrum is proportional to temperature:
$$ \lambda^{-1}_{max}=bT$$
where
$$ b\propto \frac{k}{\hbar c}$$
so the now cold CMB radiates at 2.7K, the Earth's atmosphere (250K) emits shorter microwaves, red hot coals start around 800K, and the pits of recently detonated nuclear weapons radiate thermal X-rays in the tens of millions of Kelvin.
Note: the total emission goes as $\sigma T^4$, so that argument may not clear up frequency vs. amplitude.
Another way to look at it is to realize a lone EM wave packet doesn't actually have a frequency, nor wavelength, nor energy. Suppose you're in deep space, and you have a wave packet of $L=1000 \lambda$, where $\lambda$ is the wavelength. A peak electric field $\mathcal{E}$ over a cross-sectional areas of $A$ defines the amplitude and volume, respectively. It's basically a "box" of propagating EM.
What is the energy in the box?
For simplicity, ignore the magnetic field, then the energy density is
$$ E = A\times L\times(\epsilon_0\bar{\mathcal{E}}^2) = 1000\lambda A \epsilon_0\bar{\mathcal{E}}^2$$
The total number of photons in the box is:
$$ N = \frac{E}{\frac{h}{\lambda c}} = 1000\lambda^2 A \frac{c\epsilon_0}h\bar{\mathcal{E}}^2$$
Those results describe the wave packet from your reference frame. The energy and wavelength are specific too you . Another observer moving against the direction of propagation at $+v$ will see:

Length contracted box: $L\rightarrow L'=L/\gamma $
Length contracted wavelength: $\lambda\rightarrow \lambda'=\lambda/\gamma$
A boosted transverse electric field: $\mathcal{E}\rightarrow \mathcal{E}'=\gamma\mathcal{E}$

(with $\gamma=1/\sqrt{1+v^2/c^2}$)
For a total energy of:
$$ E' = 1000\lambda' A \epsilon_0\bar{\mathcal{E'}}^2 = 1000\frac{\lambda}{\gamma} A \epsilon_0(\gamma\bar{\mathcal{E}})^2 = \gamma E $$
and number of photons:
$$N'= 1000\lambda'^2 A \frac{c\epsilon_0}h\bar{\mathcal{E}'}^2
=1000\big(\frac{\lambda}{\gamma}\big)^2 A \frac{c\epsilon_0}h(\gamma\bar{\mathcal{E}})^2 = N$$
So the wavelength shortens and the energy increases, while the total number of photons is unchanged.
Thus: shorted wavelength is associated with higher energy, regardless of amplitude.
Comment: Ha!  Amazing answer, thanks… but can you dial it back a couple notches on the math scale…?

" Another way to look at it is to realize a lone EM wave packet doesn't actually have a frequency, nor wavelength, nor energy. "

Then how is energy "emerging?"


How to stream videos from any url in android application?

Question: I want to use media player to play videos from any url. I found that, youtube video can be played using rtsp url, but no other videos, like vimeo video, can be played in app. Is there any method to do it?
Answer: Unfortunately Vimeo doesn't provide support for RTSP, you could use flash to this end since Android support flash, and can be easily add with a WebView and simple HTML
Also, please keep in mind that playing Vimeo videos through a non-Vimeo player usually constitutes a violation of their TOS.


Power series solution for a shifted spherical harmonic oscillator

Question: I'm trying to solve the Schrodinger equation for a radial Harmonic oscillator whos equilibrium point has been shifted away from the origin, i.e. $V(r)  = V_0(r-1)^2$.  The standard approach is to make a substitution for the radial wavefunction $u(r) = rR(r)$ so that $$\frac{d^2u}{dr^2} -\left[V_0(r-1)^2+\frac{\ell(\ell+1)}{r^2} \right]u(r) = -Eu(r)$$ where I've set $\hbar=1$ and $m=1/2$ for simplicity. I then want to find the solution in terms of some nicely behaved power series. We can look at the asymptotic behaviour to make a good guess. As $r \to \infty$ we have $$\frac{d^2u}{dr^2} \approx V_0(r-1)^2 u$$ so that $$u \to e^{-\frac{\alpha}{2} (r-1)^2}$$ where $\alpha := \sqrt{V_0}$. Furthermore, as $r\to 0$ we have $$\frac{d^2u}{dr^2} \approx \frac{\ell(\ell+1)}{r^2}u$$ so that $$u \to r^{\ell+1}.$$ I then guess that a nice series solution which captures the desired asymptotic behaviour is $$u(r) = e^{-\frac{\alpha}{2} (r-1)^2} r^{\ell+1}\sum_k a_k r^k.$$ Plugging this into the differential equation, we get that $$0 = \sum_k a_k \left[2\alpha(\ell+1)r^k+ \left(E- \alpha(2\ell+3)\right)r^{k+1}+2\ell(\ell+1)kr^{k-1}-2\alpha(r-1)kr^k+k(k-1)r^{k-1} \right]$$ which implies $$0 = \sum_k \left[2\alpha a_k(\ell+k+1) + a_{k+1}(k+1)(2\ell(\ell+1)+k) + a_{k-1}\left(E-\alpha(2\ell+2k+3) \right) \right]r^k$$ But I am unsure of how to solve such a recursion relation where there are 3 unknown coefficients in each relation. In every case I've seen before, this reduces to equations with only two power series coefficients to the recursion relation is straightforward. Have I made a mistake in my asymptotic analysis? How should I go about solving it with this method?
Answer: There is a problem with the setup here. Note that $r \in \mathbb{R}^+$, since it doesn't make sense for the radius to be negative. So what your potential actually looks like is this:
The red is your actual potential, which does not extend to the negatives!
This potential will be an entirely different beast from the harmonic oscillator potential that you seem to think it is. Also, trying to solve for a shifted potential doesn't make too much sense, since your choice of coordinates should always be taking full advantage of the symmetry.
Comment: This doesn't answer the question. I know that it's different than a harmonic oscillator, that's why I'm having trouble with the solution. Telling me not to solve for this potential doesn't answer my question.


Can communication satellite carry payload other than it's own boards?

Question: Can we attach payload to communication satellite and detach it in space after having gained a specific altitude? What is probability that it will fail?
Comment: secondary and "hitch-hiker" payloads are done regularly for orbital flights, but because communications satellites are so expensive and take so long to build (and are going to GTO or GEO) they usually don't have them. There have been some secondary scientific payloads that have remained attached permanently on communications satellite but I can't remember the one I'm thinking of right now.
Answer: Large geostationary satellites often have  a bit of space, power and bandwidth to carry secondary payloads.
For example, the recently launched Elektro-L 3 satellite carries secondary payloads:

The satellite also carries instruments to monitor space weather and a search-and-rescue communications payload, according to information published by Roscosmos.

But these typically stay attached.
At lower altitudes, it's common for a launcher to carry multiple payloads, but they generally start and stay separate from each other.
The US Air Force has done quite a bit of work on secondary satellite buses that carry satellites for a while before dispersing them.
Comment: I would also add that although they can, the economic, political, and work load factors typically prevent communications satellites from hosting secondary payloads.  Some LV providers, like SpaceX, are beginning to poke at that paradigm and are now starting to offer rideshare slots as long as payloads conform to standard interfaces https://www.spacex.com/smallsat.  Russian, Indian, and even Japanese launches have traditionally been more open to secondary payloads, usually through brokerages like Spaceflight Services https://spaceflight.com/ .
Comment: Private space agencies avoid that due to multiple risks or any other factors as well.What is ideal payload that communication satellites can carry?
Answer: Another example of a piggyback payload is the Geostationary Lightning Mapper or GLM. I just ran across an image of the simulator (flown on an aircraft) as the banner for this page:

From the overview page:

The Geostationary Lightning Mapper (GLM) is a satellite-borne single channel, near-infrared optical transient detector that has been placed on the GOES-16 satellite in a geostationary orbit. This orbital position allows for GLM to measure a dedicated region that includes the United States with continous views capable of providing lightning detection at a rate never before obtained from space. GLM detects all forms of lightning during both day and night, continously, with a high spatial resolution and detection efficiency.
GOES-16 (formerly GOES-R) was launched in November 2016. GLM began operation in March 2017 after a dedicated satellite and instrument spin-up period. The use of a geospatial orbit provides increased severe storm warning lead time, earlier indication of impending lightning strikes to the ground, and total lightning detection with nearly uniform spatial coverage of approximately 10 km.

webpage: INSTRUMENTS: GEOSTATIONARY LIGHTNING MAPPER (GLM)
PDF Fact Sheet
video: SatFC-G: Visualizing the Geostationary Lightning Mapper (GLM) on AWIPS 10 minute talk
video: First Images from GOES-16 Lightning Mapper 30 seconds of images


What is the ring of invariants of GL acting on quaternary cubic forms?

Question: Suppose I am looking at $GL(4,K)$ acting on a cubic form in say four variables $x,y,z,w$ over $K$ via the usual induced action on a polynomial. Does anyone know what is/where I can find how to compute the ring of invariants? The case of personal interest is when $K$ is a finite field but the the answer over $\mathbb{C}$ would of course be more than useful.
Answer: According to Dolgachev in
http://arxiv.org/abs/math/0408283
the ring of invariants is generated by 6 invariants of degrees 6, 16, 24, 32, 40 and 100
the last one being a polynomial in the other ones.
In addition to the references to Salmon and Clebsch indicated by Dolgachev, I would also
look up the book by Salmon "A treatise on the analytic geometry of three dimensions"
pp 392-400. It is downloadable from google books:
http://books.google.com/books?id=LTgDAAAAQAAJ&printsec=frontcover#v=onepage&q&f=false
The article
http://arxiv.org/abs/1006.0721
also contains some references which might help.
Comment: These sources are really useful, thanks. In the last paper it gives explicit formulas for the fundamental invariants in terms of elementary symmetric polynomials in the coefficients of the surface in Sylvester normal form (which is what is proved in the various sources I suppose). Can something similar be done over finite fields? (i.e. Are there similar normal forms which one can then write down the ring of invariants in terms of)
Comment: I am not aware of an analogous theorem in char p. I don't see other approach except carefully following the Salmon/Clebsch proof and seeing if it adapts to char p.
Answer: Don't be misled into thinking that the answer over $\Bbb C$ tells you very much about the answer over your finite field $K$.  The space of cubic forms in 4 variables is 20 dimensional.  The group $GL(4,K)$ is a finite group and so the ring of invariants you seek has Krull dimension 20.  In particular, it has at least 20 generators.  Probably, however, it has a few thousand generators if not many more.
There are computer algebra packages (e.g. Magma) that include routines that can compute generators for your ring of invariants in principle, but in practice you will find that they run out of memory long before getting very far on a problem of this size.  They will be able to compute vector space bases for the invariants in low degrees.  On the other hand, it is doubtful that having a list of thousands of generators (or even just their degrees) for the ring of invariants will help you very much.  On the other hand if you want to know something about the properties of the ring of invariants as a ring, then it's possible that may be known.
Answer: There is also a nice book by Sturmfels called Algorithms in Invariant Theory that discusses the problem of finding invariants.  It may be worth a look.


How do I map ctrl x ctrl o to ctrl space in terminal vim?

Question: After searching a bit on the net it seems that I can't map CtrlSpace to anything/alot. Is there a way to do it today, what I found was usually 2 years old.
Answer: I've run into the same issue, the short answer is yes you can, and not only in the gui version. Adding this on you .vimrc is enough:
inoremap <C-Space> <C-x><C-o>
inoremap <C-@> <C-Space>

Comment: For me it's working just `inoremap  ` (on linux)
Comment: I know this is _really_ nitpicking, but I would consider using `inoremap` instead of just `imap`, since the former will make sure that any messing around you do later won't change these settings.  But, really, that's overcautious overkill.
Comment: In my experience, using `inoremap` for these 2 mappings worked on Mac but not Linux. I changed them to `imap` and now it works on both platforms. So: `:imap  ` and `:imap  `
Comment: Could you add a link to the relevant docs of ``? I've been searching but can't find anything. I'm curious what this answer actually does. I'd love to have a deeper understanding of this.... nevermind. Answered by @romainl. It can be found in `:h CTRL-@`. Seems it was too easy!
Comment: I tried this again, and in fact... it just worked with `inoremap  ` and works fine in terminal vim and gvim. Now if I add the last part, it stops working. Trying with an "empty" vimrc (`vim -u NONE`), none of the combinations work. So I guess some configuration **has** to be set in your `.vimrc` (which one is something that I don't know).
Comment: I can't get this working properly in GVim on Windows. It keeps inserting a space and so defaults to the first autocompletion
Comment: Please guys let's make this answer clearer : `inoremap  ...` alone works in GUI, and in terminals, `` is interpreted as `` so one must remap it _recursively_  to  for the first instruction to be taken into account, with `imap  ` ; @Pablo please change the second `inoremap` to `imap` in your answer.
Answer: The problem seems to be that Terminal.app doesn't interpret <C-Space> correctly and Vim understands it as <C-@> which is a built-in mapping (:help CTRL-@).
Maybe you could go with something like the following in your .vimrc:
if !has("gui_running")
    inoremap <C-@> <C-x><C-o>
endif

which seems to work, here, but I don't like the idea of overriding built-ins like that.
Instead you should try with <Leader> (:help leader), it gives you huge possibilities for defining your own custom mappings and (depending on the mapleader you choose) won't interfere with OS/app specific shortcuts/limitations and hence be more portable.
With this in my .vimrc:
let mapleader=","
inoremap <leader>, <C-x><C-o>

I just hit ,, to complete method names.
Comment: It is not only Terminal.app who outputs NULL when you type ``. I won't be surprised if I find out that it is written in some standart: at least urxvt and konsole also do this thing.
Answer: The nitpicker broke pablox solution. The crux of the solution was just about remapping. So when you disable remapping, it cannot work.
If you really want to throw in a noremap, this is what it looks like:
inoremap <expr><C-space> neocomplete#start_manual_complete()
imap <C-@> <C-Space>

What will not work: inoremap <C-@> <C-Space> 'cause the <C-Space> part will not be remapped itself.
Comment: For me results in:
`E117: Unknown function: neocomplete#start_manual_complete
E15: Invalid expression: neocomplete#start_manual_complete()`
Comment: @user2609980 you need to map to a function that is available in your setup. the function I used as an example was taken from my personal setup.
Answer:
Have you tried :inoremap <c-space> <c-x><c-o> ?
Does CtrlX CtrlO do anything when you type in insert mode? Is omnifunc set?
Comment: This was the solution for me on MacOS 12, in iterm2, in Tmux, with a brew-installed Vim 8.
Answer: Add the following code to ~/.vimrc:
" Ctrl-Space for completions. Heck Yeah!
inoremap <expr> <C-Space> pumvisible() \|\| &omnifunc == '' ?
        \ "\<lt>C-n>" :
        \ "\<lt>C-x>\<lt>C-o><c-r>=pumvisible() ?" .
        \ "\"\\<lt>c-n>\\<lt>c-p>\\<lt>c-n>\" :" .
        \ "\" \\<lt>bs>\\<lt>C-n>\"\<CR>"
imap <C-@> <C-Space>

Source: https://coderwall.com/p/cl6cpq
Comment: I think  is html tag which means '<' symbol
Comment: Disregard my edition. I think is wrong. There should be a cancel edit option.
Answer: To accommodate both Windows and Linux I applied this to ~/.vimrc
if has("unix")
  inoremap <C-@> <c-x><c-o>
elseif has("win32")
  inoremap <C-Space> <c-x><c-o>
endif

Answer: I had better results with this set of mappings across all modes on Mac OS. Have not tested Windows or Linux.
I don't understand how the excepted answer is supposed to work in terminal mode.
inoremap <C-space>   <ESC>
vnoremap <C-space>   <ESC>
cnoremap <C-space>   <C-c>
" When in terminal, <C-Space> gets interpreted as <C-@>
imap     <C-@>       <C-space>
vmap     <C-@>       <C-space>
cmap     <C-@>       <C-space>

Answer: Like the others said, using inoremap with the correct key for your term (as discovered using i_Ctrl_v) should work. I will add to this another possible cause for problems with insert mode mappings: paste mode. As the docs state:

    When the 'paste' option is switched on (also when it was already on):
           - mapping in Insert mode and Command-line mode is disabled

This may seem irrelevant, but this very thing tripped me up trying to get a similar inoremap binding to work in Vim 8.2. I had set paste in my .vimrc, and had to chop it up with :finish statements (as [recommended in the vim faq) to isolate the line causing the problem.


Lighting fixture ground wire splicing

Question: I installed a lighting fixture that hangs from a chain over my dining room table. I realize that I did not hang it long enough so I want to add some chain links which means I have to have more ground wire. I cut the ground wire down already so now it's too short. I have the leftover ground wire I cut, can I just splice the two together to make it longer with a wire nut or something else? Appreciate any feedback thanks
Comment: thank you freeman! thats what i needed to know. I will wire nut it together
Answer: You will have to do something to lengthen the ground wire, or replace it in its entirety.
Yes, you can simply wire nut the cut off piece to the existing piece. If you're happy with the look of the wire nut there, you're good to go. If not, you may be able to use a crimp connector which would be less visible. Something like this or this or these* .

* These are the first and second results listed in a search for "wiring crimp connector". No explicit recommendations of the brands or vendors expressed or implied.

Lighting fixture ground wire splicing


CodeIgniter only loads default controller

Question: I've been crawling all over the internet and none of the solutions other people have used are working for me.  The problem is that the default controller is the only controller that will load.  There are many posts on here regarding this subject.  But I've tried all of them, including the main suggestion to try all five settings for the $config['uri_protocol'].  I've tried all five settings and none of them work.
I've also tried several different .htaccess settings and none of those help either.  Here are a couple I've tried.  The first is the official CI .htaccess from their website.
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

and
#Standard CodeIgniter Rewrite
#-------------------------------------
RewriteCond $1 !^(index\.php|resources|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA] AddHandler cgi-script .pl

Still, no luck.  Can someone clue me into the correct combination of .htaccess and $config['uri_protocol'] settings.  All of the answers out there vary.  Is that because of different server configurations?
Answer: I got it.  Finally.  Here is my .htaccess
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /materials-library/index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

And the $config['uri_protocol'] is set to REQUEST_URI.