Should I pay off my student loan before putting money into Roth IRA?

Question: I have about $7K in student loans remaining at 6.25% I also haven't made a contribution to my Roth IRA for 2010. I'm thinking off paying off my loan at the end of the year, but that'll not really leave me enough free cash to maximize my Roth contribution. What should I do?
Answer: Finish off the student loans. If your absolute goal is saving as much as you possibly can for retirement, then you of course will be best off by maxing your IRA contribution every year. However, student loans are just another thing hanging over you, and nothing feels better than getting rid of a large debt.
Pay them off, take yourself out to a nice dinner to celebrate, and tuck away what you have left over in your IRA. Paying off student loans is a great accomplishment - celebrate it!  The difference long-term will be negligible.
Comment: Also, remember that you can make 2010 Roth IRA contributions all the way up through April of 2011.
Answer: Do both.
The Roth should be started ASAP so you can start on the 5 year maturity period. Even if you already have the Roth started, it doubles as an emergency fund, so putting money into it couldn't hurt.
Student loan interest is tax deductible, so your "real" interest is probably around 4.7%. However, this is still a good reason to pay them off soon.
Comment: Student loan interest *may* be deductible.  In the US, the amount that can be deducted varies based on income.  In 2009 if you were married filing jointly the deduction starts phasing out when your income is over $120k.  If you are singe, it starts phasing out over $60k.  http://www.irs.gov/publications/p970/ch05.html#en_US_publink1000178272
Comment: Wow. Great FYI firedfly. I did not know that.
Comment: The flexibility of the Roth IRA and it's low max annual contribution of $5000 make funding it by April 15 of the following year a high priority. Write up your budget and figure out how many months it will take to fund the IRA with $3-5K, then stop paying extra on your loan when you are that many months away from April 15th.
Comment: Having done my budget, I will have about $4K to spend on my IRA or student loan. I'm not sure $2K on my student loan is worth it, so while it's good advice to do both, I really need to know which is better.
Answer: Fund the Roth.
If your loan interest is deductible (see firedfly's comment) then your effective cost for the loan is lower than 6.25%
You get tax free earnings on the same amount in a Roth. Assuming you can get 6%, it's at least break even, probably better. And you can never gain back the time for compounding on the retirement account.
With that said, there may be an emotional component to the decision. If you really just want to get rid of the debt, go ahead and do it.


An angle of a cone

Question: How do we measure an angle of a cone?
When making the cone flat we obtain a circle with a sector cut out of it. So when calculating the angle of a cone we would actually calculate the angle of a circle with a sector cut out?
Answer: The angle of the sector differs from the angle of the cone.
The sector's angle is computed using the formula $\theta=\frac{L}{R}$; where $L$ is the sector's arc length and $R$ is the sector's radius. Now say $L=R\theta$.
When you make a cone using the sector, its arc length will become the cone's base perimeter. So you can write $2\pi r=R\theta$; where $r$ is the cone's base radius.
Now you can find $r$ to be $\frac{R\theta}{2\pi}$.
The cone's lateral side is $R$ (the sector's radius). So we have a right triangle here which its smallest side is $\frac{R\theta}{2\pi}$, its vertical side is the cone's height and its hypotenuse is $R$. (You can find the height using Pythagorean rule, but it's not our goal here).
Let's call the top vertex of our triangle $\frac{\alpha}{2}$. ($\alpha$ is our cone's angle which we want to calculate).
$\sin(\frac{\alpha}{2})=\frac{\frac{R\theta}{2\pi}}{R}=\frac{\theta}{2\pi}$.
Now find $\frac{\alpha}{2}$ using $\frac{\alpha}{2}=\arcsin(\frac{\theta}{2\pi})$.
Finally, find $\alpha$ to be $2\arcsin(\frac{\theta}{2\pi})$.
Note that $\theta$ is in radians here. If you want to put it in degrees, you should write $180$ instead of $\pi$.
Sometimes you don't have the sector's angle, but you have $n=\frac{S_c}{S_s}$ or $n=\frac{P_c}{P_s}$; where $S_c$ and $S_s$ are circle's area and sector's area respectively. Also, $P_c$ and $P_s$ are circle's perimeter and sector's perimeter respectively.
In these cases, we have $\sin(\frac{\alpha}{2})=\frac{1}{n}$ and so on. (Because $n=\frac{2\pi}{\theta}$).
Answer: This usually refers to the opening angle of the cone, which is the angle made by its sides along a cross-section through the apex and center of its base. For a right cone, you'll also see half of this angle—the angle between the cone's axis and sides—used as well. For most purposes, these angles are much more useful to know than the angle of arc subtended by the base with the cone "rolled out."

An angle of a cone


In-app autorenewable subscriptions walk-thru

Question: I'm tearing my hair out trying to work out the work-flow for auto-renewable subscriptions on iOS. It's not even clear whether I require a server to do this. I just have one product - a monthly subscription. What are the steps to getting this working? Is there a walk-thru anywhere?
Comment: have you read https://developer.apple.com/in-app-purchase/
Answer: First things first. If you're app is not a periodical like a magazine, then you should steer away from ARS (auto-renewable subscriptions). Apple may reject it and insist you use NRS (non-renewing subscriptions).
To answer your question, my two best resources were Apple's Verifying In-App Purchase Receipts and this guide on Verifying Receipts from your server using PHP and cURL.
Basically, if you're using NRS you'll need your own server.  But if you're doing ARS which is what you asked about, you don't have to use your own server.  It's just recommended for better security.  If you don't use your own server and you do the verifications straight from the app, you have to include your shared secret in the app which could get sniffed out.  Also, you're more likely to be vulnerable to someone hacking the network communication to trick your app into thinking the user purchased a subscription.
Comment: auto renewable subscriptions seems to be working not only for newsstand apps
Comment: @raistlin That wouldn't surprise me. The point I'm making though is that Apple is very selective about which apps they allow to use ARS. I haven't yet heard any evidence to the contrary.


Difference in the meaning between "flying straight for the lunch" and "flying straight to the lunch"?

Question: What is the exact difference in the meaning between "The ball was flying straight for the lunch" and "The ball was flying straight to the lunch" ?
i want to see the examples about the differenece. thank you.
Comment: What do you mean by "lunch"?
Comment: Thank you for taking my feedback in good faith, and moving your question over here. I think you'll really enjoy this site. That said, let me reproduce my original comment, because I don't really agree with the two answers you've gotten completely, and it might provide guidance for other users to answer: ***Motivation (goal) vs location (place)***.
Comment: Dan Bron// thank everyone. i somewhat understand the differenece in the meaning between "flying straight for " and "flying straight to" by your answers.
Answer: Functionally they are the same. They mean the same thing.
They both mean that the ball is flying in the direction of the lunch and it suggests that the ball will hit the lunch.
I would have chosen to use the word "towards". So,

The ball was flying straight towards the lunch.

I think a meaningful difference could be made if it was not a ball, but a person or an animal. For example, let's say it was a bird, for a literal sense:

The bird was flying for the lunch.
The bird was flying to the lunch.

Again, they are functionally the same; the bird moves towards the lunch. However, in 1., the word for might suggest an intent to eat the lunch or that we think the bird wants to eat it. In 2., the word to might not suggest this. It simply gives the direction in which the bird moves. Maybe the bird just wants to perch next to the lunch. Maybe the bird is curious, or maybe it does want to eat it.
Answer: To "head for" something is to head towards it.  Also, to "make for" something has the same meaning.  This is an idiomatic use of for over to.  Both "head for" and "make for" have the implied meaning of the subject having the intention of getting to whatever it is "heading for."  That implication wouldn't be there if we used to instead.
So, there's an slight implication in "flying for" that the ball has the intention of hitting the lunch, as if the ball had a bit of a mind of its own, and its mind was set on crashing into the lunch.
It is, after all, a children's story.  :)
Answer: The use of the word lunch in the examples provided sounds unusual.  Lunch is a mealtime, or the food consumed at the mealtime, but isn't usually referred to as such.  For example, the sandwich, chips and drink of which a 'lunch' might consist, are only 'lunch' if they are being consumed for the mid-day meal.  They are still food, and might be eaten later for 'dinner' instead...
Also, the verb 'flying' in these examples also sounds a bit unusual.  A ball might be flying through the air, but aside from that example, I have a hard time imagining the use.  One might instead use: The ball was (streaking toward | headed for | headed toward | destined to hit | arcing toward) the lunch.
All that being said, in answer to your question, they are both equally correct and awkward.
One might instead say "The ball was headed straight for the cup of soda" or "The ball was arcing directly toward the sandwich."  These sound more natural to me, a native speaker of US English.

Difference in the meaning between “flying straight for the lunch” and “flying straight to the lunch”?


Why are optical parametric oscillator so big?

Question: Optical parametric oscillators have an optical resonant cavity. Why is this cavity so big when the wavelength of light is so small? What will happen if optical cavity length is shortened?
Comment: I'm not an expert so I don't post an answer, but I *think* the reason comes from the fact that modulation of optical media is usually extremely weak, so we need a large path length to get an appreciable modulation of the light. In other words, for a given applied voltage, the change of index of refraction of interesting optical media is very tiny.
Answer: There's no fundamental reason that drives the length.  You can make an OPO with a short cavity and the free-spectral range (FSR) will be increased relative to a longer cavity.   There are certain situations where you want the pump laser and the frequency of the OPO to be exactly matched, called resonant pumping.  In such a case the cavity length of the OPO must be matched to the pump.
Answer: Many applications of OPOs are in nonlinear optics, and so the laser is pulsed, so as to have the largest possible peak intensity for observation of nonlinear effects.
In that case, the cavity length needs to be cf/N, with c the speed of light, f the pulse repetition rate, and N a counting number. $N=1$, and therefore the longest cavity length, is the most straightforward configuration, because the higher the value of N, and the shorter the cavity, the more difficult it is to align the cavity length get two pulses to overlap.
Comment: Is it high Q you mean to say? If I decrease length Q decreases?
Comment: Q also plays a role (because more round trips and so more loss) but I meant something much more basic: it's more difficult to physically twiddle the knobs that control the cavity length to get the pulses to overlap! Since, for example, if N = 4, then a small adjustment will have a 4x higher effect, and it's harder to hit your target exactly.


How would you say "She said goodbye too many times before." in Latin?

Question: The refrain of the Maroon 5's song "This Love" contains the verse "She said goodbye too many times before.". How would you translate that verse into Latin? My attempt would be "Ea dixit 'Vale!' plurimis temporibus abhinc.", but I am not sure that's correct.
Answer: That translation strikes me as overly literal, trying to keep a match for each English word. I'd go more idiomatic with this.
For example, unless it's important to emphasize the "she", I would leave out the pronoun and let the verb's ending handle it. Similarly, I wouldn't use a word for "before". I would use either the perfect tense (if the intention is "before now") or the pluperfect (for "before then") and let the aspect of the verb carry that information.
There's actually a single Latin verb for "say goodbye", though it's very similar to your phrasing! Valedīcō, valedīcere, the ancestor of English "valedictorian" (the person who gives the farewell speech).
Finally, for "too many times", two phrasings come to mind. Totiēns means "so many times", emphasizing the repetition, while nimium (or its variants, there are plenty) means "too much", emphasizing the excess. I'm not aware of any phrase that emphasizes both the repeated action and the excess of it at the same time, like English "too many times" does.
So I would cut this down to something like nimium valedīxit or totiēns valedīxit: "she bade farewell too much before" or "she bade farewell so many times before".
(Of course, since this is a matter of style, others can and will disagree completely. Literalism in translation isn't necessarily a bad thing just because I dislike it stylistically.)
Comment: @Sklivvz it's not uncommon to omit words if they can be inferred from the sentence (ie through verbs). Saves valuable chisel time.
Comment: @Sklivvz Ah, but if the context refers to this person enough to make it clear who "she" is, it should also make it clear who "he/she/it/they" is. I don't know the song, but I doubt losing the gender marking will actually create any ambiguity; imo, adding an emphatic _illa_ changes the meaning significantly more.
Comment: Nimium valedixit omits the subject but I think it's a relevant part of the original phrase - we are talking about "she". So perhaps illa nimium valedixit is more accurate? Or if not, can you perhaps expand to explain why we would omit the subject?
Comment: @Sklivvz Latin is what's called a "pro-drop" language, meaning that subject pronouns usually aren't written. The ending of the verb indicates who's doing the action instead. Including a pronoun for the subject puts a lot of emphasis on it: "_she_ was the one who said goodbye".
Comment: I know a little bit of Latin, I know you can drop the subject, but that's understood. However, the sentence as you wrote equally applies to both genders. The original English one only applies to a person with feminine pronouns.
Comment: Forcing a choice of gender might be seen as a limitation of the English language that could be profitably left behind during transition.
Comment: Including "illa" is helpful if you are trying to sing a Latin language cover of the song and need the syllables to make the original melody work. The original phrase has ten syllables, so "illa nimium valedixit" comes close. That said, the last word "before" is sung as a melisma covering six notes in the original song, so I suppose you could always "Gregorian chant" it.
Answer: Cicero provides a possibility for "too many times" with nimium saepe:

Quare "bene et praeclare" quamvis nobis saepe dicatur; "belle et festive" nimium saepe nolo (Cicero, De Oratore 3.101.2)

I think the meaning is even clearer with Seneca's Medea:

Quodsi nimium saepe vocari quereris votis, ignosce, precor:
But if you protest at too frequent a summons from my entreaties, forgive me, I pray:

Cicero uses nimium joined with saepe often, perhaps too often, since it's rarely found in other others (once in Seneca, the above passage, and I think twice in Ovid, but I haven't translated the passages in full to see if they belong together or if nimium goes with another word).
You could also easily just use the comparative or superlative forms of saepe, which would get the point across. In searching the Loeb library, I found several translators who have done that, so it's not just my intuition.
While Draconis is right that you don't need to translate "she", you might consider it if you want to single the subject out. For this, you could use illa, "that woman." For this particular sense of illa, see Lewis & Short:

C. Opp. to hic, to indicate that object which is the more remote, either as regards the position of the word denoting it, or as it is conceived of by the writer; v. hic, I. D.—

So saying illa valedixit would have the same sense as the English "that woman."
I really only bring this up because the previous line has (and the song is called) "this love," so it provides a nice contrast: hic amor, illa mulier.
Comment: My only nitpick is that I wouldn't use that Catullus line as an example, since it's a fairly faithful translation of a Greek poem that uses a pronoun there. (I do think _illa_ is potentially a good choice here though.)
Comment: @Draconis Yes, very true, but it was the first thing that came to mind. If I think of a better example, I'll swap it out.
Comment: While the discussion of how to translate parts of the sentence is very interesting, to properly answer the question, the final sentence combining those parts really should be in it. _Illa nimium saepe valedixit,_ then?
Comment: I don't really think the contrast works in this particular context. There isn't an actual contrast between 'this love' and 'she' in the English (along with the person singing, 'she' _is_ the other half of 'this love', after all). Going a bit freer, I think I would leave out _illa_, but add in the object, which is implicit in the English original, and instead saying _mihi nimium valedixit_, or perhaps even _a me totiens abiit_ ('she has left/abandoned me so many times').
Comment: @JanusBahsJacquet You are free to write your own answer.


How do I switch between the command-line history and file panes?

Question: When using the command-line history window, I'd like to go back to the file I use it on to see what I'm working with. When revisualizing a block of code (gv), the cursor will go to the top after entering command-line history (q:). How do I switch between these two windows/panes?
Answer: Generic answer:
<C-w>p moves the cursor to the previous window.
See :help window-move-cursor and, more generally, :help windows.
Specific answer:
You can't switch to another window while the command-line window is focused, as stated in :help cmdline-window:
In the command-line window the command line can be edited just like editing
text in any window.  It is a special kind of window, because you cannot leave
it in a normal way.

Comment: I get "E11: Invalid in command-line window;  executes, CTRL-C quits", trying to do this.
Comment: Please, see my edit.
Comment: You can switch to another window from the cmdline window if you have executed a `:wincmd` before. It will then be in your cmdline history and you can execute it from there, like `:wincmd pq:k`. This also closes the cmdline window, however, so it's not very useful. But it should be possible to save the cursor position when leaving the cmdline window and so one can close it, do something else, and resume working with the cmdline history in the same place.
Answer: Sadly you can't. You have to close the window first.
From the help :h E11 :

The command-line window is not a normal window.
  It is not possible to move to another window or edit another
  buffer.
  All commands that would do this are disabled in the
  command-line window.
  Of course it is possible to execute any
  command that you entered in the command-line window.
  Other text edits are discarded when closing the window.
Answer: As others have mentioned, window commands are very limited for the cmdline window and there is no way to move the cursor to the previous window while keeping the cmdline window open. Here is a suggestion that, though it won't allow ordinary 'window switching', may simplify returning to look at the content of the buffer from which you summoned the cmdline window.
function! JJCmdWinResume()
    let cmd = 'q:'
    if exists('g:CmdWinCurPos')
        let cmd .= ':call setpos(".", g:CmdWinCurPos)^M'
    endif
    return cmd
endfunc

nnoremap <expr> <Leader>q JJCmdWinResume()

:autocmd CmdWinEnter * nnoremap <buffer> <Leader>q :let g:CmdWinCurPos = getpos('.')<CR>:q<CR>

The idea is to allow storing the position of the cursor in the cmdline window when leaving it, and to allow returning to that cursor position when reentering it. We create a general expression map for Leader+qthat simply evaluates to opening the cmdline window (q:) if there is no cursor position stored, but if a position is stored, then it also sets the cursor to this position. Then with an autocmd we set a buffer specific map for the cmdline window, with the same lhs, that stores the cursor position before quitting the cmdline window. This way you can quit the cmdline window with Leader+q, look at the buffer you are working on, then reenter the cmdline window with the same keys and continue from where you left off.
Note that ^M in the function is a literal carriage return, to be entered with CTRL-V+RETURN. (If you yank-put this code you will have to replace the two characters ^ and M in this way.)
Comment: Great approach! I'm adopting this into my workflow
Comment: It doesn't seem to be fully working though, it get's stuck at the `:call setpos`


How many forest clear cuts and how big are they?

Question: I have forest stand characteristic data from northern Sweden. We have interpreted multiple years of aerial photos and now have polygons outlining different forest stand ages over time (e.g. clear cuts, young forests, old forest, etc.). I'm interested in determining how the number of clear cuts has changed over time and how much area they have covered over time. But because of the way we mapped the forest stands, we can have 2 or more polygons that are called "clear cut" right next to each other. Thus, if I were to just count the number of polygons that were coded as "clear cut" this would over estimate the number of clear cuts. How can I get GIS (I'm a novice, but use both ArcGIS and QGIS) to count polygons that neighbor each other as just one polygon?
Comment: So you want to count only each contiguous areas as a single clear cut?
Answer: Assuming you have attributes for the polygons for each type (clear cuts, young forest, etc), you can run the Dissolve tool in ArcGIS with this 'Type' column as the Dissolve_Field.  This will aggregate all the features of each type.  If you UNCHECK 'Create Multipart features'  your result will be a single polygon for each contiguous feature of each type.  This is also assuming each photo interpretation (time) is a different feature class.  If not, and its all in one, you will need to also add the time (or whatever field differentiates the different photos) to the Dissolve_Field list.
Comment: Thanks Rex! I just checked this after not working on the project for awhile and this is perfect!
Answer: In QGIS, the Dissolve tool (in the tob bar, Vector > Geoprocessing Tools > Dissolve) is used to join adjacent polygons.
Answer: This seems better suited for a raster data type. Convert each polygon dataset into a raster where, clear-cut is coded as 1 and everything else 0. Then, just sum your rasters.
The specified resolution of the raster(s) would depend on the mapping base scale of your polygons (eg., 1:50,000 would support ~25m resolution). You can approximate this using: <code>[Map base scale = raster resolution (meters) * 2 * 1000]</code> so, a 30m raster resolution would be supported at 1:60,000.


How to create popup using sprite kit on iphone?

Question: I am a beginner developing an iOS game using sprite kit. I would like to have 'pop-up' menu's that display objects (skspritenodes) such as daily rewards or settings/pause menu. The settings pop-up for example should be able to be accessed on the main home screen or during the game. Currently I have one view controller and the home scene and play scene are two different SKScenes. For reusability (and a clean project, as well as learning) I would like to have these pop-ups be their own class, including handling touches. Currently, I have a class for the settings pop-up that returns an SKNode, and this sknode contains several skspritenodes (the buttons/images that correspond to a settings pop up including enabling/disabling sound etc). However, I have to duplicate the touches code in both my home scene and my play scene to interact with this. (I currently have, in each skscene's touchesbegan method, "if nodeSettings !=nil", check the name of the skspritenode that corresponds to the touch-location, then call a method in the setting-pop-up class passing the name of the skspritenode clicked to handle interactions with the pop-up).
For my own knowledge and also to solve this problem, I would like to use a class that can handle the touch logic on its own (so in my play or home skscene, the only thing I do is create the pop-up. Any interaction, including dismissal, I would like to have handled in the class. No using the skscene's touches methods). I have found one 'solution' to this:
<code>LTPopUpReward *test = [[LTPopUpReward alloc] init];
UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:test];
CGFloat fltHeight = [UIScreen mainScreen].bounds.size.height;
CGFloat fltWidth = [UIScreen mainScreen].bounds.size.width;
popover.popoverContentSize = CGSizeMake(fltWidth/2, fltHeight/2); //your custom size.
CGRect rectPopUpReward = CGRectMake(500, 500, fltWidth/2, fltHeight/2);
[popover presentPopoverFromRect:rectPopUpReward inView:self.view permittedArrowDirections: UIPopoverArrowDirectionAny animated:YES];
</code>
and I like that you can dismiss the UIPopoverController by clicking outside of it, but this UIPopoverController only works on the iPad and doesn't work on the iPhone. I've seen this UIPopoverController for iphone not working? but was wondering if there is another way to solve my problem that Apple won't possibly disapprove of? For example, could I create a UIViewController, resize it and position it (i don't know how to do this) to simulate the pop-up?
Summarizing: my goal is to have a pop-up appear, but have all of its code (including touch) self contained within one class, and the objects on the pop-up are skspritenodes.
Comment: You can't do that. Your SKScene handles all touch methods and you cannot pick and choose which nodes are affected by this.
Answer: answering my own question: The solution I used to solve this problem is to use different SKViews. One SKView presents the main scene and another SKView presents the pop-up scene. You can adjust the size of the second SKView and even make its background transparent. Interacting with objects in this view will correctly call the touches methods in the class of the scene presented - That is this pop-up is dealt with when being created, and there is no other code dealing with it on the view-controller or main-scene's logic (all code, including creating objects and handling touch) are in the second skscene's code. The method below is called when I do "something" to call the 'pop-up'.
<code>-(void)test4
{
    skViewPopUp=nil;
    scenePopUpReward=nil;
    NSLog(@"test4 successfully fired");
    CGFloat fltHeight = [UIScreen mainScreen].bounds.size.height;
    CGFloat fltWidth = [UIScreen mainScreen].bounds.size.width;
    CGRect rectPopUpReward = CGRectMake(0, 0, fltWidth/2, fltHeight/2);
    skViewPopUp = [[SKView alloc] initWithFrame:rectPopUpReward];
    [self.view addSubview:skViewPopUp];
    skViewPopUp.allowsTransparency = YES;
    scenePopUpReward = [[LTSceneStoreMain alloc] initWithSize:CGSizeMake(fltWidth/2, fltHeight/2)];
    scenePopUpReward.backgroundColor = [UIColor clearColor];
    [skViewPopUp presentScene:scenePopUpReward];
}
</code>


Embed vector graphics in generated PDF

Question: I am generating PDF files using a Visualforce page with the renderAs="pdf" attribute. Is there any chance that I could embed vector graphics in the rendered PDF file? I tried using SVG and EPS files via <apex:image> tags, as well as embedding svg code directly into the site, but no luck.
Answer: I have accomplished embedding graphics in a PDF by using Heroku to return the image to the VF controller. We needed charts generated according to datasets so we passed the data to Heroku, used a java charting application and passed the image back to the controller.
Comment: Thanks, but embedding rasterized (pixel) images is not the problem, my question is only about vector graphics.
Answer: Highly unlikely. Remember that with SalesForce, you're basically taking an HTML page and then rendering it as a PDF. So, if it won't render first as VisualForce page (HTML), then its unlikely that you'll be able to render it as a PDF like you'd be able to with a dedicated RIP such as Acrobat Exchange.
As an afterthought... If you have your images in a vector based web plug-in format like Adobe flash, then you 'might' be able to get them to render. I've never attempted doing anything like that.
Comment: As I said, I already tried SVG which is the de-facto standard for vector graphics on the web. I cannot imagine why Flash should work. Thanks for your effort!
Comment: Actually, according to my recollection, until Flash came along, there was no support for rendering vector graphics content on web pages. That's going back to the mid/late 90's.

Embed vector graphics in generated PDF


Is sideloading same as flashing via custom recovery?

Question: Recently, I side-loaded the latest nougat release on my nexus 6p. Which was almost identical to how one would go about flashing via recovery. This brings me to the question- is there any off  the hand differences between side-loading a zip file against flashing it?
Comment: If you're speaking of `adb sideload` (which I assume), AFAIK the difference is you save yourself some steps: instead of manually copying the `.zip` to the device, booting into recovery, selecting "update from zip", navigate to the zip and finally select it – you simply tell the device to perform all those steps automatically by `adb sideload rom.zip`.
Answer: ROM Flashing refers to flashing the OS ROM. Usually involves installing a new image of the OS.
Side-loading usually refers to installing a single app that is not delivered from the Google Play Store (or whatever the app store your device is setup to use.) It can still flash ROMS, but it requires the process of using adb. Good for devices with limited storage, since the ROM can be on the PC with adb rather than the device, but sorta identical to Flashing otherwise.
Comment: While this was my first thought, "sideloading" is rather an ambiguous term. What OP most likely referred to was using the `adb sideload` command – not "installing apps from unknown sources" :)
Comment: Hello Izzy - yes. adb sideload


Anti matter of gravity

Question: We all know that the fundamental particles to be controlling the electric and magnetic forces in our universe are obtained in pairs(electrons and protons, north pole and south pole.) Likewise I guess it is safe to assume that even the weakest long range force,Gravity, also follows the same. So, is anti-gravity real or just a rubbish idea of my tiny brain?Also I think this might be related to the Quantum realms.
Comment: >"Likewise I guess it is safe to assume that even the weakest long range force,Gravity, also follows the same."  No, it is not a safe assumption. The two kinds of charges  *does NOT imply that gravity must have two kinds of masses.*   Masses always act attractively and if you read the duplicates you will see that only limits can be given for any kind of repulsive gravity.
Comment: North Pole and South Pole in gravity do exist and refer to gravitomagnetism: https://en.m.wikipedia.org/wiki/Gravitoelectromagnetism - but it is not anti-gravity. In electromagnetism, like charges repulse. In gravity, it is the opposite, like "charges" (masses) attract. For a repulsion you need a negative mass, something that makes time go faster. Nothing like this has been found so far.
Answer: The particle that conveys the electromagnetic particle is the photon, not the electron or positron. The force between them is carried by photons; the photons themselves are not subject to the electromagnetic force.
The (hypothetical) graviton is a boson like the photon. And like the photon, the graviton is its own anti-particle. So there are no anti-gravity particles ;-(
Comment: "particle that conveys the electromagnetic particle" - what does this mean? "The force between them is carried by photons" - No, the force carriers are *virtual* photons, but virtual particles don't exist, so photons don't carry a force. "photons themselves are not subject to the electromagnetic force" - example, the Compton scattering is mediated by a virtual electron interacting with a photon and making it scatter. "graviton is a boson like the photon" - then how does it curve spacetime? "there are no anti-gravity" - then why is "dark energy" repulsive? You just repeat "official" mantras.

Anti matter of gravity


What if i dont want any crop dusting done near my home simply because of the cancer causing affects from the chemicals being spayed right on top of me

Question: I have 8 acres and I am surrounded by farmland that gets sprayed regularly every year! Twice while driving down my road, the plane flew right over top of me and splattered my entire car with spray chemicals! And once while working in my yard, I smelled it first, then I felt a wet light mistyspray on my arms, and was visible on my jeans!! I don't want any crop dusting near my property for that reason alone..can I stop them, there are other ways of application, I feel threatened by these health hazardous chemicals on top of me year after year..what can I do to stop them?
Comment: This is primarily a legal problem and not an aviation problem.
Comment: I agree this is not an aviation question.  But as with many of these things, the very first step I believe is to identify the landowner and discuss your concerns with them.  It is possible you'll get the "whatever."  But its also possible they'll be concerned and feel it is their responsibility to discuss it with the application company that they aren't being considerate enough of neighbors.  And if you don't get satisfaction and decide to take it up with your township or county, it will matter to them that you already made an attempt to clear things up with the owner and were rebuffed.
Comment: How do you know these chemicals are "health hazardous"? Do you even know what the chemicals are? You have to find out what is being sprayed, and document the dates and times, and provide photos or witnesses. Then you can complain to your local lawman.
Comment: Peggy, it may not be worth your effort now, but you could edit your question to ask about aviation regulations specific to crop dusting and get the question reopened in case you think there might be benefits in getting any additional perspective on your issue.  The existing answer is ready-made for such an edit, and could be accepted unless somebody else chimes in with something better.  A succinct, regulation based Q&A that is searchable might be a good thing to have for the record...
Answer: Here is a pertinent Federal Aviation Regulation:
14 CFR Part 137.37 Manner of dispensing.

No persons may dispense, or cause to be dispensed, from an aircraft, any material or substance in a manner that creates a hazard to persons or property on the surface.

Look up the information for the FAA's Flight Standards District Office (FSDO) that services where you live. They would have FAA regulatory oversight of all of the "crop duster" operations in their area of jurisdiction. This would be a good place to start.
Also, there are likely some state or local agencies that have responsibilities associated with pesticide (or similar) dispensing operations.
Comment: The state Dept of Agriculture would be another regulatory agency to check with.


Can I install an 8 speed sturmey archer hub on a dahon folding bike

Question: Can I install an 8 speed sturmey archer hub on a 6 speed dahon folding bike ?
Comment: What do you gain from going from 6 speed to 8 speed?   Is the 6 speed an IGH as well or is it a freewheel/derailleur bike?
Answer: I'm not sure whether there are any challenges specific to a dahon bike, but here's a summary of the challenges you'll face converting any derailleur style bike to an internal gear hub:

Hub width - You'll need to find an internal gear hub with the same width as the spacing between the dropouts.
Chain tensioning - Derailleurs provide chain tensioning and with vertical dropouts you won't be able to adjust the tension with your IGH. You will probably need to install a chain tensioner.
Replacing cable and shifter - You'll most likely need to replace the cable and the shifter.

Other than this there shouldn't be any reason you can't do this. Note that an internal gear hub will be heavier than your existing derailleur setup.
Given Dahon make other bikes with internal gear hubs it might be worth considering purchasing one with all the gear already sorted.
Comment: Many thanks, Mac, for your sensible comments and this is more or less what I was already thinking but I have not decided yet and I may sell the bike and start again with an upmarket folder.  Cheers Colin


Edit InfoPath columns in Quick edit

Question: Is there is a way to Edit InfoPath columns in Quick edit view, without using InfoPath Forms with SharePoint 2013/Online 365
Answer: Yes, you go to the list in SharePoint.
'List' tab, 'list settings'.
Then you can edit existing columns to some extent - there are less options than in InfoPath.
You can also create additional columns if needed.
Answer: Creating form using infopath will create an app in site contents page open the settings for that app and it looks like the image attached. In the column  section all the columns are displayed open the column you want to edit, edit thr fields and select Ok

This may help you
Answer: when you are publishing your InfoPath form to a SharePoint Form library you can choose columns to promote to SharePoint list columns. Normally such a promoted column will be readonly in SharePoint, but you can enable it to be editable by checking the checkbox 'Allow users to edit data in this field by using a datasheet or properties page' (Modity the promoted column in InfoPath Designer).

Edit InfoPath columns in Quick edit


Google's predictive text as you type code example - w/o auto suggest dropdown menu

Question: Google's new predictive text predicts the search "as you type" in the box by showing the next characters in light gray font. Does anyone know of any code that does this? I am aware of the typical suggest drop down menus but I am looking for example code that does everything in the search box - without auto suggest dropdown menu.
Answer: i found one similar script here which suggest words like google when user type search query
https://sourceforge.net/projects/searchpuppy/files/
Answer: I'm not sure if there are any that exists, but the logic to build one seems simple enough.
It seems to me that the prediction is always the first item in the autocomplete list. The prediction is displayed by having two text inputs with transparent backgrounds, one layered underneath the other. The bottom input will contain the prediction (silver text); The top input is where the user types.
As the user types, the autocomplete finds a list of suggestions. Take the first suggestion and populate the prediction input with it.
Bind an onKeyPress event to the user-input box and watch for the user to press the right arrow key. If user presses it, populate the user-input box with the value of the prediction box.


Do voltage-limiting resistors exist?

Question: I see sometimes that resistors are specified as current-limiting resistors, so I decided to see if voltage-limiting ones exist. When I do a search though, I don't see anything mentioning voltage-limiting resistors.
Comment: "current-limiting" is not a type of a resistor, it is a function of the resistor in a particular circuit.
Comment: I can imagine circuits where a resistor would limit voltage.
Answer: A voltage source is theoretically capable of supplying an infinite current into a short circuit hence if a series resistor is used then that short circuit current becomes amps or milliamps rather than infinite amps.
A current source, on the other hand, will not be affected by a series resistor at all - it will continue to produce whatever voltage is needed into an "open circuit" resorting to making a sustained electrical arc to create a conductive path if necessary. In these circumstances a parallel resistor will restrict the open circuit voltage because it will conduct the current back to the other terminal of the current source.
So, in short, a resistor can be a voltage limiting AND a current limiting device.

I see sometimes that resistors are specified as current-limiting
  resistors

They are not specified as such i.e. a resistor isn't to be regarded as a current limiting resistor rather, it is the function it plays in the target circuit that may be described as "current limiting".
Answer: Example of Resistor used as current limiter and voltage divider (limiter)

simulate this circuit – Schematic created using CircuitLab
If you mean a polyfuse , then there is no voltage limiting R.
These have a large PTC ( positive tempco.) that rises in R exponentially past the holding current, causing a  rapid rise in junction temperature from 120 to 140'C where current is limited by a design limit. These have a cold (25'C) resistance rating as well.
The opposite temperature characteristic is a large NTC which drops in R rapidly as it heats up.  These are used as inrush current limiters called ICL's and also have a cold and hot resistance ratings with corresponding current ratings.
Both are metal oxide components but with a different mix of conductive particles in a ceramic composition.
Voltage limiters are semiconductive such as; TVS, MOV, Zeners and diodes.  These cannot substitute as a fixed R value but do have some high leakage resistance that changes with many factors such as temperature.

Do voltage-limiting resistors exist?


How do I generate a laplacian matrix for a graph dataset?

Question: If I have a dataset in a csv that looks like the one shown below.
How do I convert this into a laplacian matrix using Python?
Answer: Use SciPy's Laplacian function:
import numpy as np
from scipy.sparse.csgraph import laplacian

g = np.array([[1, 0, 0, 0],
              [0, 1, 0, 1],
              [0, 0, 0, 1],
              [0, 1, 1, 1]])

laplacian(g)

Answer: Well the Laplacian matrix is achieved by:
$degree (v_i) $ for $\space$ i=j
$-1$ for $\space$ if $v_j$ and $v_i$ are not adjacent to each other
$0$ otherwise

First, you need to store your file to a 2d-array
Then you need to define another 2d-array matrix the same size of your first matrix. Then loop over the elements to fill the Laplacian matrix
import pandas as pd
data = pd.read_csv('data.csv')
df = pd.Dataframe(data)
M = df.as_matrix()
L = np.zeros(df.shape[0], df.shape[1]) #shape[0] and shape[1] should be equal

Then for each element $A_{i,j}$ we calculate their corresponding value in L
for i in range(len(df.shape[0])):
    for j in range(len(df.shape[0])): # or shape[1]
        if M[i][j] == 0 and M[j][i]== 0:
            L[i][j] = -1
        if i == j:
            L[i][j] = sum(M[i][:])
        else:
            L[i][j] = 0

I haven't tried the code so consider it much like a pseudo-code.


What kind of payload is Mission 1390 (Zuma) going to launch?

Question: Usually, when there is a "classified" payload, there are hints as to what it would be. Why is it different on this mission? Why is no government entity taking credit for it?
Comment: Because this question is unclear as stated. It needs more background so that readers know what mission you're talking about.
Comment: The secret kind.
Comment: What's mission 1930? Is this the SpaceX "Zuma" mission?
Comment: Yes, it is my understanding, that mission 1930 is  the SpaceX "Zuma" mission.
Comment: Why the downvote?
Answer: There's really no way to know. There are a number of articles out there speculating, but there isn't a lot really known. What we do know is it was manufactured by Northrup Grumman, will enter Low Earth Orbit with an estimated inclination of 40-60 degrees, and was payed for by an unnammed government agency. There are 2 launches in recent memory that have followed similar conventions. Of these, one of them was later determined to be NSA (I believe I read, can't find the source). It does not belong to the NRO (According to them), who usually launches top secret US satellites. See this article for more information.
If I had to guess, it belongs either to the NSA, CIA, or some not very well known government agency. The purpose could really be anything, from proof of concept to spying to communications, or perhaps more. They probably aren't taking credit because the first thing that anyone will have problems with is identifying who is using it, which makes it even more difficult to figure out what the purpose is. With NRO missions, one knows they are some kind of spy satellites, these are less well known.
Comment: I've read a dozen or more articles trying to figure out what the payload is. There's a lot of really interesting theories out there. Who knows what the truth is, only people not talking...
Comment: Mentioned article would indicate a EO/SAR test bed for a future satellite?
Answer: update: apparently there will indeed be a Zuma launch:

https://spaceflightnow.com/2018/01/02/falcon-9-zuma-mission-status-center-2/
https://arstechnica.com/science/2018/01/spacex-will-try-to-launch-the-mysterious-zuma-satellite-again-thursday/

Some speculate there is no spacecraft for the Zuma mission to begin with.
From Florida Today's article SpaceX launch of secret Zuma mission on hold until after Thanksgiving:

Some have gone as far as to suggest that there really is no Zuma mission — that the pre-launch preparations were an exercise to prove SpaceX's ability to fly on short notice. (emphasis added)
SpaceX put a Falcon 9 on the pad at KSC and test-fired its main engines on Nov. 11. The rocket went vertical again before last week's planned launch attempts, but has since returned to its hangar.
Under that scenario, the payload fairing tests SpaceX cited might merely be an excuse to stand down from a launch that was never really going to happen. (emphasis added)
Time will tell if SpaceX confirms a new launch date for the mission after the holiday.
Comment: Is there a link to that article?
Comment: @mike I forgot to type the `[1]` after the article's title. The link was included in the raw text of the post, but the UI won't display until properly formatted. Thanks for the heads-up!


How to use more than one color in a tellraw command?

Question: I am using <code>/tellraw</code> for my server, and I know how to use tellraw with color, but not with multiple colors in one command. Help?
Answer: This command would send the letter 'r' in red and the letter 'b' in blue. (You would replace player with a username or target selector).
<code>/tellraw player [{"text":"r", "color":"red"}, {"text":"b", "color":"blue"}]
</code>
This one would write, "Hello, World!" with two different colors:
<code>/tellraw player [{"text":"Hello, ", "color":"gold"}, {"text":"World!", "color":"red"}]
</code>
This page will show you more about raw JSON text and how to use it.
Answer: If you want long ones try this one:
<code>/tellraw @a [{"text":"YOU ","color":"gold"} ,{"text":"HAVE ","color":"aqua"} ,{"text":"BEEN ","color":"blue"} ,{"text":"REWARDED ","color":"green"} ,{"text":"GREATLY","color":"yellow"} ,{"text":"!!!!!!","color":"dark_purple"}]
</code>
Answer: Use minecraftjson.com it helps! You can add multiple lines and copy and paste the code provided in the box after you have finished


Why parallel LC oscillator producing very high voltage?

Question: I was trying to generate 1 MHZ frequency using LC parallel circuit using 2.53 mH inductor and 0.01 nF capacitor and I successfully did so. But its amplitude in KVs is surprising me. Any idea why?
Comment: Because you don't have any losses! Try simulating real components.
Comment: @LeonHeller How is the voltage amplified?
Comment: Add 1 ohm series resistor, or 50 ohms as the Rout of a function generator. Then Re-sim.
Answer: Imagine, if you can, that prior to opening the switch, there is (say) 10 amps flowing from V1 (the 12 volt supply) into inductor L1 (2.53 mH). The energy stored (W) in an inductor is: -
$$W = \dfrac{1}{2}\cdot L\cdot I^2$$
This works out at about 0.127 joules. When the switch opens, that energy is released by the inductor and will "fill-up" the capacitor C1 (10 pF). The energy equation for a capacitor is: -
$$W = \dfrac{1}{2}\cdot C\cdot V^2$$
And, if you calculate the peak voltage across the capacitor, that comes to 159 kV. That voltage will rise and fall sinusoidally as energy swishes back and forth between capacitor and inductor.
Maybe if you limited the current to something like 10 mA you would get a more realizable circuit.
Answer: When you close key A, you might think you're charging the capacitor to 12v. You're also charging the inductor to a large current, which will store a lot of energy.
How large a current? With the circuit components you have there, 12v and zero resistance, the current ought to be infinite. However, as the simulator has come up with some finite numbers, it looks like it imposes its own lowish value for infinite things, or maybe uses a finite resistance in voltage sources or inductors to limit the current.
In real life, the inductor or battery would have some resistance. However, you would still expect a significant voltage rise from energy stored in the inductor.
Comment: Good old-fashioned SPICE would have barfed at a zero-resistance path from a voltage source to ground.  I'm not sure what that simulator is, but I suspect that it's trying to use "realistic" resistances in either the coil, the switch, or the "battery".
Answer: I added the switch B in resonance circuit.
First let the capacitor charge via closed switch A and opened switch B, so that no current passes through inductor because inductor opposes the change of current.

When it was fully charged, I opened switch A and closed switch B to complete the loop[!

Now it is working as it should be.


Computing x and y distances between two raster maps using GRASS GIS?

Question: I am working with a maximum water elevation raster in which, similarly to using r.grow.distance, I am trying to extract the distance from the each null cell to the nearest water elevation cell. However I need both the x and y distances, which are not provided by r.grow.distance. I looked into the source code for this function and found that the x and y distances are calculated within the code but r.grow.distance can only provide results in euclidean, squared, maximum, manhattan, or geodesic formats. Is there an easy way to extract these x and y distance values? If so, I am working on a real-time storm surge model so it would be ideal to be able to calculate these values in as little time as possible. I also looked into r.distance but this does not seem like an option that would work for me.
Comment: Please edit your original question with additional info from comment and remove comment.
Comment: So you have a region that is partly covered by water, and all the rest are pixels with NULL?  And you want the distance from all NULL pixels to the water, but split into X-Y components? Perhaps an image would make the question clearer.
Comment: Micha, that is correct. I am essentially trying to pull distance values from r.grow.distance as x and y components. I have added an image of the sample water elevation raster I have been working with. This raster represents the maximum water levels achieved throughout the duration of Hurricane Florence within a small area of the eastern coast of the United States.
Comment: @Micha Sorry, I just realized I did not properly use the @ in my previous comment (I'm new to this). If you are interested in seeing how I was able to resolve this issue, I have posted an answer to this thread.
Answer: I was able to use r.mapcalc to create a raster for all of the x and y values of the original maximum elevation raster. For example:
<code>if(maxElevationRast,x(),null())
</code>
Then I used r.grow.distance to extrapolate the x and y values, covering all null cells. Finally, I used r.mapcalc and simply found the difference between the x() and y() moving-window values and the values extrapolated using r.grow.distance.
This gave me the x and y components of the euclidean distances between each null cell and its closest non-null cell.
Comment: Nice! Thanks for posting the solution.


What is the physical reasoning behind the generation of equal but opposite force (Newton's third law)?

Question: When I apply a force on a body, it will apply a force on me (Newton's third law). But where does this force on me (i.e. equal but opposite force) generate from? Does it generate from within the body, or from somewhere else?
Comment: In the case of contact forces, microscopically speaking, it's because of the electromagnetic repulsion between electrical charges when the surface is compressed, but for distance molds such as gravitational ones, I'm also curious about why this reflexivity happens...
Answer: It follows from the principle of conservation of momentum. Think of it as a transfer, like a payment. If you give me 20 dollars, I have 20 dollars more than I had before and you have 20 dollars less because you have transferred money to me. Giving me 20 dollars has an equal and opposite effect on the amount of money you have. It is the same with forces. If you apply a force to me, you transfer momentum to me- my momentum increases and yours decreases by an equal and opposite amount.
Comment: I like this, but how do you answer the objection that it works only if the objects are free to move, that is they are not acted upon by other (restraining) forces?
Comment: If I push a pile of sand, I am applying force on it. The pile of sand will start to deteriorate, but will it be still applying the same force on my hand? Or the third law of motion assumes the objects involved are only rigid?
Comment: Similarly, if I push air, why don't my hands experience equal but opposite force? Is it because the air is not rigid?
Comment: @RameezUlHaq, who says it does not experience such forces?  Calculate the force necessary to accelerate a few cubic centimeters of air from rest to the speed of your hand.  That's a ballpark estimate of how much force you are exerting on the air.  It is very difficult to feel that small of a force on your palm.  It is low because air has little mass.  Use a more massive fluid (like water) to generate stronger forces.
Comment: @BowlOfRed, so Newton's third law doesn't assume that the bodies in contact should be rigid? They can be flexible and locally deform when force is being applied by my hand onto the object and hence when my hand experiences an equal and opposite force?
Comment: Rigidity is not required.  Rigidity just gives you the ability to accelerate more mass at once (which requires higher forces).
Answer: For example: I do a force on a broken car to move it. But instead of put my hand directly on it, I hold a spring, and there is another equal spring fixed on the car. So I do the force by contacting both springs.
No matter if the force is enough to move the car or not, the deflections of the springs are the same. So the forces are equal.
We could imagine a different outcome of the experiment without any logical contradiction I believe. So it is an experimental fact.


Can anyone tell me how to play triplets in rhythm with eighth notes?

Question: I'm having difficulty performing these series of triplets in tandem with my eighth notes? Does anyone know any cues or practice I can do to learn? I'm thinking I should try to just aim to aim to time the notes to "hit" after 2 beats, where they meet. Thanks.
Comment: One can count it – the second eight note is exactly in the middle between the second and third triplet. However first let's clarify the most important: are you sure the left hand is playing straight eighth notes, or perhaps it's playing swinged eighth notes in triplet feel (in which case the second eight note would be played with the third triplet note)? What composition is it?
Comment: See also: https://music.stackexchange.com/a/45828/63781
Answer: Here are a few step by step exercises that you can try. If you feel that some are too basic you can skip them, of course, although I find that overall this process provides a good foundation to the end result.

With the metronome in 60 bpm:

Tap a binary division with your hand (1 2 with 1 with every beat of the metronome).
Tap a ternary division (1 2 3 with 1 with every beat of the metronome).
When you can do the previous steps regularly and relaxed, alternate continuously between the binary and ternary division every few "bars" (first, say, every 4 bars, then every 2 bars, then every other bar).

Repeat the previous exercise, but tapping the metronome beat with one hand and the divisions with the other hand. Exchange hands. When you can do it regularly and relaxed, do it without the metronome.

These first two exercises will help feel the binary and ternary divisions.  The following exercise will train your ear to the 2/3 polyrhythm:

Put the metronome in 120 and tap the ternary division at the SAME tempo as before when the metronome was at 60 bpm. So, 1 2 3 with 1 with every other beat of the metronome. Again, do this until you do it fluently. If you have to go back to 60 bpm to tap the ternary division regularly, do it. When you can tap the ternary division superimposed with the binary division of the metronome, listen to the rhythmic pattern that's being produced.

Now put the metronome at 180 and tap the binary division at the SAME tempo as before (1, 2 with 1 at every 3 beats of the metronome). Again, when you can tap the binary division superimposed with the ternary division of the metronome, listen to the rhythmic pattern that's being produced.
Finally, let's do the polyrhythm:

Put the metronome at 60 bpm. Start for example with the binary division on your right hand and the ternary on your left (could be the other way around, but since that's how your piece is...) and try to tap both hands each with their respective division. The auditory memory of how the polyrhythm sounds will be of great help in this. Your ear will help you even if your hands may not want to in the beginning.

When you can do it regularly and relaxed, do it without the metronome.
Now you can do it on the piano: choose any two keys and play the 2/3 polyrhythm with your index fingers. Always keep relaxed and try to keep the regularity of the pattern. Change fingers and play note series or small improvisations always maintaining the 2/3 polyrhythm, .e.g something like this (it's just an example):

By now you should be able to play the 2/3 polyrhythm in your sleep, so you can focus on the technical aspects of the piece. But you may want to repeat some of the previous exercises at the same exact tempo as you'll have in the piece, before actually going back to it, as this will give the memory of how the polyrhythm should sound and feel in the piece.
I would also suggest to momentarily practice a couple of any two bars where this texture occurs, without the octaves in the right hand (so playing the right hand like a single note melody). This will allow you to focus on the rhythm when joining hands and making sure that that each hand is doing the subdivision in a even manner. So play these bars and listen to what's being played (recording yourself is a good idea), making sure that each note on either hand is rhythmically even and the overall 2/3 polyrhythm is there.
As the work on the piece progresses, there will be a tendency to make the rhythm uneven, specially in the ternary part, the left hand in this case, when there are technical difficulties. So you'll have to keep attentive and once you feel that the technical difficulty is overcome, listen to the overall rhythm and to what each hand is doing to make sure that each division is even.
Comment: A typical advice for learning 2/3 polymeter is to first learn the whole structure linearly as a single voice, and only then learn to hear it as two separate voices. You can see examples in the duplicated linked questions. You don't mention it. Does it mean you specifically oppose this method of learning? Why?
Comment: No, I don't oppose :-), I agree that the auditory memory of how the polyrhythm sounds "linearly" is an essential part of  learning it, as emphasized throughout my suggested approach (e.g. step 3).  But it's easier if you're already familiarized with different time divisions anyway both auditorily and physically, and that's the purpose of the first steps I propose (which can be skipped if not necessary).


Calculating critical values in chi distribution

Question: I am learning about chi tests and I've understood everything so far except how to calculate critical values. I don't want to take number of degrees of freedom and probability of exceeding the critical value(alpha) and look it up in the table. I want to learn how to calculate the critical value.
Comment: As Robert says, trying to compute the critical values by hand is a tall order, unless you've somehow devised a nice method to easily approximate the incomplete gamma function. Nevertheless, you might be interested in looking up the Wilson-Hilferty transformation, which approximates the $\chi^2$ distribution with a normal distribution.
Comment: +1 @J.M. for pointing to a classic paper from the 1930s.  Good ideas never die!
Answer: The chi-square distribution with  $\nu$ degrees of freedom has cumulative distribution function
$$F(x) = 1 - \frac{\Gamma(\nu/2,x/2)}{\Gamma(\nu/2)}\ \text{for} \ x > 0$$
For each positive integer $\nu$ this can be written in terms of powers of $x$, $e^{-x/2}$, and (if $\nu$ is odd) $\text{erf}(\sqrt{x/2})$.
The upper-tail critical value at level $\alpha$ is the solution of $F(x) = 1 - \alpha$, while the lower-tail critical value at level $\alpha$ is the solution of $F(x) = \alpha$.
This can't generally be done in closed form, but you can use numerical methods.
EDIT: In the case $\nu = 1$, $F(x) = \text{erf}(\sqrt{x/2})$, so the solution of
$F(x) = \alpha$ is $x = 2\; (\text{erf}^{-1}(\alpha))^2$.
In the case $\nu = 2$, $F(x) =  1 - e^{-x/2}$ for $x>0$, so the solution of $F(x) = \alpha$ is $x = - 2 \ln(1-\alpha)$.
In the case $\nu = 4$, $F(x) =  1 - (1 + x/2) e^{-x/2}$ for $x > 0$, and the solution of $F(x) = \alpha$ is $x = -2\; \text{LambertW}(-1,-(1-\alpha)/e) - 2$.
Those are the only cases, as far as I know, where the solution can be done in any sort of "closed form".
Comment: The `\Gamma(a,x)` function in Robert's answer is known as the incomplete gamma function; one would be hard-pressed to numerically evaluate this function, or its inverse, by hand.


when i copy outlook calendar events to SharePoint calendar it changes all names adding "copy" at the beginning

Question: when I copy outlook calendar events to SharePoint calendar it changes all names adding "copy" at the beginning of each event
FYI
---I followed these steps :
1- Open your SharePoint online site
2- Open the Calendar and click "Calendar" tab at the top left corner.
3- Click "Connect to Outlook". Then it will ask for confirmation, click "Yes".
4- Open your Outlook calendar
5- Click "View" tab at top > "change view " tab > choose "List"
6- select your required calendar that you want to import it
7- change it again to list view > select all + copy
8- select the SharePoint online calendar inside the outlook
9- change the view to list view > paste
Answer: I know this is old, but the difference is if it is an appointment or a meeting.  An appointment is a calendar entry that has no other people invited.  A meeting is a calendar entry that does have others invited.  When someone shares a meeting it adds "Copy:" to the front.


Is triage review queue really working?

Question: I have been the decider on several reviews, meaning that they had 2 'reviews' with the same decision as mine, most of these have been 2 x 'Looks Ok' and 2 x 'Should be Improved', so my decision is conclusive. Only once have I been the decider on a unanimous review, this was when the question had been edited. What I ask is should I be hitting 'Should be Improved' more often, or is Triage just not really working?
Comment: Why exactly do you think the Triage is not working? Because you're doubting your own decisions?
Comment: I would suggest that you go over the ones where you've clicked looks okay and others haven't and try to work out why. It's getting amusing that posts are leaving the queue with 2 close votes from unsalvageable votes where 3 people think they're fine. (Either party might be wrong)
Comment: I find it interesting when I've clicked "looks Ok" on something that others have flagged as needs improvement. I think the problem is that almost all questions can be improved slightly, and knowing where the cutoff should be seems pretty subjective.
Comment: @MattCoubrough yes, i would agree, that is what i meant by question.
Comment: @slugster yes-who wouldn't doubt their decision if it was split halfway (in saying this the obvious fix is for me to avoid triage/skip question until/unless I am sure of my decision), I think it is not really working because it seems nobody is deciding the same way, it seems to be unknown how to use it, i think people have  different ideas on how it works, who/which way is correct
Answer: I'll quote Shog9 from his announcement:

However, first we need to make sure that works! In particular,
  before we start filtering questions from the home page or building a
  queue for helpful editors, we need to make sure the two pieces we've
  built already actually do what they're intended to.
So right now, there's no visibility restrictions or helper queue.
  After a few days, I'll come back with the results:

If it looks like things are working, we'll start dropping questions that don't "Look OK" from the home page.
If it's not working, we'll fix them. Change the guidance, the number of reviews required to complete a task, etc.

Once we're all happy with both the behavior of Triage and the
  appearance of the home page, we'll roll out a Helper/Editor workflow.

The whole point of the exercise at present is to see how the community responds to this. Declaring failure before the results have even been tabulated seems a bit premature. Personally, I'm optimistic that this design is going to work based on what I've seen so far.
Also, your vote is no more "deciding" than any of the other four votes on the posts you've reviewed. You just happened to vote last. Again, part of this exercise is to see where the line is for what the community feels is "unsalvageable" or "needs work".
Comment: I'd also point out that it is even *working* in its current form by having questions with a low quality score get flagged promptly and closed (and deleted? I've seen a fair number of unlinked questions from unsalvageable reviews in my review history).  Also, many times I've seen looking back on need improvement responses seeing an edit to the question when I look at it again later.  So even if there isn't complete functionality today, it is 'working' to some degree now.  More future functionality on the queue could make this even more streamlined in processing.
Comment: Yes I agree that it can work well, and it does do an alright job, but should we be heavier on the 'Should be improved' button then the 'looks ok'?

Is triage review queue really working?


Progression not saved after first playthrough

Question: Whenever I play Undertale another time (anytime but the first run-through), after San's phone call, I can never get back to where I was because there is no save file. That means I can never go on a date with Papyrus, befriend Undyne, and go to the true lab.
I play on Switch. Can anyone help?
Answer: I'm assuming that you want to do a pacifist run after completing your neutral run. you can't befriend papyrus or undyne if you killed them, you have to reset your save and do a full pacifist run from the beginning, and it means that you can't kill any monster or boss, just spare them, and then you can befriend them.
EDIT:
the true lab is a part of the pacifist run that you go to after sparing every monster and tiring asgore until he shows the mercy button then talk to flowey.
if you killed any monster in your current run reset your save.
to just go to the true lab after beating asgore yo need the following prerequisites:

spared every monster and boss
spared asgore and talked to flowey (if you did a pacifist run, flowey will tell you to hang out with your friends)
if you killed any monster reset your save and begin a pacifist run

to go to the true lab you need to close the game after beating Flowey and then start it again and press continue in your save, you will find yourself at the save before asgore's fight, don't fight him, Go back until you get to the path between the core and MTT-hotel. You will receive a call from Undyne and she will tell you to go to Snowdin and deliver a message for her. When you take the message and deliver it to Alphys' lab you will swap it under the door. Alphys will think that's your message and you will date with her.
Go again to Alphys' lab and you will find a letter and a door. Then go to the real lab and finish it.
Comment: I already know that. It's just that after the Asgore boss fight, I spare him and then Flowey kills him. Then I get San's phone call, get sent into an empty room (in the ruins?), and then sees the credits (not necessarily in the right order). I can't go into the true lab and do whatever people do there.
Answer: Thanks for helping, but I actually got the answer. I went on a date w/ Papyrus and cooked with Undyne. After beating Mettaton EX, I went back to the hotel to get more healing items.
Before I even entered the hotel, Undyne called for me to send the letter. Then everything else happened (true lab, Asriel boss fight) but I never fought Asgore. Instead, when he was supposed to destroy the Mercy button, Toriel hit him with fire magic. So I'm guessing that the game is slightly different on Nintendo Switch rather than on a computer. Anyway, thanks for trying to help.


Can't access special vehicle list in gta 5

Question: When I'm in the garage of any 3 players on gta 5 for my Xbox One it says to access the Xbox store for new downloadable content but can't find anything in the Xbox store. How do I fix this?
Answer: Xbox one installs all DLC automatically as game patches so the only thing in the store are the Shark Cards for in game currency, unlike on 360 where expansions packs had to be installed individually to unlock the access to the in game cars.


Marketing Cloud Data Extension Consistency Model

Question: We have a Data Extension that will be updated by multiple users using either REST API or through Marketing Cloud flow. We want to understand what will happen to the REST call to update particular Records if some other user is also trying to update the same Record. What atomicity/consistency policy MC has for the Data Extension. Eg REST API we will be accessing is: PUT /hub/v1/dataevents/key:{key}/rows/{primaryKeys}
Answer: You will not get a 'this record is currently being edited' type of message. Calls will be processed in the order they are received.
Comment: IF 2 calls are made (which the calls tend to be sync, not async, by default) to the same row at nearly the same time, the second one will fail, not queue and process. To get what you mention above, I believe you would need to ensure all are utilizing Async - but even then, your second call potentially could be overwriting what the first call edited previously.


How do I create a bumpy reflective material?

Question: I'm doing a project for practice, and I want to recreate this lighting shown below. I don't know too much about nodes and node setups (I'm currently studying it). I believe I have the appropriate light for this scene, I just need to know what nodes or settings to use.
Effect I'm trying to achieve

Comment: You can check my answer here: https://blender.stackexchange.com/questions/76369/space-between-voronoi-shapes/76382#76382 just change Diffuse Color and Cracks Scale in Mapping node.
Comment: Can you post a screen grab of your model? And are you using Blender Internal or Cycles render engine?
Comment: Hello, welcome to Stack Exchange! In order for us to help you, please provide more information. Screenshots of your node setup would be helpful, or it would be great if you can provide us your .BLEND file using [this website](https://blend-exchange.giantcowfilms.com/)
Answer: Creating a bumpy reflective material is easy using procedural textures and bump nodes.
Step 1: Make sure that you are using Cycles Render

Step 2: Add a Bump Node With Shift+A, and under Vector choose Bump.
Step 3: Connect the Normal output of the Bump node with the Normal input of the Material you are using (In most cases this will be a Diffuse material.)
Step 4: Add a Voronoi Texture node with Shift+A, and under Texture choose Voronoi Texture.
Step 5: Connect the Fac output of the Voronoi Texture node with the Height input of the Bump node.
You'll notice that this already begins to warp the lighting effects on your model the way that you would want them to.
Step 5: Now you just have to adjust the Scale value of the Voronoi Texture node to your liking.
Also, adjust the Strength value on the Bump node, so that the effect on the lighting isn't as harsh.
Your end node setup should look something like this:

Note: This same process applies for any other Texture node, I just used Voronoi for example because it looks close to the effect OP is trying to achieve.


The chi-square test for cryptography

Question: I have a question about the chi-square test How can we use it in cryptography? And what results should we expect from it when a file is encrypted? I mean, when a file is encrypted, should its value increase?
Comment: I did link to the list of questions about chi-squared hoping that you might be able to get something out of it. Please indicate what you've tried to find out and where you are stuck by hitting [Edit] under the question.
Comment: "A new test for randomness and its application to some cryptographic problems" by Ryabko, Stognienko and Shokin in Journal of Statistical Planning and Inference 123 (2004): https://boris.ryabko.net/jspi.pdf
Comment: The relevant article cited above was found on the Wikipedia page on X².
Comment: @ Maarten Bodewes I encrypted a file and now I want to use chi-square on file before encryption and after that and then compare them with each other to be sure, it is well encrypted
Comment: @A. Hersean Thanks for your help.
Answer: $\chi^2$ measures the uniformity of a sample distribution. It's commonly used to test samples for randomness (I don't want any hassle on this), to do with true and pseudo random number generators. Uniformity is absolutely necessary for cryptography which you can  read about elsewhere herein.
E.g.
<code>$dd if=/dev/urandom of=/tmp/urandom bs=1000 count=1000

$ent /tmp/urandom
Entropy = 7.999799 bits per byte.

Optimum compression would reduce the size
of this 1000000 byte file by 0 percent.

Chi square distribution for 1000000 samples is 278.05, and randomly
would exceed this value 15.37 percent of the times.

Arithmetic mean value of data bytes is 127.3541 (127.5 = random).
Monte Carlo value for Pi is 3.141468566 (error 0.00 percent).
Serial correlation coefficient is 0.000781 (totally uncorrelated = 0.0).
</code>
A mean value is about 255 for an eight bit window (byte) if a thing is randomesque, or properly encrypted. So yes, generally the thing's information entropy increases to ~8 bits/byte or ~1 bit/bit when encrypted.
Comment: @ph9675 But no. You can't say that encryption is done well just because the cipher text looks randomesque. I would consider it an alpha level test of the software. Nothing more. That's what this entire site is about...
Comment: Thanks for your help. But I have a question. If I have a file and encrypt it, is the value of chi-square different before and after encryption? If the chi-square value for the encrypted file increases, can we say that the encryption is done well?
Comment: @ph9675 Humans (and me) tend to focus on information, rather than data.  Do you understand?  Well encrypted information is computationally indistinguishable from a random sequence. So even if your un-encrypted information is all zeros, once encrypted it will have an information entropy of 8 bits/byte. It will increase. So $ \chi^2 $ will be ~ 255 for an eight bit window.  It will look like random gibberish.
Comment: Thank you so much for your help and guidance.

The chi-square test for cryptography


Is it possible to ever recover from Chronic IT (iliotibial) Band Problems?

Question: I have been a runner for nearly 20 years now.  In high school, I suffered the occasional IT (ilio-tibial) band injury where it got so tight that even if I tried to run through the pain my speed was severely restricted.  And I had a coach which encouraged running through pain :(  As time has gone on, such injuries have become more and more frequent and require at least a month of down time to heal.  Even with rest, it seems these days my body really is not recovering from it and my IT band is having a hard time loosening up at all.  It seems leg-length difference (5/8") has played a big role in this condition.  2 years ago I got a new pair of 1/2" custom orthodics at a sports doctor I was seeing, but those do not keep me completely injury free.  Am I doomed for a lifetime of problems or is there something else that can be done to regain that springiness and flexibility in my IT band?
Comment: You may want to see this question about [stretching your iliotibial band](http://fitness.stackexchange.com/questions/3337/how-to-properly-stretch-your-iliotibial-band).
Comment: How are you doing now @demongolem?
Answer: Possibly.
I know a lot of people who have had some really severe and longlasting IT band issues and have done the work and then successfully come back to running.
For severe issues, which yours appear to be, I would suggest getting good advice from the appropriate specialist. In this case, I would find a good physiotherapist with good knowledge of running. I would expect them to put you on a program of rest, following by a lot of stretching.
The issue is that you will have a blister on your IT band where it crosses the tightest point, right beside your knee. You need to get that blister to heel properly, then get your IT band to remain loose while slowly building up the volume.
If you do this too fast then you will re-blister the IT band and have to start again.
I cannot speak to the leg length or orthotics issue. Personally, I remain unconvinced of the effectiveness of orthotics. Your experience may vary.
Answer: Iliotibial band syndrome (ITBS) management and prognosis is something you should discuss with your health care provider. They can help you with your specific situation.
There is surprisingly little high quality information about ITBS in the literature about prognosis.
Information from an ITBS systematic review
Here is information from a systematic review1 about ITBS.
Regarding treatment:

studies confirm the benefits for the conservative treatment of ITBS in runners; pain medication/injection, stretching of the iliotibial band, hip abduction exercises/pelvic drops to strengthen the gluteus muscles and advice about training, inlays and shoes. Unfortunately, to date, no (randomized) clinical trials have investigated the benefit of these different modalities in isolation. Although iliotibial band bursectomy and arthroscopic resection of the lateral synovial recess proved effective in runners with chronic (>6 months) ITBS, the studies investigating these techniques were small.

Regarding prognosis:

conservative treatment appears to be beneficial in the management of ITBS in runners, although the evidence supporting this comes from studies with small, heterogeneous samples. Surgical approaches appear to be effective, and the arthroscopic technique would seem especially appropriate because it allows assessment and treatment of any intra-articular pathology. In the future, it would be interesting to compare these treatments in an RCT with more participants.

Information selected from UpToDate
Even UpToDate2 had nothing on prognosis, and this is what they stated on treatment:

There is little high quality evidence to inform the treatment of iliotibial band syndrome

TLDR: There is little high-quality scientific information about the treatment of ITBS, and even less about prognosis. Your question is best aimed towards a health care provided experience in ITBS.
Citations
[1] https://link.springer.com/article/10.1007/BF03262306
[2] https://www.uptodate.com/contents/iliotibial-band-syndrome - accessed 16-04-2022


Does clearing one's Google Drive old photo files also remove photos in Google Photos?

Question: Way back when Google Drive was synced with Google Photos - i.e. I've had my photos backed up to Drive with Google Backup & Sync, and they'd automatically show up in Google Photos. I need to free up some space on Google Drive now - would deleting the original photos on there also remove them from Google Photos, or is Google Photos collection been copied there, now independent of the original Google Drive files?
Answer: I found the answer. Apparently because the relationship between the two products was confusing, starting in July 2019 Google decided to separate them so that:

When you upload or delete photos in Google Drive or Google Photos, changes  won't reflect in the other product


Why do some cells in InfoPath 2013 appear white on SharePoint?

Question: My form is a gray color with a blue heading, but some of the cells in the table appear white in SharePoint. When I view it in InfoPath, all cells are the correct color. However, when I upload to SharePoint, the color of some cells appear to be white. They appear to be random.
Answer: IF you have verified that the field background/color is correct as you want then this could be an issue with how IE is rendering your form. Update your IE if you are using an older version. Also try it on Google Chrome.
Answer: The cells need to be bounded. Try editing the table and putting outlines set as the same color as the cell


Correlation of Ratios substantially lower compared to the numerator alone

Question: I have four variables. The first two (V1, V2) are correlated .98. The third and fourth variables are correlated (.99). When I correlate the ratios V1/V3 and V2/V4 the correlation drops to .59. Any thoughts why? V1-V3 and V2-V4 are correlated about .98. Coudl that have anything to do with it? And how?
Answer: Since correlation of the pairs $(V_1, V_2)$ and $(V_3, V_4)$ both are high (about $0.98$) then the regression of one on the other must be almost linear. But still, the constant terms could be very far from zero! and that will be seen in the ratios. Algebraically, we have (very approximately) that
$$ V_1 = k_1 + \beta_1 V_2 $$
$$  V_3 = k_2 + \beta_2 V_4 $$
(where we have left out error terms). If we have scaled the variables such that
$\beta_1 = \beta_2 = \beta$ then we get, approximately,
$$
    V_1-V_3 = k_1-k_2 +\beta(V_2 - V_4)
$$
and the correlation should not depend on the value of $k_1-k_2$. But if you take the ratio,
$$
\frac{V_1}{V_3}= \frac{k_1+\beta V_2}{k_2+\beta V_4}.
$$
Now, the dependence and thus the correlation will clearly depend on the constants $k_1, k_2$. Just make some simulated example data and then some plots and you will see!
Answer: Indeed, the correlation of the ratios can be pretty much 0:
set.seed(19291010)

x1 <- rnorm(100)
x2 <- x1 + rnorm(100, 0, .1)
x3 <- x1 + rnorm(100, 0, .15)
x4 <- x1 + rnorm(100, 0, .1)
rat1 <- x1/x2
rat2 <- x3/x4

cor(x1,x2) #.99
cor(x1,x3) #.99
cor(x1,x4) #.99
cor(x2,x3) #.98
cor(x2,x4) #.99
cor(rat1, rat2)  #-0.09

Essentially, you are correlating the left over noise.
@whuber makes the good point that ratios should only be taken on variables that are all possible. This does not change the results much:
set.seed(19291010)
x1 <- rnorm(100,10,.5)
x2 <- x1 + rnorm(100, 10, .1)
x3 <- x1 + rnorm(100, 10, .15)
x4 <- x1 + rnorm(100, 10, .1)
rat1 <- x1/x2
rat2 <- x3/x4

cor(x1,x2) #.98
cor(x1,x3) #.94
cor(x1,x4) #.98
cor(x2,x3) #.94
cor(x2,x4) #.99
cor(rat1, rat2)  #0.01

Comment: A fair evaluation of any analysis involving ratios will assume all quantities are positive (although the OP did not stipulate this): ratios rarely are meaningful otherwise.
Comment: OK, good point. I will amend the code


Do Chinese minorities speak Chinese as a native language?

Question: I'm thinking about learning Chinese for the future possibilities of the terrain work of linguistic anthropologist now. Don't you anyone have any views on the potential possibility of usage Chinese in thi manner? Or do the Chinese minorities take Chinese as a foreign language?
Comment: Which minorities? China is a big place, and even "Chinese" isn't a single language. I'm sure there exist minorities whose first language isn't a variety of Chinese, but that doesn't mean all minorities speak the *same* non-Chinese language.
Comment: Yes, I know but I'd just like to get an overall view.
Comment: When you write "Chinese" do you mean Mandarin? Do you mean ethnic minorities, ie not Han Chinese? Do you mean Han Chinese who speak languages other than Mandarin?
Comment: Mandarin is the state language and is spoken at home, business, and school by the great majority in PRC. In the south though, people mostly speak a related but mutually unintelligible language at home, and Mandarin at school and business, but people are mostly bilingual in both.  [See wikipedia for more](https://en.wikipedia.org/wiki/Chinese_language#Standard_Chinese_and_diglossia).
Comment: If you research "sinicization", this may be a good starting point for an answer. See, https://en.wikipedia.org/wiki/Sinicization for a start. Most ethnicities within China, I would propose, have more or less adopted Mandarin as their native language. This would be due to economic and social development reasons.
Answer: Note that China has fifty-something officially recognised ethnic minority groups and it's impossible to say anything about "Chinese minorities in general".
Let me summarise my experiences from several months of travel in Zhejiang, Gansu, Sichuan, Yunnan and Xinjiang. I don't know how generalisable they are, but they should give you some idea about differences between groups.

Hui. This is a minority group that doesn't have its own language, and a variety of Chinese is their native language. Most Hui people are Muslim, and therefore many of them learn Arabic to some degree, but it is clearly a foreign language for them.
Xibo. A small minority group in Xinjiang, stemming from Manchurians. In the case of the Xibo man I met, Mandarin seemed to be his second native language, and he was fully proficient in it. He was also fully proficient in the Xibo language, which included reading and writing its Mongolian-based vertical script.
Naxi. A minority group in Yunnan. As far as I could tell, they speak Mandarin very well, perhaps on a near-native level. Note that Naxi has an interesting writing system but the Naxi people I met could not read or write it, even though they spoke the Naxi language.
Uyghurs. Unlike Hui and Xibo, they don't speak Chinese as their native language. Most Uyghurs in Urumqi speak conversational Chinese, and some speak it extremely well. On the other hand, in Kashgar, a town with Uyghur majority, it's quite easy to find people who can't speak Chinese or can speak very little. In general, the greatest differences in Mandarin proficiency that I've met were among Uyghurs.
Kyrgyzs, Mongols. All members of these minorities I met spoke Mandarin well, even though it was clear that they spoke it as a foreign language.
Tajiks. Even Tajiks who lived in Tashkurgan, a remote town near the Pakistani border, spoke good Mandarin. Fun fact: Chinese Tajiks don't have their own writing system, and generally write Uyghur and/or Chinese. They are therefore often trilingual, and know three completely unrelated languages: Tajik (Indo-European language family), Uyghur (Turkic language family) and Mandarin (Sino-Tibetan langauge family).
Tibetans. I met a Tibetan nomadic family on the Gansu/Sichuan border, and the mother didn't speak Chinese at all. Her 7-year-old son, however, spoke perfect Mandarin.
Han Chinese. It's not a minority group, but it's worth noting that while the great majority of Han Chinese speak Mandarin as either first or second native language, there are some who only speak the local Chinese dialect and know little Mandarin. For example, in a small town in Zhejiang I again experienced the situation where the daughter spoke perfect Mandarin (she was, in fact, my Mandarin teacher), but I couldn't directly communicate with her mother, who only spoke Wu. In PRC such situations seem to take place in smaller towns and villages, with people from older generations. In Hong Kong, however, there are many people from all social backgrounds and generations who can't speak much Mandarin.
Comment: 中国少数民族 may be translated as "ethnic minorities in China" or "Chinese ethnic minorities". They are still treated as part of the Chinese people (中华民族), hence 中国人 ("Chinese"), as opposed to the Han people (汉族). Foreigners are not ethnic minorities, and those who obtain a PRC citizenship will still be recognized as foreigners, not native Chinese, with the exception of re-patriation of Overseas Chinese.
Comment: The OP explicitly said "Chinese", Mandarin being one of the varieties. The Han people will of course speak some variant of Han language as a native language.
Comment: @DoubleU The adjective "Chinese" has several meanings in English, among others: "relating to ethnic Chinese people" and "relating to China". I assume the OP meant the latter here, given that there is an official classification of ethnic minorities in China and no classification of "ethnic Chinese minorities".
Comment: This is where it is actually helpful to use Han characters instead of English words. In the PRC, there is 中华民族, which includes Han people + non-Han peoples recognized as being natives of China. This is translated as "Chinese ethnicity" or "Chinese race". The Han people view themselves as one people/race with one written language and multiple pronunciations of that one written language, NOT as separate races, and part of the greater racial category Zhonghua minzu. "Ethnic Chinese minorities" would get interpreted as non-Han Chinese people.
Comment: "Ethnic minorities in China" will get interpreted as non-Han, non-Chinese people (aka foreigners with or without a PRC citizenship and belong to NEITHER the Han people NOR the non-Han Chinese people).
Comment: @DoubleU I don't think there is such a distinction in English. The [Ethnic minorities in China](https://en.wikipedia.org/wiki/Ethnic_minorities_in_China) article in Wikipedia is about non-Han citizens of China. And I'm from Europe, I lived in China for some time and met quite a few other foreigners living there. Nobody ever referred to us as "ethnic minorities", and that would sound extremely strange.


How surface charges in circuit knows where to make what potential?

Question: I am a high school student and I am very confused in topic "current and electricity" I have read that when any circuit {take a simple one with only one resistor ) is open some charges leaks out from battery and appears as surface charges on the connecting wires which makes up the electric field 0 inside the whole circuit  so the potential at any point in the circuit is same as the potential of  terminal of the battery to which it is connected, but as soon as we close the circuit those surface charges arranges in such a way that the make a constant electric field throughout the circuit, but my confusion is that how they arranges like that they makes the same potential in connecting wires of negligible resistance{which connects resistor with the terminals of the battery) as the terminal of the battery to which it is joined but in the resistor they don't makes the same potential everywhere why? how do they know it? and also isn't it very bizarre that they makes up the constant electric field everywhere? please guide me without involving complicated mathematics(if any required) and just try to give any logic behind this.
Comment: do you know about surface charges in circuit? if yes ,then only u will be able to understand my question
Comment: Not quite sure I understand what you are asking for.

Before closing the circuit the electric potential will be equal in the entire circuit as there are no current flowing. The electric field around the circuit would be dependent on the actual layout of the circuit. I

From what you are saying it sounds like you have "Idealized" to much for your question.

You can look at the wire as resistors with very low resistance if that helps so there will be some electric field in the wires as well. but as you say they can be neglected compared to the resistor.
Comment: Yes I do. That does not make your question any clearer, unfortunately.
Comment: I am simply asking how does the surface charges know where to make what potential? for example, in the image, I have shown that they make the same potential as the terminal of the battery in the connecting wires of negligible resistance but in a resistor they don't makes the same potential everywhere . how does they know that this is a resistor and this isn't? and also why do they arrange to make constant electric field isn't it bizarre?
Answer: After initial transients, the total current in all parts of a circuit must be equal. If this condition is not met, the non-uniformity in the (E) field will shift the positions of charges until it is met.  This is the same feedback mechanism that keeps the field equal to zero in a non-driven conductor.
Answer: Imagine you have a spring, said R, press it. You have an effect on R that now has a particular length. Now press the R spring with the help of... another spring ;) , said C (conductor), using the same energy you employed before: you obtain a different effect on R with another length (is longer than before because your energy is not "communicated" on R because is spent also on C that has is proper elasticity). If C (conductor) is a perfect translator of your energy it has to have no elasticity.
So, there is a physical property that makes energy being translated from you to R: now please imagine elasticity is for a spring as the same thing resistance is for a conductor.
Resistance is intended for the whole conductor in terms of his form, but there is a specific physical property linked to the material called "Electrical resistivity" that "tends" to be "0" in good and superconductors (resistivity equal 0 does not exist) and is responsible also for the behavior described in the answer edited by R.W. Bird (1).
Electrical resistivity is a "microscopical" property.
(1)
@MISC {648745,
TITLE = {How surface charges in circuit knows where to make what potential?},
AUTHOR = {R.W. Bird (https://physics.stackexchange.com/users/238328/r-w-bird)},
HOWPUBLISHED = {Physics Stack Exchange},
NOTE = {URL:https://physics.stackexchange.com/q/648745 (version: 2021-06-30)},
EPRINT = {https://physics.stackexchange.com/q/648745},
URL = {https://physics.stackexchange.com/q/648745}
}


Question regarding the multiplication table of $\mathbb Z/6\mathbb Z$

Question: I'm sorry if this is a dumb question, but I'm honestly confused. I was reading my modern algebra textbook and it started talking about the multiplication and addition table of $\mathbb Z/6\mathbb Z$. I understood the addition table, but the multiplication table had me confused. For example, why is the multiplication of $0+6\mathbb Z$ and $0+6\mathbb Z$ equal to $0+6\mathbb Z$? My initial impression was that it would equal $36\mathbb Z$ because $6*0=0$, $6*6=36$, $6*12=72$, etc. What aspect of my reasoning is faulty? Thank you in advance.
Comment: By definition,$\Bbb Z/6\Bbb Z$ is the set of cosets $a+6\Bbb Z$, but $0+36\Bbb Z$ is not such a coset, so isn't an element of $\Bbb Z/6\Bbb Z$.
Comment: Thank you for your response. I recognize that $0+36\mathbb Z$ doesn't make sense to be an element of $\mathbb Z/6\mathbb Z$. I guess my main question is how you would perform multiplication of the elements of $\mathbb Z/6\mathbb Z$ because it seems counter-intuitive to me.
Comment: My assumption is that in order to multiply $0+6\mathbb Z$ with $0+6\mathbb Z$, you need to multiply every element of these sets together and see what set comes out. But when I do this, I get $0+36\mathbb Z$ which doesn't make sense.
Answer: That is precisely the beauty of ideals:  they are stable under arbitrary multiplication. Hence your cosets are also stable under multiplication. This is actually a really nice exercise:  prove that $R/ I$ is a ring if and only if $I\subset R$ is an Ideal (well definedness of multiplication here then actually boils down to $r0=0$ for all $r \in R$).
So in your concrete case that means that
$$(2 + 6\mathbb{Z})*(2+6\mathbb{Z})= 4 + 6\mathbb{Z} + 6\mathbb{Z} +36\mathbb{Z},$$
but now since all the factors containing $\mathbb{Z}$ are contained in $6\mathbb{Z}$  this actually is $$4 + 6\mathbb{Z}.$$
Hence you can actually just multiply as in $\mathbb{Z}$ and then take modulo $6$.


How to integrate ROS with QtQuick GUI

Question: I am trying to build an User Interface for a robot which is built on ROS-Kinetic.
Now I had the front end made in QtQuick but i am having trouble in backend. Basically , I dont know how to integrate ROS with QtQuick UI . What I expect from my UI is to get the details of nodes , topics , dynamic reconfigure etc in my UI.
So , do anyone have idea regarding some ?
Answer: What You Can Do Is Use Sources Of Visualizers Like RVIZ Or RQT and take Whatever You need and put them in One Or More C++ Class And Expose It To QML As An Object And Call It Whenever You Want
Here's rqt On Github

How to integrate ROS with QtQuick GUI