Import error: module not found

Question: I am working on an addon and when I test installing it it works just fine, but when I reopen the Blender I get a message saying "JARCH_materials" module not found, even though it is in the same folder. Also why is it when I install it I don't get a remove button on the addon?
Comment: Did you install it via *User Preferences > Addons > Install from file...*?
Comment: yes @CoDEmanX, I did
Answer: It turns out that this seems to be an issue with importing bpy into JARCH_matierals. I changed around the code so that bpy is passed into the function instead of being imported and I got it all to work together fine. This might be since bpy is already imported into the module? I don't know for certain.

Import error: module not found


Help finding the Marginal PDF of Y given a Density Function of Two Variables

Question: Problem:
The join pdf of $(X,Y)$ is given by
$
f(x,y) = \begin{cases}
\Big( \frac{5}{32} \Big) x^2(4 - y) & \text{for } x < y < 2x, 0 < x < 2 \\
0 & \text{otherwise} \\
\end{cases}
$
where $k = \frac{5}{32}$. Find the marginal pdf of $Y$.
Answer:
\begin{eqnarray*}
f_y(y) &=& \int_{-\infty}^{\infty} f(x,y) \,\, dx \\
f_y(y) &=& \int_{0}^{2} \Big( \frac{5}{32} \Big) x^2(4 - y) \,\, dx \\
f_y(y) &=& \Big( \frac{5}{32} \Big) \frac{x^3}{3}(4 - y) \Big|_{x = 0}^{x = 2} \\
f_y(y) &=& \Big( \frac{5}{32} \Big) \frac{2^3}{3}(4 - y)  \\
f_y(y) &=& \Big( \frac{5}{12} \Big) (4 - y)  \\
\end{eqnarray*}
My answer is:
\begin{eqnarray*}
f_y(y) &=& \begin{cases}
 \Big( \frac{5}{12} \Big)(4x^3 - \frac{3x^4}{2}) & \text{for } 0 < y < 4 \\
 0 & \text{otherwise} \\
\end{cases} \\
\end{eqnarray*}
but the books answer is:
\begin{eqnarray*}
 f_y(y) &=& \begin{cases}
  \Big( \frac{5}{12} \Big) (4 - y) & \text{for } 0 < y < 2 \\
  \Big( \frac{5}{32} \Big)\Big( \frac{1}{3} \Big)(4-y)(8 - \frac{y^3}{8}) & \text{for } 2 < y < 4 \\
  0 & \text{otherwise} \\
 \end{cases} \\
\end{eqnarray*}
I would like to know what I did wrong.
Thanks
Bob
Comment: You obeyed the bound $0<x< 2$ but not the bound $y/2<x<y$.
Answer: The support for the joint distribution is $\{(x,y): 0<x<2, x<y<2x\}$

That is the triangle $\triangle(0,0)(2,2)(2,4)$

This is the same region as $\{(x,y): 0<y<4, y/2< x< \min\{2,y\}\}$
Which is the union: $\{(x,y): 0<y<2, y/2<x<y\}\cup\{(x,y): 2\leqslant y< 4, y/2<x<2\}$

That is $\triangle(0,0)(1,2)(2,2)\cup\triangle(1,2)(2,2)(2,4)$

Plot the points and you see how the triangle is divided into two parts at the $y=2$ horizon.   Draw horizonal likes through the upper and lower triangles and see why the bounds for the integral producing the $Y$-marginal pdf are different for each part.
Hence why:
$$f_Y(y) =\frac{5}{32} \begin{cases}\displaystyle \int_{y/2}^y x^2(4-y)\;\mathrm d\, x &:& 0<y<2 \\[1ex]\displaystyle \int_{y/2}^2 x^2(4-y)\;\mathrm d\, x &:& 2\leqslant y< 4 \\[1ex] 0 &:& \text{otherwise}\end{cases}$$
Answer: It seems like you have a good idea of what to do but just made a tiny mistake, I'll clear that up and leave you the work of finishing up.
The problem is that the set of possible values of $y$ depends on the value of $x$. You are not taking this into account. To do so you can write the joint pdf in terms of characteristic functions.
So, rewrite the pdf as follows:
$$ f(x,y) = \left( \frac{5}{32} \right) x^2 (4-y) \mathbf{1}_{ [x,2x]} (y) \cdot \mathbf{1}_{[0,2]}(x) $$
Now aply the same method you did before, integrating with respect to all possible values of $x$.
Take into account that if $ y$ must be between $x$ and $2x$, this is equivalent to $x$ being smaller than $y$ and $2x$ being bigger than $y$. (Draw the region for easier integration)
Hope this helps!
Comment: I now understand why my answer is wrong and my guess is that $f_y(y) = \int_{\frac{y}{2}}^{y} \Big( \frac{5}{32} \Big) x^2(4 - y) \,\, dx $ is the right integral. Is it?
Comment: @Bob not exactly. That one is not considering the bound on $x$. When you do integration on two variables it is a very good practice to draw the region (set of $(x,y)$ values). Whenever yo draw this region you'll find out exactly where the solution of the book comes from. It is just from integrating.


How to put array into excel range

Question: I know how to write single cell into excel but when im trying it on array excel sheet is filling with only last value
this is my range
 Excel.Range ServiceName = (Excel.Range)_sheet.get_Range(_sheet.Cells[38, "B"] as Excel.Range, _sheet.Cells[45, "B"] as Excel.Range);

_ServiceName is List which contains 1,2,3,4,5,6
for (int i = 0; i < _ServiceName.Count; i++)
            {
                ServiceNameArray[0, i] = _ServiceName[i];

            }

this i my trying to write into excel but as i said it there is only last item (6) in excel book
 for (int i = 0; i < _ServiceName.Count; i++)
            {
                ServiceName.set_Value(Type.Missing, ServiceNameArray[0,i]);
            }

does anyone have an idea?
Answer: Davide Piras is right. And you're doing a few other strange things there, I can elaborate by request.
For now I just want to point out that you can directly assign the .Value property of a Range to an array:
ServiceName.Value2 = _ServiceName.toArray();

This is much, much faster for bigger amounts of data.
(Side note: If you want to do the same with Formulas, for some strange reason you have to take an extra step (doubling the time):
range.Formula = array;
range.Formula = range.Formula;

unless there is a better way I don't know about yet.)
Answer: I see you looping on the ServiceName array to get all values one after the other but not see you changing the focused cell inside the cellrange at every loop iteration. Of course, I would say, you see only the last value, because you are writing all values one over the other always in the same place.

How to put array into excel range


Is length contraction multidimensional?

Question: I'm solving this problem in which the rod with length $L_0$ is moving at speed v along the horizontal direction; this rod makes an angle $\theta_0$ with the x-axis and I am supposed to determine the length of the rod as measured by the stationary reference frame.
I started with breaking the Length of the rod into horizontal and vertical components; the horizontal component will get contracted for sure, but I am not sure if the vertical component also will contract or not? Is length-contraction multi-dimensional?
Answer: The component that is seen contracted by a moving frame, is along the direction of the velocity of the frame. In your case since the rod is seen to be moving in the horizontal direction, therefore only the horizontal component contracts and not the vertical one.
Comment: Thank you for your answer! Does that mean that if the rod is observed to be moving along that theta direction it will contract both horizontally and vertically?
Comment: Yes, precisely. Also, if you change your axes (by simple rotation), you can have the rod contracting purely along one of the axis directions. This tells us that the physical picture doesn't change based on what you call as horizontal and vertical.
Comment: However, in the case of an object with extent in all 3 dimensions (e.g. automobile), there is a parallelogram-like distortion in addition to length contraction.

Is length contraction multidimensional?


What kind of payments are accepted for the initial purchase of United States Treasury securities?

Question: What kind of payments are accepted for the initial purchase of United States Treasury securities ? (not be to confused with trading done on the secondary market) When a normal person is purchasing securities they are typically doing so within the money supply as effected by fractional reserve banking and The Fed. (eg. NOT M0) Does the initial purchase require physical cash, coin, gold certificates, etc or is it done the same way as normal people would do a bank transfer or any other payment ?
Comment: Can you explain the connection to personal finance?
Comment: Confused as to how this relates to the The Fed and money supply. Are you aware of https://treasurydirect.gov/ which allows for retail purchase of [various US Treasury products](https://treasurydirect.gov/indiv/products/products.htm)
Comment: When the federal reserve makes requests for additional currency to the treasury they must hold 100% of the face value of the currency in collateral. The main approved collateral used is US treasury securities. I thought there would be some restrictions in place as a result, but there are not. Thus changes in the federal funds rate or reserve requirements can lead to the purchase of more treasury securities which can lead to the increase in M0.
Answer: There is no restrictions for payment methods individual or institutional investors at US Treasury Security Auctions.
https://www.treasurydirect.gov/indiv/products/prod_auctions_glance.htm


Not All Threads are starting in JMETER using Master-Slave Configuration

Question: I am testing using a Master-Slave Configuration. When I look at the output on the master test machine, when I start the test, it typically shows 64 threads started. Recently it seems like it was showing 63 out of 64 Threads Started. I just started another another test and this time it was showing 62 out of 64 threads started.
What should I be looking for.
Below is a snapshot from the master test machine.
Answer: Let me start with little background.
The image which you have displayed in your question this is called as the 'Summarizer' and it is shown on in the Non-GUI mode of JMeter execution. You can configure this (like its interval etc.) from the JMeter.properties file.
In this view, The lines with "summary +" are incremental for the latest summarizer period, the lines with "summary =" are cumulative. (courtesy to links Link1 and Link2) i.e. if your Summarizer interval is 5 secs then this summary is shown after every 5 secs and "Summary +" will show the incremental value from the last summary (i.e. the summary value 5 secs ago + current values).
Further, you must have seen that these values "Active, Started, Finished" are shown only with "Summary +" line
Now, coming back to your question, first of all you don't need to do anything with this summarizer view, as this is only for command line and your actual results are saved in the .jtl file you are creating.
But still to begin with the explanation, the number just next to "Summary +" is the number of request which will be used for your Throughput (like from your image (900/9.5 = 97 requests/sec),

Avg: is the Average response time value at that time
Min: is the Minimum value of response time
Max: is the Maximum value
Err: is the Error percentage in your requests (if there is any)
Active: is the total number of threads which are currently active, i.e. they may be doing some work over the application
Started: is the total number of threads Started by JMeter till that Summarizer time (usually what I have seen is that Started >= Active, as a thread which has not got started how it can be active (normal thread group case) "but not sure about Master Slave/Distributed load")
Finished: is the total number of threads which have exited the script, or their work has got completed (so, for a normal thread group configuration ideally; Active + Finished = Started)

Example:- Lets say
Thread Group count = 30
Ramp-up = 30
Loop Count = 1
When this is executed (with summarizer interval as 3 secs), then after every 3 secs you will get "Summarizer +" entry over command prompt
00: Active: 3, Started: = 3, Finished = 0

03: Active: 4, Started: = 6, Finished = 2

06: Active: 2, Started: = 9, Finished = 7

..... so on till

xx: Active: 0, Started: = 30, Finished = 30

Multiple factors may affect this behavior like:

This all was a scenario from a normal thread group, for Stepping, Tear Up etc. thread group (it should be same, but I am not sure)
Master Slave Configuration/ Distributed Load (there may be multiple slaves, sharing the thread count, but any slave might have unfinished threads affecting count)


Open closed window in Chrome

Question: How can I open the closed window in Chrome? I mean exactly window with all its tabs, but not a single tab. I know that you can open tab by clicking Ctrl+Shift+T.
Answer: I use:  https://sessionbuddy.com/
It's a Chrome extension - seems minimal resources wise
Been using it for years.  Does the trick. Gives you peace of mind.
(I have no vested interest in the company)
Answer: I'm not sure why Ctrl+Shift+T does not satisfy your needs. If you open a new window with a few tabs, and close it, then it will show up in your history.
If you then hit Ctrl+Shift+T, Chrome will re-open the window with its tabs. It is not limited to opening one tab at a time, and I think that is what you seem to believe?
Here's a picture of the history, after closing a window with multiple tabs. Clicking it, or hitting Ctrl+Shift+T will reopen the window and its tabs
Answer: I think the only way is to go to "Recently closed" on a new tab.
You can see here.

Open closed window in Chrome


Account field clean up best practice - how long to hold onto field before delete

Question: We are in the process of cleaning up unused fields (generally under a 5% usage) in Accounts.  The fields have been removed from the new Layouts and we are ready to deploy.  How long should we hold onto the information while we give the users time to review the new layouts and alert us if there is any information they feel is important missing.?  I can't find a best practices in field and record type clean up.  Please help.
Comment: Yes, I agree its sort of vague, and I asked the same questions.  They asked me what are best practices.  I believe this is mostly useless data.  There is no policy at the moment. I'm actually trying to establish one.  I will say we are financial management so I would assume on the high end.
Answer: It is nice you are thinking about this as common practice is to a) do nothing and b) let the next poor sysad worry about it :-)
That said,

Rename the labels of the deprecated/obsolete fields to: The field (obs) or maybe Obsolete - the field.  This way, anyone doing report or list view building in your user community won't be tempted to use the fields while they are in their 'on the way out' part of the lifecycle. Or if they need it, you will get notified via the usual channels.
Take a backup of Account and save it in a few places.
Wait a quarter after all end of quarter reports/dashboards have been run -- if the field labels have changed and someone has reports in their Personal Folder or in a folder you haven't replaced references to the old fields - the users might notice the "Obsolete label" and mention something to you.
Answer: I do not believe that there is a correct answer to this question, as it will depend on various factors.

What kind of data is about to be deleted?
What is your company's record retention policy and requirements?
Is the data used anywhere else (reports, integration, etc.)?

This is obviously not a comprehensive list. It should just be a start to which questions should be asked around your company.
Whatever you decide for a time frame, just make sure that other people at your company are ok with this data disappearing permanently.
Comment: Also have a backup of all the data in case you need to recover any of the deletes.
Comment: that's a good idea.  Then no regrets.


Why should I use a contact between two glued bodies in FEA when I can directly merge the mesh nodes between them?

Question: So I am using ANSYS to conduct a FEA analysis. I have two options to built a connection between two bodies; first is I can use a contact (like bonded) between the touching faces and the other option is I can simply merge the topologies of the two faces in contact, so the the two faces will have a single set of nodes and elements between them.
I couldn't understand what is the difference between these two options and which one should be used where? I heard from somewhere that if you are interested in finding the amount of force being transferred in that contact, and if you want to know the contact stresses on the faces in contact, then you should choose modelling the connection as a contact in FEA. But still I am not sure if these reasons hold true or not. Please help.
Comment: Adhesives can handle a given level of shear forces and/or separation loads then they fail. If you merge the bodies then you lose the ability to see what the shear/load is at the interface.
Answer: Merging the nodes is equivalent of a continuous body (see welded).
Using a contact definition, means that there are two separate surfaces which are connected through a layer/thin film (although this is a simplification). Using the contact definition means that usually there is a surface and adjacent nodes and/or elements are checked against that surface (to measure the distance or penetration).

Figure 1: an algorithm used for penetration of a node against a contact surface (source Autodesk)
By knowing the distance, and setting a spring constant for the definition, it is possible to calculate the forces between the nodes. Changing the constant (i.e. changing the bonding agent) will result in a different force and a different displacement (which in the case of the merged nodes is not possible)

An alternative (naive) approach for the glue, would be to use elements to model the glue layer. However usually the thickness of the layer is a few $\mu m$, and that would be harmful for the aspect ratio of elements  in the neighborhood (either the glue elements or the structures or both).

Usage

Merged nodes: when the faces of the two bodies cannot move relative (or you can assume that the movement is very small) to each other. A prime example is welded materials, or using a rigidly connected fastener. You ca use it even bonded with glue when you don't care about the relative displacement (as a simplification of the structure).
Contact definition when the faces move relative to each other, and the movement is either significant or is a subject for study. An example is the performance or the loads transferred from a bonded surface. An alternative example is automotive crashworthiness (e.g. when you two cars impacting each other, you need to define contact definitions between the two cars, and also between the different components of each car)

In general contact definition are more expensive, but sometimes is the only way to perform a  meaningful simulation.
Comment: @JonathanRSwift In my experience even when the material have different properties you can merge the nodes and select the elements and give them different properties.
Comment: Well thanks for answering. But for what purposes should the contact be used and for what purposes can a simple merged topology be used? An example for each would be very much appreciated. And can you also please share the link for the picture you attached?
Comment: Contact should be used if the two parts have different material properties!
Comment: @JonathanRSwift, why should the contact be used for two parts having different material properties? How is that gonna be different than merging the faces of contact.
Comment: @RameezUlHaq Jonathan IMHO is right, in that you can do it if initially they don't touch and you need to check for penetration or other. The most common case is that the materials will have different properties.


Elimination in α,β-dibromohydrocinnamic acid

Question:
The above is a picture of α,β-dibromohydrocinnamic acid (2,3-dibromo-3-phenylpropanoic acid). In the lab today I carried out an elimination reaction on this molecule using potassium carbonate giving the carbonate anion as a base. I thought about the mechanism and I initially thought that the base would attack the hydrogen on the leftmost carbon atom (out of the two with the bromine atom on it) as I thought that this would be the most acidic proton of those two carbon atoms because of resonance available with the aromatic ring. However, the proton on the carboxylate group is surely the most acidic. How does this effect things in terms of the mechanism and the product?
Comment: Question: was the product a carboxylic acid or bromostyrene?
Comment: I have literally no idea. I am sorry.
Comment: Just theoretically though, if you were to try and predict what would happen, what would you say?
Comment: google://dibromocinnamic+acid+elimination gives links for decarboxilating elimination, but the procedure I found uses $\ce{AgNO3}$ in addition to carbonate. The product is bromostyrene. Given that I would say, that carboxylic group deprotonates first, and then both $\ce{Br^-}$ and $\ce{CO2}$ leaves simultaneously.
Answer: Dibromohydrocinnamic acid can eliminate in a number of different ways as shown in the following diagram. I'm not sure what conditions lead to cinnamic acid, but I know it can happen.  You have recently been asking questions about E1 and E2 eliminations, so my guess is that you are running a well-known lab experiment that generates cis- and trans-bromostyrene and allows the student to study the effect of reaction conditions on the mechanism of an elimination reaction.

Usually, the experiment starts with the bromination of trans-cinnamic acid.  The bromination is run under conditions that lead to trans-addition of bromine so that only the erythro (see here for diagrams and mechanism) or (S,R) [and its mirror image (R,S) enantiomer] dibromocinnamic acid diastereomer is formed.  The other dibromohydrocinnamic acid diastereomer, the threo isomer [(R,R) and its (S,S) enantiomer], which can only be formed by cis-addition of bromine is not produced.
If you build a model or draw a Newman projection it will make it easier to understand what follows.
Using the erythro [(S,R) and (R,S)] diastereomer obtained from the above bromination, running the elimination reaction in a solvent like acetone (a solvent that won't stabilize a carbonium ion as much as protic solvents like water or methanol) you drive the mechanism towards the E2 elimination side.  With your model or drawing, put the carboxylate group (the base has removed the acidic carboxylic acid proton to produce the corresponding carboxylate anion) and the bromine on the next carbon in an anti-periplanar arrangement (you've discussed anti-periplanar in your earlier questions on the E2 mechanism) and see how in a one-step, concerted elimination of both carbon dioxide and bromide you wind up with the cis-bromostyrene isomer.
If you ran the reaction in a protic solvent (like water or methanol) that stabilizes carbonium ions, you push the reaction towards the E1 mechanism involving loss of the bromine adjacent to the benzene ring to produce a stabilized benzylic carbonium ion.  The stable carbocation ion has an appreciable lifetime and will rotate so 1) the soon-to-be-departing carboxylate group is lined up with the carbocation p-orbital on the adjacent carbon and 2) that the benzene ring and remaining (bulky) bromine are as far apart as possible (the lowest energy conformation).  Elimination of carbon dioxide from this conformation produces trans-bromostyrene.
Typically, the student is given several test tubes and the reaction is run under a variety of conditions where solvent and reagents are changed and then the amounts of cis- and trans-bromostyrene are measured by nmr.  From this information the student can see how solvent and reagent can shift the mechanism.  See this link for a bit more detail on the actual experiment along with some good Newman projections.
BTW, the lab should smell nice since the trans-bromostyrene produces a hyacinth-like odor.
Comment: Two question Ron :-) --> 1) Why do protic solvents stabilize carbocations better than aprotic solvents? Both are capable of donating a lone pair. 2) Is the bromine more bulky than the carboxylate group?
Comment: @Jori 1) protic solvents, particularly water and methanol, have high dielectric constants.  High dielectric solvents lower the energy (stabilize) charge better than low dielectric solvents ([see here](http://chemistry.stackexchange.com/questions/16810/why-would-a-polar-protic-solvent-favor-the-addition-of-hbr-to-an-alkene/16848#16848)).  Also protic solvents can hydrogen bond with the leaving group and stabilize it, making carbocation formation a lower energy pathway. 2) The first atom in the carboxylate is a (relatively) small carbon atom, bromine is larger than carboxylate.
Comment: It seems that also electron-donating substituents on the phenyl ring can interfere with the mechanism, driving it more towards an E1-type elimination. At least that's what happened to somebody who worked on my project before I did and who had a phenol derivative.


Changing my Apple-Id's nationality

Question: Not many years ago, there was quite a difference between accounts from different countries when it came to apps and music available for purchase. Nowadays I don't really see that difference, so I wish to change my AppleId's nationality. Is that possible? Will my purchased apps and music be kept with the new nationality?
Answer: The App Store purchased items are tied to Apple ID per country.

If you have an Apple ID under registered under email@example.com in US, everything you've purchased is only available when you've switched to US App Store.
If you use the same Apple ID and switch country to Hong Kong, you won't be able to download all the apps and musics you've purchased in US App Store unless you switch back to US App Store first.
You can, however, download the apps from the US App Store before switching to HK App Store where you can buy an apps from the there separately. The apps bought from HK App Store is only available when your Apple ID's country has been set in Hong Kong.

For the sake of simplicity, never switch an Apple ID to other regions unless you decide to move to the destination country permanently.
Answer: Open itunes
From the menu bar at the top of your computer screen or at the top of the iTunes window, choose Account > View My Account.
Enter your password, then press the Return or Enter key on your keyboard, or click View Account.
On the Account Information page:
To the right of Country/Region, click "Change Country or Region."
source: https://support.apple.com/en-us/HT201389

Changing my Apple-Id's nationality


Is there any way to move your dragonvale park to another facebook account?

Question: I've realized that my dragonvale is linked to my personal fb account and I want to have a separate account just for dragonvale. Is there anyway to transfer my park?
Answer: http://www.backflipstudios.com/help/androidfaq/ has this to say:

DragonVale park progress is stored on our servers for Android devices when the park is associated with a Facebook account.  If you would like to associate your Local park with your Facebook account, please follow these steps (please note that this is a permanent choice and once you associate your Local park to your Facebook account, this cannot be undone)...

So you cannot undo the link yourself. It's unlikely that support has the capability to do this as well. You'll have to start a new park, sorry.


What is the difference between "See you" and "So long"?

Question: I want to say "Let's work this later, "see you/so long" I don't know which one is more formal and I don't know which one take more time to "meet someone again"
Comment: Do you mean which closing remark refers to meeting again sooner?  _So long_ does not refer to seeing each other again. _See you_ means I hope to see you again. Let's work _on this_ later or Let's work _this out_ later means we should definitely meet again soon to finish our discussion.
Comment: Meaning no offense: I had enough trouble attempting to parse your grammar in the original question that if I were reading this in a business correspondence, that would dominate any concerns over formality. // I can't tell what you mean by "which one take more time to...".
Answer: "See you" and "so long" are roughly equal in formality in American English. Both are what most people would probably call informal - you can use either as a sign-off to coworkers of equal rank, and to immediate supervisors with which you have friendly interaction in any typical office environment. For anything farther off, you'd want something more formal such as "sincerely" or "signed". (It's also common to omit a signoff altogether in email, and just use a signature file.)
"So long"'s origin is unknown, though there are a few candidates. Nowadays, it's identical to "goodbye", "farewell", and several other parting phrases.
It would be odd to inquire how long it would be until next meeting, unless there were another reason to ask (i.e. you need to meet again to follow up on some issue). In all cases, the choice of signoff phrase is independent of time until next meeting unless you explicitly provide a time (e.g. "see you tomorrow"; "so long until next year").


Views displaying node reference fields

Question: Will the view chosen (in the advanced settings) of a node reference in a content type get overridden by another view if the node reference field is shared between two (or more) content types?
In more detail: I am working with a Drupal site that has a content type that contains a node reference field. One of the things it asks you when creating the content type is - which views are used to reference the node. I am trying to create another content type that shares the same field as the first one, and it therefore will also be a node reference.
BUT, when I create this new content type, it again asks which view I want to use. If I chose a different one will it override the view in the first content type, since they share a common field?
Answer: In Drupal 7 you can have different field settings for different content types. This was not possible in Drupal 6.

Views displaying node reference fields


Clearcase to Subversion Migration

Question: How to migrate the datas from clearcase to subversion? I have a vob of size 30 GB and i should not miss any datas during the migration? Please provide me a valid information to do this process?
Answer: I was once watching as this discussion unfolded once, and honestly, it's not an easy process on paper. The only tool explicitly for migration that I've found is Polarion Software's Importer for SVN. There are other connectors and bridges, both free and commercial, that you might be able to use for migration as well.
But if the decision to do this hasn't been set in stone yet, you might want to know what you are getting into. The two best articles that I still have bookmarked are a blog post from CollabNet and a question on StackOverflow about migration strategies - if you search around, you can probably find blogs and posts by people who have made the leap to see what worked for them, I just don't have any bookmarked or easily accessible. The SO question also linked to another question that mentioned specific strategies for actually performing the migration - the accepted answer was the Polarion tool, but other options include custom scripts.

Clearcase to Subversion Migration


why "return false;" or "event.preDefualt();" doesn't work after $.post();?

Question: why "return false;" or "event.preDefualt();" doesn't work after $.post();
Firstly,I simply written a return false after
 $(#id).submit(function(e){ return false;}// it works properly.But
when i call something via $.post('check-email.php',{parameter},function{data}) and i try to write return false after that $.post call.It doesn't works and directly goes to next page.
 here is my code:-
$(document).ready(function () { //newly added
    $('#mysignupform').submit(function (event) {
        return false;
        or event.preDfault(); // only work here
        var emailVal = $('#inputEmail').val(); // assuming this is a input text field
        //alert(emailVal);
        $.post('check-email.php', {
            'email': emailVal
        }, function (data) {
            alert(data);
            if (data == 'false') {
                $("#mysignupform").submit(function (event) {
                    return false;
                    or event.preventDefault(); //both doesnt work here..why??
                    ;
                });
            } else {
                $("#mysingupform").submit(function () {
                    return false;
                }); //retrun false doesnt work here..why??
            }
        });
    });
});

I dont want to allow them to submit but still its happening. Please help me..!
Thanks in advance..
Comment: Don't know if this is a 3-times typo, but it's ```event.preventDefault()```
Comment: do not use unrelated tags. PHP removed.
Comment: what you getting in data
Comment: You're already inside the submit event and you're creating two more events I don't get it... A return statement won't return an outer function.
Answer: Because $.post is asynchronous. Execution continues at the statement following the call to $.post immediately. Since there isn't a statement following it, the submit event handler function will simply return undefined and the browser will happily continue with the submit as if nothing happened.
The callback to asynchronous methods will only be executed some time later. In your case, that will be when the server returns a response. Since the outer function has already returned, there is nowhere for that callback function to return to.
You will need to always prevent the default action in a click event handler on the form submit button, and then re-submit the form programatically upon success in the $.post callback:
$('#mysignupform :submit').click(function (event) {
    var form = this.closest("form"); // Get a reference to the containing form
    event.preventDefault(); // Prevent the default action (form submission)
    $.post('check-email.php', { /* data */ }, function (data) {
        // If the data is good...
        form.submit(); // Submit the containing form
    });
});

Obviously you can't really do this if you're binding to the form submit event, since the re-submission of the form will trigger the event handler again and you'll be stuck in an infinite loop.
Answer: This should work:
$(document).ready(function () { //newly added
    $('#mysignupform').submit(function (event) {
        // your $.post call
        $.post('check-email.php', {email: emailVal}, function (data) {
            // ...
            // having a return false means returning false to the success callback
            // of your .post call. it is not the same as returning false to the
            // submit() callback
        });

        // return false to submit()
        return false;
    });
});

Answer: Ajax works asynchronous. The easy solution is bind a click event handler on the submit button.
$('#your_submit_button').click(function (event) {
    event.preventDefault();
    var emailVal = $('#inputEmail').val(); // assuming this is a input text field
    $.post('check-email.php', {
        'email': emailVal
    }, function (data) {
        if (data !== 'false') {
            // submit the form here
            $("#mysingupform").submit();
        }
    });
});

Answer: $.post(...) is asynchronous. Try $.ajax(async: false, ...) instead.
Answer: This is because the function that is executed after the post completes is executed asynchronously, i.e. you are no longer in the event handler.
This answer has a technique you can use - basically click the submit button again, after setting a Boolean flag to prevent your post logic from being executed twice.


Does acceleration warp space?

Question: I know that mass warps spacetime and gravity and acceleration are equivalent so does acceleration warp spacetime too?
Comment: And mass is equivalent to energy by E = m*c**2.
Answer: Sort of. You are correct in saying (with some caveats) that gravity and acceleration are equivalent. According to general relativity, gravity is manifested as curvature of spacetime. As we know from special relativity and Einstein's famous equation $E = mc^2$, energy and mass are equivalent. As a result, any type of energy contributes to gravity (i.e. to the curvature of spacetime). This relationship can be seen directly from Einstein's Field Equations of General Relativity:
\begin{equation}
G_{\mu\nu} = 8\pi T_{\mu\nu},
\end{equation}
where the left hand side of the equation (called the Einstein tensor) contains information about the curvature of spacetime and the right hand side (called the stress-energy tensor) contains information about the mass and energy contained in that spacetime.
Recall that Minkowski spacetime is the spacetime of special relativity. That is, it has no curvature (no gravity) and is the shape of spacetime when you are in an inertial (non-accelerating) reference frame. So, let's ask the question: what happens when you accelerate in Minkowski space?
The answer is that spacetime no longer looks flat to accelerated observers. This is precisely the equivalence principle; locally we cannot tell if we are in a gravitational field or accelerating. Thus, when we are in fact accelerating in a flat spacetime, everything will locally appear as though we are in a spacetime that is curved due to gravity.
There are other interesting similarities between accelerated observers in flat spacetime and observers in gravitational fields. For example, accelerated motion leads to horizons similar to the event horizon of a black hole because if you accelerate at a constant rate for long enough then there will be portions of the spacetime to which you can never send or recieve light signals. There is also an analog of Hawking radiation that occurs for accelerated observers in Minkowski space, called the Unruh effect.
Comment: What do you mean by "[Mikowski] spacetime no longer looks flat to accelerated observers"? It surely does! The Riemann curvature vanishes in every coordinate chart, which of course includes the Rindler chart adapted to accelerated observers.
Comment: @EvanRule That is not gravitational curvature. That is just curvature of a worldline.
Comment: @StanLiou Of course you are right! Sloppiness on my part. I should clarify that the effect is strictly local, and that, as you correctly point out, the Riemann tensor vanishes identically (since Rindler and Minkowski are related by a diffeomorphism). However, because the Christoffel symbols are not tensorial objects, one can find local frames which appear to have gravitational curvature viz. the geodesic equation. Obviously this is true of every spacetime, not just Minkowski.
Comment: @FenderLesPaul I think the question is whether an accelerating frame in flat spacetime can be described as observing curvature (obviously not because of any source of gravity). The answer is yes? Because there is an accelerating force but no motion w.r.t. the frame, there appears to be (fictitious) curvature. However, it is not super useful and there is no more explanatory power.
Comment: @Evan Rule - Every material object has a gravitational field around it that is intrinsic and infinitely extensive. How can I place this object in a flat Minkowski space, if this object always curves all the space around it? Does this flat time space exist?
Answer: Gravity and acceleration are not totally equivalent, only locally so. That's why you get tidal forces, so in some cases, you can detect if you are accelerating or in a gravitational field.
From Wikipedia Equivalence Principle

What is now called the "Einstein equivalence principle" states that the weak equivalence principle holds, and that:
The outcome of any local non-gravitational experiment in a freely falling laboratory is independent of the velocity of the laboratory and its location in spacetime.
Here "local" has a very special meaning: not only must the experiment not look outside the laboratory, but it must also be small compared to variations in the gravitational field, tidal forces, so that the entire laboratory is freely falling. It also implies the absence of interactions with "external" fields other than the gravitational field.

From Tidal Forces

Tidal forces, and a more precise definition
So far, so simple. Too simple, in fact, in several respects. Strictly speaking, all that was said about the equivalence of gravity and acceleration is true only for gravitational fields that are strictly homogeneous. Only in homogeneous gravitational fields are all bodies - per definition - accelerated in exactly the same way, namely in exactly the same direction and at exactly the same rate; as a result, it is indeed true that a researcher inside a cabin cannot distinguish acceleration from gravity. But real gravitational fields are always to a certain extent inhomogeneous.
Take, for example, the gravitational field of the earth. True, here on the surface, looking at experiments which take up only a very, very small fraction f the total surface area of the earth, the gravitational field is, to good approximation, homogeneous: all objects fall to the floor along parallel paths, in the same direction ("down") and with the same acceleration (at least as long as the effects of air friction can be neglected). But if we look closer, the situation is a bit more complex. Here is an example where the deviations from homogeneity are clearly visible - a truly gigantic elevator which contains two spheres, all falling towards the earth:

This extreme example shows clearly: the elevator and the spheres do not fall in parallel. Instead, they fall towards one and the same point, the earth's centre of gravity. And while an observer inside the elevator does not see the common downward component of the fall, he or she will notice that the two spheres move slightly closer together.
This is what is called a tidal effect. Tidal effects are what tells a freely falling observer that he is in an inhomogeneous gravitational field, and thus definitely not in gravity-free space. Thus, a more precise formulation of the equivalence principle states that in any freely falling reference frame, the laws of physics are the same as in special relativity, as long as tidal effects can be neglected.
One can, in fact, be more specific as to how tidal effects can be kept small: first of all, by confining all observations to a small region of space: in the animation above, the effects are clearly visible because the distance between the two spheres is not that much smaller than their distance to the earth. For someone here on earth dropping two objects a mere few metres apart, the effect will be virtually undetectable. On the other hand, if you watch merely a brief excerpt from the above animation, you will hardly see the two spheres move towards each other.
Realizing that what matters are the size of the region, and the duration of our observations, we are led to a formulation in which the equivalence principle is not just a useful approximation, but exactly true: Within an infinitely small ("infinitesimal") spacetime region, one can always find a reference frame - an infinitely small elevator cabin, observed over an infinitely brief period of time - in which the laws of physics are the same as in special relativity. By choosing a suitably small elevator and a suitably brief period of observation, one can keep the difference between the laws of physics in that cabin and those of special relativity arbitrarily small.

Acceleration by itself won't warp spacetime, as far as I know, only mass energy will do that.
This question is really a duplicate of Warping Space Time, which you should read, as it explains your question much better than I ever could.
Answer: I am restating the question, for clarity:
I know that mass warps spacetime, and gravity and acceleration are equivalent, so does acceleration warp spacetime too?
This question is actually in the form of a logical argument:
IF mass warps spacetime, and this warpage is defined as "gravity"
AND IF gravity and acceleration are equivalent
THEN acceleration warps spacetime.
Alternatively you could phrase this as:
Mass warps spacetime; we call this effect, "gravity".
Gravity and acceleration are equivalent.
Therefore, acceleration warps spacetime.
It is important to note that this is a logically sound argument; if this argument's premisses are true, then it's conclusion must also be true... and if the conclusion is false, then one or more of its premisses must also be false!
I use the exclamation point because both of these premises are either essential logical assumptions of, or direct logical conclusions of, Einstein's general theory of relativity; and if they are wrong, then so was Einstein...
Fortunately, we are saved, because the conclusion that acceleration of matter must also warp spacetime is true, and its evidence is all around us to see. What is a rocket, if not a direct demonstration of this very principal? In fact, what is Newton's third law of motion (for every action there is an equal and opposite reaction) except a demonstration of this?
With any explosion, there is the dramatic acceleration of matter outward in all directions. In space, the ejecta expands spherically like a 3D ripple or wave. Within an atmosphere,the ejected material is slowed and stopped by air friction and impact with the earth, while the surrounding atmospheric pressure absorbs the rapid acceleration of air particles and sends all the air particles crashing (accelerating) back in a sonic boom.
That explosion of matter particles is in the shape of a bubble, a 3D space-time wave, the very same wave that can be focused by a rocket to travel in space. In effect, a rocket actually "surfs" on a 3D spacetime bubble, or "wave".
Comment: But gravity and acceleration are not equivalent globally...
Answer: If the question is, does acceleration warp spacetime? then the answer is a strict and unequivocal no. Acceleration does not warp spacetime. What does warp spacetime is all the various components of the stress-energy tensor $T^{ab}$. Physically, these components are:
$T^{00}$ energy-density
$T^{0i}$ energy flux
$T^{i0}$ momentum density (v. closely related to energy flux)
$T^{ij}$ sheer stress (the off-diagonal components) and pressure (the diagonal components)
The amount of warping of spacetime can be expressed by a mathematical combination of partial derivatives called the Einstein tensor $G^{ab}$. The central equation of general relativity asserts that this is equal to the stress-energy tensor whose components are outlined above, multiplied by some constants.
To be precise about my assertion that acceleration does not warp spacetime, one could put it this way:
If two configurations of matter have the same stress-energy tensor but differing acceleration, they will produce precisely the same warping of spacetime.
But now one may raise the issue: can two matter distributions have the same stress-energy but differing acceleration? To answer this let's look at the equation of motion of the matter:
$$
\nabla_{\mu} T^{\mu b} = 0
$$
where $\nabla_{\mu}$ is the covariant derivative, but it is not necessary to be familiar with this operation in order to follow the next bit. All you need to know is that this operation depends on the metric tensor, and the metric tensor in turn depends on the matter configuration, but it is not uniquely specified by the matter configuration. (For example, in the absence of any matter you can have either flat spacetime or gravitational waves). It follows that you can have the same $T^{ab}$ but differing acceleration in some region of spacetime, depending on whether there are any gravitational waves or similar.
But coming back to the start, the main point is that warping of spacetime is caused not by acceleration but by energy, momentum and force per unit area. Force per unit area can also cause acceleration, but it is not the same as acceleration and indeed you have have cases where force is present but balanced, so that there is no acceleration but there is an internal stress. It is such stress (along with energy density) which contributes to warping of spacetime.
Accelerating reference frame
But perhaps the question was intending to ask something else: maybe the question was trying to ask whether, if one is undergoing acceleration, does this result in an experience much as if space were warped (even if spacetime is not)? Here the answer is a qualified "sort-of".
To understand this, you can compare the situation to cutting a block of cheese. You can have an ordinary block of cheese, with no warping of the three-dimensional space, and then cut a curved shape out of it. The surface of that curved shape will not be flat. It might be a corkscrew shape or an egg shape or whatever. Similarly, when we talk about "space" as opposed to "spacetime" we are making a slice, only now we make a 3-dimensional "slice" out of a 4-dimensional spacetime. So we can if we like make a curved slice through a totally non-warped spacetime, and if we do then we shall have a warped three-dimensional space.
This might seem an odd thing to do, but if one is living in an accelerating rocket then it can be a satisfactory way to organize one's measurements of distances and time intervals. So in this scenario, it is not quite that acceleration warps space, but rather: the choice made by an observer to define what part of spacetime is called "space" at any given moment might give a three-dimensional space which has non-zero curvature.
One can indeed get some nice insights into gravitational phenomena by this route.
For example, on a rigidly rotating disk one can deduce that various contraction and precession effects occur, and one can infer that similar effects can be produced by gravitation.
Answer: The simplest answer is that energy (of any varying intensity) is affecting the flow of other energy around it from the fact that there is a dispersed field gradient and that gradient has the effect of varying the rate at which energy is flowing through it (most comprehensibly as a wave).  Energy travels as a wave (even inside of particles), and since the wave finds a variance in its flow rate it changes its direction of flow from an outside observer.  Thus the perception of the warping of space is perceived.  Though at the minutest level, for each bit of the energy flowing through the field, it is always going in a straight line. As stated in the responses above.  Locally (at the infinitesimal level) there is nothing affected.  So since this effect is what causes matter to form from energy and persist as particles, the size that might define "local" and "unaffected" can change a lot.  For those that would like the source of some evidence of this effect, you might note Maxwell equations on the propagation of radio waves.  There is a small factor in the equations where the intensity of the energy involved affects the rate of propagation.  Science News also had a small article stating this some years ago, it was relating to the rate of light's propagation through intense energy fields.  Since acceleration is caused by gravity or some other applied energy that is playing, at the very least, with the energy in the mass generating particles it is acting upon that resist the change in speed that inherently must slightly rearrange their internal form to accept that change in relationships when being directly pushed or pulled, or with gravity the internal relationships are rearranged toward the source of greatest gravity.  If you consider the amount of energy that is needed to make a particle and atom exist and how small it is, that will help to note the intensity of the flows involved in its existence.

Does acceleration warp space?


Two versions of the same book without differences?

Question: On Amazon, the book Worlds of honor 6 (which hasn't been released yet), has two "formats" listed, they're both hardback but have different prices, how can I tell what the difference is?
Comment: @w3d - You should add this as an answer, looking at other books I think you're right, the row with a + is the most recent edition with previous editions as sub-items, though how you can have older editions for an unreleased book I have no idea!
Comment: The more expensive "format" has a marginally earlier publish date (14 July, as opposed to 16 July) - maybe these are the first prints?!
Comment: @w3d - Items from other sellers (Amazon marketplace) rather than direct from Amazon also introduce a new sub-item (often for the same edition).
Answer: As mentioned in comments, it would seem that the only difference is the date of publication. In this instance, the more expensive "format" has a marginally earlier publish date (14 July, as opposed to 16 July) so maybe these are the first prints hot off the press? Consequently you should probably expect to get it a little bit sooner and have the satisfaction that it is one of the first editions. Some of these early editions may even be numbered?


PostgreSQL: Why is the schema owner not the database owner

Question: I've a simple question, yet I am unable to find the answer from the official documentation. When I create a database in PostgreSQL as a specific user, I'm the owner of all the objects under the database except for the schema. Is there a reason why the postgres role is the schema owner by default? I can't think of any explanation for this setup. Just curious ...
Answer: A new database is created by cloning an existing one. If you don't specify which one to clone, PostgreSQL clones the hidden-by-default database template1. All objects in template1 are owned by user postgres.
So you're not the owner of any of the objects in the database at the time it's cloned from template0 or template1; you only own the database its self.
New objects are created with your ownership because you created them. Existing objects retain their existing ownership.
See \dn * in psql to see the namespaces defined, \dp *.* to see table/view/sequence privileges, \df+ * to see function definitions with owners, \dT * to see data types, etc. You'll see that in a new blank DB they're all owned by user postgres.
Comment: @YorickdeWid I find that templates don't fit well into source control and backup processes, they're "extra magic" that gets lost sooner or later. They also tend to collect cruft when Joe decides that he wants `hstore` installed by default and Jenny decides she wants `intarray`; this adds to drift when DBs are copied from the template at different times. I strongly prefer to use configuration management to generate the schema instead - things like Liquibase are really good.
Comment: Oke I understand the idea. But is it good pratice to alter the template1? Or should I create a template database myself and use that to create new databases?
Comment: @YorickdeWid Well, what're you trying to accomplish? In general it's better to create a new template, but personally I prefer to avoid template databases in genreal.
Comment: I want to create a set of databases following a predefined structure. Templates sounds like an amazing thing, and very suited for this idea. If I may ask, why would you avoid them? Do they come at a performance cost?


Reboot Ubuntu without going through the BIOS POST

Question: Sometimes I am required to restart my Ubuntu machine and don't want to go through the BIOS then Grub. I remember that in windows we just need to hold down the Shift Key while clicking restart and trying the same procedure in Ubuntu without any success.
Comment: Could you please edit your question to include why you would want to restart the way you describe as opposed to doing a proper restart?
Comment: Ok, what about `sudo kill -9 -1`?
Comment: This is a duplicate! See here: http://askubuntu.com/questions/152661/warm-reboot-directly-to-grub
Comment: @Frantique No, I don't think my question is duplicate as the above link speaks about directly booting to Grub bypassing the BIOS and I am talking about bypassing all those thing BIOS and the GRUB too. I also want to restart from within my Ubuntu system might be with some modification and not making any changes to Firmware(Motherboard).
Comment: @Frantique I used your code and it instantly makes the Screen dark just like expanded terminal (CUI) with a frozen cursor and had to restart my PC pressing the reset button.
Answer: On standard x86 PCs address 0x472 controls whether or not one does a cold or warm reboot. By writing 0x1234 to this address, the BIOS should do a warm reboot, and if zero is written to this address a cold reboot will occur.
This can be controlled with the kernel parameter reboot=w (warm) or reboot=c (cold).  So using sudo and your favourite editor, edit /etc/default/grub and change
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=w"

and save.  Then run:
sudo update-grub

and reboot.  Hopefully, you should be doing warm reboots from now on.  I've not tested this, but the code is there in the kernel to support this, see arch/x86/kernel/reboot.c in the kernel source and how reboot_type controls the reboot.
Comment: lan king I have edit grub and then update but when I click restart it still goes through all the procedure bios, grub etc. and also ubuntu now restart immediately without waiting to close for any open application.
Answer: You can try out the kexec-tools (http://en.wikipedia.org/wiki/Kexec) by installing them using
sudo apt-get install kexec-tools

and allowing them to handling reboots on installation.
Try out a reboot, if your machine comes up without troubles, you're good to go.
Comment: No, a standard laptop, Thinkpad W530 by Lenovo. First it flickers during shutdown (very weird graphical effects) and then it takes much longer to boot:-/. I am using an EFI install, if that might make a difference.
Comment: Ha, I messed with systemd a bit (mainly to disable unneeded services to make it boot faster) and now it is quick enough (about two seconds, so reboot takes altogether like 7 seconds). However, it still flickers: https://www.youtube.com/watch?v=2jDkEEjb0qA&feature=youtu.be- I disabled plymouth (removed quit-splash from grub config) an the flicker is gone.
Comment: This actually does not make reboots faster for me ( it takes longer to shut down and then kernel takes 7 seconds to boot as compared to less than 2 when using normal reboot), is that expected?
Comment: Absolutely not, for me it's just the same as a reboot minus the BIOS Time. I have only one idea, why that could be: A device has to be waited for (old hard disk, e.g. SCSI, ...) Anything special with the hardware?
Comment: @sup I also had devices, that made problems, one was an old laptop, that didn't lighten the display again after reboot. Another one failed  reactivating a modem/sim card slot. Sorry, no I'm out of ideas.


3 year Degree from India and 20 years experience

Question: With 3 year degree from India and 20+ years work experience in Office Administration from Software company, Can I get  H1 visa.
Comment: Have you done any research? What have you found?
Answer: It's hard to tell if you can get it. You may be able to qualify for it if the 20 years of experience (with at least 3 of them after your graduation) are relevant to the position you are seeking, and the lawyers can write it up so that the USCIS will accept that in lieu of the missing year of education.


What is scope of variables in Verilog modules?

Question: I am fairly new to Verilog and can't find out if Verilog modules have same scope privacy as for example C functions have.
For example can I use same name ( say clk ) for variables in different modules ?
Answer: Signals declared inside a module have their scope local to that module only. So, yes, two different modules in a source file can have signals with same name, with corresponding local scopes.
However, recommended coding practice - single module in a single source file.
Answer: Verilog has several name spaces for different kinds of constructs. See Section 3.13 Name spaces in the IEEE 1800-2017 SystemVerilog LRM.
Briefly, each module definition creates a name space for itself and you can declare variable with the same names within each module. There is no implicit connection between variables with the same name in different modules, you must connect them through ports. Within a module you can have other local scopes and declare variables with the same name inside them. (like inside a function)
You might want to read my DVCon paper about variable scopes and lifetimes.


Can the input of a quantum circuit be a multidimensional array?

Question: Why is $|A\rangle$ (a column vector) often used as an input in many references? Is there a quantum encoding that can make the input a matrix of $A$ (an $n$ by $m$ matrix)? Then a new type of quantum gate is constructed to perform accelerated computation on the matrix.
Answer: You can find a good overview about the different methods that can be used to load a matrix into a quantum computer in Quantum algorithms for data analysis by Luongo.
Also, there is a chapter dedicated to one of these methods "Block encoding" in Lecture Notes on Quantum Algorithms for Scientific Computation by Lin.


Is there an official English version of LTF-UL?

Question: I have found the German version of the ultralight regulations under Germany airworthiness authority, but I have not found a link for English version of that. is there any?
Comment: I had translated it all in 2019, while working on the "certification" of an ultralight. I can see if I find the files next week (first week of March).
Answer: For LTF-UL 2019 there is no official English translation, unlike, say, documents from the United Nations or the Vatican.  German aviation forums have plenty of statements like

Ja eine offizielle englische Übersetzung gibt es tatsächlich nicht
English: Um, yeah, actually there's no official English translation

But the document's language is technical and precise enough that Google Translate can manage it accurately.

Edit: in 2020 Google Translate worked, but I've lost my copy of that translation, and in 2024 Google Translate generally translates only the easy parts and leaves technical words in the original German, even obvious ones like Ultraleichtflugzeug and Hängegleitern.  Worse, what it does translate is littered with gems such as

The fact that the air transport vehicles are safe now that ultra-lightweight vehicles are being used
means that they must be able to travel safely and that they must also be able to speak.

and

The safety of the air transport is in the vicinity of the safety equipment and the safety shield is
visible, with the maximum safety guarantee for the safety of the safety equipment.
Comment: "English: Yes, there is actually no official English translation" which is actually confusing and sounds like a machine translation. "English: _No_, there is actually no official English translation" would be a much more natural English wording. And far less self-contradictory.


Definability in the signature of first-order logic with identity

Question: Let $L$ be the language of first-order logic with equality and $D$ a set, considered as a model of $L$. Is there a nice characterization of the subsets of $D^n$ that are definable in $L$ with parameters from $D$? For instance, presumably the definable subsets of $D^1$ are just the finite and cofinite subsets. (Any references appreciated too.)
Comment: "There are sets which contain finite subsets that are not definable". Every finite subset of $D$, $\{a_1...a_n\}$ is defined by the formula $x_1=a_1\vee ... \vee x_n=a_n$ with the parameters $a_1...a_n$.
Comment: I feel like you're asking for more than the definition of pointwise definability in a structure. There are sets which contain finite subsets that are not definable. Could you say a little bit more about what you mean?
Comment: I wanted simple necessary and sufficient conditions for a subset of $D^n$ to be characterized by a formula in $n$ variables and parameters in $D$. I was hoping they existed, since there is a simple characterization when $n=1$, namely the finite and cofinite subsets of $D$.
Comment: @Nika, you mentioned that there are sets with finite subsets that are not definable. Keep in mind that this question is about which subsets of $D^n$ will be definable with parameters from $D$.
Comment: Whoops I must be misunderstanding something. I was thinking of an example in Enderton's *A Mathematical Introduction to Logic* which has $D = \{a,b,c\}$ and a relation on $D$, $E = \{\langle a,b \rangle, \langle a,c \rangle \}$, for which neither $\{ b \}$ nor $\{ c \}$ are definable. Did I get definable confused with definable with parameters in $D$?
Comment: "Did I get definable confused with definable with parameters in D?" I think so -- see e.g. the definition here: https://en.wikipedia.org/wiki/Definable_set.
Answer: If $D$ is finite, then we can define any subset of $D^n$ using parameters from $D$.
If $D$ is infinite, then it is what we call a strongly minimal structure: its definable subsets are indeed either finite or cofinite. The theory of $D$ is that of infinite sets, and this theory has quantifier elimination, which tells you something about the definable subsets of general $D^n$. The only atomic formula in this language is "$x = y$". This corresponds to a definable subset of the form $\{(x_1, \ldots, x_n) \in D^n : x_i = d\}$ for some $1 \leq i \leq n$ and $d \in D$. The definable subsets of $D^n$ are then Boolean combinations of such sets.
Edit: as Eric Wofsey pointed out in the comments, we can also use $\{(x_1, \ldots, x_n) \in D^n : x_i = x_j\}$ in our Boolean combination (getting for example the diagonal of $D^2$). The case of $\{(x_1, \ldots, x_n) \in D^n : d = e\}$, for $d, e \in D$ is really not interesting, because it is either the entire set or the empty set.
Comment: Oh, the description of the definable subsets corresponding to atomic formulas here is incorrect, though: they can also have the form $\{(x_1,\dots,x_n)\in D^n:x_i=x_j\}$.  (Or $\{(x_1,\dots,x_n)\in D^n:d=e\}$ for some $d,e\in D$, but such a set is either $\emptyset$ or $D^n$ so we don't need to include that case.)  This is because an atomic formula is $x=y$ where each of $x$ and $y$ can be either a variable or a parameter, so there are different cases depending on how many of them are parameters.
Comment: Thanks, this characterization is very helpful. Do you have a reference for the fact about quantifier elimination?
Comment: And could you say a little more about why it implies that the definable sets have that form? Is there a general fact about theories with quantifier elimination you are appealing to?
Comment: @AndrewBacon: This is immediate from the definition of quantifier elimination.  Quantifier elimination says every formula is equivalent to a quantifier-free formula, and a quantifier-free formula is by definition a Boolean combination of atomic formulas.
Comment: Right, I can see how the definable subsets are Boolean combinations of *those* sets, given quantifier elimination.
Comment: @EricWofsey Thanks for the comment, I did indeed miss a case. I added that as an edit.
Answer: Here is a proof that the theory of any set $D$ (over the empty signature) has quantifier elimination.  By induction on formulas, it suffices to eliminate one existential quantifier at a time.  That is, it suffices to prove that if $\varphi(x_1,\dots,x_n,y)$ is a quantifier-free formula then there exists a quantifier-free formula $\psi(x_1,\dots,x_n)$ such that  $$D\models\forall x_1\dots\forall x_n(\exists y\varphi(x_1,\dots,x_n,y)\leftrightarrow \psi(x_1,\dots,x_n)).$$  To prove this, define the shape of $(a_1,\dots,a_n)\in D^n$ to be the equivalence relation $\{(i,j):a_i=a_j\}$ on the set $\{1,\dots,n\}$. Observe that if $(a_1,\dots,a_n)$ and $(b_1,\dots,b_n)$ have the same shape, there is an automorphism (i.e., bijection) $f:D\to D$ which satisfies $f(a_i)=b_i$ for all $i$.  Thus, $D\models \exists y\varphi(a_1,\dots,a_n,y)\leftrightarrow \exists y\varphi(b_1,\dots,b_n,y)$.  In other words, the truth of $\exists y\varphi(a_1,\dots,a_n,y)$ depends only on the shape of $(a_1,\dots,a_n)$.
Now for any equivalence relation $\sim$ on $\{1,\dots,n\}$, let $\psi_\sim(x_1,\dots,x_n)$ be a quantifier-free formula that expresses that $(x_1,\dots,x_n)$ is $\sim$-shaped (so $\psi$ is a big conjuction of formulas of the form $x_i=x_j$ or $\neg x_i=x_j$ depending on whether $i\sim j$). Let $\psi$ be the disjunction of $\psi_{\sim}$ over all $\sim$ such that $D\models\exists y\varphi(a_1,\dots,a_n,y)$ if $(a_1,\dots,a_n)$ is $\sim$-shaped.  We then see that for each possible shape of $(a_1,\dots,a_n)\in D^n$, $D\models \exists y\varphi(a_1,\dots,a_n,y)\leftrightarrow \psi(a_1,\dots,a_n)$, and so $\psi$ has the desired property.

From quantifier elimination, it follows that every definable subset of $D^n$ is defined by a quantifier-free formula, which is just a Boolean combination of atomic formulas.  There are just three types of atomic formulas (with parameters):

$x_i=x_j$
$x_i=d$ (or $d=x_i$) for some parameter $d\in D$
$d=e$ for some parameters $d,e\in D$.

In the first case the corresponding definable subset is $$\{(x_1,\dots,x_n)\in D^n:x_i=x_j\},$$ and in the second case the corresponding definable subset is $$\{(x_1,\dots,x_n)\in D^n:x_i=d\}.$$  In the third case it is either $D^n$ or $\emptyset$ depending on whether $d=e$ is true, so we can ignore that case.  Thus the definable subsets of $D^n$ are Boolean combinations of the two types of sets above: "diagonal" subsets where two coordinates are equal, or "hyperplane" subsets where one coordinate has a fixed value.
When $n=1$ both of these types are finite or cofinite sets and so the definable sets are just the finite or cofinite sets.  For $n>1$, there is not any description that is much simpler than "Boolean combinations of these sets".  If you like, you could say that for any subset $A\subseteq D^n$ definable from parameters $d_1,\dots,d_m\in D$, there is a set $S$ of equivalence relations on $\{1,\dots,n+m\}$ such that $A$ is the set of all $(x_1,\dots,x_n)$ such that the shape of $(x_1,\dots,x_n,d_1,\dots,d_m)$ is in $S$.
Comment: Seeing the proof of quantifier elimination was really helpful for me. Thanks!


How to display an InfoPath 2010 form attachment in a SharePoint 2010 document library

Question: I have an InfoPath 2010 form with a "Resume" attachment. When the form gets submitted to the SharePoint document library, I need to display the resume attachment as a document library's column. Every solution method that I am finding is based on InfoPath/SharePoint 2007, which is not working the same way with 2010.
I know there should be a workflow to create in the SharePoint Designer, and can't figure out what it is.
If anybody has this knowledge, please help.
Answer: You will have to include custom code in the submit button of your InfoPath form and you will have to give the InfoPath form template Full Trust for the code to work in SharePoint.
<code>// Retrieve the value of the attachment in the InfoPath form
XPathNavigator ipFormNav = MainDataSource.CreateNavigator();
XPathNavigator nodeNav = ipFormNav.SelectSingleNode("//my:document", NamespaceManager);
string attachmentValue = string.Empty;
if (nodeNav != null && !String.IsNullOrEmpty(nodeNav.Value))
{
    attachmentValue = nodeNav.Value;
    // Decode the InfoPath file attachment
    InfoPathAttachmentDecoder dec = new InfoPathAttachmentDecoder(attachmentValue);
    string fileName = dec.Filename;
    byte[] data = dec.DecodedAttachment;
    // Add the file to a document library
    using (SPSite site = new SPSite("http://ServerName"))
    {
        using (SPWeb web = site.OpenWeb())
        {
            web.AllowUnsafeUpdates = true;
            SPFolder docLib = web.Folders["MyDocuments"];
            docLib.Files.Add(fileName, data);
            web.AllowUnsafeUpdates = false;
            web.Close();
        }
        site.Close();
    }
}
</code>
Please visit the Step 5 of this post to get the different options- http://www.bizsupportonline.net/blog/2010/04/top-10-questions-infopath-file-attachments/
or view this post directly- http://www.bizsupportonline.net/blog/2010/01/upload-document-sharepoint-infopath-form/
Answer: I would recommend to move all c# code out of the InfoPath form.  Full Trust forms w/ code inside couldn't be deployed w/ CI or powershell to defferent SharePoint farms and that's pity.
In that case, it's better to move code to event receiver to sync attachments between InfoPath forms and 3rd part source like additional column/list/whatever it is.


How to get both sides of 1/2 inch water pipe into a new coupling

Question: What can I do when putting in a coupling but there is not enough flex in the water pipe to get both sides of the coupling on?
Comment: What type of pipe copper, brass, steel, PVC, etc?
Comment: Your mention of the term "flex" is probably eliminating this being the type of issue resolved in the posted answers so far. There is "flex" pipes that hook up faucets and the like, and there is plastic flex pipe for sprinkler heads, but neither of those are typical places where one would use "couplings". So unless you clarify, we are not going to be able to help you in any meaningful way, all you will get are SEWAGs (Semi-Educated Wild Ass Guesses)
Answer: If you're dealing with copper, you will find two types of couplings.  One has a stop in the center and one without. What you need in this case is the type without a stop. Without  a stop, you can slip the coupling over the entire end of one pipe, and then slip it over the end of the other pipe.
With Stop (notice the dimple in the center)

(source: homedepot.ca)
Without Stop
Without Stop http://www.usqualitysupplyinc.com/wp-content/uploads/2012/09/coupling-without-stop.jpg
Comment: +1 I'm not sure why I thought it was PVC, but if copper, this is better. The fixer does need to mark the pipes to be sure s/he gets good coverage of both sections before soldering.
Comment: +1 on highlighting this important difference, that slip coupler is a life saver. Important that you gauge it so it's dead center on the joint. Been there, done that and it was a good tee shirt. BTW, you don't want to accidentally get a bag of the non centering ones UNLESS you like testing your skills every time you need one.
Comment: Best answer can you edit it and call it a slip coupling by name?
Answer: Often a union allows you to deflect each end of the pipe enough to place the adapter on that side. Then the amount of flex needed to align those sides is less than that needed for a standard coupler.

<code>Links and images are for illustration only and are not endorsements.
</code>
Comment: I'd also add to this: Step 1 - try to avoid this situation. Beyond the technical aspect of physically connecting pipes, plumbing has a bit of an art to it in terms of figuring out how to assemble everything, which you can really only learn through experience. Things like which sections to assemble on the floor before putting into place; being able to use an elbow as a hinge to connect a piece in place; leaving extra space between a wall, or not attaching pipes to walls until everything is in place.
Comment: @gregmac Absolutely agree. But sometimes, through necessity or simply lack of forethought, you get in a spot where the only solution is to take out more than one section to get to a place where you can repair/modify. Better to avoid if possible.


Do I have a grounding issue?

Question: I am asking a question regarding my PRS SE7. It has 2 humbucking pickups and recently, I have noticed a substantial amount of noise in my signal. The noise diminishes when I touch the strings or any metal but is still apparent. My jack kept coming loose and I would have to tighten it every couple of days and then I finally had to lock it down hard lol. Another note to add is that it is coil tapped and the noise is much less obvious in certain selections. The last thing to add is that the noise is gone when I cut back the volume completely or the tone control. I have tried several cables and all the results are the same. I just wanted to make sure this is the guitar and nothing else. What does this sound like to you?
Comment: Have a look at http://music.stackexchange.com/q/8197/104
Answer: Often when a jack socket comes loose, the owner keeps tightening it from outside. This makes the wire attached to the part of the socket which is either inside the guitar body, or under the scratchplate, to turn round. It will only go so far before it either breaks or shorts or touches another component. Sounds like you need to get at the inside part of that socket, and sort it out from there. When re-tightening, stop the side with the wires attached from turning as the nut is tightened.
Comment: i beat the crap out of my guitars.  (punk bands) a bit of blue locktite on the jack socket helps prevent it from coming loose again.

Do I have a grounding issue?


Can't run perl-browser

Question: I'm trying to run this program perl-browser but I'm getting fowllowing error:

$ perl ./perl-browser
Can't locate Gtk2/WebKit.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./perl-browser line 8.
BEGIN failed--compilation aborted at ./perl-browser line 8.

Why is that?
Answer: Looks like module webkit is not installed. I think you should try something like this (or google perl modules installation)
<code>sudo apt-get install cpanminus libwebkitgtk-devel
sudo cpanm Gtk2::WebKit
</code>
Hope it will work.

Can't run perl-browser


Our Aspen are weep brown sap. A web site from Colorado said this condition is terminal for Aspen. Can you help?

Question: Our Aspen are weeping a brown sap.  A web site said the condition is terminal.  A local weed and feed company said the condition can be treated with an antibiotic for pigs.  Do you have information on the best treatment?
Comment: A picture would help...
Answer: It sounds like your tree is suffering from a bacterial disease called Slime Flux. According to "The Ortho Problem Solver" (AKA the Big Book of Bugs), the bacteria in question is Erwinia nimipressuralis. Here's more of what Ortho has to say (emphasis mine):

The bacteria affect the heartwood, producing abnormally high sap pressure. The pressure... forces the fermented sap, or flux, out of the wounds, cracks, or crotches of the tree. Flux is especially copious when the tree is growing rapidly. Large areas of the bark may be coated with the smelly, bacteria-laden sap, which dries to a grayish-white color. In addition, wounds do not heal, and the bark is unsightly. A tree with this problem is often under water stress... The problem may persist for many years.

The entry goes on to say that "There are no controls for this condition." Because this is a bacterial issue, it is possible for you to pass the bacteria to other trees if you prune this tree and then prune other trees with the same non-sterilized tools.
Note the part about the water stress - has your area been in drought conditions recently? If so, have you watered the tree? How much per week?
I once owned an American elm that suffered from slime flux for at least five years. Eventually it went away by itself, possibly because I removed competition for water (I took out a ton of nearby invasive shrubs).
I can't really see how anyone can get an antibiotic into the heart of this tree without damaging it - certainly, not someone from a weed-and-feed company.
For professional results you should contact a professional - in this case, a certified arborist.
Comment: Just for completeness, the quote came from "The Ortho Problem Solver", Fifth Edition, copyright 1999, published October, 2004. Page 412.


Identify science fiction story about people surviving in an underwater biosphere after extreme climate change

Question: A scientist designs an underwater biosphere after severe climate change causes coastal flooding and category 5 hurricanes that flood coastline cities including New Orleans and much of Florida. Government fights people moving into it (don't remember why) and when people start moving into the Ark, the designer is fatally injured and his consciousness transferred to the Ark's computer. People live underwater for several generations before they are able to move back to the surface. Much of what isn't flooded turns into desert. Some people alter themselves to stay on the surface and evolve past the point of being human. There is at least one other biosphere or Ark that survives.
Comment: Do you recal what year and/or where you may have read this?
Comment: I don't remember exactly where and when I read the book, but I know it was in paperback before 2005 because Hurricane Katrina took my sci-fi collection. I was in MS. Also fairly certain it was written in print after 1992.
Answer: This is Ark Liberty by Will Bradley
From the Google Books summary:

In 2084, melting polar caps and burning rain forests force survivors to live in Arks, self-contained biomes. Against orders, Stefan Li staffs an undersea Ark with as many refugees as he can before its ports are sealed. When Li is killed, a computer genius transfers Li's persona into the Ark's computer net--and Li becomes the Ark.
Comment: Can you please add a little more information in your answer? Like why you think this is the story asked,maybe a wikipedia link etc


creation of EPS/PDF figures with LaTeX

Question: I have the following problem. While earlier I succeeded to create EPS/PDF figures with LaTeX command (a specific file feynman. sty), and each picture was of a normal size, now something changed in LaTeX in a new version of TexStudio, and the EPS/PDF figure occupies an entire page.
fourpoint.pdf
Using Linux-like style of LaTeX through terminal (which earlier helped to solve this problem on Mac computers) now also does not help.
Thus, the question is -- how to obtain a small-size image in LaTeX?
Comment: It is rather hard to guess what you did before or what you are doing now that is changed. Show a small complete example document that shows the problem, then someone can suggest how to correct it, and test their answer.
Comment: Welcome to TeX SX! Why not make your epd.pdf figures as independenr figures with the `standalone` class, and include the result via `\includegraphics`?
Comment: Dear Bernard,
If I understand you correctly, you want to say that I need to add the standalone class to preamble?
From another side, the problem is that earlier I was created figures with LaTeX, but now the result is not satisfactory.
Certainly, creating of figures with some another program with their subsequent inclusion to LaTeX is a good solution. But I would like to create figures with LaTeX.
Comment: No, you don't have to add whatever to the preamble. You just create one independent file per figure, with the standalone class and the relevant packages, and create  autonomous figures in the same directory as the main file. That's the way I work, personally (usually with pstricks and xelatex).
Comment: Dear Colleagues,
Whether there is a possibility to attach the TEX file which I used to create a picture? The reason is that I used the specific style which I included into the body of the TEX file.
Answer: The situation became much more simple.
Actually, after starting the Terminal command as usual, I processed the TEX file (latex *.tex), then converted DVI to PS as usual (dvips *.dvi), and then, used the simple command ps2eps *.ps. And the problem is solved!
By the way, I am grateful to all of you for calling my attention to extra programs for designing Feynman diagrams, for example, https://www.aidansean.com/feynman/.
Thank you very much again!

creation of EPS/PDF figures with LaTeX


Reading images (jpeg) files from SD Cards Vs SQLite DB

Question: Does anyone have any idea (numbers?) that shows the difference between reading image files from a SQLite database vs reading it directly from the file system in a SD card. Which one is faster ?
Answer: I think reading from file system directly is faster, because reading from database includes reading data from database file. But, it greatly depends of image file size. Usually, database reads data from disk (or from SD Card in your case) using pages. Reading from file system may be less effective if file size is small.
But of course, you need to prototype and test it on your data similar to real data suspecting in system, this will get you only one true answer.
Answer: Reading from the file system is always faster than reading from a DB unless the DB can cache the file in memory (don't think Android phones have enough memory for sqllite to do this)...


Why do Photons want to be together?

Question: So I've heard that when a photon flies by a atom excited enough to release a photon there's a good chance it will. Because Photons want to be together and have the same direction etc?
Is this true? And then, why is it like this?
Comment: Because they are so radiant.
Answer: I think what you are talking about is the stimulated emission of radiation.  This is part of the process that occurs in a LASER and in fact, gave the LASER it's name - Light Amplification through the Simulated Emission of Radiation.  When an atom is in an excited state it can spontaneously decay to a lower energy state with the emission of a photon of a particular frequency.  If a photon of that same frequency passes an excited atom it can stimulate the atom to emit a second photon in the same direction and with the same phase (and frequency) as the original photon. According to Wikipedia:

In optics, stimulated emission is the process by which an atomic
  electron (or an excited molecular state) interacting with an
  electromagnetic wave of a certain frequency may drop to a lower energy
  level, transferring its energy to that field. A photon created in this
  manner has the same phase, frequency, polarization, and direction of
  travel as the photons of the incident wave. This is in contrast to
  spontaneous emission which occurs without regard to the ambient
  electromagnetic field. However, the process is identical in form to
  atomic absorption in which the energy of an absorbed photon causes an
  identical but opposite atomic transition: from the lower level to a
  higher energy level. In normal media at thermal equilibrium,
  absorption exceeds stimulated emission because there are more
  electrons in the lower energy states than in the higher energy states.
  However, when a population inversion is present the rate of stimulated
  emission exceeds that of absorption, and a net optical amplification
  can be achieved. Such a gain medium, along with an optical resonator,
  is at the heart of a laser or maser. Lacking a feedback mechanism,
  laser amplifiers and superluminescent sources also function on the
  basis of stimulated emission.
Stimulated emission was a theoretical discovery by Einstein [1] within
  the framework of quantum mechanics, wherein the emission is described
  in terms of photons that are the quanta of the EM field. Stimulated
  emission can also be described classically, however, without reference
  to either photons, or the quantum-mechanics of matter.[2]

The reason why two photons can have exactly the same frequency, phase and location in space is because they obey Bose-Einstein statistics.  Photons have spin 1 which is why they are Bosons with Bose-Einstein statistics.  If the photon were a fermion (like the spin 1/2 electron) simulated emission would not be possible since it is impossible for two fermions to occupy exactly the same quantum state.
Answer: Did you here that in the context of lasers or BEC?
Photons are bosonic particles, this is generally what people refer to when they say 'they want to be together'.
Answer: Any particle in a system (like a photon or an electron) can be in many different energy state. You may be familiar with the energy states of atoms, these are the states occupied by electrons orbiting the nucleus.
But electron are fermions and they don't want to be together (in fact they can't). In order to minimize the energy of the atom any additional electron will occupy the lowest energy state available (but only if this energy state is empty).
On the opposite photons are bosons and they can be together. They can occupy the same energy state as the other photons. If you consider a system with many photons, any additional photon will occupy the lowest energy state wether it is already occupied by another photon or not. This is done in order to minimze the energy.
However the answer to your first question :

Is this true?

is "yes".
The answer to your second question :

And then, why is it like this?

is more complicated. The answer to the question "Why photons are bosons?" is very difficult. But in a general way bosons can be seen as the way for fermions to communicate. It is true in the case of photons. Photons are the way for electrons to exchange energy and thus interact.

Why do Photons want to be together?


Is doing credit card transaction via 3G secure?

Question: 3G, GPRS or other mobile-based connection. Because it seems like it's easier to intercept, than, say, land-based connection or encrypted WiFi. If it matters, the transaction I want to perform is Android Market/Google Checkout transaction. How do I know if it protect my data?
Comment: Hi @Fitri, can you explain your question a bit better? A little context, some details, etc would help a lot.
Comment: Are you asking about the Air interface traffic between a mobile phone and a Base Station? Or are you asking about the security from mobile phone to the transaction processing server?
Answer: If I am correct, normally you use an SSL connection when doing money transfers. SSL encrypts the data before you send it over the network. In this way, even if your connection is being eavesdropped upon, they will not be able to see anything.
It does a lot more than only encrypting, also authentication and message integrity is provided.
To learn more : http://en.wikipedia.org/wiki/Transport_Layer_Security
My point is that with this layer you shouldn't be worrying about your connection.
Comment: I don't see why you got downvoted, because you're making the right point: application layer encryption protects transactions such as Android Market, and therefore the relative strength of the underlying protocol encryption is not necessary to the question.  If for no other reason, the encryption on the (cell network / wireless network / carrier pigeons) isn't end-to-end for the transaction that goes out to the Internet.  Relative security of 3G/whatever is still fascinating, but the original question was, does it protect my CC?  The answer is no regardless of crypto strength.
Comment: If this got downvoted I atleast want to know why...
Answer: The security of a the air interface on a 3G connection is significantly different to that on a 2G connection. The main advances in 3G over 2G is the higher data rate and the security features. But much of the security depends on the Mobile Operator issuing the customer with a USIM rather than a 2G SIM.
If you have a USIM in a 3G phone connected to a 3G network, then the phone will perform the Authentication and Key Agreement (AKA) protocol that verifies the network as well as the SIM.
When using a 2G network or using a 3G network with a 2G SIM then the authentication falls back to the old 2G process, this verifies the SIM but does not verify the network. This means that these connections are vulnerable to a False Basestation Attack, where an attacker can pretend to be the network to the phone and thus intercept all the data traffic.
When using a 2G network, then the data will most often be encrypted using the GEA1 or GEA2 algorithms, this is similar to the A5/1 and A5/2 algorithms that has been compromised. But at the moment tools to compromise GEA1 have not been made public, whereas tools to compromise A5/1 are available. There is the newer A5/3 and GEA3 algorithms using KASUMI for encryption instead, but note that these still uses KASUMI with 64-bit keys (3G variants uses 128-bit keys which are much stronger).
The GSM air interface was designed to offer equivalent security to a wired connection, and the connection will be carried over wired networks. The security of the data being carried should be treated with the same level of protection as for a wired connection. This means use of https (TLS) should be used for any sensitive data.
There are some extra considerations though.

The limited screen space available on mobiles devices may be an issue
in displaying security icons to the user.
The portable nature of a mobile device increases the risk of loss
of the device and this loss of data locally stored.
Comment: I would be reluctant to place too much trust in the security of 3G networks against interception.  As each generation of digital cellphone was introduced, the carriers have said it was designed to provide equivalent security to a wired collection, and we've repeatedly found flaws in each generation which contradict those claims.  The carriers just don't have a history of getting this right.  Now, I don't know; maybe with 3G they finally got it right for the first time.  That'd be great.  But history suggests some caution and skepticism would not be out of order.
Comment: OK so Karston Nohl has just reveled that he is able to crack the 2G GPRS encryption GEA1 http://www.h-online.com/security/news/item/GPRS-connections-easily-tapped-1321018.html
Comment: For better informativeness, please highlight the fact that it's most probably safe anyway due to the SSL/HTTPS


SuperTuxKart and 0 A.D. in Retropie

Question: Is it possible to install SuperTuxKart and 0 A.D. in Retropie ?
Answer: While it isn't directly possible to install 0 A.D in retropie as a system, once you are in emulation station, if you press F4 on your keyboard it will bring you to the terminal. You should then be able to run sudo apt-get install 0ad and install the game. You can then launch it by running the command 0ad
Unfortunately I do not think it's possible to install SuperTuxKart though because the Raspberry Pi does not have the proper graphics support for it.
Answer: raspberry pi 4 does now support opengl es 3.1 https://www.cnx-software.com/2020/02/03/raspberry-pi-4-opengl-es-3-1-conformant-vulkan-drivers/  so stk and other games could now be made to be compatable with it.

SuperTuxKart and 0 A.D. in Retropie


Why quantities in physics are always talking about rates?

Question: I get the idea that physics wishes to study changes to discover new rules.
But why is everything related to rates? Acceleration,Velocity?
Could we use something else apart from these?
What can you think of istead of velocity(rate) to describe motion?
Why rates?
Comment: Can you suggest an alternative?
Comment: I can't that's why I'm asking!
Answer: If you agree that a lot of physics deals with how things change over time (example how do the planets move over time, or how do the waves of the ocean propagate in time etc), then the answer is calculus. Because VERY VERY roughly speaking, if you want to understand how something changes, you should first try to understand "small changes", but understanding "small changes" is really the subject of differential calculus. Studying "big changes" is then the subject matter of integral calculus (putting together all the small changes to recover the total change). The connection between these two is given by the fundamental theorem of calculus (if you're dealing with the one-dimensional case).
Comment: @ShadmanSakib yes, that's pretty much what the second fundamental theorem of calculus says ($f(b)-f(a)=\int_a^bf'(t)\,dt$, under suitable assumptions). The point is that sometimes we understand the rates better, so we use this to understand the change. Sometimes we understand the change better so we use this to understand the rate (for example, I know that Usain Bolt ran 100m in 9.58s. If I ask how fast do I have to run to beat him, then this is clearly a situation where I understand the change better. Using this I can calculate the rate: I have to run faster than 100m/9.58s)
Comment: I've intentionally been pretty vague, because you seem to be asking for the big picture type of an answer. But if you want more details, do let me know, I'll try to elaborate.
Comment: So change and rates are always related then?
Answer: We try to discover laws that help us predict the future location of an object using information about it's current state. This means that we want to know how it's motion changes with time, so we can calculate the next step and the next etc.
Newton's laws describe how the position of an object changes with time, in order to predict it's location at later times. This can be calculated numerically, or by solving differential equations (integration).