Reusable knowledge going from Embedded to Desktop

Question: I'm thinking about switching my path "slightly" by going into desktop development (VC++, MFC, C#, etc) after about 8 years within embedded telecom systems development (C, MAKE, Symbian, 100 compilers etc, etc).
My concern however is that my experience within embedded systems maybe doesn't give me much value when going into desktop development. For example that the domain specific problems and environments I've worked with for so long still doesn't give me much to negotiate salaries with since it bares little worth on the desktop.
I think this place might be good for input on this.
So, the Q:
If you disregard the obvious generic experience on programming language level, give an example of something you have learned working with embedded systems that you could reuse when working in a desktop environment.
PS:
I should note that I'm no beginner in the desktop area - since many years back all my hobby projects are focused around desktop development.
Answer: Embedded engineers in general tend to be more disciplined when it comes to validating operations and dealing with finite resources.
This can also translate into coming up with an exception handling strategy earlier on.
The quintessential example is checking the return value of malloc.  I have seen very few desktop software consistently check it, but it's commonplace in embedded environments.
Answer: Discipline of having a clean, well-organized set of source-code is the key skill that translates well to the "desktop experience". -- I've noticed that the embedded projects I've written and picked up are often WAY cleaner than their desktop counterparts.
Answer: Many desktop-only developers could benefit from the experience of making a program fit in 128K of FLASH and 32K of SRAM, not to mention communicating meaningfully with a user through only an LED or two and a couple of buttons. Making that a requirement might reduce some of the endemic code bloat in the applications industry. :-)
Even if you don't switch tracks to straight application development, the embedded experience translates well to driver development, as well as to low level utilities and to long running services. All of these are also domains where the disciplines that are nearly second-nature to a successful embedded developer remain valuable.
Answer: I was a desktop developer for almost 5yrs before switching to an embedded environment.
I find working on an embedded environment more challenging as we have to deal with memory limitations, slow CPU speed, cross-compilation issues, etc.
Having learned a lot of patience, discipline and low-level intricacies, desktop development should be as easy as a walk in the park.
Answer: State machines/event driven programming on embedded systems is not that different from event driven programming on the desktop. The depth of experience you have of these coding techniques on embedded systems, especially telecoms embedded systems, should make you a great desktop programmer.
Similarly, your experience with communications protocols should transfer nicely to the desktop. Most desktop applications have some involvement with the network.


Word(s) for cardboard box whose flaps slide into slots to hold lid closed

Question: What is the word(s) for the type of cardboard box whose lid can be held closed without tape. Specifically, the sides have slots and the lid has flaps that slide into the slots to be held in place by friction. These types of boxes are commonly used as product boxes for computer motherboards, hard drives, and feature phones.
Comment: @NigelJ as opposed to words that were in the dictionary when the big bang happened? All words are invented by humans (and [many of them by their inventors, including sales people](https://en.wikipedia.org/wiki/List_of_generic_and_genericized_trademarks)). Let's not judge a word by its creator. ;)
Comment: @NigelJ http://www.dictionary.com/browse/self-locking
Answer: You need to ask your vendors/manufacturers as manufacturers use slightly different terms for their box products, but here's an example:
Excerpts from Types Of Cardboard Box:

Self Locking

  Initially, these boxes are supplied flat for storage purposes and are very easy to assemble into strong packing style boxes. Designs can be modified to include locking tabs, handles, display panels and more depending on your requirements.
  ...

Self Locking Tray

  Self locking boxes/trays, these are stackable when loaded with product, generally used for packing tins, jars or bottles, you will often see these trays in supermarkets printed with product details or brand image.
  ...

Die Cut Self Locking

  Often used for shipping small components or as an alternative mailer pack (See below for image). Die Cut boxes are quick and easy to assemble and the nature of the style gives excellent protection through the post once they are made up.
  ...
Comment: Hi @johnlee, links sometimes go stale. On Stack Exchange, the norm is for answers to be self-contained, with links used to verify what the answer itself says. Your post claims that there are multiple variants used to describe what the OP wants, but it doesn't actually provide any word that the OP can use. If there are equally viable alternatives, you should list them (and then add a link to each to show the words in use).
Comment: @Lawrence: Valid point. The answer's edited accordingly.
Answer: It's called a self-locking cardboard box, as shown here: https://www.google.com/search?q=self+locking+cardboard+boxes&client=firefox-b-1&tbm=isch&tbo=u&source=univ&sa=X&ved=2ahUKEwjL5vO1uYTbAhVO4GMKHcWEBrwQsAR6BAgAEGg&biw=810&bih=548
tab lock cardboard box is another search term that may find similar boxes.
Comment: I think with the "self-locking" term you should be able to search for what you're looking for.
Comment: +1, but can you be more specific? The "self-locking" search term in your URL doesn't necessitate the question's type of self-lock. Your URL's [5th image result](https://www.google.com/search?q=self+locking+cardboard+boxes&client=firefox-b-1&tbm=isch&tbo=u&source=univ&sa=X&ved=2ahUKEwjL5vO1uYTbAhVO4GMKHcWEBrwQsAR6BAgAEGg&biw=810&bih=548#imgrc=q5oEG4vfY7BG7M:) (at the moment) concerns a crash-lock base, which doesn't imply its box has a lid that closes via flap-slot insertion.


App store review process for apps that rely on specific geolocation

Question: I'm getting ready to submit an App that relies on the user being at specific locations to watch a video. (Kind of a mashup of geocaching and youtube.) Needless to say none of these videos are anyway near Apples headquarters. So how will the App store review people be able to properly review the App? Do I have to provide test data in their vicinity or can I instruct them to fake their geolocation to a location that works?
Answer: I guess the best way is to just submit it once, wait ~7 days and see what they have to say,
but since they have special toolchains to test apps, it shouldn't be a problem.
Just make sure to mention it in the review notes.
I've submitted an update to an app once that requires an user and password to login, and gave them a test user. When I checked the server logs, they never logged in once - but the app was still approved.
Answer: The iOS Simulator can 'fake' its location :) Though I doubt what they DO review in their process, because once they accepted one of my Apps' update which crashed upon launch...
Answer: Recently had to deal with this myself... submitted a location specific app without any extra review notes, and the app got rejected. In the rejection notice I was given the instruction to create a video of the app in action and then provide a link in the review notes.
So I used another iPhone to take the video, put some basic explanation text in the video using iMovie, uploaded to YouTube, put the link in the reviewers notes, re-submitted the app and then 5 or so days later it was approved.
Answer: As I understand, they review team does NOT test the usability nor stability of your app during app reviewing. All you need to do, is to provide an testing account, and some sample data, screenshots to them helping understand how your app works. If the app does not show any data because of a reasonable circumstance, it's not the problem of your app quality nor user usage, but data coverage. So you won't have problem with it.


How to play piano with both hands?

Question: I took piano lessons since fifth grade and stopped in eighth grade. I have been taught to play with hands seperate instead of playing with both hands. I have attempted this but I keep messing up.It's been almost four years ever since I played the piano. I am trying to teach myself to play the piano since I don't have time to go to piano lessons and they are expensive. Has anyone had trouble playing with both hands and how did you end up mastering this skill? So I can try it for myself and hopefully get the same results. Thanks!
Comment: This isn't identical, but I think your answer is here: [Learn piano one hand at a time or simultaneously?](http://music.stackexchange.com/questions/39871/learn-piano-one-hand-at-a-time-or-simultaneously)
Answer: I'm a piano noob and I face this problem every time I try to learn a new piece.
Many people go for the "Three Time" thing (once with the right hand, once with the left hand, and then playing with them together). I have found that it doesn't really work for me.
So I try to play the piece really slowly with both hands at once so I know which fingers play together and which ones to alternate.
Plus you could try playing scales with both hands at a time (which I guess you already did when you took classes).
You'll have to try the "Three Time" method or the "Both hands together slowly" method or any method you can think of and see which one really works for you.
Let me know if the answer needs any clarification.

How to play piano with both hands?


How can I send emails so that replies don't get threaded as a single conversation?

Question: I have a service sending out automated emails via Amazon SES with some questions to answer when people sign up, and currently all replies are being grouped into a single conversation in Google Inbox. Is there some way I can tell Google that these are separate conversations?
Comment: I'm not sure about Google Inbox, but with Gmail and most other email clients that group emails into conversations, varying the subject usually breaks the conversation.
Comment: Did you mean this post for webapps.stackexchange.com?
Comment: I looked at that, but the solution to this would involve changing my automated emailer rather than changing settings in Inbox. I felt it fit here better.
Comment: Hmm, adding their name to the subject might be enough. That's a good point, thanks.
Comment: Are these emails related to your website?   If not, this is not the appropriate place to ask.   http://serverfault.com/ might be more appropriate.
Comment: It's not really a technical question though. It seemed to me that what content or meta information an email should have to distinguish itself as a separate thread was a webmaster question.
Comment: Given I've been asked if this belongs better in webapps or serverfault, this seems like a happy halfway between the two.
Comment: You wrote it 'currently' happend - so it worked before? What did you change?
Answer: I will give you as an answer the obvious one that applies for all e-mails from/to same sender/receiver that you do not want to be displayed as a thread (conversation) and you want each one of them to be displayed individually (in case you have not already set it up):
Open Gmail page > Click at the Gear icon > Settings > Conversation View > Set it to "Off"
Answer: I just got an programmatically answer:
I guess this link will help you.
Each eMail has in its header an id. So answers always belong to an id which can be found in eMails header.
So you have to send mails with different ids in their headers.


Data on vote and seats

Question: I'm looking for a data on:

Nationwide data from 1946 on Democrat and Republican share of the
national vote
Share of the seats in Congress in the same period.

Would it be possible to collect the same data at state level (such as Texas)?
Answer: Assuming you are looking for data showing the vote share of each party for the 1946 House and Senate midterms, on state and national level, here is what I found.
Simple answer: The House of Representatives Office of the Historian has this data for every national election from 1920-2016 in original PDF form (from the Government Printing Office), including for the 1946 elections. The problem is, the PDF for 1946 is a scan of print documents in raster form (i.e., it isn't encoded in text form), so it's not optimal if you're putting it in a spreadsheet or doing other data analysis. But for quick reference, here is what I found:
House of Representatives

Senate

That data appears to be exactly what you described as long as I interpreted it correctly. But for actual numerical data in digital form, I'd suggest looking through this list of election data sources from University of Michigan, or this list from the Library of Congress. That is probably a good starting place, depending on how specific and in what form you need the data.
As for party control in Congress through the years, see these links:

Party Division of House of Representatives 1935–Present
U.S. Senate  Party Division 1789-Present

I'm sure more data available through proprietary services or in university databases, but as for what I could find on the public internet, I hope this helps.
Answer: I know this question is quite old but I just wanted to build on WClarke's answer a little more, and specifically the second part of your question...

Share of the seats in Congress in the same period.

The two sources WClarke linked are great (and are where the total seating counts are pulled for the following visualization) but this part of your question was a good nudge for me to expose more historical data on this site we're building. Here's a more detailed / interactive seating chart for 1946 which includes exportable data and links to individual politicians of the period (e.g. Allen Ellender, a senator). Note that you can use the year slider to check out the seating shares for other years in the 1940s (most of the 1900s and 2000s data is solid, but there are seemingly still some quirks in our 1800s charts though we should have that data).
Anyway, I hope this helps some who stumble across it. I didn't realize until playing around with this that Harry Truman had no vice president for much of his presidency. Turns out that's actually happened a number of times.

Data on vote and seats


How Are The Four Bars Here Sequenced Down A Step?

Question:
I see first instance of the melody, and then the second one instance descending. But I'm not sure what the text means by sequencing down across 4 bars since the melody isn't descending across 4 bars.
Comment: I can only see the first 4 (or so) bars, where are the following four bars?
Comment: "The website": what website?  Can you provide a link?
Comment: @ElementsInSpace This was just an example the website had about sequences. By following four bars, they were referring to the picture below.
Answer: Your excerpt shows the first four bars. The following four bars are a step down from the first four (ignoring the first bar which is an anacrusis as far as the melody is concerned):

This is the beginning of Mozart's Symphony no.40 in G minor KV550.
Comment: Oh God I'm sorry I didn't see that. Was that on the website the whole time?
Comment: @t_t It's not on the web site. The author presumably expects you to know how the piece goes.
Comment: @t_t we don't know what website you're talking about.
Comment: @phoog We do, Elements In Space provided a [link](https://musictheory.pugetsound.edu/mt21c/CircleOfFifths.html#p-327)
Answer: The source of the quote is Robert Hutchinson's Music Theory for the 21st-Century Classroom:

Definition 9.1.11   A sequence is a musical idea repeated at a different pitch level.
Sequences can be short or long. For example, look at this familiar idea and notice how all four bars are sequenced down a step in the following four bars.

Figure 9.1.12. Mozart, Symphony No. 40, I.

I think the author is expecting you to recognise the melody (either by sight or after playing in on your instrument first) or to use the figure caption to look it up:

The melody in the following four bars is the same as the melody shown but shifted down a step.
Answer: Unfortunately, the example of melodic sequence given at...
https://musictheory.pugetsound.edu/mt21c/CircleOfFifths.html#p-327
...is poorly illustrated, because it does not actually show the sequence!
The part of music treated by sequence can be called the model and the sequenced material is called the sequence.
Here is the Mozart melody showing the model followed by its sequence:
Answer: Listen to the beginning 9 measures of Mozart's 40th Symphony in G Minor (1st movement).  The first phrase (called the "model", see @MichaelCurtis's answer) is what you included in your answer, beginning with Eb-D (la-so).  The question mark at the end is the start of the second phrase (called the "sequence") which is D-C (so-fa), which is one SCALE DEGREE lower according to the G-minor harmonic scale (see the notation of the melody in @PiedPiper's answer).  This is consistent throughout the sequence.
Don't get confused by the variable distance of each note between the "model" and the "sequence"; go by scale degree instead of absolute distance.  For example the first note was down a semitone but the second note was down 2 semitones.  So the textbook was right in calling it a "step" instead.

P.S. I doubt that measure 1 should be called anacrusis because the string accompaniment (viola, cello, and double bass) starts at beat 1 which is musically significant (see the full score embedded in the YouTube in @ElementsInSpace's answer).


Backup Exec 2012 will not backup Sharepoint 2010

Question: Backup Exec 2012 SP3 is unable to 'see' Sharepoint 2010 installed on the same server for backing up. MSSQL 2008, Symantec Backup Exec 2012, Sharepoint 2010 are all installed on same server. Agent for Application and Databases has also been purchased but Backup Exec cannot browse to Sharepoint Farm. Sharepoint Farm account has local admin privileges and so does Backup Exec service account. MSSQL Server databases are being backup properly using the Backup Exec service account. I'm not sure how to troublshoot if this is an account issue or an agent issue.
Answer: You may need a different agent to backup that. Read up on symantec best practice ( http://www.symantec.com/business/support/index?page=content&id=HOWTO74431).
Answer: Check through the list on this document to verif the permissions have been setup appropriately  http://www.symantec.com/docs/TECH75907


Dantzig-Wolfe vs Benders Decomposition on the dual problem - Computational differences

Question: My question is a follow-up to this one: Relationship between Benders' decomposition and Dantzig-Wolfe decomposition. Here what is being discussed is the relationship between the two methods, and it is commented that while theoretically equivalent, there may be some computational differences. I want to learn about these computational differences. When does it make sense to switch to the dual in these circumstances?
Answer: A terminology note: Dantzig-Wolfe (DW) and Benders (BD) decomposition are formulations, not algorithms. DW decomposition is usually solved via column generation because, in general, it yields exponentially many variables. BD is usually solved via cutting plane because, similarly, it yields an exponential number of constraints.
TLDR: if you work with continuous problems, it probably doesn't matter too much, but if you have a mixed-integer problem, the choice will likely be imposed on you.

If you start from a linear program (P) then, as you know, DW decomposition on the primal is equivalent to Benders decomposition on the dual.
Both approaches have identical sub-problems.
Assuming the same sequence of sub-problem solves,  the master problem in BD decomposition is the dual of the master problem in DW decomposition.
As outlined by Marco Lübbecke in his answer to the original question, computational differences can arise if, e.g., the sequence of iterates is not the same.
While most mainstream solvers will automatically dualize a problem if they deem it preferable, solving one or the other may give you a different solution and, in the end, different performance.
Furthermore, although equivalent, there are, e.g., stabilization techniques, that can be more easily formulated in the dual problem than the primal.
For instance, it's easier to add a box constraint on your dual multipliers if you're working with the dual (the primal would require artificial slack variables), or a quadratic proximal regularization.
That being said, DW and BD decomposition are not always applied to pure LP problems.
In many practical settings, they arise from mixed-integer problems.
In that case, you may not have the luxury of switching to the dual.

One very desirable trait of BD decomposition is that you can implement it easily on top of a MIP solver, especially if it supports adding constraints via callbacks.
It would be a lot harder to work on a DW formulation, because you wouldn't be able to use the solver's cuts, heuristics, branching, etc...
If you have integer variables in your subproblem, then BD won't directly apply, because it normally relies on dual variables from the subproblem (you can get around that, but it's not trivial). When that happens, DW is your friend.
Comment: The issue with MIPs is that you can't really take the dual. You'd need to relax integrality constraints... but then there's no integer variables anymore, so the initial concern goes away. You may look into dual decomposition and progressive hedging algorithms. They were designed for stochastic optimization with integer recourse, but you can apply them to any problem that has a structure like you describe.
Comment: Thank you for your comment. Let me give a bit more context of my problem, as you may be able to give even more tips. I have a MIP (a MINLP actually, but the NL aspect should be troublesome to discuss here) that has the structure for Benders, with integer variables in the subproblem, although not that many. You are then saying that I should probably look more into the dual for DW, right?


Am I immune to SQL injections if I use stored procedures?

Question: Lets say on MySQL database (if it matters).
Answer: You are only immune to SQL injections if you consistenly use parameterized queries. You are nearly immune to SQL injections if you use proper escaping everywhere (but there can be, and has been, bugs in the escaping routines, so it's not as foolproof as parameters).
If you call a stored procedure, adding the arguments by concatenation, I can still add a random query at the end of one of the input fields - for example, if you have CALL CheckLogin @username='$username', @password='$password', with the $-things representing directly concatenated variables, nothing stops me from changing the $password variable to read "'; DROP DATABASE; --".
Obviously, if you clean up the input beforehand, this also contributes to preventing SQL injection, but this can potentially filter out data that shouldn't have been cleaned.
Comment: +1 for saying stored procedures can secure you, -100 for being a posting hypocrite.
Comment: @RandyMorris: I am not saying that. What I'm saying is that, if you are calling a stored procedure, then it doesn't matter if it's safe or not, unless your call is also safe. In other words, *it's not enough to just use SPs* as you're still susceptible to SQL injection if you're creating the query to call the SP by concatenation, and you're also susceptible if the SP builds a dynamic query and executes it. This is no different from my point in the comment you're thinking of: http://stackoverflow.com/questions/2768692/will-these-security-functions-be-enough-php/2768737#2768737
Comment: thats like saying "downvote for saying a password helps security, it only works if it is not blank."
Answer: No, you will not be completely safe. As others have mentioned, parameterized queries are always the way to go -- no matter how you're accessing the database.
It's a bit of an urban legend that with procs you're safe. I think the reason people are under this delusion is because most people assume that you'll call the procs with parameterized queries from your code. But if you don't, if for example you do something like the below, you're wide open:
<code>SqlCommand cmd = new SqlCommand("exec @myProc " + paramValue, con);
cmd.ExecuteNonQuery();
</code>
Because you're using unfiltered content from the end user. Once again, all they have to do is terminate the line (";"), add their dangerous commands, and boom -- you're hosed.
(As an aside, if you're on the web, don't take unfiltered junk from the query string of the browser -- that makes it absurdly easy to do extremely bad things to your data.)
If you parameterize the queries, you're in much better shape. However, as others here have mentioned, if your proc is still generating dynamic SQL and executing that, there may still be issues.
I should note that I'm not anti-proc. Procs can be very helpful for solving certain problems with data access. But procs are not a "silver-bullet solution to SQL injections.
Answer: It depends what your stored procs do. If they dynamically generate SQL based on their parameters, and then execute that SQL, then you're still vulnerable. Otherwise, you're far more likely to be fine - but I hesitate to sound 100% confident!
Comment: I can't think of a reason for wanting this done in a stored procedure.      Interesting to know that it can be done though.
Comment: @Allain: Do you mean that you can't see a reason for generating dynamic SQL in a stored procedure, or that you can't see a reason for generating dynamic SQL in a stored procedure using parameters supplied to the procedure?
Comment: @Michael... must be a client side guy. Thinks of the database as just a broom closet with lots of space for storing the relational representation of his objects.... hehe
Comment: Yes, it's a broom closet. Seriously though, doing this kind of thing inside a stored procedure just seems odd. Not that I can't think of some convoluted requirement for it, I just can't think of a situation where this would be easier than constructing it client side then sending it down. Correct me.
Comment: An SP allows for more concise PHP/ASP(.NET) code, if, for example, you want to keep old revisions of a record, inserting a new one when you're actually updating an old record. The SP can then figure out what fields refer to your table, and use dynamic SQL to update them with the new record ID.
Answer: nope.  If you're constructing SQL that invokes a stored procedure you're still a target.
You should be creating parametized queries on the client side.
Comment: Every SQL should be in the database. Clients should have a procedures to run queries. Any other way means that there's dependencies on the database structure that the architect is unaware of. Couldn't tell your preferred RDBMS from your website but this is the strong recommendation of Oracle
Comment: @Mark:  even if all queries are in the database, the client app must run an EXECUTE PROCEDURE statement.  SQL injection can occur here, for example if you interpolate an application variable in for the name of the procedure.
Answer: No, as you could still use D-SQL in your stored procedures... and validating and restricting your input is a good idea in any case.
Answer: Stored Procedures are not a guarantee, because what is actually vulnerable is any dynamic code, and that includes code inside stored procedures and dynamically generated calls to stored procedures.
Parameterized queries and stored procs called with parameters are both invulnerable to injection as long as they don't use arbitrary inputs to generate code.  Note that there is plenty of dynamic code which is also not vulnerable to injection (for instance integer parameters in dynamic code).
The benefits of a largely (I'm not sure 100% is really possible) stored procs-based architecture, however, is that injection can even be somewhat defended against (but not perfectly) for dynamic code at the client side because:
Only EXEC permissions are granted to any user context the app is connecting under, so any SELECT, INSERT, UPDATE, DELETE queries will simply fail.  Of course, DROP etc should not be allowed anyway.  So any injection would have to be in the form of EXEC, so ultimately, only operations which you have defined in your SP layer will even be available (not arbitrary SQL) to inject against.
Amongst the many other benefits of defining your database services as a set of stored procedures (like any abstraction layer in software) are the ability to refactor your database underneath without affecting apps, the ability to better understand and monitor the usage patterns in your database with a profiler, and the ability to selectively optimize within the database without having to deploy new clients.
Answer: Additionally, consider using fine grained database access, (also called generally Role Based Access Control)  The main user of your database should have exactly the permissions needed to do its job and nothing else.  Don't need to create new tables after install?  REVOKE that permission.  Don't have a legitimate need to run as sysdba?  Then don't!  A sneaky injection instructing the user to "DROP DATABASE" will be stymied if the user has not been GRANTed that permission.  Then all you need to worry about is data-leaking SELECT statements.


Would time speed up near a large body of negative mass relative to observers in micro gravity?

Question: Time tends to slow down near objects with large amounts of positive mass relative to observers in micro gravity.  Considering that negative mass is the opposite of normal mass and would time tend to speed up near a body of negative mass relative to observers in micro gravity?
Comment: We don't know. Nobody has made any measurements on objects of negative mass. Can you send us one?
Answer: There isn't a simple answer to your question because negative mass turns out to be rather strange when we try and use it in general relativity.
If we take the static black hole described by the Schwarzschild metric then the time dilation for an observer at a distance $r$ is given by:
$$ \frac{d\tau}{dt} = \sqrt{1 - \frac{2GM}{c^2r}} \tag{1} $$
and since $M \gt 0$ we get $d\tau < dt$ i.e. time is slower for the observer near the black hole. You might think we could just put a negative value for $M$ in the equation, and if we did that then we'd get $d\tau > dt$ so time would be faster near the (negative) black hole. Except that it turns out the Schwarzschild geometry with a negative mass is perturbatively unstable, so equation (1) isn't reliable.
This is the problem with your question. The temptation is just to answer that yes time does speed up near negative mass, but making this rigorous is harder than it seems. As it stands I think your question is basically meaningless as you would need to specify in a lot more detail exactly what physical systems you were considering. And of course many of us would take the position that negative mass doesn't exist, so the question is in any case no more than playing with a physically irrelevant bit of mathematics.
Comment: @annav: Yes, that's why exotic matter with negative inertial mass doesn't exist. :-)
Comment: @anna v : antiparticles do not have negative mass, and everybody knows it. Everybody also knows that light bends towards gravity, and that we make matter and antimatter out of light in pair production. What nobody knows is why CERN are peddling nonsense like  _Does Antimatter Fall Up?_
Comment: Well , experiments are designed to measure whether anti particles have negative mass ,  but it will take some time to get statistically stable results . http://alpha.web.cern.ch/node/248
Comment: @annav: We know that antiparticles have positive inertial mass, for sure, but I don't know if that is what the OP had in mind and how John Rennie's suggestion to stick a negative $M$ in works. Is that the gravitating mass only? GR "rests" (pun!) on the assumption that gravitating mass and inertial mass are identical and I find it hard to make sense of a calculation of something with a theory that has its backbone broken by the starting point of the calculation itself.
Comment: @CuriousOne I am just pointing out that experiments are being designed to check this. Of course if they find a positive result it will be a game changer as far as postulates of GR go
Comment: @annav: I know about the experiments, and I agree that they need to be done to get the equivalence principle watertight. Just not sure I would bet serious money on an unusual outcome...
Comment: @CuriousOne I suppose that GR would be OK if there existed negative inertial mass for negative gravitational mass, but that would not be with the particles we know
Comment: @annav: A negative inertial mass means that the particle would move against the direction of the accelerating force...the harder you pull on it, the faster it will accelerate against the force. Now put that particle on a spring, what happens?
Comment: @CuriousOne  https://en.wikipedia.org/wiki/Exotic_matter#Negative_mass  . We sure would have noticed. bye
Answer: Recall in Newtonian mechanics when you could write $\vec F=m\vec a$ or you could write $F=\mathrm d\vec p/\mathrm d t$ and everything was fine.
But then when you studied relativity you found out $m\vec a\neq\mathrm d\vec p/\mathrm d t$ so you had to make a choice. They couldn't possibly both equal the force.
The same thing happens with negative mass. You have a bunch of formulas that used to be equivalent that now aren't equivalent. And different people can pick different ones as the ones they want to keep and have their own consequences for a negative mass.
For instance, does negative mass mean negative energy?  If energy is given by $$E=\sqrt{(mc^2)^2+(\vec p c)^2}$$ then it's still positive, even when mass is negative. And if momentum is given by $\vec p=\vec v E/c^2$ which is the only correct formula that works for zero mass, then a negative mass object with positive energy will still have momentum and velocity point in the same direction. It's actually a tiny bit silly if someone uses a formula that doesn't work for zero mass to claim they know what happens for negative mass.
So it might be that negative mass is rather boring, and that everything interesting happens when you have negative energy. And if you look at general relativity carefully, mass doesn't actually even appear in the Einstein Equation. Energy and momentum and stress and curvature appear.
So the answer is that when we deal with positive energy, lots of different formulas are equivalent that aren't equivalent when we deal with negative and positive mass. So without experiments or good theoretical reasons to pick some subset of these many formulas that are no longer equivalent, the words "negative mass" will mean different things to different people.
Comment: Or, you could just take the negative square root.
Answer:
Would time speed up near a large body of negative mass relative to observers in micro gravity?

It would if there was any such thing as negative mass.

Time tends to slow down near objects with large amounts of positive mass relative to observers in micro gravity. Considering that negative mass is the opposite of normal mass and would time tend to speed up near a body of negative mass relative to observers in micro gravity?

As above. As CuriousOne was saying, there's a big issue with the negative mass. As per Einstein's E=mc² paper, the mass of a body is a measure of its energy content. You can take energy out of a body and reduce its mass, because a radiating body loses mass. But when you get to zero via say electron-positron annihilation, that body isn't there any more. You can't take any more energy out of it, just as you can't shorten a pencil to less than 0cm. I know people wax lyrical about this sort of thing, particularly when it comes to things like wormholes and other speculative exotica, but I'm afraid it's what's called a "non-real solution". It's a negative carpet. If you have a square room with a floor area of 16m², some will suggest that you could buy a carpet measuring -4m by -4m. There is no such carpet, it's a non-real solution, and so is the negative mass.
Answer: Considering negative mass would have opposite behavior to normal mass in every possible way. For example, normal mass causes negative potential energy, negative mass would cause positive potential energy. Negative mass would have negative inertia, means, it would not stay in state of rest, or uniform motion.. It becomes quite complicated. Hope the negative mass does not exist.
However, just for the heck of it, consider an observer near earth, experiencing all effects due to presence of mass of earth. For imagination purpose, you can consider as if there is a negative (but same magnitude) mass body exactly in opposite direction at exactly the same distance. Would the rate of time change? I would not think so. Because, it would still curve the space but in opposite way, and time would still be slowed down in equivalent manner due to curving of space. The geometry would be inverted, not the rate of flow of time - my guess.


Changing Minecraft Player Model Arms Position

Question: I made a gun and I can shoot it now, with the only problem being that the gun would not be pointed towards to front while I am holding it, which is such a scene killer. Is there a way I can configure the player model if they are holding a specific item only by using datapack commands? Otherwise BlockBench?
Answer: You would need to use a texture pack for that. If you only want to change that angle/position an item is held at, that would only require a model data file. If you also want a custom texture (and not overwrite the existing item texture (say bow for example), you would need to tag an item with a model data nbt tag so you can assign a custom texture in the texture pack. I can explain more if you need.
Comment: Yes thank you. I have created a custom model for my gun using blockbench but I haven't really made a player model. My question is, even if I made a seperate player model with arms stretching out by what means can I configure my character model to this new one?
Comment: I dont think you can alter player models at least without a mod. What I meant is you can change item/block models with texture packs, such as how they look when held, and I believe how they are held as well. Since you already made a texture for it, now you can tag any item with any model data tag, and then assign a custom texture (the one you made) to any item with that tag. I can provide an example.
Comment: Is it that the player model configuration is a part of the item? I searched blockbench but couldn't find that option
Comment: I mean you can tag it with an nbt tag and then only assign a custom texture to items with that tag. So that means if you have a bow with that tag, it will look like a gun, but a regular bow without the tag will still be normal. With this you should be able to change how the item is held but again I do not believe you can change the player without a mod. And nbt tags are applied in game.
Comment: I see. I found another way round --- simply change how the item is held to create the illusion of the gun being pointed to the front
Comment: Yes thats what I was referring to. Sorry for the delay but do you need help with applying the texture to only items with an nbt tag and not every item of a type?
Comment: I already know how to do that. Anyways thanks for your advice.
Answer: First make your gun model replace a crossbow instead of a carrot on a stick so that you have the aim animation when the player holds the weapon and insert this command in a repeating command block in your world:
/replaceitem entity @p[nbt={SelectedItem:{id:"minecraft:crossbow",tag:{Charged:0b,Gun:1}}}] weapon.mainhand crossbow{ChargedProjectiles:[{id:"minecraft:arrow{disappearBug:1}",Count:1b}],Charged:1b,Gun:1}

This replaces a non charged crossbow with the Gun:1 tag with a loaded crossbow with a bugged arrow that won't appear when shot. The crossbow will activate scoreboards and will immediately reload making it the same as a carrot on a stick
The bugged arrow won't appear, make any noise or spawn particles
Give command for the crossbow (you can get it normally but you would have to shoot an arrow once to activate the above command without this):
/give @p minecraft:crossbow{ChargedProjectiles:[{id:"minecraft:arrow{disappearBug:1}",Count:1b}],Charged:1b,Gun:1}

This was tested in minecraft 1.16 but should work anywhere there is a crossbow
Also, you texture a crossbow a different way than you do a normal item so google that when you do change the models to crossbows (along with other things you are going to have to get 2 models one for the charged crossbow and a near copy for the normal crossbow, but you can make the normal crossbow one to simulate the recoil which makes it even better)


Windows 8.1 / Ubuntu 14 dual boot partition mystery

Question: I clean installed windows 8.1 on a new 1TB HD. During which I created a 120G partition for windows to live on. (it also creates a small 350M system partition by default). Next, using a LIVE CD I installed Ubuntu 14.4 using the "install alongside" option for dual boot purposes. Everything seemed fine... on powerup I get the menu where I can choose either OS (it defaults to Ubuntu if no choice is selected) but I can successfully boot into either OS no problems.
However, when I go into the disk manager in Windows it shows it's own partition, the system partition, and the rest of the HD as unallocated.
When I checked it out in Ubuntu, I found that on install Ubuntu created an extended partition with whatever disk space was left after the Windows partitions and then split that into two logical partitions. a roughly 8G swap partition and a gigantic 700-something-Gig partition.
1st... how does ubuntu find a way to boot from a non-primary partition? Unless I hallucinated that - but in both Ubuntu's on board disk app and Gparted it says its an extended partition w/2 logical partitions. I didn't think it was possible to boot that way.
Anyway, it works, and thats really not that important to me anyway. I wanted to have Ubuntu on a small(er) partition (like 40-60G) and then split up all that remaining space into a couple other partitions for various purposes.
So, I fired up a Gparted LIVE CD and used that to shrink the Ubuntu partition down, and create a couple more. It completed those operations no problem and...
Ta-DAAAA! Windows STILL doesn't see anything.
This is a problem because I want to be able to use the other partitions from windows not just Ubuntu. I would have used Windows to create them in the first place BUT, since it can't see anything in the "unallocated" space, messing around in there would undoubtedly screw up the ubuntu install.
Now, having done this several times on a couple other drives to try different setups... I think I know wherein lies the problem. When I selected "install alongside" in the Ubuntu setup this time, it skipped the "disk layout" step where I can choose/format partitions etc and went  right to choose location. I thought it was odd at the time, and could pose a problem, but I wanted to let it go and just see what happened.
I assume Ubuntu did this only because the rest of the HD was empty/unformatted.
On previous attempts at this, where I created other partitions first, both from inside a new Windows 8.1 install and using gparted prior to installing Windows, Ubuntu gave me the option after choosing "install alongside" to choose/modify/format partitions etc before proceeding. This resulted in windows still not seeing the Ubuntu OS and it's data, but it did recognize the partitions without issue.
So I guess the real question here is Why can't windows see partitions created by Ubuntu?
In summary, I guess I should have known better. I did it the way I did because I thought it would be the "cleanest" install. Pop the live CD in and let it do it's thing with empty drive space.
I did think it was strange that I didn't have the option during install to make location/size choices. You always have that option if you choose "other" (the third choice), AND - if partitions already exist besides the one Windows is on, you also get that choice.
I will most likely end up keeping the Windows partition, wiping the rest of the drive, creating the new partitions first, and then reinstalling Ubuntu.
I was just looking for any input you all might have on the subject. Data loss is not an issue as there is nothing stored on the drive yet.
UPDATE: after more research I decided to uninstall Ubuntu using the "2nd Option" on this help page: https://help.ubuntu.com/community/OS-Uninstaller
Unfortunately I did this before the comment posted to this question asking for more data.
Ubuntu uninstalled cleanly. I created several partitions using windows and intend to re-install Ubuntu once I am certain of the best way to go about it to ensure smooth boot and cross-OS usability. I assume any questions on that should be posted/asked elsewhere?
Thanks
Comment: Please edit your question to include the output of *all three* of the following commands, typed in an Ubuntu Terminal window: `sudo parted /dev/sda print`, `sudo fdisk -l /dev/sda`, and `sudo gdisk -l /dev/sda`. Add four spaces to the start of each line of the program outputs. This will provide us with information that's necessary to do more than wildly speculate about the nature of the problem.
Answer: Windows 8 uses Microsoft bootloader to look at the partitions on the HDD. Unfortunately the bootloader doesn't recognize ext2, ext3 or ext4 (and several others) format types of partitions so it will either say the partition is unavailable or unallocated.
Ubuntu used GRUB2 to partition the HDD. It supports several more formats than Microsoft's bootloader. If you want both OSes to see a partition, you will need to format it with FAT16, FAT32 or NTFS (I think there might be one more). After you create the partition and format it, go to Windows and mount the partition.
Answer: There are several drivers that allow Windows to read and write ext filesystems. If I remember correctly, the one I use was titled "ext2fsd". Google "windows ext4 filesystem driver" and find one. Linux typically installs with the ext4 journaling filesystem, but Windows refuses to acknowledge its existence - the driver will fix this.


Relationship between triangle free graphs and their minimum degree

Question: Let $T$ be a triangle-free graph on $n$ vertices with minimum degree $\delta$ (which can be $0$). How does one show that $n >2\delta -1$? It seems to be true for bipartite graphs, but I cannot see how to prove it for general triangle free graphs in general. The motivation behind this question is if this is solved, I will have a much more interesting corollary to garner from it. Thank you!
Comment: It might be useful to consider two vertices of minimum degree joined by an edge. If the graph is triangle free that gets a bound close to what is suggested, but there is more lurking behind the example.
Comment: You want an upper bound on the minimum degree. The average degree is larger (or at least as large.) Look for upper bounds on the number of edges in a triangle free graph with $n$ vertices (complete bipartite...) and use that.
Comment: Thanks for accepting the answer.  I would still like to know more of the motivation and the corollary, even if it did not turn out to be much more interesting.
Answer: In addition to the literature mentioned in the other answers, one can try some
arguments based on counting.
Let $u$ and $v$ be two of $n$ vertices in a triangle-free graph, and further assume they
are distinct and connected by an edge, with degrees $c$ and $d$ and $c$ at most $d$.
Then their neighborhoods are disjoint, so $c - 1 + d - 1$ is at most $n-2$, giving
$2\delta \leq n$.
It might be fun to recreate the $2n/5$ result: here is a start.  Take an odd
cycle from a non bipartite graph with minimal cycle length.  If the cycle
length is $7$ or greater, show that three vertices will produce either a triangle,
a shorter odd length cycle, or a degree at most $2n/5$.  Try a similar analysis
with a $5$-cycle. Enjoy!
Comment: Given the elementary nature of the analysis in this answer, I would like to see the corollary mentioned in the question and how it is more interesting than the supposedly weaker alternative.
Comment: Indeed, a couning argument might show something mildly stronger: a non bipartite graph which is triangle free has either a minimum degree less than 2n/5, or the graph is 2n/5-regular.  This could well be part of an undergraduate graph theory course.
Comment: Very nice. So in a graph with $n$ vertices and minimum degree $\delta$ **every** edge is in at least $2\delta-n$ triangles. It is possible to have $n=2\delta$ and no triangles but if $n \le 2\delta-1$ then every edge is in a triangle so there are lots of triangles.
Answer: If you can prove it for bipartite graphs, this follows in general, by the following theorem of the reference below: any triangle-free graph of min degree greater than $2n/5$ is bipartite.
@article {MR0340075,
    AUTHOR = {Andr{\'a}sfai, B. and Erd{\H{o}}s, P. and S{\'o}s, V. T.},
     TITLE = {On the connection between chromatic number, maximal clique and
              minimal degree of a graph},
   JOURNAL = {Discrete Math.},
  FJOURNAL = {Discrete Mathematics},
    VOLUME = {8},
      YEAR = {1974},
     PAGES = {205--218},
      ISSN = {0012-365X},
   MRCLASS = {05C15},
  MRNUMBER = {0340075 (49 #4831)},
MRREVIEWER = {D. J. Kleitman},
}
Answer: This follows from familiar results once everything is untangled. Suppose we have a triangle free graph with $n=2m$ or $n=2m+1$ vertices. Then $\delta \le m$ so $2 \delta \le n.$ This follows from the comments below.
You wish to show:

In a triangle free graph $2\delta-1 \lt n.$

Since $\delta$ is an integer this is the same as  $2\delta \ \le n$ i.e. $\delta \le \frac{n}{2}.$ It is sufficient to prove $\delta' \le \frac{n}{2}$ where $\delta' = \frac{2|E|}{n} $  is the average degree, since  clearly $\delta \le \delta'.$
Turans theorem (proof at the link) has as a special case Mantel's theorem:

A triangle free graph on $n$ vertices has at most $\big\lfloor\frac{n^2}{4}\big\rfloor$ edges.

So the cases for a triangle free graph are

$n$ even , $|E| \le \frac{n^2}{4}$ and $\delta'=\frac{2|E|}{n} \le \frac{n}{2}$

along with

$n$ odd , $|E| \le \frac{n^2-1}{4}$ and $\delta'=\frac{2|E|}{n} \le \frac{n}{2}-\frac{1}{2n}.$


Simplicity of (complex) orthogonal groups

Question: I need a reference for the proof that the complex orthogonal group
$SO_{2n+1}($ℂ$) = \{A\in SL_{2n+1}($ℂ$): A^TA = Id\}$ is simple in a group theoretical sense (if it is true).
How about the simplicity of $SO_{2n+1}(K)$ in general (i.e. $K$ an arbitrary infinite field)?
It there any criterion? It seems that if $K$ is "big", then $SO_{2n+1}(K)$ is not simple, e.g. if $K$ has a valuation, then (I think) one can find somehow a proper normal subgroup.
Comment: Another problem with the even case is that $SO_4$ is not simple as an algebraic group: it is isogenuous to $SO_3\times SO_3.$
Comment: That's $O_n(\mathbb{C})$ you've defined. You should write $A \in SL_n(\mathbb{C})$ (otherwise there's an obvious normal subgroup :)).
Comment: (I presume you mean $A\in\mathrm{SL}_n(\mathbb C)$.) When $n$ is even the group has  non-trivial centre and hence is not simple but that is the only problem. Generally results on normal subgroups of semi-simple groups is due to Tits but this particular case may be earlier.
Answer: You have to be kind of careful.  For the complex numbers, there is no problem as BCnrd wrote above.  For a general field $K$, you are asking a basic question from the field of geometric algebra (there's an AMS GTM volume by Grove on the topic, and Dieudonne's books on classical groups).
If you take a nondegenerate quadratic form $q$, then we know:

If $q$ is isotropic over $K$, then $Spin(q)(K)$ is "projectively simple" (i.e., the quotient by its finite center is simple)
If $q$ is anisotropic, then $Spin(q)(K)$ can be far from simple.  You can construct examples using valuations, as you suggest.

But you asked about $SO(q)(K)$.  Then you use Galois cohomology (where I assume that $K$ has characteristic different from 2 for simplicity):

$1 \to \mu_2(K) \to Spin(q)(K) \to SO(q)(K) \to K^{\times}/K^{\times 2}$

where the last map is the spinor norm.  You should think of the spinor norm as usually having a big image, so $SO(q)(K)$ will be pretty far from simple.

Your specific group
You asked specifically about $SO(q)$ where $q$ is a sum of squares.  Then the spinor norm map has image products of sums of squares (typically not actually squares themselves), so you should expect the image of $Spin(q)(K)$ to be a normal subgroup in $SO(q)(K)$ of large index.  (That is all very imprecise, but a precise answer depends on the arithmetic of $K$ and the dimension of $q$.)  But now you can ask: Is $Spin(q)(K)$ modulo its center a simple group?
Here you have a strong advantage.  If $q$ is isotropic over $K$ (i.e., you can write $0$ as a sum of a small enough number of nonzero squares), then you know from classical results that the answer is "yes".
If $q$ is not isotropic over $K$, then $Spin(q)$ is anisotropic (as an algebraic group) but it is split by the quadratic extension $K(\sqrt{-1})$.  For such groups, under some hypotheses on $K$ (maybe as weak as characteristic zero), you know that the answer is again "yes" by Chernousov.  See Theorem 9.7 on page 514 of the book "Algebra & Number Theory" by Platonov and Rapinchuk.  You will have to inspect the proof (which starts on p.546) to see the precise hypotheses they need on $K$, or you can consult some of the original papers, where the proof is slightly different.
Comment: A nice way to interpret Skip's example is that there's an exact sequence of $k$-gps
$$1 \rightarrow \mu \rightarrow \widetilde{G} \rightarrow G \rightarrow 1$$
where $\widetilde{G}$ is s.c. central cover and $\mu$ is the mult. type finite center.  Passing to $k$-points gives an exact sequence of pointed sets
$$1 \rightarrow \widetilde{G}(k)/\mu(k) \rightarrow G(k) \rightarrow {\rm{H}}^1(k,\mu) \rightarrow {\rm{H}}^1(k,\widetilde{G})$$
with connected map a homomorphism.
In many cases, final term is 1 and the 2nd-to-last term is computed by Hilbert 90 to be big (e.g., ${\rm{H}}^1(k,\mu_2)$).
Answer: The structure of classical groups goes back a long way and has been treated in a number of books, but in varying generality (arbitrary fields, various commutative rings, etc.).   One older source in French is J.A. Dieudonne's concise Springer Ergebnisse volume La geometrie des groupes classiques (1963).   A probably more readable modern textbook with limited aims is Larry Grove's Classical Groups and Geometric Algebra (AMS, 2002), just cited by Skip.   There is also Emil Artin's old book Geometric Algebra and a much larger book by Hahn-O'Meara oriented more to algebraic K-theory.   Anyway your group is simple both as an algebraic and as an abstract group (special orthogonal groups in odd dimension are also adjoint groups).   There's no real need to get into algebraic groups, BN-pairs, or the like, though this is the "correct" general setting as Tits showed.
Actually, simplicity of various classical groups is proved sometimes in graduate algebra textbooks (which I don't have at hand).    It depends how far you want to go.  Over more general fields, especially of characteristic 2, a little more care is needed but these groups are still simple or very close to it even over most finite fields.
Comment: To reinforce what Jim wrote in the preceding comment, if you assume the group is isotropic, you can typically prove results that depend only on the type of the group and not on the arithmetic of the ground field $K$.  But if you allow the group to be isotropic, results typically involve heavily the arithmetic of $K$.  To underline this distinction, one can compare the Kneser-Tits Problem (for isotropic groups) with the Margulis-Platonov Conjecture (same issue, but for anisotropic groups over number fields).  These are the modern context for Jakub's question.
Comment: In many places they assume "isotropicity" of the group (i.e. Witt index > 0) to get simplicity of the projectivisation of the derived subgroup (L. Grove, thm 6.31, page 58). In the case of usual SO_n, the Witt index is 0, so the simplicity is not clear.
Comment: Yes, I was following your formulation at first over `$\mathbb{C}$`.   Once you get into the forms of Witt index 0 it gets more complicated.   This is why the theory got developed further around *isotropic* and *anisotropic* forms over a given field, which gets reformulated in appropriate generality in the general theory of algebraic groups.  After a while that setting seems more natural for simplicity questions.
Answer: A reference with a small amount of patching to do is Bourbakie: Groupes et algèbres de Lie, Chap IV, 2.7, it uses the theory of BN-pairs (which there are called Tits systems). It is shows that the only non-trivial normal subgroup is that consisting of the scalar matrices (which is non-trivial exactly when $n$ is even). As I said above this is probably overkill for this classical situation.
Answer: You need to be more careful, or else there may be a non-trivial central element. Note that for $n$ even you have $-I$ in the special orthogonal group.
Comment: Use Ch. IV, sec. 2.7, Cor. to Thm. 5 in Bourbaki LIE. If $G$ is split conn'd ss gp over field $k$ s.t. $G(k)$ is own commutator subgp and gen'td by $U(k)$'s for unip. radicals $U$ of Borel $k$-subgps $B$ of $G$ then structure theory for ss gps provides Tits system, so Bourbaki ref. implies $G(k)$ *mod center* is simple abstract gp.  If $G$ is abs. simple and s.c. then these hypotheses on $G$ hold, by using "big cell" and structure of Weyl group (gen'td by simple reflections!) to reduce to case of ${\rm{SL}}_2(k)$ (win if $|k| > 3$!). So for $k$ alg. closed, $G(k)$ simple if $G$ is *adjoint*.
Comment: Jakub, then just keep reading.  Basically, it's a refined group version of the Lie algebra fact that pairs of opposite root spaces generate $\mathfrak{sl}_2$'s.  (The "refined" aspect is Bruhat decomposition using the Weyl group to nail down the *entire* group, not just some open around the identity.) At least over an alg. closed field, the version in Jim's book will give you the group version which I was invoking above.
Comment: How it works in odd dimensions?
Comment: I know this simplicity criterion (due to Tit's) with BN pair buissness, but the main point is the perfectness of the group. I don't know how to show that SO_n's are perfect.
Comment: Jakub, I had in mind the case of split groups (since I usually write ${\rm{SO}}_n$ to denote the special orthogonal group associated to the split quadratic form). Now I see that you specifically defined it relative to the "sum of squares" form, so then there will indeed be problems if the form is anisotropic (for example).  Not sure what to suggest in that case, though over the real numbers there must be classical facts from compact groups which clarify the matter. Sorry!
Comment: The book of Grove (chapter 7) provides a proof of simplicity only of "real" orthogonal groups PSO_n(R). I don't see the complex case in that book.
Comment: Jakub, if the structure theory of semisimple groups over alg. closed fields is unfamiliar, then my initial comment on the commutator aspect will probably not make much sense to you, and then you should follow Jim's advice and try to dig it out of Artin's "Geometric Algebra" or Dieudonne's book on classical groups.  Or wait until you learn about connected ss groups, and you'll see how it magically reduces to the known case of SL_2.
Comment: Dear BCnrd, I know some theory of semisimple alg. groups (e.g. from Jim's book). But, I dont see how SO_n "magically" reduces to SL_2.


Cannot log in to Ubuntu after changing /etc/fstab

Question: I was recently trying to change my /home directory to a new hard drive using these instructions.
I got to the step where I have to change the fstab file and I think what I did was I set the location to /home instead of /media/home. Well now when I try to log into my computer, it brings me back to the log in page, but it doesn't say that my password was wrong, so I know that's not the problem.
I've been trying to do the Ctrl+Alt+F2 thing to edit the fstab file from the command line, but its a read-only file. I also tried changing the permissions of the file with chmod, but that doesn't work either.
What else can I do to solve this?
Answer: Try to edit with sudo:
sudo nano /etc/fstab
Comment: bless you dude, worked like a charm...
Answer: You will be able to change fstab file after remounting root filesystem in read-write mode, using this command:
sudo mount -o remount, rw /

Answer: Edit it using sudo $EDITOR /etc/fstab
Answer: Try: sudo vi /etc/fstab and after editing press Esc to get vi go to command mode and then :wq! to save and overwrite


French language videos for an absolute beginner (free)?

Question: I am trying to learn French. Can anyone suggest videos where you can learn French for free? A brief search throws up videos from Americans who have studied French for only a couple years. I am trying to learn from someone who has a genuine French accent. Any ideas?
Comment: Do you want a video lecture, or a movie ?
Comment: I think @oli mentions a good hint. I, personally, consider movies more helpful than video lectures since situations, conversations and such are more natural than in lectures or tutorials.
Comment: I am in the same situation, I've been watching french preschool programs on You Tube and reading preschool books too.
Answer: If you are really serious (meaning you can stick with it), I suggest French In Action (FIA), which can be found on YouTube and other places, including here at learner.org. It consists of a total of 52 half-hour episodes, for 26 hours of language immersion. It is well worth going through them all.
If you know absolutely no French, you should look into Rosetta Stone to get acquainted with the language. Unfortunately, it is not free. Even with Rosetta Stone, I recommend FIA.
Comment: I used [Pimsleur](http://www.pimsleurapproach.com/learn-french/) as complementary listen-only course when I started studying French. It was nice for walking around listening to the lessons. It is really basic though, a "bonjour, comment allez-vous" kind of course.
Answer: Try some of the Youtube channels I use:
https://www.youtube.com/@lequipe/videos: It's a sports channel, and you don't really need to understand the commentators to watch the videos.
https://www.youtube.com/@SportenFrance/videos See above
https://www.youtube.com/@maprofdefrancais/videos: She uses simple vocabulary and a bunch of her videos are subtitled.
https://www.youtube.com/@HistoireGeoYT/videos: Most videos are subtitled and the maps help you follow along. Plus, English versions of all the videos exist here: https://www.youtube.com/@GeoHistory/videos
https://www.youtube.com/@InfoouMytho/videos: Videos are short and simple
https://www.youtube.com/@TotallySpiesFrancais/videos
Comment: While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.  Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/21786)


How to resend emails that Drupal already sent?

Question: I need to theme emails that happen when a user completes a booking on our site or modifies there booking after this. Is there a way I can resend emails that Drupal has already sent? This would greatly speed things up for me not having to make new or edit existing bookings.
Comment: It would help if you also tell what modules you are using to accomplish the bookings. Also, Drupal does not save emails unless you use a logging module like Maillog. So you are going to have to regen the emails another way.
Answer: Step 1: Create a view of all these bookings
First think of a way to create a view (using the Views module) of all those bookings for which you want to resend such eMails.
Step 2: Create a Rules component for sending an eMail
Create a Rules Component that will be used in Step 3 to actually send your eMail. Here is an example of such Rules Component to be created:
{ "rules_send_booking_email" : {
    "LABEL" : "Send Booking eMail",
    "PLUGIN" : "action set",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "USES VARIABLES" : { "user_to_notify" : { "label" : "User to be notified", "type" : "user" } },
    "ACTION SET" : [
      { "mail" : {
          "to" : [ "user-to-notify:mail" ],
          "subject" : "Some information about your booking",
          "message" : "This is an update about your booking with reference [user-to-notify:field_about_some_booking] ...",
          "from" : "[site:mail]",
          "language" : [ "" ]
        }
      }
    ]
  }
}

It uses (references) some field that was added to the "user" entity with machine name (say) field_about_some_booking. Feel free to adapt to any field name you have available. And/or use some other entity (eg a node about a booking?), instead of "user", to which this field might be related to. If you want, you can just import the above Rules Component (in Rules export format) in your own environment (via copy-paste), but make sure the machine name of the field matches with what you have available (otherwise the import will fail).
Obviously, the Subject and Content of the eMail may need review / tuning, while you might also want to use some other From eMail ID.
Step 3: Get VBO involved to actually trigger all the eMails
Transform the view from Step 1 into a Views Bulk Operations (=VBO) view. And have the actual VBO "operation" execute the Rules Component that you created in Step 2.
If you're not familiar with how to do so, have a look at the video about Using Rules components with VBO". If you want even more, then also watch the subsequent "Using Rules components with more than one parameter" video.
Attention: the size (volume) that needs to be processed might be another (extra) challenge (memory requirements, etc). Therefor you might want to also watch the video about "More details about VBO settings" ... Before you are tempted to use VBO for processing them all at once ...
Happy VBO-ing while Rules-ing!


How to find the English words "Shipping" and "Review & Payments"

Question: In the screenshots below, you can see the strings "Shipping" and "Review & Payments". I want to translate these strings to Chinese, but I don't know where I can find the source of these strings.
picture 1

picture 2
Answer: You have to create a .csv file in the vendor > [Vendor] > [Theme] > src > i18n folder. The name of the .csv file has to be named according to your language (in this case Chinese), I think it is zh_CN.csv in this case.
In this file, you write your translations like this:
"Original string","Translation","type","Location"

For example:
"Newsletters","Nieuwsbrieven","module","Magento_Customer"

Answer: Create a directory app/i18n/<Vendorname>/language_zh_hans_cn (or whatever you want to call it)
Issue command:
bin/magento i18n:collect-phrases --output "app/i18n/<Vendorname>/language_zh_hans_cn/zh_Hans_CN.csv" --magento
This will collect all the translatable phrases in csv file zh_Hans_CN.csv and place it in the specified path. Make changes to the csv file as per your requirement and when ready issue command:
bin/magento i18n:pack app/i18n/<Vendorname>/language_zh_hans_cn/zh_Hans_CN.csv -d zh_Hans_CN

This will deploy the translations from your file.
clear the cache etc and you should see your changes.
PS: There is a Chinese language pack if you want to use it for reference or full install http://bit.ly/2izuj1m
Answer: Or just translate it inline.
Go to:
Stores -> Configuration -> Advanced -> Developer -> Translate inline -> Enabled to storefront 'yes'

Clear cache, and refresh the page.
Do the translation, save.
Set "Enabled on storefront "No".
Clear cache, and refresh.


What difficulties may you find when controlling an aircraft with one engine on fire?

Question: I curious that from a pilot perspective, what do they really feel when they experience an engine failure that caused by fire ? Can they easily maneuver the aircraft anymore, or will their situational awarenese decrease by time ?
Comment: Most (not all) engine fires in Airline/Corporate type jet aircraft are extinguished in 60 seconds or less. Is your question assuming that the engine fire cannot be extinguished?  Or are you asking about single-engine flight and maneuvering in a twin engine jet?
Answer:
Airplanes and helicopters are designed so that their control does not depend on the engines and they can be controlled even with no engine power.
The asymmetric thrust—in twin-engine plane with one engine stopped and the other running at full power—makes control harder and must be properly handled, which is why multi-engine pilots train it. The main problem is that if the plane gets too slow, the rudder won't be efficient enough to compensate for the asymmetry and the plane will roll out of control. This tends to be most difficult on light prop twins as they have the engines relatively further apart and have less excess thrust.
It does not really matter why the engine failed, the control problems will be similar. The problem with fire is that it can cause additional damage that can have additional adverse effects and it can get worse over time up to the aircraft falling apart if the fire is not extinguished. Often cutting off the fuel supply is enough to stop the fire since steel and aluminum do not burn, but if not, that's why there are extinguishing systems (at least on transport aircraft).
Fire is worse once the aircraft stops. While it's flying, the air stream is blowing the flames away from the structure limiting its spread, but when the plane stops, it can completely burn down in a couple of minutes. That's why there is the 90 seconds evacuation requirement. Still, there were some accidents when continued fire damage resulted in an aircraft eventually falling apart in flight (e.g. the infamous Concorde crash).
Situational awareness is a rather different thing. It means not whether the aircraft can be controlled, but rather whether the pilots know what they should and shouldn't do with it. Situational awareness is only going to improve as the pilots find out what the problem is.
Comment: Like many metals, aluminum can burn if it is a powder.  If your aluminum airplane turns to powder, you were already in a lot of trouble.
Comment: For light twin engine airplanes (under 6000 pounds MTOW) certificated under FAR Part 23, there is no requirement for a positive rate of climb or maintaining altitude with one engine inop. Depending on the circumstances (weight, temperature, altitude, etc.) finding a safe landing spot could be the major problem.
Comment: @757toga  That is why their minimum speed is a lot lower than that of Part 25 certified designs. A lower minimum speed makes many more fields and roads into possible landing spots.


How easy or hard is it for a combat sport champion to defeat a much stronger man?

Question: As a layman in martial arts, I've been curious about this question: In a real life situation, is it easy/difficult/impossible for a seasoned professional fighting expert (in whatever discipline of martial arts you name) to beat a much stronger man, without fighting training but superor both in size and strength to him? For the latter think of those husky men pulling trucks or hurling ironballs in world-strong-man competitions.
Comment: @THelper We decided [in meta](http://meta.martialarts.stackexchange.com/questions/266/amend-the-faq-to-allow-for-high-quality-style-comparison-questions) that such questions would only be off-topic if they were low quality. I think that this question uses "champion versus physical specimen" as a concrete example of a broader philosophical question and is therefore both on-topic and constructive.
Comment: These are really, really hard questions to answer - in any given fight, you're still talking about two human beings, and human beings make mistakes. One mistake could change everything. Would it be difficult? Yes, but any fight is. I just don't think this is answerable in its current form.
Comment: This looks a lot like a "Would martial artist A beat martial artist B" question which is considered off-topic according to our [FAQ](http://martialarts.stackexchange.com/faq)
Comment: @DaveLiepmann I read the discussion on meta, but that discussion was about "this is my situation, what is good for me". This question looks like a hypothetical question to me, so as such I don't think it is on topic.
Answer: "Real Life Situations"
There are too many variables encoded in this term for it to have any meaning. Is the big man stealing your car? Running you over with a car? Picking a fight at the bar because his wife left him and he's sad and drunk? Throwing one ill-conceived haymaker? The problem with such questions is that the premise of "highly trained and conditioned fighter versus individual of enormous physical capabilities" is inherently chaotic even before one adds situational concerns such as who decides it's a fight first.
It sounds like what you're trying to ask is, "without odd sport-specific restrictions, how much better at fighting bigger, stronger opponents does learning how to fight make a person?" We can find suggestive parts of the answer in a few areas.
Areas of Evidence

Early MMA: in the 1990s in America, mixed martial arts had no weight classes. In the early days of the UFC, Royce Gracie finished a long succession of fighters who had a large physical advantage but a mere fraction of his jiu-jitsu experience. Eventually, as jiu-jitsu skill and tactics became a more level playing field, smaller men had a tougher time beating bigger opponents. It still happens, though: Anderson Silva, the 185-pound division champion, has defeated several 205-pounders in dramatic fashion.
MMA mismatches: Japanese mixed-martial-arts promotions had a liking for circus fights. That is, a smaller but more skilled man (often quite large in his own right) would be pitted against a GIANT. (For example, Bob Sapp versus Nogueira, or Fedor Emelianenko versus Hong Man Choi, or any of Fedor's other fights against enormous men.) Alternatively, a hard-hitting man with an iron chin but not much training would be pitted against similar-sized men with more experience (e.g. Mark Hunt).
The successes (and failures) of brawlers in MMA is quite informative on this topic. Tank Abott and Kimbo Slice are good examples.
Absolute divisions: Kyokushin karate, judo, and Brazilian jiu-jitsu retain no-weight-class divisions. These are full-contact striking, grappling, or striking-and-grappling contests, and can thus be informative about what works and doesn't work against bigger, stronger opponents. (Light-contact karate tournaments are not so informative, because not being able to clinch, grab, or hit hard removes a significant portion of the benefit of size and strength.)
Marcelo Garcia is a great example of a smaller man successful in grappling against bigger opponents. This highlight video shows him demolishing grapplers who are often bigger and nearly always stronger than him. These opponents are no slouches, either; many of them are champions in their own right. But Marcelo's victory through technical superiority and innovation is not absolute: he lost against Roger Gracie and Jacare Souza, both of whom possess elite-level fighting skill as well as significant strength and size advantages over Marcelo.
Street fight videos: we can condemn the stupidity of street fights while pumping videos of them for knowledge. One notices when a street fight involves one or more persons with combat sport training: the clinch is still messy, many of the punches may still be haymakers, but techniques get applied to great effect. Combat sports with a strong emphasis on hard sparring tend to have more and better clear examples of their techniques used successfully in street fights. For instance: boxing, boxing again, BJJ (featuring a champion against a somewhat bigger and perhaps stronger but definitely drunker opponent), and judo. Finding examples with a strength/size mismatch is much tougher; but we can extrapolate that the results are similar but less successful.

In these combative arenas, smaller and weaker fighters frequently best stronger, bigger opponents. They frequently lose, too. Technique matters, but if technique is equal then physical attributes (size, strength, agility, power, reach, speed and so on) matter a lot. The standard advice for beating a physically superior opponent is to have superior tactics, technique, conditioning, and speed. In comparing combat sports to unscheduled street fights, some of those areas may be tougher to bring to bear.
Comment: It is important to note that there are elements present on the streets that you will not find on those competitions: bottles being thrown, improvised weapons, concrete, which makes the landing much more violent, friends of your aggressor, 'illegal' moves (face shredding, eye poking, fish-hooks), knives and guns, police, security staff, dogs, broken glass on the ground, etc, etc, etc. Again, the majority of the traditional MAs will not cover this aspect. Moreover, they will not prepare the individual psychologically to face these sort of life and death situation.
Comment: Thank you Dave! You understood my intention correctly. The evidence is informative. What I had in mind was the two person fighting without weapon. I think @Lex had a point that psychology matters and perhaps unexpected human potentials can be unleashed in life-or-death situations.
Comment: Another great Example is Kaoklai Kaennorsing who at ~170lbs competed in the K-1 Grand Prix multiple times, which is an openweight tournament, and defeated opponents up to 100lbs heavier than he was. If at the highest levels such feats are possible, that should definitely answer how a well trained fighter might fare against an untrained albeit more physical individual.
Comment: @Lex My opening and closing paragraphs made reference to such issues. On the psychological side, martial arts do not (and should not) prepare an individual for murder and so on, but combat sports *do* prepare the trainee for the adrenaline dump of a fight, through competition.
Comment: I agree with everything you said. But a question for you: if there was no other way, would you kill in order to protect yourself or your beloved ones? While I agree that MA should not prepare an individual for murder, if your answer is 'yes', then you (not necessarily the MA itself) should prepare yourself for that. This is why I argue that the psychology (i.e., how one projects their frame of mind) is more important than knowing how to throw a punch, because if your aggressor is really committed, he will have this psychological preparation and you will become a victim.
Comment: @Lex I think the fascination many martial artists have with life-or-death situations is twisted and sad. If you want to learn to kill people, or experience life-or-death situations, join the military or get involved in a drug war. I think it's much more healthy to just wrestle or box (taken broadly, encompassing BJJ/judo/kickboxing/etc), thereby developing hand-to-hand fighting skills without the obsession with life-or-death scenarios.
Comment: Dave you are now generalizing while missing the full context. 1) Mastering one's own death was the essence of budo. 2) you are probably living somewhere nice and I would guess North America. While not the safest place in the world, it is pretty different from the 3rd world country I come from, so MA has a slightly different context from your usual environment. 3) While joining the military would get you the extra skills, this would be in the interested of their officials, not the individuals. MA and self_defense are two completely separate things, though they do cross over.
Comment: I saw a video of a guy with a black belt in jujitsu of 90kg beat a cultist of 130 kg. Whit out getting any harm and almost broke his arm they just stooped the combat at that point.
Answer: It really comes down to whoever is better able to apply their strategy in the fight. If a champion can tire out their opponent, getting kneed in the face by the champ will not help their ability to fight back.
However no matter how skilled you are, in a fight you will get hit. Over a series of fights these add up. So at some point a champ might get knocked out relatively easily.
The fact fighters cut weight to get into lower weight classes implies it's worth having the size advantage.
Answer: In a self-defense scenario, between intelligence and physical skills, the latter gives you advantages over a untrained person, whereas the former gives you more chances of 'surviving' a less-smart person than you. If an untrained person is smarter than you, no matter how much you have trained, you will end up with a bottle on your head before you realize it, and thus all your physical training will be wasted.
I love MA, and I train it for many different reasons, but if I had to choose between being really fit and well trained, vs being really smart, if we are talking about self-defense, I would choose the latter. MA training will give you the confidence, and the speed, performance, etc. But in many cases it will not directly address matters such as your emotional state (before, during and after the fight) or train you to 'cheat', or to use other techniques in order to be 'smarter' than your aggressor.
In some types of aggression, you can often spot the Point of No Return, that is, you know that this guy is going for you and there is nothing you can do to convince him not to crush your skull. His body language will tell you that: his upper lip will be curled up, his chest will be forward, his breathing pattern will be more accelerated, fists clenched up. At this point, you need to acknowledge that you will 'die', unless you do something about it. So you hit first, you use a weapon, you distract him and run, you offer money to someone to help, whatever, as long as you get him by surprise. The goal on the streets is not to compare skill vs strength, but to survive by whatever means you have: usually intelligence will get you further.
To sum up, you don't need to necessarily train MA in order to really gain advantages against an aggressor on the streets: you just need to be smarter than him (and that also means, realizing that someone is starring at you and that you should leave the scene before things escalate further). If contemporary MA schools started to adopt this 'Urban Survival Combat' kind of thing and started getting people to realize the importance of outwitting an aggressor, then I would change my answer to say that: 'Yes, MA really train you for the streets'. Unfortunately most of MA disciplines have moved from a discipline that was to teach the individual to fight as part of an army to a system that train people for sports. Neither are suitable for a street self-defense where it is not very likely that you will be accompanied by a small army with you or that the aggressor will say: 'I will crush your skull using Karate rules only'.
If, however, you are a good MA student, smart and capable of not letting your testosterone mess up with your brain, you learn how to avoid this situations and should you ever get into them, you will know how to defend yourself before you attacker has even the chance to blink. So my answer is: 'Yes, MA will help you a lot, but what is covered in a MA school is only a tip of the iceberg on your self-defense study, and you will need to learn a lot about the psychology of different types of attacks/fights and tame your emotions'.
Some Reading on the subject:
Geoff Thomson's website - Book: 'Dead or Alive: The Choice is Yours'
Rory Miller's website - Book: 'The Gift of Fear'
Comment: Your second paragraph is strange: my instructors in both sport and non-sport martial arts have talked copiously about how to apply "cheating" techniques, emotional states before and during a fight, and using techniques to outsmart someone (e.g. with weapons of opportunity) in a self-defense scenario.
Comment: @DaveLiepmann So you are lucky to have instructors that have this level of awareness: I, on another hand, have only met a handful of enlightened ones throughout my MA study.


Is my hand live

Question: At the table in a heads up, I bet, he pushes all in. I turn my cards face up, without uttering CALL or FOLD.  Are my cards still live?
Answer: Depends on where you are playing. Generally no, however in tournaments it is generally yes. Some poker rooms have a rule against showing your hand and will rule it dead. You really need to ask where you are playing.
Answer: I think Jon is correct in saying that it depends where you are, remember that whilst verbal declaration of intent is pretty much always the best way to do things, there are also rulings around physical motions as well. So argument is that by turning over your hand (provided you didn't make a forward motion, as in, throwing towards the muck) then it could constitute a call. HOWEVER, this could be viewed plain and simply as angle-shooting, because someone could turn over their cards, wait for a reaction, then say "Oh no I was folding, I didn't state I was calling". It's a slippery one.
I suspect if you were a noob and it was clear and obvious you didn't have experience at the table, you'd probably be fine, but otherwise you'd probably be chatting with the floor. But you'd only get away with it once.
Also I think it would depend on the size of the pot in question, in a large pot I suspect you'd probably get some hassle. Mainly down to the angle-shooting issue.

Is my hand live


is there some one expert with the btc recovery tool?

Question: trying to use btc recovery tool , installed every thing , python 2.7 and all the required pibs . followed tutorials . actually i need to find second password so am using the command i.e c:\python27\python btcrecover.py --wallet wallet.aes.json --utf8 --blockchain-secondpass
here it asks for main password , when i enter it ,,, it says wrong main password where i can enter to blockchain wallet using the same password . where i am going wrong ?
Answer: either you have the wrong wallet.aes.json or you have a v1 wallet. they (blockchain.info) seem to have used three different wallet encryptions and btcrecover only work with one.


Xcode symbolication error

Question: I have a small app made with SpriteKit and i receive EXC_RESOURCE error all the time and i really don't know. I want to see crash log , but Xcode doesn't symbolicate correct.
I need to see Thread 0 , but it is the only one who isn't symbolicate.
Exception Type:  EXC_RESOURCE
Exception Subtype: WAKEUPS
Exception Message: (Limit 150/sec) Observed 379/sec over 300 secs
Triggered by Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Attributed:
0   libobjc.A.dylib                 0x33ef1a54 0x33ecf000 + 141908
1   libobjc.A.dylib                 0x33ed4a24 0x33ecf000 + 23076
2   CoreFoundation                  0x2661beec 0x26615000 + 28396
3   CoreFoundation                  0x266b655e 0x26615000 + 660830
4   CoreFoundation                  0x266b67b4 0x26615000 + 661428
5   UIKit                           0x29e6adec 0x29bcd000 + 2743788
6   UIKit                           0x29c106a2 0x29bcd000 + 276130
7   UIKit                           0x29e4ce8a 0x29bcd000 + 2621066
8   UIKit                           0x29bdb3d4 0x29bcd000 + 58324
9   CoreFoundation                  0x266e1d54 0x26615000 + 838996
10  CoreFoundation                  0x266e1162 0x26615000 + 835938
11  CoreFoundation                  0x266df7c8 0x26615000 + 829384
12  CoreFoundation                  0x2662d3bc 0x26615000 + 99260
13  CoreFoundation                  0x2662d1ce 0x26615000 + 98766
14  GraphicsServices                0x2da2b0a4 0x2da22000 + 37028
15  UIKit                           0x29c3b7ac 0x29bcd000 + 452524
16  Annoying Bird                   0x00071f5c 0x54000 + 122716
17  libdyld.dylib                   0x34455aac 0x34454000 + 6828

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x345082a0 kevent64 + 24
1   libdispatch.dylib               0x344419fc _dispatch_mgr_invoke + 276
2   libdispatch.dylib               0x3443720e _dispatch_mgr_thread + 34

Thread 2 name:  AURemoteIO::IOThread
Thread 2:
0   libsystem_kernel.dylib          0x345084f0 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x345082e4 mach_msg + 36
2   AudioToolbox                    0x25e9599a AURemoteIO::IOThread::Run() + 102
3   AudioToolbox                    0x25e99094 AURemoteIO::IOThread::Entry(void*) + 4
4   AudioToolbox                    0x25dcd9e2 CAPThread::Entry(CAPThread*) + 206
5   libsystem_pthread.dylib         0x34598e90 _pthread_body + 136
6   libsystem_pthread.dylib         0x34598e02 _pthread_start + 114
7   libsystem_pthread.dylib         0x34596b8c thread_start + 4

Thread 3:
0   libsystem_kernel.dylib          0x3451c9cc __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x34596ea8 _pthread_wqthread + 788
2   libsystem_pthread.dylib         0x34596b80 start_wqthread + 4

Thread 4:
0   libsystem_kernel.dylib          0x3451c9cc __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x34596ea8 _pthread_wqthread + 788
2   libsystem_pthread.dylib         0x34596b80 start_wqthread + 4

Thread 0 crashed with ARM Thread State (32-bit):
    r0: 0x00000000    r1: 0x3481da04      r2: 0x16664d50      r3: 0x01001380
    r4: 0x00000000    r5: 0x3481da04      r6: 0x16664d50      r7: 0x00183450
    r8: 0x00000030    r9: 0xffffffff     r10: 0x00000013     r11: 0x347fa3c0
    ip: 0x36b8a198    sp: 0x00183444      lr: 0x33ed4a29      pc: 0x33ef1a54
  cpsr: 0x20000010

Comment: What versions of OS X and Xcode are you using?
Comment: OS X 10.9.5 and Xcode 6.1.1
Comment: Ok, there's a bug in Mavericks (10.9.5) where Xcode can't find the .dsym file. If you've got it stored in an archived, inside your ~/Library folder somewhere. Copy the archive (or even just the .dsym file) to your desktop, and attempt to symbolicate in Xcode again. Let me know that that fixes it and I'll write this up as a full answer with additional info about that bug (which is fixed in Yosemite).
Comment: i copied both archive and .dSYM to Desktop and nothing :(
Answer: Expanding on my earlier comment in an answer, as it won't fit in the comment anymore.
In your crash report, look at the first line under Binary Images
EG>
Binary Images:
   0xb3000 -   0x242fff  AppName armv7  <6daf5fd2c9e23af786cd580ef39b5b82> /private/var/mobile/Containers/Bundle/Application/E83D554F-BD3A-47CF-8753-AAACB0BDDF33/AppName.app/AppName

The hash between the angle brackets <> is the build UUID of the build that produced the crash log. We'll call that CrashLogUUID later.
Next, in terminal, change to your archived app directory and execute:
dwarfdump --uuid dSYMs/AppName.app.dSYM

You'll get back a number of UUIDs, one for each slice/architecture in the app.
Confirm that the CrashLogUUID you see in the crash log is listed in the UUID list for the app. If you don't see a match, you have the wrong archive/dSYM.
If it's the wrong dSYM, you can search for the correct one. You need to adjust the format of your CrashLogUUID from above, make it all upper case, and add hyphens to fit the standard UUID format: 8chars-4chars-4chars-4chars-12chars. Lets call this CrashLogUUIDFormatted.
Due to a bug in Mavericks, you will need to copy all of your archived projects out of the ~/Library folder and into somewhere that Spotlight indexes, such as your Desktop. In Mavericks, Spotlight won't index under ~/Library even if you specifically add it (rdar://17169292 fixed in Yosemite).
Now in terminal, enter:
mdfind "com_apple_xcode_dsym_uuids == CrashLogUUIDFormatted"

That will list the correct location of the app archive and/or dSYM related to your crash log. If it comes back empty, Spotlight can't find the correct build and you many not have it on your system.
Once you have the correct dSYM, you can either have Xcode try and do the symbolication automatically again (if it wasn't finding it with mdfind earlier but can do now, this will work). Or you can symbolicate it manually with the following command:
/Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash -v -o output.log yourCrashLog.crash AppName.dSYM

That will take your crash log and your dSYM and create a symbolicated crash log called output.log.
Hope that helps!

Xcode symbolication error


Turbogears 2 Tutorials?

Question: Anyone know of a good beginners tutorial for Turbogears 2? I'm particularly interested in one that would have some details on working with existing database schema rather than creating from scratch. (and some pointers on MS SQL server setup would help too!)
Comment: For the database stuff you need to look at SQLAlchemy documentation and perhaps pyodbc. You merely need to ignore the bits in the existing tutorial that issue 'CREATE TABLE' statements.
Answer: A very good TG2 tutorial is the movie demo http://turbogears.org/2.0/docs/main/RestControllers.html. It walks you into the basics of what a "high level" TG2 app is.
Regarding your MS SQL question I agree with joeforker, this is more a SA issue than TG. You have several options the best is the very experimental code put together by Chris Perkins, based on autocode and some snips from myself. This currently works well with postgres and sqlite, we'll love some MS SQL patches :) http://bitbucket.org/percious/sqlautocode/
Answer: This tutorial talks about, making a simple note taking application using TurboGears2. Its directed towards beginners, you will find it useful.

Turbogears 2 Tutorials?


display webpage inside other webpage without frames

Question: i'm looking for a way to display a web page inside a div of other web page.
i can fetch the the webpage with CURL, but since it has an external stylesheet when i try to display it, it appears without all his style properties.
i remember facebook used this technique with shared links (you used to see the page that was linked with a facebook header)
did some unsuccessful jquery tests but I'm pretty much clueless about how to continue..
i know this can be done with frames but i always here that it's good practice to avoid frames so i'm a bit confused
any ideas how to work this out?
Answer: If you want to display the other website's contents exactly as they are rendered in that site then frames are, in this case, the best (easiest) way to go.
Facebook and Google both use this technique to display pages while maintaining their branding / navigation bar above the other site.
Comment: Thanks for that, will go with the frame solution. do you know by chance is it possible to enable closing of the 'header' frame thus let the user remain with the original page?
Comment: @Yaniv Do you mean is it possible to visually wrap your page about the other page rather than just doing a header banner?  If so, then yes.  I would recommend looking up iframe and its many implementations.
Comment: well, after investigating for a while looks like this is very uncommon to do since iframe won't adjust it's height according to the content in it.. there are some workarounds but most of them won't work if the iframe content is from other domain (which it is in my case)..bummer.. will have to think it over again
Answer: I am going to guess that Facebook still used an iFrame, just with no borders and a well placed header outside of it. The reason I am guessing that is because if the outside page has its own style sheet, there is a high probability that your styles and their styles will clash and not show things properly.
In order for the styles not to clash everything on both ends would have to be extremely detailed, not just generic styles applied to all paragraphs etc...
Answer: i agree that using frames would probably be the best solution for you problem.
but if you still want to avoid frames and put the contents into a div with the id externalConent, you could request the stylesheets the same way you get the other contents and prefix every rule in them with "#externalContent ". save these stylesheets to your server and include them in your page. with a few more customizations, that should work.
i have to admit this solution does sound quite strange... well, it is.
but it's the only way i see to do what you're asking for.
Comment: You would also then have to change all of the HTML class references.. This seems a bit overkill just to display an external webpage. (Ever wrote an HTML parser and CSS Parser?)
Comment: yeah that sound like a big headache :) iframe it will be.. :)
thanks
Answer: If you are unable to use a frame or iframe, try:

extract the HTML inside the BODY and inserting it into the destination DIV
extract the  and  sections at the header

Is not very clean though, but it will definitely work, you can insert a phpBB forum into another dynamic way using this technique, take a look at http://www.clearerimages.com/forum/ for an example.