Manage a GIT repo after a number of bad merges

Question: So brief story I'm managing a GIT repo of some code for an application. The application does not have any tests. One of the developers merged a feature branch directly into master and Jenkins deployed it to stage. This feature branch has weeks worth of changes and was merged several times into master branch. So I come back from vacation and find some functionality broken and added functionality not ready for primetime. I managed to tease out the bad code by reverting merges and commits.
I want to run this fixed code base and manually test the crap out of it. The PM wants to take whats on live and drop it into the GIT repo.
This seems so wrong. Does anybody have any other solution or comments?
Comment: You you unsure about content after the teasing out, just use `git diff master release` to see difference if any and investigate it.
Comment: Wait, are there changes on live that are not in the repo?
Answer: I did not understand what the PM wants to do.
Though I believe a "well maintained" Git repo has one branch per feature, including the fixes, which is merged once it is stable and passed tests.
I know and imagine how hard it is to stick to that. So I guess what you now have is a repo in which you have no idea what any commit may represent since it's messy and you added reverts (personally I think reverting should be avoided when possible).
So you want to have something stable? I would recommend, even though I have very little experience of it, to start from a stable commit in the history. Branch from it and call it "stable", that will become your main branch. Merge successively from commits that introduce new features, or bugs. For each, commit fixes until it is stable and rebase to have these fixes before the next bad commit.
For example, before:
A(stable) - B(feature1, bugged) - C(feature2, more bugged) - D (worse)
after:
A - B - B1 - B2 - C - C1 - D - D1
(so that A, B2, C1, D1 are stable milestones). Overall, you can play with rebase, merge and cherry-pick to perform what you want to do. This article : Git Cherry-pick vs Merge Workflow tells you that you'd better use merge if you are not comfortable with the others, but there are little differences that are very useful.
Hope you'll solve your problem


What is the meaning of "its been hell"

Question: I've seen this in a movie and I guessed it meant "every thing is bad", but I just want to know the exact meaning of it.  I tried to search in many dictionaries and websites such as Merriam Webster and free dictionary but I couldn't find the answer.
Comment: {It's been hell} rather than {Its been hell}.
Comment: It has been like burning in Hell.  Of course, this is figurative, to varying degrees.
Answer: I looked up the word: Hellish

hellish
  /ˈhɛlɪʃ/
  adjective
1.
  of or resembling hell
2.
  wicked; cruel
3.
  (informal) very difficult or unpleasant

"It's been hell" would refer to a period where things felt hellish.
However, at least in the US, it's more often used to describe difficult, but not quiet heinously terrible situations. Sometimes it can be used almost flippantly.
"It's been hell at work the last few months between losing the big contract, the constant layoffs, and working for a completely incompetent boss."
It can be used in an exaggerated way such a clerk saying to a fellow clerk, "Where have you been?, it's been hell in here the last two hours short one person during the morning rush"
War is hell, however I believe that, the less serious way the expression is used today, "It's been hell" would tend to understate a soldiers experience. It would also be used too frequently with humor to describe a dealing with the loss of a child or that level of terribleness
The "it's been hell" expression is probably losing it's shock value over time.  Someone answering a question about their well being with an answer of "really bad" might be taken at face value and listened to with concern more quickly.
Answer: It has been very bad, similar to the torture sinners are subjected to in the mythical region of Hell.

What is the meaning of "its been hell"


Mean field variational inference

Question: In Chris Bishop PRML book p.465 equation 10.6, the derivation doesn't explain why exactly the term $\int q_j ln(q_j) dz_j $ was generated, is not that term supposed to be multiplied by constant, did the derivation supposes that all the values of $q_i \forall i \neq j$ are constants, if that is the case then why the equation lists the product $\prod_{i \neq j} q_i dz_i$ as not a constant and lists it as a function.
Comment: You'll need to provide a lot more information for this to be answerable. What book by Bishop? Eg, can you paste in the context for this? Etc.
Comment: @gung Thanks a lot, by PRML I was referring to his book (Pattern recognition and machine learning) [http://research.microsoft.com/en-us/um/people/cmbishop/PRML/]
Answer: The equation lists $\prod_{i\not=j} q_i dz_i$ as not a constant because it's a multiplicative factor to $q_i$ and is important from optimization perspective. Further down a formula (10.9) for $q_i$ update is derived and it heavily depends on these $\{q_j\}_{j\not=i}$.
From the other hand, $\int q_i \sum_{i\not=j} \ln q_j$ is left aside as $const$ because it's independent of concrete $q_i$ (as long as it's a probability distribution).
Comment: Thanks a lot, a final question: why is $\int q_i \sum_{i\not=j} \ln q_j$ a _constant_ even though it contains $q_i$
Comment: @Magellanea because of independence assumption. $q_j$ is independent of $q_i$ (for $i \not= j$), thus sum can be moved out of integral and, since $q_i$ is valid probability density function, it integrates to one.
Comment: so to recap, away from $j$ that we optimize for all other $i \neq j$ are taken as constant vals, and their use in the product $\prod_{i \neq j}$ is for using in formula (10.9)
Comment: Formula (10.9) is derived from (10.6) by minimizing it. You can mark the product as a constant, but you can't throw it away because the function inside of integral depends on it. On the contrary, sum can be thrown away because it's independent of $q_j$

Mean field variational inference


The number of maximum inputs I can get on a Raspberry Pi

Question: I'm relatively new to the Raspberry Pi but not so to Python programming. So I'm mostly new to the electronics side of the story.
I'm looking to build a bass midi controller. My idea was to have one button for each fret and I would need more or less 84 inputs to the raspberry pi.
More or less because not every fret has to have a button. I would then use Python to receive input and pd to  produce a note based on the button being pressed.
My first obstacle is getting 84 inputs on the pi. The only thing I came across was this port extender. But I'm not sure I would know how to connect three of these to the pi.
Secondly would this be a 'clean' solution? Any advice?
Answer: An approach that potentially requires less wiring is a keypad matrix.  It essentially looks like this:
https://www.google.com/search?q=keypad+matrix&tbm=isch
You then would "scan" the rows by only enabling one row at a time, and reading the column to see which keys in that row are pressed.  You'll only need enough GPIOs to make ROWS * COLS > 84.  In this case, 9 and 10 would work, which means 19 GPIOs (the Pi has 26 available on the header).
Comment: Thanks alot! This is definitely the best solution and what i was looking for.
Answer: It would work and would probably be a cleaner solution than just buying the six MCP23017 you need and sticking them on a breadboard.
The only thing to be concerened about is the latency of detecting the key press.  You'll need to research how long that will take in Python over the I2C bus.
Comment: Thanks for your answer. I just have a few concerns. Do you know how i could figure out the latency issue? I am not planning to use any sound card or anything. As a matter of fact the pi would only serve as a pure midi controller and it would send the values over an ethernet cable to a more powerful computer running an effects processor. Since there was no sound output from the pi i wasn't expecting to have to deal with latency. Am i wrong?
Comment: @Scottyers Everything is relative.  The latency between a button press and the software finding out may be a few milliseconds (a few thousandths of a second).  I have no idea if that is a problem for your application or not.


Claussen Pickles Bitter

Question: I have been buying Claussen Pickles for years and never have had a problem with them. For some reason this jar of pickles has a bitter taste. I don't know if its a problem with the batch of cucumbers they used, or if they weren't refrigerated at some point before we bought them. They were in the refrigerated section of the store, but who knows what could happen to them in transport. My question would be is their being bitter a sign of poor refrigeration or just a bad batch of cucumbers? Also who would I report this too ?
Comment: Take them back to the shop you bought them from?
Answer: I love Claussen pickles too, and I know from my childhood in South Asia that cukes can be bitter, and it was frequent enough that we had few "tricks" to reduce the bitterness, which i believe do not work much :)
Agricultural seed in the western world are pretty standardized and removes the "undesired" characteristics, but they still occur from time to time, and I am guessing this is the reason for bitter pickles.
Claussen is owned by Kraft now, you can call them/fill up a contact form:
https://www.myfoodandfamily.com/contact_us
Answer: The cucumber itself might be bitter because of larger than normal amounts of cucurbitacin. Increased amounts can't be detected except by tasting the cucumber.

Claussen Pickles Bitter


how to dump via mysqldump hugh table into chunks

Question: i have very hugh table , around 100 M records and 100 GB in a dump file , when i try to restore it it to a different DB  i get sql query lost connection , i want to try and dump this table into chunks (something like 10 chinks of 10 GB) where each chink will be in seperate table.
what i managed to optimized so far is this :
mysqldump --skip-triggers --compact --no-create-info --single-transaction --quick --max_allowed_packet 1G  -h {host} -u {user} -P 3306 -p{pwasword} {my_schema} {}> /mnt/datadir/{table_name}.sql

and now the output is that i have 1 file {table_name}.sql i na size of 100 GB i want to get 10 files in sizes of 10 GB each
Answer: You can use primary key to specify to dump only id in those range
mysqldump -u root -p db_name table_name --where='id  < 10000' > test1.sql
mysqldump -u root -p db_name table_name --where='id between 10000 and 20000' > test2.sql
.....
 mysqldump -u root -p db_name table_name --where='id between 900000 and 1000000' > test11.sql

Answer: Maybe kind of a late comment here. But if it is a Mariadb database then you can use mariabackup utility and run a backup for that database-table and then scp to other server or maybe you want to import data at same server into other table: https://mariadb.com/kb/en/restoring-individual-tables-and-partitions-with-mariabackup/
we used this way to move production data to the slave server and mariabackup took some minutes to dump a database with 50 GB.
Another way to use SSIS or mysql integration tool with small batch inserts (5000-10000 rows).


Port Flash to iPhone

Question: How hard would it be to port a flash game to the iPhone. Obviously Flash CS5 is no longer an options, I still would like to know if there's anything that can be reused? or do I have to write everything from scratch (Is Obj-C that different than ActionScript?) Is there any other shortcuts?
Also, if anyone has done this before please share your experience.
Answer: Flash is a very different platform, not only is the language change going to be an issue you're going to be going from Flash's renderer to presumably your own using OpenGL:ES.
Although another method may be to port your app to JavaScript. Both ActionScript and JavaScript are  EMCAScript dialects, so very similar in that area, the APIs will be completely different though.
http://paulirish.com/work/gordon/demos/ interesting and slightly related, this is a implementation of Flash in JavaScript.
Note the new Apple T.O.S may affect you, but as far as I'm aware it's still a beta and I'm not Apple or a lawyer so I won't try and decipher it for you.
Answer: read the statements from apple, no its not possible.
Comment: I know that. I'm asking how to convert the code manually. wanted to see if there's any tips
Answer: For my game Hudriks I used flash to build levels and some animations. For this an animation engine has been developed that supports motion tween, and then wrote JSFL scripts that goes through Flash objects and export to a format that can be parsed in my game.
For writing the JSFL - look for document called Extending Flash.
The rest was developed from scratch using Objective C with OpenGL. Do not see option of 'one-click' compilation or converting from Flash to iPhone (not considering CS5), but with developing extensions for Flash you could reuse some work.
Answer: I am doing the same thing.  I am using Cocos2d for iPhone.  This is a pretty good 2d game engine.  Actually, two apps created with it are in the current top 25.  You are going to have to get down and dirty in Objective-C though.  Objective-C is different from ActionScript but if you are use to object oriented programming you should be able to make the switch.  Programming a Flash game is different than typical game programming done in Objective-C/C/C++.  So, if you are familiar with how to do things in the Objective-C/C/C++ game programming world (render loop, capturing inputs, etc), you'll really be ok.  If not, you'll have to get use to not having the Flash timeline, dealing with frames, etc.  Good luck!  You can do it!
Answer: It is hard, but it is possible. I am working on a automatic code converter now.

Port Flash to iPhone


Appending a div with id containing object

Question: I'm trying to get every instance of an object to create html that displays the property values of that instance and no other. So I've added a property to the object prototype using jquery. The property adds html elements to the page. The elements I'm adding include ids which include the name of that particular object instance, which I use so I can display the property values of that particular instance only to that instance. But I run into a problem:
$('.manDivContainer').append("

");

If I use this code, the event thinks this.nameLC is a string, so every instance ends up having the same id.
$('.manDivContainer').append("

");

If I use this code, on the other hand, adding the object in a space outside the quotes, the event doesn't work.
$('.manDivContainer').append("

").attr('id', this.nameLC + "Div");

If I attempt to add an .attr, on the other hand, the code assumes I'm adding that attribute to every instance of .manDiv. So what will happen is with the first instance of this object I create, it adds the id of that object to .manDiv, but then when I create a second object after the first, the second object will add it's own id to both it's own .manDiv and the previous .manDiv, so I end up getting two divs with the same ID, which end up displaying the same information, instead of information unique to each object. I don't know how to work around this. Does anyone know if there's a solution?
Answer: Wrapping single quotes for the id attribute:
$('.manDivContainer').append("

");

Comment: My god, how was that the one thing I didn't do. Thanks a bunch, jonno! The code is working beautifully now.
Answer: you can isolate part of not working code to new variable
        var somethingToAdd = "here should be string with div";
       // here you can print it to console and see how it looks
       $('.manDivContainer').append(somethingToAdd);


Sprout Forms - Notification Based on Checkbox Value

Question: I'm using Sprout Forms 22.214.171.124 and Craft CMS 3.4.5. My client wants the email notification to go to different email addresses based on whether or not a form checkbox is checked. My plan is to create a new notification for each checkbox value, with the checkbox logic in a custom rule. I've read through the documentation, but I can't figure out how to write the code that checks whether a checkbox is checked. I think it's something like
{ checkBoxFieldHandle == 'value' } or { checkBoxFieldHandle.valueBeingChecked.selected } but neither of those are sending any notifications after a test message. Any advice on how to do this? Thank you!
Answer: You're on the right track.
The first thing to note is that the Send Rule field does support shorthand syntax like in your question, however, if you are using compound logic, you will want to use the full object syntax for that logic.
So, instead of (with no reference to object. and single curly braces):
{ checkBoxFieldHandle == 'value' }

You'll want to use the full object syntax to get the expression to evaluate:
{{ object.checkBoxFieldHandle == 'value' }}

The next thing to note is that the checkbox field is a multi-select input, meaning more than one value can be selected. This could be present additional logic challenges for what you are trying to do but assuming you have a checkboxes field with a single checkbox or an opt-in field the logic is more predictable.
Checkboxes are submitted as arrays, so you'll need to make sure you are targeting the correct node in the array. In the case of a single checkbox, we know the first checkbox will be index 0 in the array. Once we have the target checkbox, we can see if it's selected by checking the selected attribute:
{{ object.checkboxFieldHandle.getOptions()[0].selected == true }}

And we can update the same statement to check for false if we want to only send if the checkbox is unchecked:
{{ object.checkboxFieldHandle.getOptions()[0].selected == false }}

Comment: I've updated my answer with a new syntax that works in my tests: `{{ object.checkboxFieldHandle.getOptions()[0].selected == true }}`
Comment: Thanks for the advice! I've added `{{ object.checkboxFieldHandle[0].selected == true }}` but now the notification is always being sent, even when I didn't check the `[0]` index checkbox. Side note: the default notification template for checkboxes is sending the checkbox handle, rather than the label; for example, I'm receiving "Checkbox Field Name: checkboxFieldHandle" in the notification email, rather than "Checkbox Field Name: Checkbox Field Label." I can override that myself with a custom template, but is that a bug with the default template?
Comment: This worked! Thank you so much!


I told a small lie to prevent trouble after swearing to God I would tell the truth; is it a sin and what do I do?

Question: Today my friends asked me if I could say "I swear in God I will say the truth" so said that. Then they asked me a question.  However, if I answered this question a lot of my friends will be in trouble, so I answered the question except a small part, which was a lie to prevent problems. I need to know if I have done a sin and if so, what do I do?
Answer: 1. If you are forced to take an oath, your oath is not in order.
2. Oath taken for performing Haram (Forbidden) and even Makruh (Non-recommended) acts is not in order.
3. Oath taken for abandoning Wahjib (Obligatory) and Mustahab (Recommended) acts is not in order.
4. Oath taken for performing normal acts whose performance is not deemed to be better in the estimation of people, will not be in order.
5. Oath taken for abandoning normal acts whose abandonment is not considered to be better in the view of people, will not be in order.
6. If you break an oath intentionally, you are obliged to give Kaffarah which is liberating a servant or feeding fully ten indigent persons or providing them with clothes.
7. If you cannot afford to carry out these three tasks, you have to fast for three consecutive days.
Comment: Plz feel free 2 provide some ref.s 4 ur ans.


Going from two hdd to one hdd cannot boot

Question: I've had two HDD both with Vista installed on them. This is because the old Hitachi HDD failed previous and I added a Seagate HDD and just loaded Vista onto one of its two partitions. Normally when I booted up it give me an option to choose which one to boot from, which I'd choose the Seagate but the Hitachi did work Again if I wanted it to boot from it. Now the Hitachi has died and I've managed to recover all the data from it. I've now removed it completely from the PC. But now when I turn on it says I have the option to enter BIOS etc and then it says Boot from CD/DVD: Disk boot failure, insert system disk and press enter.  Why is it simply not booting from the Seagate automatically? I don't want to reinstall Vista. Any help please?
Answer: The broken harddrive must have had the Master Boot Record (MBR), now that it is no longer there, the computer does not know which operation systems are installed, and how to start them.
You will get errors like:
<code>Error loading operating system

Missing operating system

Invalid partition table
</code>
It is however easy to fix.
First, start your computer with your windows cd/dvd.
Make sure you have the correct boot device selected in your bios:

In the Vista install click "Repair your computer"

Choose the operating system to repair and click Next. When the System Recovery Options dialog comes up, choose the Command Prompt:

Now type bootrec.exe and press Enter. This will rebuild the boot configuration data and hopefully fix your problem. You can also run the command with switches to fix just the master boot record (/fixmbr), the boot sector (/fixboot), or rebuild the entire BCD (/rebuildbcd).
Comment: Thanks, I will give that a go. When connecting the broken HDD back in, Vista does boot up from the newer drive but takes a long time, much more than before. Can anything be done while at this position. Can I run the commands from this point instead?
Comment: I think the only way is to use the CD. More info since you can still boot into old vista: http://www.maximumpc.com/article/ask_doctor/moving_mbr
Comment: Thanks, it took some doing, but it looks like I've got there in the end as it's all booting fine now.
Answer: Might be bad MBR ..
Boot with your Vista CD .. And you choose "Repair installation" (or something like that) ..


Why am I temporarily banned from suggesting edits?

Question: I see the message, "You are temporarily banned from suggesting edits", when I try to suggest typo fixes I've seen. I presume this is because of the series of rejected edits I've made to the tag wiki. Is this true? Also, how long does this ban stay in place?
Comment: Congratulations in pushing the edit button too much! I'm in the same boat, though not on Drupal Answers though. Don't worry, just be patient (between 1 to 7 days?). In my case I suffer the same problem on the overall meta site ... again. I'm confident that reviewers like kiamialuno and free radical have good intentions (ie reasons to "so now and then" reject suggested edits), just consider it as constructive critique. While your "timeout" lasts, how about we organize some chatroom party (or just head over to any other SE site). Like "New User Experience" room? Do NOT give up, ok?
Comment: I just created http://chat.stackexchange.com/rooms/22624/new-user-experience-for-drupal-answers ... I have no experience with chat rooms on SE at this moment. Want to join there? Of course: same invitation for anybody else ...
Comment: Consider changing the title of this question to something like "Am I temporarely banned because of my series of rejected edits, and if so for how long?"
Comment: @Pierre No worries or frustrations. This isn't the first time I've been on a community-editable site. If you're not breaking things you're doing it wrong :)
Comment: Thanks! Yeah, I figured out the tour badge pretty quick.  I semi-scripted a way to login with my SE login, navigate to /tour, & scroll to the bottom for each SE site that have knowledge/interest in.
Comment: talking about scripting: http://stackapps.com/ is an interesting place to investigate ... while being banned (and receiving upvotes on Drupal Answers) ... Just in case you get bored while being banned: are you familiar with the distribution https://www.drupal.org/project/arrayshift? Something interested happened over there (cfr its issue queue for details) ...
Answer: Users are banned from suggesting edits when they get their suggested edits rejected. In your case, the suggested edits were for tag wikis, and two of them were automatically rejected because the tag the wiki was referring was deleted or merged. The same applies to other suggested edits, if you still don't have the privilege for editing every post.
The standard ban lasts seven days. After that, the ban is removed, but it will be applied again the next time you get most of your recently suggested edits rejected.
Answer: That ban is for having too many rejected edits.  Usually, you get these from trying to edit the tag wiki, as tag wiki edits gets (as a rule) far more rejections than other edits.
The ban will be automatically lifted in a week.
As I say in a comment to this question: Suggesting tag wiki edits is dangerous. They often get rejected, and sometimes for (at least to me) non-obvious reasons.  If you want to keep your editing privileges, it is probably best to stay away from the tag wiki.
Answer: Yes I agree with Free Radical about such edits being dangerous (so +1 for it) ... But "Worse then not succeeding ... is to not have tried". And even if you fail, keep trying, just never give up. At best be a bit patient to be allowed again. I just discovered that "my" Temporary Ban on meta.stackexchange.com (= no edit suggestions of questions or tags allowed) was lifted again, after a 7 days timeout, so my "test environment" for
Trying to improve a tag wiki while blocked causes incorrect 'This post has been deleted' no longer works "for me". Maybe Shawn Conn is willing to verify the same issue using "Drupal Answers" as the test environment now (and somehow confirm my suggested answer over there)?
Also funny (I think): I was banned for 7 days, and without doing anything (I couldn't because of the ban ...), my reputation went back up to only 1 below my maximum so far. My points went down quite a bit, because of 1 question + related answer there that got downvoted heavily (damage: -19-6 = -25 ...). I honestly don't care about what SE calls "reputation" (ie "points"), that is not why I contribute to any SE site (trust me).
I'm considering yet another approach over there to get my "editor stats" balance over there in "better" shape again. Right now the balance is "33 edit suggestions approved, and 24 edit suggestions rejected". Just in case anybody want to "judge" that ratio: make sure to carefully analyse the actual rejection details ... Maybe also consider some App (on StackApps) to help you on it, but don't get burned like in the question with my suggested edit for it. Note: 'all' (=1) my suggested edits over there are approved, with a 0% rejection rate ...).
Comment: Its not a huge deal. I understand why it is in place, to prevent spamming. Furthermore, the ban is just editing tag wiki stuff, I can still do Q&A which is the core activity on here.
Comment: This is a little beyond the scope of this thread, but another thing that might be helpful inside SE's gamification system is to give people "quests", some relatively-tedious maintenance task that shows off some knowledge and also helps improves the site. That's how I looked at editing the tag wiki; I took my experience as a Wikipedia and thought "hey, I can help by filling out some stubs!"
Comment: Some of his edits was rejected due to lack of usage guidance or copied content as far as I remember. "Never give up" is bad advice for such cases. If anything, he should give up until he knows what was seen as wrong and is convinced he can do better. At least these two reasons are pretty clear and objective.
Comment: Great comments ... seems like we have similar goals / attitudes! Keep on the good work!
Comment: @Mołot thanks for the comment, that's another way of looking at it. "Now" (about 4 months later) I better understand how most of the things on Drupal.SE work. But still I keep "struggling" with some of the attitudes, procedures, etc. But hey, think of all the amazing things around here, and how we all can learn about Drupal from each other, no?


I have my public key and my recovery passphrase. How do I get my private key to that address

Question: Hi I have my public address and my recovery phrase how do I create my private key for the public Bitcoin address.
Comment: What wallet software are you using?
Answer: As long as you have the recovery phrase, you can recover it on whichever software you generated the seeds on.
If you forgot the software or service that generated your seeds then you will have to quickly use the most trusted seed recovery service (such as blockchain.info or electrum) and after you recover the seed, immediately generate a new address or wallet and send all your coin to that address to avoid getting your coin stolen unless you planning to use that most trusted software.
Never have anyone to manually recover for you or use the untrusted source as your coin may immediately get stolen before they give you the key.
Answer: The normal recovery procedure would be to download the latest version of the wallet software you originally used onto a new clean computer and give it the recovery phrase at startup - the exact details depend on what software you used.
If the wallet software is no longer supported or not available you would have to use different wallet software that supports the same seed-phrase system.
Most wallets support a seed-phrase system known as BIP-39.
The popular Electrum wallet uses its own system but I think it may have some capability for importing a BIP-39 seed-phrase.
You can probably tell which is used by looking at the relevant word-list for  BIP-39.
When using the seed phrase with a different wallet, you also need to make sure it uses the same derivation path. Wallets have a default derivation path and some let you specifiy a specific derivation path when first started up. Details depend on the exact software used.
Some third-party businesses offer both wallets and accounts. These are effectively non-custodial and custodial wallets. The recovery process may be tied to a specific business. I would avoid trusting such businesses but many people seem to find them convenient. At least until they suddenly go out of business!
Answer: try to convert your recovery passphrase to SHA256 hash then convert then use that hash as your private key to get your public address there are lots of services and apps that can do it for you like bitaddress.
Answer: If you have a blockchain.info recovery phrase (not from an old backup), then you have enough with your recovery phrase. You can enter it here and create your new account.
In other wallets, this can also be the case. So the rule is, if your recovery phrase is some where between 12-15 English words, you actually have the Mnemonic_phrase and can recover it in a lot of wallets (Electrum, Blockchain, ...)
For other type of recovery phrase, we need to know the wallet software you are using. Because they use the name 'recovery phrase' for something non-standard.
Comment: Do NOT trust any random recovery service with private keys/seed words under any circumstances
Comment: is blockchain.info trustworthy?
Comment: The wallet technique that they use, makes sure that you don't have to trust them. So everything is encrypted before sending it to their server. And they don't know the encryption key (your password). So you should use a very hard password.

Caveat: If somebody takes over the website maliciously and you enter the password in the newly fabricated fake login form, it is possible that the hackers get the password. So offline wallets are still better.


Google Form Abandonment

Question: If someone abandons a Google Form survey before submitting, can I still see their responses up until the point where they dropped off?
Comment: https://webapps.stackexchange.com/help/someone-answers
Answer: No, this is not possible due to the fact that form was not submitted (eg. completed or sent to the spreadsheet). Data from an abandoned form are simply "lost" and not recorded in the final results.

Google Form Abandonment


If electricity creates a magnetic field, could a (strong) magnetic field stop electricity?

Question: Surely this would make the two magnetic fields interact and if movement was made impossible, the stronger magnetic field would block the weaker electromagnetic filed. Am I right (presuming that the magnetic field is stronger than the electromagnetic field created by the electricity)?
Comment: there is magnetic field, and there is electric field, and then came Maxwell with his equations and showed that there is an electromagnetic field i.e. light. there is some confusion in the notions you have . Why not start from here https://en.wikipedia.org/wiki/Maxwell%27s_equations#Formulation_in_SI_units_convention . On the left are the  laws known before maxwell. click on the links to see what they were about.
Comment: really what im asking is would a magnetic field conflicting with an electromagnetic field affect the electricity causing this?
Answer: There are a few things that need to be cleared:

now we know that there is a field called EM field, which unifies both electric and magnetic fields.
the expression electric field and magnetic field is observer dependent, one observer might see the same field as magnetic, another observer as electric

So basically you are asking whether if there are two EM fields, will they conflict or interact with the field itself.
Now let's say you have two charges (electrons), they will create an EM field around themselves. These fields will affect both the other charges, that is when the EM field of one charge will interact with the other charge.
This is what we call the near field, and let's assume you are asking about that.
Basically you are asking whether two near fields affect each other. This would mean that the near fields, if they would have an edge, would affect each other without affecting the charge itself (from far away).
You are mistaking the interaction by assuming that the near fields will interact themselves, repelling in this case. It is not true. What creates the repulsive force between two electrons, is when the near field of one charge interacts with the other charge. And vica versa.
We use virtual particles in the mathematical description of the near fields, to describe the interaction, because truly, we do not know what or how interacts.
You are asking whether when the edges of the near fields touch, will they repel, they will not. The near fields of the two charges themselves will not interact in this way. The interaction is always between the charge and another field.
The magnetic and electric fields are observer dependent, but let's assume you are asking from one observer's frame. Now if there is a magnetic field from this observer's view and another electric field, then you are asking whether the magnetic field (created by one charge) will affect the other charge (that creates the electric field). Yes it could affect it. But how could it stop it?


How is the amount of loot calculated at the end of each battle?

Question: How is the amount of loot calculated at the end of each battle, is it based on the number of kills? In which case when victory is announced should I be continuing the battle and chasing down as many of the routing enemy as possible?
Comment: You should in most cases try to chase down routing units at the end of a battle because if a small fraction (10%?) of the unit is still alive, the unit won't be disbanded, you then have to attack a second (or more) time to finish the enemy. Not relevant in quest and siege battles where all defenders die if the battle is won. Note that the Undead will raise back some of their losses even in case of defeat.
Answer: It is calculated on the number of kill and your casualties.
More kills means more money and also if you get less kills you'll get a few money because your people don't die which means you don't need to wait more time to recruit or wait to get full health-points (HP).
Also I recommended, when you won a battle and you know you can chase them and totally kill them, to pick the option "rescue of captives" or "release captives". You will get money and then you can chase their army again and then choose, if you want, extra leadership for a few turns or less money than before. I recommend choose the first if you want to fight more in the next turns.


Can a Bitcoin node create an outgoing connection to a inbound node?

Question: I'm trying to figure out if we can create an outgoing connection to a inbound node (a node which we are already connected to, but the remote peer has initiated the connection). I know that this does not make much sense since we exchange information to inbound and outbound nodes. However, I have looked at the source code and did not find the code that prevents a node from doing that. Is anyone out there more successful?
Comment: I misread that. Nothing prevents what you describe.
Answer: Jan,
there is a mechanism that prevents Bitcoin Core from opening a new connection (making an outbound) to an address it is already connected to (irrelevant of whether the existent connection is inbound or outbound).
See the function CConnman::AlreadyConnectedToAddress(), how it is called from CConnman::OpenNetworkConnection() and the surrounding code.
This check, however, could allow to open an outbound even if an inbound from the same address exists in the following cases:

When opening an outbound connection to RPC addnode onetry, RPC addconnection, ADDR_FETCH connections, connections to addresses given to -connect and -addnode. Then the port is also compared. So, for sure, we are not going to see an inbound connection from the node's listening port (e.g. addr:8333) during the check. Inbound connection are from some random port assigned by the remote node's operating system (e.g. addr:54721). In these cases the check would only prevent us from opening multiple outbound connections to the same node.

In the other cases only the address is compared, without the port, so the check would detect an existent inbound from addr:54721 when trying to connect to addr:8333 and would cancel the opening of the connection. However:

There is a race in CConnman::OpenNetworkConnection(), if addr connects to us between the two:

check whether connected to addr
if not, then open a connection to addr

This race is rare because the window is very small, but more likely if the network is slow and completing the connection takes some time, like could be with overlay networks, especially I2P.
Answer: Nothing prevents this as it is impossible to distinguish whether the node that is connecting to you is the same one that you are already connected to. This is because one machine can run multiple node software or multiple instances of the same software and thus it can be multiple nodes on the network.
There's also no reason to block such a connection.
Comment: I see that there is no reason to block such a connection. However, as I see it, a node would benefit if it connects to another node (and not to a one it is already connected to). Can't we use the IP address?
Comment: No. IP addresses are not unique enough identifiers. Besides what I mentioned, there's also the issue of NATs. Two computers behind a NAT will have the same public IP address.


Finnish maps: bogs easy vs hard to traverse

Question: Bogs on my Lemmenjoki and Hammastunturi map are marked as either easy or hard to traverse. What conditions should I expect from both terrain types in summer (mid August)? Does easy mean one can walk more or less like on dry (albeit springy and wet) land or is some special gear (bogshoes?) needed?
Comment: I wanna go bogshoeing!
Comment: Note that these conditions can vary quite a lot depending on how much rain there has been recently.
Answer: Ok so I do't have excessive first hand experience at crossing bogs - but did find an couple of interesting reads which may help to answer some of your questions. From researching, bogs are not that simple a thing.
From what I can gather from these articles - the easy / hard rating may be to do with how wet / dry the bog is. A bog is basically decaying vegetation etc in areas where it is very poorly draining, so the water collects, but is not always surface water. There are shrubs, grasses, exposed earth interjected between watery areas. Drier weather would lead to a drier bog, in theory, but poor draining areas may not be consistently better.
From Bogology.org:

Ombrotrophic (meaning 'rain-fed') bogs get all their moisture from precipitation (rain, snow etc.).  This means that any change in the hydrology of the bog is directly related to climate – mainly to precipitation but also to temperature because that affects how much of this water evaporates. Fens on the other hand, receive water from groundwater flow, as well as from precipitation and so climate is often not the main factor in their evolution.

Crossing a bog:

The trick to walking across a peat bog is to pick your way across by linking up the firmer spots that will hold your bodyweight while avoiding the wetter spots where you will sink.
...
Sections of bog that are completely under water should be circumvented because you can't determine what's below the surface. The same holds for areas with fine grained mud particles that look like chocolate mousse because you're likely to sink into them rather deeply. While it is possible to step in partially submerged areas, it's best if you can see grass or heather sticking out of the water around you.
The best footing is found in areas of sedge grass and heather that are visibly dry or mounds that are covered with them and provide firm footing. Hopping from one mound to another is common practice. Drier, fluffier looking areas of exposed peat can also be counted on to hold your weight.

From the Mountain Saftey UK website:

Take your time crossing
Explore all available routes and choose your steps wisely
Walking poles with baskets can assist, as they'll distribute your weight more evenly
When crossing in poor visibility, keep a track of your intended route - leap-frogging may be your best technique - even if visibility is ok, as it's easy to lose track of your direction in such situations

Regarding special gear (boots):

When you walk across a large bog, there's a good chance that your shoes/boots and feet will get wet. But if you're walking across open country that has bogs, chance are that your shoes/boots and feet will already be wet before you attempt to cross a bog! Under these circumatances, your best course of action is to wear a pair of shoes or boots that will dry as quickly as possible and not hold in water when they get wet (avoid gore-tex lined footware.)

Regarding Shoes - googling bog shoes brings up a brand name Bog footwear (who do indeed sell rubber boots of various kinds) however bogshoes do exist and are similar to snowshoes (see below) which can be used to traverse the wetter areas - where there is standing water these may become a bit cumbersome, and you may need to remove them for drier areas.

Image courtesy of visitestonia.com
sectionhiker - how-to-hike-across-peat-bogs
Mountain Saftey - Bogs
Bogology.org
Visit Estonia Bogshoeing
Comment: Downvoter, can you state your reasoning?
Comment: Didn't downvote, but large surface area footwear help in the hardest places where the ground you stepped on wasn't that firm. For example snowshoes (or even bogshoes) that can be attached to your actual shoes. Also there are two choices to choose from: easily drying shoes (as mentioned) or very watertight rainboots (everything in between works poorly).
Comment: Fair, I did not go too in depth into the special gear other than walking poles, but then I did say not a full answer as it was a research based one. I'll expand - turns out Bogs are actually a shoe brand on a quick Google.


Left control key not working in virtualbox

Question: I'm having an issue. I'm trying to install Gentoo in virtualbox. I can't use  nano because when I press Ctrl + x, I see, I have written x letter. Something's wrong with Ctrl key in virtualbox. I've seen similar question, but the answer doesn't work to me. Any ideas?
Comment: Are you using the right Ctrl key or the left - I think the right one is automatically designated as the 'host' key
Comment: @Wilf Left ctrl key. I know about 'host' key.
Comment: VirtualBox is rather buggy, but left+control has always worked for me. As one example of VB's buggyness, its host-only network adapter randomly just stops working in Windows.  Closer to the OP, my right alt+letter combinations to get non-English accents like ñ sometimes, but not always, do not work in other Windows apps while I'm running VirtualBox.
Comment: Have you tried installing the VirtualBox addons? They always seem to solve mouse and keyboard related issues like these for me.
Comment: Already answered on SuperUser: [Ctrl key doesn't work in Virtual Box, Linux host](http://superuser.com/questions/102834/problem-with-ctrl-key-in-virtual-box)
Answer: After a LOT of research I found that it was a misconfiguration in my Gnome desktop settings of my host machine.  I had a feature turned on which intercepted my control keys (left and right) and displayed a sort of animated bulls-eye on the cursor when either is pressed.  The trouble with that accessibility feature is that it doesn't pass the control key on to any programs.
The solution was to turn it off.  To do so from Linux Mint 13 Maya (MATE) do the following:
1 - Click on the Menu button on the lower left corner of the screen.
2 - Click on Preferences
3 - Click on Assistive Technologies
4 - Click on Mouse Accessibility
5 - Click on the General tab
6 - Under Locate Pointer, uncheck the box that says "Show position of pointer when the Control key is pressed".

I'm attaching a screen shot with all those menus displayed, and the relevant check box circled in red.
Comment: This worked for my Mint MATE 18.1 too


what's the difference between torch.Tensor() vs torch.empty() in pytorch?

Question: I have tried it out as below. It seems to me they're the same. What's the difference between torch.Tensor() vs torch.empty() in pytorch?
Answer: torch.Tensor() is just an alias to torch.FloatTensor() which is the default type of tensor, when no dtype is specified during tensor construction.
From the torch for numpy users notes, it seems that torch.Tensor() is a drop-in replacement of numpy.empty()
So, in essence torch.FloatTensor() and torch.empty() does the same job of returning a tensor filled with garbage values of dtype torch.float32. Below is a small run:
In [87]: torch.FloatTensor(2, 3)
Out[87]:
tensor([[-1.0049e+08,  4.5688e-41, -8.9389e-38],
        [ 3.0638e-41,  4.4842e-44,  0.0000e+00]])

In [88]: torch.FloatTensor(2, 3)
Out[88]:
tensor([[-1.0049e+08,  4.5688e-41, -1.6512e-38],
        [ 3.0638e-41,  4.4842e-44,  0.0000e+00]])

In [89]: torch.empty(2, 3)
Out[89]:
tensor([[-1.0049e+08,  4.5688e-41, -9.0400e-38],
        [ 3.0638e-41,  4.4842e-44,  0.0000e+00]])

In [90]: torch.empty(2, 3)
Out[90]:
tensor([[-1.0049e+08,  4.5688e-41, -9.2852e-38],
        [ 3.0638e-41,  4.4842e-44,  0.0000e+00]])

Comment: Worth to mention misleading tutor https://pytorch.org/tutorials/beginner/blitz/tensor_tutorial.html that prints zeros for `torch.empty` which is not true.
Comment: i was trying to create a tensor with tensor.Tensor and getting errors. Please take a look at the following post. https://stackoverflow.com/questions/51160386/unable-to-create-a-tensor-using-torch-tensor
Answer: Quick Answer:
torch.empty() creates tensor with any data type you want, torch.Tensor() only creates tensors of type torch.FloatTensor.
So torch.Tensor() is a special case of torch.empty()
Detailed Answer:
torch.empty() returns a tensor filled with uninitialized data. With arguments you can specify the shape of the tensor, the output tensor, the data type... (see tensor.empty() documentation )
This means you can create a tensor of floats, int... If no data type is specified then the chosen one is your default torch.Tensor type (which is torch.FloatTensor by default and you can change it using torch.set_default_tensor_type())
torch.Tensor() is simply a special case of torch.empty() where the data type is torch.FloatTensor.


How to disable Emacs bidi?

Question: I want to disable Emacs from ever displaying text right-to-left (i.e. ignore Unicode control sequences to change text orientation). How to do it?
Answer: I think @Dan's answer is correct. But do consult the Elisp manual node he pointed to (Bidirectional Display). But consult first the Emacs manual node Bidirectional Editing.
However, I also think that the Emacs maintainer (Eli) has recommended against setting variable bidi-display-reordering to nil. I used to do that, but I switched to this (which I think Eli recommended at some point):
(setq-default bidi-paragraph-direction 'left-to-right)

You might try that instead. Since I've switched to doing this, and it seems to do the job - reduces or removes the (incredible) slowdown I experienced with buffers that display arbitrary Unicode chars. (I don't have a need to edit bidirectional text, but I provide some help commands that can display arbitrary Unicode chars - e.g. library Apropos Unicode (`apu.el).)
You might also want to pose your question to mailing list firstname.lastname@example.com. Eli and others who are experts on this might have better or more up-to-date recommendations or advice. (I'm no authority on bidi etc.)
Comment: The settings doesn't work. I keep seeing text RTL. `bidi-paragraph-direction` only sets the base orientation AFAIU. Once it sees an unicode control sequence it'll use that. I'll try the mailing list. Thanks.
Answer: Set the variable bidi-display-reordering to nil.
Here's the docstring:

Documentation:
Non-nil means reorder bidirectional text for display in the visual order.
Setting this to nil is intended for use in debugging the display code.
Don't set to nil in normal sessions, as that is not supported.
See also 'bidi-paragraph-direction'; setting that non-nil might
speed up redisplay.

I found out about this variable in
the
Bidirectional display node of the Emacs manual after
doing a web search for "emacs bidi".
Comment: It doesn't work. Open file with RTL text and I still see the text RTL.

How to disable Emacs bidi?


Interpreting my residual plots

Question: I am trying to interpret these 2 residual vs fitted value plots if anyone can help. I was reading about a cone like structure (heteroskedasticity) but am unsure if this is the case in the first one. Obviously this isnt great but i cant pinpoint what its telling me. The same in the second plot, this is really bad, i think it's saying that my upper and lower values are poor but would be good if someone could confirm.
1

2
Comment: The second plot indicates that your model fails to capture some non-linearity resp. you are missing predictors (such as a squared term). The first plot is indeed an obvious case of heteroskedasticity. Both plots look like they result from simulated data. I show similar plots if I give an *Introduction to regression* lecture.
Answer: The plots indicate that the model suffers from heteroscedasticity. Generally, any systematic patterns (like a cone shape in the first plot or an inverted-U shape pattern in the second plot) may indicate the presence of heteroscedasticity. The error variance does not seem to be constant, meaning your regression results may not be reliable.
But, it's better not to rely on just graphs. You should try formal tests of heteroscedasticity to make sure.
If you find that heteroscedasticity exists (using formal tests), try applying Robust Standard Errors in your regression model. Then, compare its results with your original model. If the significance of variables does not change, heteroscedasticity is not a serious problem in your model. But if variable significance changes, you cannot rely on your model.
Comment: I would actually argue in common with Faraway that tests can be a bit too wooden, and that graphical methods are better. No doubt there is some scholarly difference of opinion on this matter.
Comment: Thanks. Would the second one also show a non linearity, or is that what causes heteroscedasticity here?
Comment: Every test has its shortcomings of course. In practice, I would say that it is best to supplement with both. Do not rely on just graphs or any one test. In any case, reporting Robust Standard Errors is always a good practice in regressions.
Comment: Checking the actual cause of heteroscedasticity will need a further examination of the data/variables. It is possible that you may be excluding some important variables from your regression or due to the effect of outliers in the data. Or, it might just be the nature of your variable. It will depend on the variables involved and their behaviour.
Comment: A formal test of heteroscedasticity will either fail to identify it or will confirm what is visually obvious, leaving one no better off for the effort.  The graph shows *how* the residuals vary.  Associated with such a graph are derived graphs, such as the spread-vs-level plot, that will reveal *what can be done to alleviate the problem.*  It is in this sense that one can effectively go beyond "just" relying on graphs.

Interpreting my residual plots


SSIS Blank Int Flat File Fail on Load

Question: I have an SSIS package I am using to load a Fixed Width flat file. I have put in all the column lengths and have two packages against similar files working correctly. The third however keeps throwing the following error:
<code>[Source 1 [16860]] Error: Data conversion failed. The data conversion for column "Line Number"
returned status value 2 and status text "The value could not be converted because of a
potential loss of data.".

[Source 1 [16860]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.
The "output column "Line Number" (16957)" failed because error code 0xC0209084
occurred, and the error row disposition on "output column "Line Number" (16957)"
specifies failure on error. An error occurred on the specified object of the specified
component.  There may be error messages posted before this with more information about
the failure.
</code>
After doing some testing this happens for any column I have the is using the DT_I4 Data Type and has a blank in the column. I was going to try using a derived column, but this seems to fail for some of the columns even if I change them to a string data type to handle the blank as a NULL and then do a conversion to an INT later in the data flow.
In the source and the destination task I have the Retain NULL values checkbox ticked however this hasn't changed anything.
Any suggestions on handling this error where INT seems to fail at converting a blank to a NULL?
Answer: DT_I4 maps to a four byte signed integer in SSIS.
You were on the right track with your derived column. You just need to add the right expression.
You can try this expression:
<code>ISNULL([Line Number]) ? "0":[Line Number]
</code>
This link may also be of use - see the postcode column in the example
http://www.bidn.com/blogs/DonnyJohns/ssas/1919/handling-null-or-implied-null-values-in-an-ssis-derived-column
Answer: I ended up using the approach from this blog post:
http://www.proactivespeaks.com/2012/04/02/ssis-transform-all-string-columns-in-a-data-flow-stream/
to handle all of the null and blank columns via a script task and data conversion.

SSIS Blank Int Flat File Fail on Load


Is there a word for the other party when you do not meet your agreements?

Question: Is there a word for the other party when you do not meet your agreements?
I would say something like "duped", but I don't want to give the impression it was unfair, let alone planned. I suppose something along the lines of "let down", but snappier and less sympathetic. I would say something like 'jilt', but it's not marriage specific.
Comment: A verb then? Are you looking for a word whose meaning is specific to this, because *fail* is probably [the best option](https://www.thesaurus.com/browse/let%20down). Also are you looking for something formal/literary or colloquial ("You screwed me over")?
Comment: I think *jilted* is fine.   It's *stiffed* with regards to money.
Answer: Aggrieved:

wronged, offended, or injured:
He felt himself aggrieved.
Law. deprived of legal rights or claims.

This is not emotionally loaded (except, perhaps, for the association with grief), and doesn't express any culpability towards the other party.
An example quoted on that same page (from here):

Automatically posting your images or video to social media can add to the aggrieved party's distress.

The term 'innocent party' is also used as opposed to the 'defaulting party'. Unless used in combination, this might imply guilt for the other party, though.
Comment: *Aggrieved counterparty*?
Answer: https://corporatefinanceinstitute.com/resources/accounting/reneging/
Reneging refers to a situation where one party goes back on a promise or breaks an agreement or contract that they had previously accepted. Every day, individuals and businesses enter into verbal or written contracts that they are expected to abide by the terms of. However, there are situations when one party may decide to renege on an agreement against the wishes of the other contractual party.
https://en.wiktionary.org/wiki/reneger#:~:text=reneger%20(plural%20renegers),A%20person%20who%20reneges.
Noun
reneger (plural renegers)
A person who reneges.
Comment: I also considered *abrogate* but like *reneged*, *abrogated* is, well, clumsy when the OP wanted "snappy."
Comment: Guess 'snappy' is subjective. Renege is short and sweet, to me. And it doesn't carry obvious judgment. One can renege for good or poor reasons.
Answer: You seem to be asking for an informal verb phrase, judging from your example along the lines of "let down". You could say that the other party is not living up to the terms of the agreement.
The phrase lets the other party know you're not happy with the way things are going because of things they're doing or failing to do, and its informality gives them an opportunity to address the situation by discussing the matter with you, rather than immediately "lawyering up".
P.S. If it's you who's not living up to the agreement, you'd need to indicate the context in which you'd want to use the word or phrase.  Are you explaining your reasons to them or to someone else? Defending your actions? Seeking a rapprochement or compromise?


Macbook Pro keeps ejecting anything I put into the internal optical drive

Question: My hard disk crashed and I need to reinstall Mac OS X. I restart, insert the installation DVD, press c on the keyboard and the dvd ejects. I've tried different DVDs, even CDs. It's a Macbook Pro from march 2008.
Is it broken? Or can it be something more severe like the firewire controller on the motherboard (since I noticed this after my hard drive started to act strangely)? I've ran Apple Hardware Test successfully.
Comment: I'm having a similar issue, but its not every single disc. Just discs I burned on the Macbook itself.
Answer: I had the exact same fault. The drive is faulty and needs to be replaced.
Answer: Just did something that worked for me. After trying to insert a Leopard install DVD several times with all results ending in it being ejected, I lay the laptop so the back of the display side was resting on the floor, resulting in the keyboard side being 90 degrees to the floor. I inserted the DVD downwards into the slot, and it was recognized!
I can't assume that it would be this easy for anyone else, but it worked for me, so you may as well give it a try.
Comment: LOL I just tried the same thing at it worked for me too! strange.
Comment: this worked for me right now... hilarious!
Comment: Yes, but the OP shouldn't have to this every time, right? I'd side with @Bruce on this one.
Answer: You could try using a CD cleaning disc first.  Some people have reported this cures it.
Mine only ejects blank discs.  And it's rather rare for me to burn anyway.
Answer: It seems to be an issue with slot-loading disc drives - I have this problem with two separate machines (an original Macbook Pro, and an iMac G5) - both drives will work with most discs fine, but with others it constantly eject them, as you describe (it's happened with some writable CD/DVD's, the OS X install disc, a game installer DVD etc - no obvious reason or pattern..)
They are both well outside any kind of warranty, and since the iMac is horrible to open up (it seems to be constructed with selotape and tinfoil..), and I rarely use the DVD drive on the laptop, I ended up buying an external USB DVD-burner - which you can buy them for about £30 now..
PPC machines cannot boot of a USB device, but luckily the internal drive would take the OS X install disc fine.. If that fails, you can boot from a secondary harddrive partition, or disc-image, which could be setup from a different machine
Answer: First of all, are you sure you´re doing it with the right timing? This may sound silly, but if you try to insert the DVD to quickly (e.g. at the time your Mac chimes) it will throw it out in the instant - just keep on holding the "c"-key and after a few seconds feed it the DVD.
Also, how exactly did you try different CDs? Are they all bootable?
And lastly: do you have an external Hard Drive? Then you could try booting from it (for instance by cloning the Mac OS X disk onto it).


How can I change tomboy note's background colour?

Question: How to make Tomboy Notes have a different theme that are easier on the eyes like black font over a lightgrey background rather than a darkgrey font over a white background. I have explored Tomboy's preference window, toyed a bit with gnome "appearance" settings, and even tried to tweak the Gtk+ code but nothing seems to work.
Answer: First, it looks like in my desktop setting, I need to restart my X session for widget colours settings could be applied. I could use the $GTK2_RC_FILES environment variable to define the colours profile only for one program, rather than overall.
Second, the text colours (highlight, titles, links, ...) are defined in NoteTag.cs file in the Tomboy sources (InitCommonTags() method). It's not possible to run the rebuilt Tomboy.exe file directly, though: you need to proceed to a "sudo make install" (in /usr/local) first to have all the libraries and resources moved to their expected location.
e.g. use foreground-yellow instead of background-yellow on highlight
tag = new NoteTag ("highlight");
// tag.Background = "yellow"; // commented out
tag.PaletteForeground = ContrastPaletteColor.Yellow; // <- inserted
tag.CanUndo = true;
tag.CanGrow = true;
tag.CanSpellCheck = true;
Add (tag);

Have fun.


Can a field type detect if it's being edited inline in Craft 2.3?

Question: Is there was a way for a field type to detect if it is being instantiated for the inline editor or even the live preview? I am working on some responsive UI's to make Google Maps for Craft work optimally on all screen sizes, but current smaller screens are posing a problem. Obviously media queries are being used, but was also wondering if I could easily detect where the field type was being instantiated and then I could possible add additional classes to my field type wrapper.
Comment: Maybe this would be a good use for the Element Query Polyfill, so that the elements could adapt themselves to the size of their container rather than the viewport? https://github.com/marcj/css-element-queries
Comment: I was already thinking the same thing, but the for sake of knowing I was just wondering if this was technically possible to detect in some way without using a size to determine it. And just to clarify, "viewport" was using in the same way you were using "container". Container is probably better wording for it.
Comment: I think size detection is the better way to do it, Justin. Keep in mind that the Live Preview pane is resizable!
Answer: You could check if the whole request is Live Preview using craft.request.isLivePreview.
Comment: What about the inline editing modal? That was the primary question, the live preview was an additional example of what I was asking since it was conceptually the same thing.
Comment: Oh I see. I misunderstood the question. :-/ still a bit unfamiliar with the plugin side of Craft
Answer: You would do that with JS, at least this is how it is done to the core fields (see MatrixInput.js line 152 ff.).
Just check for the container width of your field and then swap your classes / do your responsive design magic.


How to quit your job in germany

Question: I work in Germany at a tech company, a couple of months ago my boss decided I don't do well and gave me an improvement plan where they can fire me if I don't do better after some time. This decision was very unfair to me, coming right after I had a very stressful personal experience that my manager knew about.
Anyway, I have found a better job now and I would like to quit my company without burning bridges. How can I do it gracefully? Tell him personally and give him a letter? Email? What should I include in it? Are there any special requirements that are in accordance with German law?
Comment: The professional aspects are covered by the question @TymoteuszPaul linked. If there are important legal elements regarding resignations in Germany (I wouldn't be surprised), that could be a valid question on its own but then this should be [edit]ed.
Comment: What exactly are you worried about?
Comment: The link does answer a big part of my question. However, legal elements regarding resignation in Germany is a major concern of mine as well.
Comment: I'm not sure there are any legal elements to quitting a job in a free country. Perhaps you are barred from working in the new company, but that is not what is being asked here. VTC.
Answer: https://karrierebibel.de/kundigungsschreiben-muster/
If you can read german, that's a good site!
The short version:
Do it written. Other forms are permissible, but you have a problem to prove anything in case of misunderstanding. So written is still prefered and also customary.
First, check your resignation deadline. By law, this is 4 weeks to the end or mid of month, but in a lot of IT contracts it's 3 months to the end of month. But, different clauses exists, so read yours carefully.
The example letter uses the phrase "next possible date", but a lot of resignation letters write the concrete date in there.
the resignation needs:

you name
company name
current date
resigning date (again, phrase "next possible date" is permissible)
your signature
the phrase "I hereby resign my contract"

Usualy, a phrase is included to ask for a confirmation of resignation. And also ask for a certificate of employment (Arbeitszeugniss)
If you don't like your resignation deadline, because you want to quit sooner, you can try to talk to your manager beforehand. They might be willing to let you go earlier.
If both sides agree, the deadline can be shortened to as little as both sides agree too. (Even immediatly)
Comment: Yes you need the letter, but no, you do NOT do this just in writing, You do it in a personal meeting with your boss where you verbally tell them and then you hand over the letter as confirmations
Comment: I was more focused on the formal aspect of it, because the linked answer "how to resign gracefully" covers it. But you are totaly right: Talk with your manager.
Comment: The one time Italian bureaucracy is more advanced. Here you just log into your INPS (govt. social security) account, select "job resignation" from the menu, fill in the form and press submit. The company automatically gets notified and there's no chance for crummy "he never gave us the letter" excuses or anything like that.
Of course before doing this you'd usually tell your boss (at least if you're leaving on good terms).
Answer: What I like to do:
I write a letter of resignation. It should read something like
<code> Hiermit kündige ich mein Anstellungsverhältnis fristgercht zum
 <date>, ersatzweise zum nächstmöglichen Termin.
Für die Zusammenarbeit bedanke ich mich herzlich.
</code>
Print and sign. Make a copy four yourself.
The I print a second page:
<code>Hiermit bestätige ich den Erhalt der ordenlichen Kündigung von <name>

Datum: ______
Unterschrift: _____
</code>
Then I hand in the letter personally and let my boss sign the second page as receipt for me.
Comment: The times I have done this, I have also included my job title, when my contract started and who the other party is. "Hiermit kündige ich das zwischen  und mir bestehende Arbeitsverhältnis als  vom  ordentlich und fristgerecht zum , ersatzweise zum nächstmöglichen Termin. Bitte bestätigen Sie mir den Erhalt der Kündigung und das Aufhebungsdatum schriftlich. Bitte stellen Sie ein qualifiziertes Arbeitszeugnis aus" For good form, you also want to say "Für die Zusammenarbeit bedanke ich mich herzlich.".
Comment: @simbabque I would avoid adding unnecessary detail. You can win nothing but you can make more errors. The "Höflichkeitsfloskel" is a good idea though!
Comment: *fristgercht* => fristgerecht

How to quit your job in germany


How to migrate to Git from this setup (svn)

Question: At work we are looking to improve our current way of working and we are thinking Git might be able to solve our problem.
Our current repo is hosted in SVN and looks like this:
MAIN ---trunk
     ---bugfix
CUSTOMER1
     ---trunk
     ---bugfix
CUSTOMER2
     ---trunk
     ---bugfix

Now here comes the joke :) Customer1 and 2 are basicly based on MAIN, however the main project needed customizations and they decided to split them off into 2 branches and rework several shared code of MAIN.
It has come to the point that you cant merge MAIN into customer1 or 2. Because to much code has been overwritten.
When we apply a new feature or bugfix we must manually edit the code of MAIN, customer1, customer2, and EVEN in some cases the bugfix branches seperatly. We are spending 30 min coding a fix and 30 min copy pasting it to the other branches.
Yes we are aware this is a complete wrong way of working, however we want to change this.
I have some decent git knowledge and i know several other projects work like this, look @ chiliproject for example.
Basicly we would like a setup like this maybe:
MAIN --- develop
     --- feature
     --- master
     --- bugfix
    \
     customer1
           --- ...

    \
     customer2

Maybe 3 repositories total, where customer 1 and 2 are based off MAIN. When we apply new code to MAIN we can simply pull it into customer1 and customer2.
Could someone make a suggestion on how we can solve this?
Also i tried adding a remote repo to customer1, the remote beeing MAIN. when i fetch the latest revision i get all diffs from MAIN. Obviously since the code is pretty different at the moment i do not want to merge this. However i would like to pull in future revision1, which contains only a patch to hello.php for example.
Thanks
Comment: Why do you want customer1 and customer2 to be separate repos instead of branches on the MAIN repo? You can easily use branches-of-branches in git.
Comment: Yes you are right. It is nog really a requirement i just thought it would be a good idea ;)
Comment: Can you provide the actual directory layout of the SVN repo? SVN just does copy operations for branches, so it's very flexible, but git treats branching and copying differently, so you need to tell it which copies are really branches.
Comment: Yes you are right. It is nog really a requirement i just thought it would be a good idea ;)
Answer: This little tutorial might help you with migrating: http://git-scm.com/book/en/Git-and-Other-Systems-Migrating-to-Git
Whether what you want/need is possible that remains unknown to me, but still, it might help.
I found it in the official Git website http://git-scm.com/.
Hope this helps. :)
(If this belongs as a comment then I'm sorry, I can't actually post comments in the main question for some reason.)
Comment: If it helps, please remember to upvote my answer, and also to accept it as an answer. That's the best thanks you can give me. :)


Java I/O streams; what are the differences?

Question: java.io has many different I/O streams, (FileInputStream, FileOutputStream, FileReader, FileWriter, BufferedStreams... etc.) and I am confused in determining the differences between them. What are some examples where one stream type is preferred over another, and what are the real differences between them?
Comment: This is probably the most thorough overview of the various streams, Reader's and Writer's in the Java IO API: http://tutorials.jenkov.com/java-io/overview.html It's part of a larger Java IO tutorial covering both byte and charater based streams. It also covers streams that are used for reading and writing raw numeric data, like int's float's etc. It also covers streams used for parsing like the PushbackInputStream and the PushbackReader.
Answer: Streams: one byte at a time. Good for binary data.
Readers/Writers: one character at a time. Good for text data.
Anything "Buffered": many bytes/characters at a time. Good almost all the time.
Comment: Really? The most recent time I checked, I got about a 40% performance drop when switching to a plain FileReader. What are you reading from?
Comment: I disagree that using a buffered stream is good "almost all the time". In fact, it's useless overhead more often than not in my experience.
Answer: When learning Java I made this mental scheme about java.io:
Streams

byte oriented stream (8 bit)
good for binary data such as a Java .class file
good for "machine-oriented" data

Readers/Writers

char (utf-16) oriented stream (16 bit)
good for text such as a Java source
good for "human-oriented" data

Buffered

always useful unless proven otherwise
Answer: This is a big topic!  I would recommend that you begin by reading I/O Streams:

An I/O Stream represents an input
  source or an output destination. A
  stream can represent many different
  kinds of sources and destinations,
  including disk files, devices, other
  programs, and memory arrays.
Streams support many different kinds
  of data, including simple bytes,
  primitive data types, localized
  characters, and objects. Some streams
  simply pass on data; others manipulate
  and transform the data in useful ways.
Answer: Separate each name into words: each capital is a different word.

File Input Stream is to get Input from a File using a Stream.
File Output Stream is to write Output to a File using a Stream

And so on and so forth
As mmyers wrote :

Streams: one byte at a time.
Readers/Writers: one character at a time.
Buffered*: many bytes/characters at a time.
Answer: The specialisations you mention are specific types used to provide a standard interface to a variety of data sources. For example, a FileInputStream and an ObjectInputStream will both implement the InputStream interface, but will operate on Files and Objects respectively.
Answer: Java input and output is defined in terms of an abstract concept called a "stream", which is a sequence of data.
There are 2 kinds of streams.

Byte streams (8 bit bytes) Æ Abstract classes are: InputStream and OutputStream
Character streams (16 bit UNICODE) Æ Abstract classes are: Reader and Writer

java.io.* classes use the decorator design pattern. The decorator design pattern attaches
responsibilities to objects at runtime. Decorators are more flexible than inheritance because the inheritance
attaches responsibility to classes at compile time. The java.io.* classes use the decorator pattern to construct
different combinations of behavior at runtime based on some basic classes.

from the book Java/J2EE Job Interview Companion By K.Arulkumaran & A.Sivayini
Answer: Byte streams are mostly and widely used stream type in java 1.0 for both character and for byte. After java 1.0 it was deprecated and character streams plays a important role. ie., for example
BufferedReader will get the character from the source, and its constructor looks like
BufferedReader(Reader inputReader)..
Here Reader is an abstract class and the once of its concrete classes are InputStreamReader, which will converts bytes into characters and take input from the keyboard(System.in)...
BufferedReader : Contains internal Buffer that will read characters from the stream. Internal counter keeps track of next character to be supplied to the buffer thru read(). InputStreamReader will takes input as bytes and converts internally into characters.


Idiom for two people having two drastically different appraisals of an event

Question: What's an idiom for "two people have two drastically different appraisals of an event they were a part of"?
For example, two people on a date. One thinks it was great and hopes for another, and the other thinks it was terrible.
Comment: One of then was wearing rose-colored glasses.
Comment: Hmm. "History is written by the winners" is the first thing I'm getting... I know there's something better, but it's not coming... +1 for a tricky one.
Comment: They had different **experiences**.
Comment: I think @WeatherVane is right, but "experiences" is a place holder.  They saw two different movies, went on two different dates, or heard two different debates.
Comment: @remarkl that's not a date if they were not at the same event.
Comment: @weathervane  When two people report different takes on the same date, people say "It sounds like they were on two different dates."  After a political debate, someone says "Candidate A sounded brilliant."  I might respond "I think we heard two different debates."  I know we didn't *really* hear two different debates.
Answer: This sounds like an example of the Rashomon effect. From Wikipedia (footnotes omitted):

The Rashomon effect occurs when an event is given contradictory interpretations by the individuals involved. The effect is named after Akira Kurosawa's 1950 film Rashomon, in which a murder is described in four contradictory ways by four witnesses. The term addresses the motives, mechanism and occurrences of the reporting on the circumstance and addresses contested interpretations of events, the existence of disagreements regarding the evidence of events and subjectivity versus objectivity in human perception, memory and reporting.

So for example if A and B go on a date, A might remember that the food was terrific and they were incredibly witty, but then B got increasingly tipsy and there was a weird digression into French art criticism that tanked the whole date; while B remembers that the food violated their dietary restrictions and A kept telling total groaners, but the wine was terrific and there was a fascinating conversation about French art criticism that really made them want to see B again. And the waiter might primarily remember that A and B totally stiffed him on the tip in spite of ordering three appetizers, two desserts, and three bottles of wine.
To address the request for an idiom: The term Rashomon, applied as an adjective to various nouns, has come to be an idiom1 for this kind of encounter. For example (bolding added; other emphasis original):

This turned out to be what I call a Rashomon date, where the perspectives on how it went differ wildly.
  —Kashmir Hill, "My Weird Hobby: Matchmaking Lawyers", Forbes, February 14, 2011

Watergate's Rashomon moment: Fans of All the President's Men . . . may have wondered why the anonymous source then known as Deep Throat didn't simply reveal everything he knew. In telling the story from the perspective of Deep Throat . . . writer-director Peter Landesman helps us understand the G-man's justified paranoia. The film is a thriller, but the current occupant of the White House may find it to be a horror film . . . .
  —Simon Houpt, "The TIFF movies we can't wait to see, from a tiny Matt Damon to two tennis tales", The Globe and Mail, September 8, 2017 (describing the film Mark Felt: The Man Who Brought Down the White House)

Let's face it: We live in a Rashomon reality in which every event is instantly captured from a dozen angles and given at least as many interpretations . . . .
  —Antonio García Martínez, "Journalism isn't dying. It's returning to its roots", Wired, 02.10.19

Perhaps unsurprisingly, the use has picked up quite a bit in US news reports in the past few years.

1 I am taking "idiom" here to mean "an expression whose meaning is not predictable from the usual meanings of its constituent elements" (Dictionary.com), since the usual meaning of something like "Rashomon encounter" would be "an encounter with Rashomon".
Comment: @Kris I've added a few examples of the idiomatic use of *Rashomon*. Hope that helps the OP's use case.
Comment: Good find, but it's not an idiom, it's a straight hard fact.
Answer: one man's meat is another man's poison (TFD)
That is, there is no accounting for tastes.

What one person may consider good, enjoyable, or beneficial may be disliked by someone else.
A: "I really don't understand the appeal of the Harry Potter series. There are so many better books out there!"
  B: "Eh, one man's meat is another man's poison."
  (Farlex Partner Idioms Dictionary © Farlex 2017)

See also:

You may not like something that I like. The phrase, which was first written by the Roman poet Lucretius, was appropriated to refer to any situation where two people disagree over something. The 20th-century literary wit George S. Kauffman's most celebrated pun was "One man's Mede is another man's Persian."
  (Endangered Phrases by Steven D. Price Copyright © 2011 by Steven D. Price)
Answer: I couldn't find anything specific to an 'event' experience, but perhaps you could use:
Different sides of the same coin
Two things that appear different, but have a connection/are related
Answer: They had a difference of opinion(s). TFD

The term is often used to frame such a disagreement as
  a polite one in which people simply differ in their views.
Comment: Similar to "They had their differences."
Answer: In the specific example provided by the OP of two people on a date,this can be referred to as a "he said she said" situation. This is a more specific example of the Rashomon effect, where a couple, usually romantically linked, have significantly different recollections of events.
It's been used to refer to differences in men and women's perceptions of their communications and relationships since at least the 1960s, possibly as far back as the 1940s big band song He Sez She Sez. It's often been used for comic effect in TV and movies.
More recently, the phrase has taken on negative connotations of sexual misconduct or abuse being dismissed, but this is not the meaning I'm referring to.
The phrase can be modified to "he said he said" or "she said she said" for same-gender couples.


What's up with SiO₂ being tetrahedral?

Question: If silicon dioxide tends to form a crystal lattice with four $\ce{O}$'s around a central $\ce{Si}$, why isn't the molecular formula $\ce{SiO4}$ then? I'm confused why it's unique in that its molecular formula doesn't match up with its geometry.
Answer: Every $\boxed{^{14}\textrm{Si}}$ atom is surrounded by 4 $\boxed{^8\textrm{O}}$ atoms.   On the other hand, every $\boxed{^8\textrm{O}}$ atom is surrounded by 2 $\boxed{^{14}\textrm{Si}}$ atoms.
Suppose that the number of $\textrm{Si-O}$ bonds is $n$, then the number of $\boxed{^{14}\textrm{Si}}$ atoms is $n/4$, while the number of $\boxed{^8\textrm{O}}$ atoms is $n/2$.  Therefore you arrive at the formula $\textrm{Si}\textrm{O}_2$.
Answer: The problem you are having with the formula is based on a misunderstanding about how far you can take molecular and structural formulae.
For compounds that form distinct molecules it is often worth writing the molecular formula in a way that helps you understand the structure of the molecule. But this is a convenience not a generalisation that can apply to all possible compounds.
It doesn't apply to $\ce{SiO2}$ because there is no such thing as an silica molecule. Silica, like many other minerals, is a 3D network of bonds with no discrete molecular components. In silica each Silicon is bonded to 4 Oxygens, but each oxygen is shared with two silicons. This gives the $\ce{SiO2}$ formula. This also explains why mineralogy is harder than chemistry.
Answer: As a short answer, chemical formulae are only really meant to show the proportions between different atoms in a compound, and in general they do not carry any information regarding the way the atoms are bonded. In quartz, there are simply two oxygen atoms for each silicon atom, hence $\ce{SiO_2}$.
Comment: @reflexiv First of all, notice that if you accept $\ce{SiO2}$ is the empirical formula, then the "molecular formula" (a misnomer since quartz does not form molecules; it is an [network solid](http://en.wikipedia.org/wiki/Network_covalent_bonding)) cannot be $\ce{SiO4}$, as the latter is not equal to the former times an integer. The following sentence from the Wikipedia article for quartz may also help: "[Quartz] is made up of a continuous framework of $\ce{SiO4}$ silicon–oxygen tetrahedra, with each oxygen being shared between two tetrahedra, giving an overall formula $\ce{SiO2}$."
Comment: Your answer appears to describe the _empirical formula_, the simplest whole number ratio of atoms. But not the _molecular formula_, which confusingly for silica is also $\ce{SiO2}$ according to PubChem. My question is getting at why silica does not follow convention with having a $\ce{SiO4}$ _molecular formula_ since that would be a better description of its tetrahedral structure.

Take butane for example. There are 2 carbons for every 5 hydrogens so its empirical formula is $\ce{C2H5}$. But its molecular formula is $\ce{C4H10}$ since that describes its actual structure.
Comment: Structure of one molecule that is. Is there not 4 oxygen atoms in one molecule of silica? If not, then why is it tetrahedral? I was taught that the molecular geometry is derived from the molecular formula, at least that's what we use all the time in class. Are you saying molecular formula can't be used across the board like this? Are there are other exceptions?
Comment: Also, I reiterate that molecular formulae do not in general carry structural information. You may know the structure of simple molecules from their formula, such as for $\ce{NH3}$, $\ce{H2SO4}$ or $\ce{IF5}$, but you may be hard-pressed to figure out that by $\ce{C_{14}H_{12}O2}$ I am referring to [biphenyl-4-ylacetic acid](http://en.wikipedia.org/wiki/Felbinac). *Sometimes* we write out formulae in such a way that helps us figure out the structure. Phosphorous *pentoxide* is often written as $\ce{P4O_{10}}$ because the latter contains a hint to the structure of each molecule.
Comment: Similarly, though ethanol and dimethylether are funcional isomers and therefore have the same molecular formulae ($\ce{C2H6O}$), we often write $\ce{C2H5OH}$ for ethanol and $\ce{H3COCH3}$ or $\ce{O(CH3)_2}$ for dimethylether. However, this is *not the general case*.
Answer: Because the oxygens are shared with more than one silicon,so in large crystal structure the ratio of silicon to oxygens will be 1:2 not 1:4
Answer: As one oxygen is not wholely solely with one silicon atom but it is bonded with two silicon atoms thus contribution of one oxygen is  1/2 towards one SiO2 molecule.. As one silcon is bonded to 4 oxygen atoms so 4(1/2) = 2 thus contribution of oxygen towards silcondioxide is 2 and we have one silicon so formula becomes SiO2.

What's up with SiO₂ being tetrahedral?


Can independent variables with low correlation with dependent variable be significant predictors?

Question: I have eight independent variables and one dependent.  I have run a correlation matrix, and 5 of them have a low correlation with the DV.  I have then run a stepwise multiple regression to see whether any/all of the IVs can predict the DV.  The regression showed that only two IVs can predict the DV (can only account for about 20% of the variance though), and SPSS removed the rest from the model.  My supervisor reckons that I have not run the regression correctly, as due to the strength of the correlations, I should have found more predictors in the regression model. But the correlations were tiny, so my question is: if IVs and the DV hardly correlate, can IVs still be good predictors of the DV?
Comment: Your title and contents show some confusion between the terms "dependent" and "independent". Please check that my edit preserves your intended meaning. The fact that people get confused about which is which strengthens the case for more evocative terminology, such as "response" or "outcome" rather than "dependent variable". Finally on abbreviations note that for many people "IV" means **instrumental variable**.
Comment: Yes, it's possible. One reason is high sample size. Another reason is confounding: the main independent variable may show a low correlation with the depedent because it is counfounded by another independent variable. Once that confounder is added to the model, it can make the original independent variable change from not predictive to predictive (or predictive to not predictive, depending on the types of confounding.) Regression will fully agree with all correlation tests only when all independent variables are uncorrelated, that nearly never happens.
Comment: If tempted to use stepwise, reach for Frank Harrell, _Regression modeling strategies_ Springer, NY, 2001 as an antidote. He's active on this site and likely to shoot rockets if he hears the word "stepwise".
Comment: Saying a step-wise regression "showed that only two IV can predict the DV" suggests you don't understand how it works. If two IVs are strongly correlated, & either predicts the DV about equally well, a stepwise procedure can remove one quite arbitrarily. What's the problem with using the full 8-IV model?
Comment: The weaker your grasp of statistics, the less you ought to be messing about with variable selection procedures. If your goal's to examine how each IV relates to the DV after controlling for the others, that's exactly what the coefficient estimates (with their confidence intervals) from the full model are telling you. Looking at variance inflation factors alongside indicates how correlations between IVs are contributing to the uncertainty. Use a cross-validated or adjusted coefficient of determination, $R^2$, to assess the predictive capability of the whole model & to check for over-fitting.
Comment: @Nick: If people use step-wise after finding the full model over-fits & then confirm that it's improved matters, I'm not inclined to "shoot rockets", but it worries me when they seem to use it for no reason at all without checking anything.
Comment: @Scorchi Here as almost everywhere else I tend to agree with you. But a 8-predictor fit carefully examined usually allows judicious choice of a simpler model without invoking any of the stepwise machinery. I wouldn't delegate a choice that should be sensitive to the underlying science to a program.
Comment: @Nick: I agree entirely; it's that judicious examination I'm recommending - of the full model before the stepwise procedure has mutilated it for its own inscrutable reasons, & in ignorance of the scientific or other considerations that might militate for a simpler model in this particular case.
Comment: Scortchi - my grasp on everything stats related is greatly lacking :(  None of the IVs are strongly correlated either with each other, or with the DV. I did put all 8 IVs into the stepwise regression analysis, and it excluded all the but two of the DVs (which indicates that they are not sig predictors?). T
Answer: With a correlation matrix, you are examining unconditional (crude) associations between your variables. With a regression model, you are examining the joint associations of your IVs with your DVs, thus looking at conditional associations (for each IV, its association with the DV conditional on the other IVs). Depending on the structure of your data, these two can yield very different, even contrary results.
Answer: Coincidentally I was just looking at an example that I had created earlier to show similar concepts (actually to show one of the problems with stepwise regression).  Here is R code to create and analyze a simulated dataset:
<code>set.seed(1)
x1 <- rnorm(25)
x2 <- rnorm(25, x1)
y <- x1-x2 + rnorm(25)
pairs( cbind(y,x1,x2) )    # Relevant results of each following line appear below...
cor( cbind(y,x1,x2) )      # rx1y  =   .08      rx2y = -.26      rx1x2 = .79
summary(lm(y~x1))          # t(23) =   .39         p = .70
summary(lm(y~x2))          # t(23) = -1.28         p = .21
summary(lm(y~x1+x2))       # t(22) =  2.54, -2.88  p = .02, .01 (for x1 & x2, respectively)
</code>
The correlations and simple linear regressions show low (not statistically significant) relationships between $y$ and each of the $x$ variables.  But $y$ was defined as a function of both $x$s, and the multiple regression shows both as significant predictors.
Answer: Your question would be easier to answer if we could see quantitative detail from your software output and ideally have a sight of the data too.
What is "low correlation", in particular? What significance level are you using? Are there built-in relationships between predictors that result in SPSS dropping some?
Note that we have no scope for judging whether you used the best or most appropriate syntax for your purpose, as you don't state exactly what you did.
In broad terms, low correlations between predictors and outcomes imply that regression may be disappointing in much the same way that you need chocolate to make chocolate cake. Give us more detail, and you should get a better answer.
Also in broad terms, the disappointment of your supervisor doesn't imply that you did the wrong thing. If your supervisor knows less statistics than you do, you need to seek advice and support from other people in your institution.
Comment: As @miura rightly emphasises, funny things can happen, but these results seem perfectly consistent with relatively low $R^2$.
Comment: Thank you everyone. I know this is a bit of a baby question. I have perceived stress as my DV and my IVs are Locus of Control (with 3 subscales), Social Support, Coping Self Efficacy (3 subscales) and Emotional Intelligence (these all relate to self report questionnaires) and i want to know how/whether the DVs are able to predict perceived stress. I looked at correlations between all variables, they are all mostly below .40, significance level is .001. I ran a Pearsons correlation first to see if the DVs correlate with perceived stress, then the regression to see if they can predict stress.