Swordsman in the year 3000?

Question: What non-Frank Herbert explanation is there for training solders in the use of slashing or stabbing weapons in an age of hand held laser projectile weapons?
Comment: do you have something, that can reliably protect you from these weapons?
Comment: Appears to be duplicate of https://worldbuilding.stackexchange.com/questions/3358/what-are-the-enabling-factors-for-melee-combat-in-modern-or-future-settings and https://worldbuilding.stackexchange.com/questions/49194/future-soldiers-using-musket-like-weapons
Comment: World war 3 happened.
Answer:
Technology fails sometimes --- be prepared for when you can't hide behind a random storage case and shoot at your enemy like a coward!
Your enemy won't always be content to hide behind random storage containers fifteen yards away from you, trying to plink you with their own lazer guns --- some may be creeping along the service conduits above your position, only to drop down behind you! Others may phase-shift right in front of you! Some's armour or even skin might eat your weak little lazer pellets for lunch as they come charging towards your position! You'll need something sharp and pointy for close in work.
Some technology is just too finicky to be playing at Okay Corral --- just like shooting a lead bullet inside an airplane is a dumb idea, so might shooting  a lazer gun inside a shuttle craft or on the bridge of a Starmada destroyer. Lots of computer & display terminals, input devices and so forth that took the IT guys ages and ages to cobble together, and you want to punch all that work full of lazer pellets!
The sword is simply a more elegant weapon, a weapon of flowing motion and graceful warriors caught up in the Dance of Death, struggling to be the one remaining to bow at the end of the set.
Comment: @DanClarke, unless there's something unusual about the swords, your space marines are more likely to be armed with maces or hammers (or crowbars) for hard targets.
Comment: Rondel daggers by all means. It would be truly unfortunate to come to a corridor fight armed with a zweihänder...

  similarly to what happened, for instance, to Stewart in Kidnapped by R.L.Stevenson: `"I must stick to the point," he said, shaking his head; "and that's a pity, too. It doesn't set my genius, which is all for the upper guard.[...]`
Comment: I'll second this list. Especially the part about avoiding shoot outs in a spaceship.
Putting a few platoons in fast, mobile power armour, give them a flechette gun for soft targets, a sword for hard targets, and let them loose either defending or boarding a space ship will quickly become a nasty, dangerous fight. Avoiding damage to critical systems would be critical.
Comment: I could see a variety of melee weapons being used, each one with a special purpose. Considering it's the year 3000, there are a number of tricks that could be put into the sword. Having just the basic weapon when you have the technology to give it surprises would be a waste. Making it electrified and being able to make it blunt or razor sharp in seconds would help with crowd control.
Comment: Right. Also, "swords" come in an amazing variety of lengths, breadths, shapes and sizes. I think a lot of the comments downplaying the sword either as an elite weapon or as a needlessly long and unwieldy one rather miss the mark.I'm thinking of a sword no longer than about a 45cm blade with a good solid handle, kind of like an 1831 artillery sword, perhaps with the brass knuckles of a US1918 trench knife. Good for poking, hacking, bashing and cracking, when all else fails and all depending on the circumstances and skill of the wielder. Not everyone with a sword is a knight, after all!
Answer: Same reason we have bayonets and trench knives. Sometimes you run out of ammo, damage your primary weapon or drop it, and sometimes close quarters and speed require them.
Also stealth reasons, the classic laser beam points straight back to the shooter and may not be immediately lethal depending where you hit and doesn't cause massive bleeding, but chopping off your opponents head is definitely lethal. Slashes may not kill immediately but they don't cauterise the wound as they hit so massive hemorrhaging is just as lethal.
Intimidation, a sword or knife is a very intimidating weapon. If terror is part of your military strategy then a few examples of hacked to pieces bodies would be pretty terrifying.
Comment: The training bill for using edged weapons is actually fairly significant, particularly for weapons which typically account for only a small fraction of battlefield injuries. And having studies swordsmanship myself, the training bill to become proficient is much higher than bayonet or knife fighting.
Comment: @Thucydides Yep, sword would be a poor choice, stabbing weapons like knives are better. But a sword is much more intimidating and still in use today. Every soldier in modern armies has a knife as far as I know. Training can be minimal. Sword is a prestige weapon.
Comment: I think it would come down to how frequently does a melee weapon need to used and why it's used.
Regular troops getting knife training makes sense, why waste time on a sword when they won't need it. But if you have space marines regularly boarding ships or space stations and using intimidation as much as lethal force to take control, swords would be useful. Pirates or smugglers might think they can get the jump on an armoured opponent with a knife by using numbers, but a sword, as Kilisi said, might make make them decide that begging a judge for mercy is a better option.
Comment: In the modern military officers carry swords on parade ("prestige") but no one seriously expects an officer to carry a sword into battle. Soldiers' knives are generally utility knives, and used for a multitude of tasks. To effectively use a weapon of *any* sort effectively, much time needs to be spent on training and practice, a person using a knife without proper training is more likely to be killed or injured. And even people with knives can use better alternatives, Corporal Dipprasad Pun fought Taliban with the tripod of his machine gun when out of ammunition, not his Kukri knife.
Comment: @Thucydides can't understand why the medieval chaps carried swords and knives instead of a tripod shaped gadget... if only they had known. And WW1 and WW2 soldiers wouldn't have needed trenchknives (not a utility tool, it's a killing weapon) Actually I'd prefer a knife for close quarters, and a talavalu or similar rather than a sword if fighting multiple people, but I have no sword training.
Comment: Even in the middle ages, swords evolved, and by the late 1300's, you carried polearms or smashing weapons like maces and hammers into battle because most armour was capable of deflecting sword blows. The brave Ghurka Corporal grabbed the tripod and waded in swinging because he had far more reach and force than he could get with a knife. Swordsmanship is *very* time intensive, and specialized (learning to fight with a katana is far different than a broadsword or a rapier). As for trench knives, they caused only a tiny percentage of battlefield injuries, which is why we don't bother anymore
Comment: @Thucydides I have no idea what you're talking about, and you probably don't either, a knife is the best close quarters combat weapon, and all militaries use them. It only has to save your life once to be worth it.
Comment: I think as a soldier I know what I am talking about, and training to use a knife *effectively* in CQB does take a good deal of training and practice. And if you look at the knives the armed forces of the world issue today, they are *utility* knives. Even bayonets have serrated backs to use as saws and many armies issue ones with  holes in them to use with the scabbard as an improvised wire cutter. In the American Civil War "Swords, sabers, and bayonets were responsible for only a minuscule number of wounds treated by surgeons—no more than 0.4 percent of the total". That has not gone up since.
Comment: Knife fighting takes training, stabbing someone to death doesn't, it happens all the time from housewives to gang members.
Answer: 1) It's dangerous to use the kinds of weapons you are talking about because science. For the same reasons you would not use a flame weapon at a gas station. It's not conducive to anyone's survival.
2) Shortages, both regulatory and/or apocalyptic in nature. There might be hand laser weapons, but getting your hands on the power-packs is very difficult. You can jury rig something, but it isn't going to last. Best save it for emergencies.
3) Security Alert!! The second a weapon that's high tech fires, BAM, the feds are there. Security tech locks on your position pretty much instantly, trapping you. with a bladed weapon at least there's a chance. This can be a planetwide automated system controlled by an AI, which nobody can do anything about, so they have to work around it. Or it can be something that's developed for the battlefield, a lock targeting system that makes laser weapons a bad, bad idea.
4) Treaties. Hear me out here. Mutually assured destruction...While there are laser weapons, an agreement is in place. Anyone uses them, they become the bad guys and alliances are formed against them.
5) War is actually thought of as a game, by those higher up. It's a gentleman's agreement to use blades.
6) Lazer guns destroy the value of something that needs captured. Might be tech, might be something else (like nature). Along the lines of delicate tech being around like in elemtilas' answer.
Answer: Because they are better in some situations?
Basically you start by giving the laser weapons some major drawback that makes them useless in some situations. And yes, this is the generic form of the Frank Herbert explanation. But it can't be really helped since the military will not waste time training soldiers to use something unless it superior to their other weapons in a some situations.
Fortunately we can narrow it down some by noting that people would still have access to the guns we currently have, so apart from some speculative superiority over hypothetical future weapons of unknown properties they also need to outperform weapons we know about and understand.
There are some obvious things mostly already mentioned by others. No need for ammunition, can be used silently and without a visible flash, harder to break thru abuse or lack of maintenance, training itself might be beneficial, vastly reduced chance of collateral damage and some defensive ability without damage to opponent.
Unfortunately non of these really justify a sword. Any melee weapon can do. In practice a knife is more convenient to carry and if it can be affixed to your laser rifle works as a spear which is superior to a sword in most cases where a knife is not. An axe is also possibility as it is a useful tool in wooded areas.
As also already noted by others it is practical to use hardware you are already carrying anyway as a melee weapon. A laser rifle can be robust enough to use as a club. A shovel (or a tripod) can be used as an improvised club or even mace. Training soldiers in such use would generally be more useful than adding another weapon for them to carry.
And if your army is aggressive about melee training to increase aggression or physical conditioning they can actually modify their hardware to be more usable.
If you train soldiers to use the rifle as a basis for a melee weapon, you will design the rifle to be robust enough to handle that. You will add the hand grips to make the rifle easy to swing as a mace. Attachment to affix a blade so you get a short spear is cheap and obvious. But a weapon might have striking surface for swung use as well. Bit of hardening would make a good mace. Affix a cutting blade and you have an axe. Albeit not a particularly good one.
Typically, Ithink the main point of going that far would be to condition to soldiers to keep fighting even when they cannot use their rifle.
Answer: Ace Levy:
Sir, I don't understand. What good's a knife in a nuke fight? All you have to do is press a button, sir.
Career Sergeant Zim:
Put your hand on that wall, trooper. PUT YOUR HAND ON THAT WALL!
Career Sergeant Zim:
The enemy cannot press a button if you have disabled his hand. Medic!
starship troopers.
https://www.youtube.com/watch?v=B203twyaMfM

Swordsman in the year 3000?


How to create wallet using eosjs or RPC call

Question: I want to perform
cleos create wallet -n <wallet_name>

using an RPC call or any predefined library like eosjs.
Please Help...
EOS version : 1.2.0
Answer: I found the answer by trying various things posting this answer as a help.
So everyone can view this.
Ok that is true that wallet_plugin has been removed from the nodeos but kleosd is still using that and we can still perform any rpc of wallet operations suppose your keosd is running on the port 9999 and you want to create a wallet using rpc call you can do that by following operation using curl.
curl -X POST   http://127.0.0.1:9999/v1/wallet/create   -H 'Cache-Control: no-cache'   -H 'Content-Type: application/json'  -d '"mywallet"'

For reference you can use https://developers.eos.io/eosio-nodeos/v1.1.0/reference
Answer: OP found their answer, but to give a slightly different answer, keosd was never recommended for accepting external connections. Using it locally is fine, but once you start making API calls from a machine external to your local network, things can get ugly, as keosd wasn't designed with this type of security in mind. In other words, your keys may be vulnerable if keosd can be queried from outside.
All keosd does is managing keys, which you should be able to do with eosjs and a browser application like Scatter. Depending on your usecase, consider that you may not want the RPC calls and there may be a reason why it's not documented.
Answer: You can use Wallet RPC API for any operation that has to be done on a wallet or using the wallet. Please check [https://developers.eos.io/keosd/reference][1]  documentation for more details. But keep in mind you have to run keosd locally for using these RPC API's. For wallet operations, we can't use external API. keosd can only communicate through your local system. Read keosd documentation in https://developers.eos.io/keosd/docs/


Does a person with a rugged look and bold voice not fail in a fight?

Question: Does a person with a rugged look and bold voice not fail in a fight?
Comment: In short, no. That only works in the movies. In real life, if someone wants to fight you, they need very little reason to start. Your defiance will invite the fight to happen. So you need to be able to back it up by being ready to fight.
Comment: I'm not quite sure what you are asking, but its safe to say that appearance is only loosely correlated with ability to fight.
Answer: No. Appearances do not determine who wins (does not fail) in a fight. There are other factors including speed, bravery, cunning, and deception that may determine the outcome.
A famous story where the apparent stronger (rugged with strong voice) fighter loses is the Biblical story of David and Goliath. Goliath is the much larger and stronger individual, but he is killed by David, a smaller, cunning opponent, who slings a stone into Goliath's head. David enters combat without armor or a sword, choosing a staff and sling as his weapons. The expected result of combat between a larger, stronger fighter with superior armor and weapons and a smaller, weaker fighter is that the larger fighter wins. In this case, the smaller fighter prevails using his skill with a projectile.


Was the first full node IP address Satoshi's and how did shim hide it?

Question: It is not surprising that people assume Satoshi used ToR when scouring the internets however if my understanding is correct in order for someone to run a full node they need to provide their IP address so that other peers can connect with them. How did Satoshi manage to run the first full node without disclosing their IP address? Did they setup an anonymous offshore server via anonoymousspeech like they did with reserving the bitcoin.org address?
Comment: That I know of, only Nick Szabo, Hal Finney and a couple other folks interacted directly (online) with Satoshi during these early days in 2008/2009. Assuming Szabo and Finney aren't Satoshi, and that Satoshi didn't trust them, then he probably went through some proxy or VPN to interact with them. This is all speculation though, nobody knows except these guys who were there 10 years ago but they're not talking.
Comment: According to the book Digital Gold, when Hal Finney first connected to the network (Jan 10, 2009), there were two other nodes running with both IPs pointing to some place in California (probably belonging to Satoshi). This is the exposed IP you might be asking, but there is a very high likelihood that Satoshi used a VPN service to mask the real IP addresses.
Comment: Pointing to a VPN service that would then redirect the traffic to his real IP would again leave a trail no?
Answer: It's possible, perhaps even probable, that Satoshi did actually reveal their node's IP address.
The day after Satoshi published the first version of the Bitcoin client, Hal Finney sent a public email to Satoshi describing an issue that he ran into while running the client. Importantly, this email contained Hal's debug.log file which contained the full response that Hal's node received from the IRC server seeder that was in use at that time. This response contains the IP address of nodes that could be connected to.
From that debug.log, we can see that there were only 2 nodes that were announced by the IRC server. One of these nodes is Hal's as the log states. That IP was also known to belong to Hal. Given the timing, it's safe to assume that the other IP is of Satoshi's node.
Of course, it's possible that this IP is that of a VPN or a hosted server. However, looking up the information for this IP reveals that it is allocated to a Covad which is a regional broadband ISP. This suggests that the node was not hosted in a data center or using a VPN as they would likely have an ISP known to have data centers or provide bandwidth to data centers.
Comment: Then can't Covad trace back who this IP address was registered to? Although if I was Satoshi I would probably have stolen one of my neighbors' IPs by hacking a low security (WEP) router or maybe use a public place IP.


Quasi-isometric embeddings of the mapping class group into the Teichmuller space

Question: Does there exist a quasi-isometric embedding
$$MCG(S) \to (\mathrm{Teich}(S), d)$$
for $d$ any "known" distance on the Teichmuller space (i.e. Teichmuller, Weil-Petersson, Thurston...) ?
Comment: I believe the answer is no for Teichmuller and Weil-Petersson: I think this follows from work of Minsky, Rafi, and Brock, who found combinatorial models for measuring distance in the mapping class group, Teichmuller metric, and Weil-Petersson metric respectively.
Comment: This is not exactly the answer you want but you can find some related results here
Comment: @Ian: I am not sure, since a qi embedding might be unrelated to the standard action of the mcg.
Comment: Ok, good point Misha! I implicitly assumed he was looking for an equivariant quasi-isometry, so whether the orbit of a point under the mcg is a q.i. embedding.
Answer: A result of Behrstock and Minsky (cf. Hamenstadt too) implies that the rank of mapping class groups is the maximal rank of abelian subgroups, which is $3g+p-3$ for a connected hyperbolic surface of genus $g$ with $p$ boundary components. The rank of Teichmuller space with respect to the Weil-Petersson metric they show is $\lfloor \frac{3g+p-2}{2}\rfloor < 3g-3+p$, so there is no q.i. embedding of the mapping class group to Teichmuller space with the Weil-Petersson metric.
On the other hand, Eskin-Masur-Rafi show that the rank of the Teichmuller metric is equal to that of the mapping class group. They point out that the orbit of a point under the mapping class group is not a quasi-isometric embedding. But this leaves open whether there might be a non-equivariant q.i. embedding.


Safe to put Openwrt in DMZ?

Question: I currently have my openwrt router setup 'behind' my fios actiontec router. I am trying to get OpenVPN and having issues. I'm wondering if putting the openwrt router in the DMZ on the fios router would be a good idea? I seem some references to 'double NATing' which I think I now doing. If I put the openwrt router in the DMZ is there any configuration I need to change to make sure it's not 'double NATing'. Basically I'd like to just treat the fios actiontec router as a modem in this case and send all traffic to the openwrt router.
Answer: If you put it into DMZ, it will forward everything to the other router by design. If you are able to turn off DHCP on one of them then let the other handle doling out addresses, then you should be free of any mess. The WRT should handle the firewalling properly. You should be covered.
Comment: Sorry, quick question, why the need to turn off DHCP on one of them? Currently I've disabled wifi etc on the verizon router and connected the openwrt router to it. That is the only thing giving out leases on my network.

Safe to put Openwrt in DMZ?


WordPress REST API - JSON "Rendered" Content Incorrect

Question: i'm working in android application that use wordpress rest api to get blog from website to , i don't have any knowledge about php or wordpress , but i take some time to learn about it , any way my problem is on the json .the content contain paragraphs unknown and i don't know how to solve this problem ,please help
Answer: The content that you are referring to is coming from the Elegant Themes Page Builder plugin on that site.
The page builder uses WordPress Shortcodes to render the content on the WordPress site. However, when you use the REST API, the content is pulled from the WordPress database and the shortcodes are not processed/rendered first.
You would need to remove the shortcodes from the returned JSON before it is displayed in your app. You could use something like this to remove the shortcodes before displaying your content in the app:
// Remove Divi/ET Page Builder shortcodes
$content = preg_replace('/\[\/?et_pb.*?\]/', '', $content);

Comment: +1, but no, the rest api returns what it should return, the post_content, if you are not happy with it you should develop your own end point
Comment: ( post edited) if i try to hide them i will lost youtube video
Comment: Then to need to write a function to parse the YouTube videos too then
Comment: thinks guys it fix by adding the redix on jquery function because i dont have access to wordpress admin dashboard                                                        `content_splited= content.replace(/\[\/?et_pb.*?\]/g,'@');'`
Answer: You can place this code in your themes functions.php file:
function awh_filter_post_json( $data, $post, $context ) {
    $data = json_encode($data); //convert array or object to JSON string
    $data = preg_replace('/\[\/?et_pb.*?\]/', '', $data); //remove shortcodes
    $data = json_decode($data); //convert JSON String to array or object
    return $data;
}

add_filter( 'rest_prepare_post', 'awh_filter_post_json', 10, 3 );

Answer: Thanks to the other answers, I solved it like this (in my WP theme functions.php file) :
add_filter( 'rest_prepare_post', 'lb_filter_post_content', 11, 3 );

function lb_filter_post_content($data, $post, $context){
    // remove shortcode just on content > rendered
    $data->data["content"]["rendered"] = preg_replace('/\[\/?et_pb.*?\]/', '', $data->data["content"]["rendered"]);
    return $data;
}

PS. The shortcodes with "et_pb" derive from the fact that the Divi theme is used on the WP with its page builder, so I just remove those shortcodes.
I wrote the above in the functions.php of my Divi child-theme.
This solution is good if you want to fix the WP side problem, which is where the problem is generated.


Drupal 6 custom submit function to alter submitted node data

Question: I have written a module that uses hook_form_alter to add a custom submit function to the node form. This function is not intended to remove the original node submit function, it is there simply to alter node data before it is inserted into the database.
The problem is that when I print_r the posted form array from inside my module when a node is added, the array is massive and it seems the posted data repeats numerous times. I need to know, which part(s) of this array I should be altering so that my altered values are inserted into the database.
To expand a little bit, the module works in the following way: My module attaches a custom submit function to the node form.  A user submits a node (containing numerous CCK fields). Some of these fields are left empty.  My custom submit function finds these fields and adds a value to them.  The node is then inserted into the database.
The module and function I am using work perfectly, but I just can't seem to find what part of the submitted array needs to be altered so that the custom data will be inserted by the node module's own submit function.  I would post the array but due to the size, it's probably not advisable, although if anyone would like it I could send it somehow.
Finally, I know there are easier ways of doing similar to what I am trying to achieve but unfortunately this is the only option in the circumstances.
Answer: Apologies for wasting anyone's time, I was looking at the $form array when in fact the submitted values are stored in $form_state['values'].


Is anti-Brahminism a sin according to scriptures?

Question: Is anti-Brahminism in accordance with Hinduism and its scriptures? Is it a sin or is it glorified?
Comment: Today's Brahmins are not the kind of Brahmins who are praised in the scriptures .. so why are u bringing in today's context?
Comment: @Rickross There are still lots of Brahmins who follow scriptures, and so it is still relevant today. Why people keep downvoting this?
Comment: Chill bro.. no exemption for any state, now a days majority Brahmins are doing lot of things never like before thousands of years (alcohol, gambling, xxx etc..)
Comment: @CR241 I'm not talking about those fake Brahmins. I'm talking about learned Brahmins and the like.
Comment: @Ishvaku you should change your question to be more generic like 'Is Anti-Brahmanism in accordance with Hinduism and its scriptures? Is it a sin or is it glorified?' else your question will be considered opinion based as it is stating your particular belief for Tamil Nadu. So, please edit your question if you want your question to stay open.
Comment: @Aby How about I remove the Tamil Nadu reference from the question? I think the title as is seem's fine.
Comment: @Ikshvaku there are still many village places in India and more places especially South India, Tamil Nadu who still follow the cultural heritage from ancient times. Infact South Indians first stood against western beliefs.... Before writing about anything kindly do research and write... Your questions are direct and target.
Answer: Anti-Brahminism is a sin and against the rules of Hindu scripture.
The various Dharma Shastras prescribe various punishments for different types of abuse hurled at Brahmanas.
Verbal abuse:
From Manusmriti:

On [verbally] abusing a Brāhmaṇa the Kṣatriya
  should be fined one hundred; and the Vaiśya one hundred and fifty; or
  two hundred; the Śūdra however deserves immolation.-(267)
"For the Śūdra 'immolation,'—in the form of beating, cutting off the
  tongue, actual death, and so forth, to be adjusted in accordance, with
  the exact nature of the abuse."
If a once-born person [Shudra and below] insults a twice-born one with
  gross abuse, he should suffer the cutting off of his tongue; as he is
  of low origin.—(270)
If he mentions the name and caste of these men with scorn, a burning
  iron nail ten inches long shall be thrust into his mouth.—(271)
If through arrogance, he teaches brāhmaṇas their duty, the king shall
  pour heated oil into his mouth and ears.—(272)

Other Dharma Shastras regarding verbal abuse:

Gautama (12. 1, 8, 10-13).—'A Śūdra who intentionally reviles
  twice-born men, by criminal abuse, or criminally assaults them with
  blows, shall be deprived of the limb with which he has offended.
Yājñavalkya (2.206.207).—'The fine is half for reviling one lower than
  one's self, double, for reviling women and superior persons; thus
  shall the fine be inflicted in accordance with the superiority or
  inferiority of the castes concerned.
Viṣṇu (5.23, 33-35-38).—'If the Śūdra uses abusive language, his
  tongue shall be cut off;
Āpastamba (2.27.14).—'The tongue of a Śūdra who speaks evil of a
  virtuous person, belonging to one of the first three castes, shall be
  cut out.'
Bṛhaspāti (20.6-11).—The Śūdra shall be compelled to pay the fine of
  the first amercement for abusing a Vaiśya; the middle amercement for
  abusing a Kṣatriya 5 and the highest amercement for abusing a
  Brāhmaṇa.'

Physical assault:
From Manusmriti:

With whatever limb the low-born man hurts a superior person, every
  such limb of his shall be cut off; this is the teaching of Manu.—(279)
If he raises his hand or a stick, he should have his hand cut off; if
  he strikes in anger with the foot, his foot shall be cut off.—(280)
If, out of arrogance, he spits, the king should have his two lips cut
  off; if he urinates, then his penis; and if he breaks wind, his
  anus.—(282)    If he catches hold of the hair, the king shall
  unhesitatingly have his hands out off; also if he lays hold of the
  feet, the beard, the neck, or the scrotum.—(283)

Should politicians support Brahmins or be against them? According to scriptures, the politicians are obligated to support Brahmins:

Manu 9.313 - Even when fallen in the deepest distress, the king shall
  not provoke the Brāhmaṇas; for if provoked, they would ruin him, along
  with his army and conveyances.
Manu 9.317 - Learned or unlearned, the Brāhmaṇa is a great divinity;
  just as consecrated or unconsecrated, the fire is a great divinity.
Manu 9.319 - Similarly even though they betake themselves to all sorts
  of undesirable acts, yet Brāhmaṇas should be honoured in every
  way; for they are the greatest divinity.
Manu 9.322 - The Kṣatriya flourishes not without the Brāhmaṇa; the
  Brāhmaṇa prospers not without the Kṣatriya; the Brāhmaṇa and the
  Kṣatriya, when united, prosper here as also in the other world.
Gautama (11.14).—'It is declared in the Veda—"Kṣatriyas, who are
  assisted by Brāhmaṇas, prosper and do not fall into distress."'
Vaśiṣṭha (19.4).—'It is declared in the Veda—"A realm where a Brāhmaṇa
  is appointed domestic priest prospers."'

But this doesn't mean that Brahmanas shouldn't be punished, for the commentator Medhatithi says:

When they betake themselves to forbidden acts, they shall be dealt and
  punished according to law, gently, and not attacked with force, in the
  manner of other castes.

Also Narada:

Nārada (18.12).—'On account of their dignity and sanctity, it is not
  permitted to either advise or rebuke a King or a Brāhmaṇa, unless they
  swerve from the path of duty.'

By "advise" it actually means "criticize," since kings have advisers.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/88829/discussion-on-answer-by-ikshvaku-is-anti-brahminism-a-sin-according-to-scripture).


Could a pressure relief valve that drains up cause my water heater to explode?

Question: In the case of a big pressure build up, could this "hypothetical pressure relief valve" piping installation indicated in black below cause my water heater to explode? What could be the consequences of having the hypothetical piping installation?
Comment: Pressure relief valves are made to prevent boom boom.  Do think they are required to be installed, no matter what you think.
Comment: Why are you trying to route what ultimately is a drain *against* gravity?
Comment: Note that in many jurisdictions external expansion tanks are required parts to water heaters these days in addition to a pressure relief valve. Expansion tanks help prevent your water heater from going boom more than a relief valve that goes up.
Answer: A pressure relief valve does (or should) what it says: relieve pressure. That is exactly what you want - in the unlikely but non-zero event that a water heater overheats or has some other problem causing the water inside to get very hot (which leads to high pressure) or to get to much higher than normal pressure, the valve opens to relieve the pressure.
Normally I see the pipe from a pressure relief valve going down. It looks like the pipe in the picture goes sideways and then down, presumably to a drain outside.
If I understand the drawing correctly, the hypothetical part here is not "existence of the valve" but rather "pipe going straight up from the valve." That is not a good idea. Under normal circumstances, water pressure can handle any direction. But in the case of an over-temperature/over-pressure situation, you want the water to specifically go out the easiest path possible. If the pressure relief valve piping extends above other pipes, it is quite possible that even after the valve opens, the water will try to exit via other means - the pipes at the top of the water heater - which could lead to burst pipes or other problems.
One extra safety feature that may make sense is a water heater drain pan. This goes underneath your water heater to catch leaks. It is typically required when a water heater is not on the lowest level, but even on the lowest level of your house it is a good idea if there is no floor drain nearby.
Comment: What is the mechanism that ensures the relief valve remains functional? I've never heard of the explosion of domestic water boilers, but it wasn't a rare occurrence for industrial boilers.
Comment: given the small power input it doesn't need a high flow rate of steam or water to keep the tank in the safe zone.
Comment: what mechanism?  periodic testing, like it says on the tag, If the lever can operate the valve then over pressure can too.
Comment: It is insane to me that drain pans are not required by code. They are incredibly cheap and can save you from having to replace your whole floor/subfloor if a leak happens.
Answer: If you run the pipe up hill the pipe will accumulate water in the upwards part and it will leak out around the stem of the valve.
The added ppressure caused by the standing water will not be enough to cause failure of the tank, but if the stem corrodes the valve may become inoperable. (which could be disasterous)
The most likely result will just be an annoying drip.


Is there a way to perform an install of osx from a flash drive?

Question: I have a mac mini that currently has osx 10.3.  I want to upgrade it ultimately to Leopard (10.5).  My problem is that the mini only has a CD drive and 10.4/10.5 seem to only come on DVDs.  Is there a way I can create an install/upgrade disk on a flash drive to perform my install/upgrade?  If there is a way to do it, would a 4GB flash drive work or would I need a larger flash drive?
Answer: My method was to use a freshly reformatted hard drive in an external USB enclosure, because I didn't have a large enough flash drive. It requires about 7.5GB (DVD-DL), so no, a 4GB won't work, but you can pick up an 8GB or use the external like I did. Follow the instructions at macinverse and it goes very quickly.
Comment: So, I actually have a little 120 GB external USB Passport drive.  Would that work as well?  I hope so.
Comment: Yeah, just be prepared to reformat it. In fact when I did, I repartitioned it so that only 8.2GB was visible, since I wasn't sure how picky the OS X installer would be, but I don't think that was necessary.
Answer: I'm betting this is a PowerPC based Mac Mini. I can almost guarantee those that shipped with CD-only drives were not Intel. An easy way to check is to see if you have an IR sensor on the front in the optical drive slot. If it's there, it's Intel, if not, PPC.
If it's PPC, you will probably not be able to use USB for booting this machine. Some PPC computers could boot off USB2, but it's slow and sometimes unreliable.
FireWire would be the best thing to use here. The instructions from maciverse mentioned above will work just fine with a FireWire drive too.


clarify behaviour: collections.defaultdict vs dict.setdefault

Question: dict provides .setdefault(), which will allow you to assign values, of any type, to missing keys on the fly:
>>> d = dict()
>>> d.setdefault('missing_key', [])
[]
>>> d
{'missing_key': []}

Whereas, if you use defaultdict to accomplish the same task, then the default value is generated on demand whenever you try to access or modify a missing key:
>>> from collections import defaultdict
>>> d = defaultdict(list)
>>> d['missing_key']
[]
>>> d
defaultdict(<class 'list'>, {'missing_key': []})

However, the following piece of code implemented with defaultdict raises a KeyError instead of creating the item with default value, {}:
trie = collections.defaultdict(dict)
for word in words:
    t = trie
    for c in word:
        t = t[c]
    t["*"] = word

Using .setdefault() works ok:
trie = {}
for word in words:
    t = trie
    for c in word:
        t = t.setdefault(c, {})
    t["*"] = word

checking before access, works ok too:
trie = {}
for word in words:
    t = trie
    for c in word:
        if c not in t:
           t[c] = {}
        t = t[c]
    t["*"] = word

What am I missing when using collections.defaultdict()?
NB
I am trying to build a Trie structure out of a list of words. For example:
words = ["oath", "pea", "eat", "rain"]
trie = {'o': {'a': {'t': {'h': {'*': 'oath'}}}}, 'p': {'e': {'a': {'*': 'pea'}}}, 'e': {'a': {'t': {'*': 'eat'}}}, 'r': {'a': {'i': {'n': {'*': 'rain'}}}}}

Comment: In my first example, if word = "oath", it fails at `a`...it doesn't get to `t["*"]`. Could you elaborate how the, `t = t[c]`, assignment changes it to a regular `dict`?
Answer: In your first example, when you do t = t[c], t becomes a regular empty dict (because that's what you tell the defaultdict to generate in the definition of trie).
Let's run through the loop with your example word "oath":
1) t = trie, word = "oath"
2) c = "o"
3) t = t[c]
  3.1) evaluation of t[c] # "o" is not in trie, so trie generates an empty dict at key "o" and returns it to you
  3.2) assignment to t -> t is now the empty dict. If you were to run (t is trie["o"]), it would evaluate to True after this line
4) c = "a"
5) t = t[c]
  5.1) Evaluation of t[c] -> "a" is not in the dict t. This is a regular dict, raise KeyError.

Unfortunately, I can't think of a way to use defaultdict here (but Marius could, see this answer), because of the arbitrary nesting of a Trie. You'd need to define the trie as a defaultdict that, in case of missing key, generates a default dict that itself generates a default dict in case of missing key, recursively until maximum depth (which, in principle, is unknown).
IMO, the best way to implement this is with the setdefault as you did in your second example.
Answer: GPhilo's answer is perfectly fine and, indeed, I also believe that setdefault is the proper way of doing it.
However, if one prefers to use the defaultdict, it can be easily achieved like this:
def ddnestedconst():
    """collections.defaultdict nested-ish constructor."""
    return collections.defaultdict(ddnestedconst)

# ...

trie = collections.defaultdict(ddnestedconst)
# or, being the same:
#trie = ddnestedconst()

for word in words:
    t = trie
    for c in word:
        t = t[c]
    t["*"] = word

May feel a little bit strange at first, but I find it perfectly readable and semantically accurate.
Reached that point, you may also prefer to create a new class altogether, inspired by defaultdict, but including all the semantics and specific behaviour that you expect from it.
Comment: I was also thinking of something towards this direction, though I wasn't sure it was feasible. Thanks for adding to my answer (and showing me how to implement something new)!


Loft Beds w/ Desks - Mattress Support?

Question: I am building two loft beds with desks under them for my 6 and 8 year olds. My question is will the mattress hold safely? It is 3/4" plywood (75" x 55") with 3x 1" x 4" slats under supported by 2" x 6" railings and 2" x 6" under the railings. I am not a professional woodworker so I am sorry if some terms are not correct lol.
Comment: Tried websearching and comparing your design against the many plans that have been posted? Looks fine to me but I never built one, just had friends who did so.
Comment: Generally I wouldn't be concerned however with it being beds for my young children I just want to make sure its sturdy because I know they will be bouncing around on it and everything, mainly just looking for a second opinion from someone who knows more then me lol. Thanks !
Answer: Plywood:
You want plywood that's sheathing. For 3/4" (or 23/32") it needs a span rating of 48/24. Plywood is what's called "anisotropic," where how you orient it determines its strength and stiffness. When constructing the base for a bed it's tempting to cut a little off the sheet's side and to cut a little off the sheet's end, but that typically will orient the sheet's strength axis incorrectly. This mistake would result in a strength and stiffness of 29% and 15%, respectively (computed from Table M9.2-1 of the 48/24 spec). See item 11 at https://osb.westfraser.com/blog/whats-on-your-apa-grade-stamp/ for an example grade stamp that includes strength axis orientation.
Orienting the sheathing's strength axis to span across the bed's side supports, the sheathing is good for 29.5 psf:
(29.5psf)(1ft)(55in)²(1ft/12in)/8 = 930.#-in,
where 930.#-in matches a conservative bending strength for the sheathing from Table M9.2-1 of the 48/24 spec. Sleeping rooms under the International Residential Code get designed for 30 psf live load, so the 29.5 psf is great. This all assumes that the strength axis has been oriented correctly.
Checking for deflection, I get a deflection under 30 psf live load of 0.68" which is very high for a floor. Such a floor would feel tremendously bouncy. For a 200# person the actual deflection is less than 3/16", where that seems fine.
I would get rid of those 1×4 slats. They're counter productive. Instead install a ledger board along the side of the 2×6 to continuously support the sheathing, and fasten the sheathing down to prevent the ledger from bowing out from under the sheathing.
2×6s:
Each of your 2×6s is a lot like a floor joist spaced at 24" centers. If your 55" was 48" instead, then each 2×6 would be carrying the exact same width of floor. This makes the joist tables from the International Residential Code useful. For a 2×6 supporting 24 inches width of 30 psf live load, the worst maximum length is 6'-5" for #3 Southern Pine. Your 6'-3" length satisfies this worst-case maximum.
In case some kid hangs on the 2×6, I compute a maximum midspan load for a 6'-3" #3 Southern Pine 2×6 as 262#. If you use those beefy 2x6 rails, then you can double that 262# by structurally linking the framing and the rail.
Stability:
An elevated bed needs lateral support to prevent it from toppling. For a free standing bed this could be diagonal bracing that would interfere with the space below the bed. The easiest solution is to fasten the bed to wall studs. If it's in a corner, then attach to both walls.
If it only has one wall, then the fasteners joining the sheathing to the frame become important. Without the sheathing, the two posts interior from the wall are somewhat free to wobble parallel to the supporting wall. The fasteners joining the sheathing to the frame will restrain this wobbling. A fastener every 6" to 8" would be wise.
Addendum:
I see that there's a lot of plywood waste from cutting 55" widths from 96" sheets of plywood. The bending strength of 1×4s is going to be totally inadequate to support the weight without the sheathing's bending strength. A roof's live load of 20 psf seems like a decent lower bound to fix for the bed to support. Orienting 2×4s flat, the 20 psf load plus 3 psf weight for materials results in a 17.9" maximum spacing of 2×4s below the plywood if the plywood doesn't span the full 55" width.
If you're building the stairs from the drawing, however, then I suppose that would be the spot to use the plywood waste.
Comment: Wow, that is very in depth and somewhat confusing but between me and Google ill figure out the terms. Thank you for the explanation. I actually had to cut the plywood because of its size so it's 2 pieces 55x37.5. I knew I would need something under the plywood to support it from bowing, so 2x4 would be a better bet then the 1x4 (the slats are actually 2x6 I am at work so I had to check the receipt lol. The beds will be in the corner of the room so fastening them to the wall is fine. Yes most of the scrap wood will be used for stairs / drawers. Thanks again!
Comment: @Zatellia, if your plywood is 48/24 rated, then it alone is more than adequate. It's 29.5 psf capacity is very high for a bed, where I believe that 20 psf is a good design target. I wrote the "strength axis" stuff more for others that find this question with a 38" twin mattress in mind. Your 55" width forced you to cut the plywood so that it's probably oriented correctly for strength and stiffness. There exists plywood with its strength axis aligned to the short side, but that's very unusual.

Loft Beds w/ Desks - Mattress Support?


Which UUID/GUID generator to use with JBoss

Question: I want to generate unique Ids as a key for multiple physically separated databases.
I use JBoss and I wonder which implemetation/library is the way to go. I know java.util.UUID would be simple and probably fine. I'd just like to know if this is the way to go in JBoss.
Any hints ?
Answer: Looks like there is an UUID generator in JBoss that can be called using this code:
   InitialContext ctx = new InitialContext();
   KeyGeneratorFactory kgf = (KeyGeneratorFactory) ctx.lookup("UUIDKeyGeneratorFactory");
   KeyGenerator kg = kgf.getKeyGenerator();
   Object uuid = kg.generateKey();

Comment: Yes found that one too. But is this the recommended way to go in JBOSS ?
Answer: What do you mean by recommended?
UUID is a standard. There are different kinds of UUID (which are also defined as standards). It doesn't matter which library or implementation you use, as long as the generated keys follow the standard (in other, as long as it works).
I would think that the JDK implementation of UUID is pretty reliable. It's part of the Java API, it's simple, I don't see a reason not to use it. In fact, that's what I'm using in a EJB 3.0 application (which runs on JBoss).
The UUID generator provided by JBoss AS was added in version 3.2 (according to the link in another answer). This generator was included probably because when JBoss 3.2 was released, the JDK didn't supply the java.util.UUID class, which was introduced in Java 5.
Answer: The answer by Andre Rodrigues is correct.
You should study up on the versions (types) of UUID. The Wikipedia page does a good job of explaining.
The java.util.UUID class generates only versions 3 (name-based, via method nameUUIDFromBytes(byte[] name)) and 4 (entirely random, via method randomUUID()) UUIDs. Sun/Oracle claim they provide a "cryptographically strong pseudo random number generator". That means you should not have any real chance of collisions even if creating billions or trillions of values.
For security reasons, Java does not generate the original version which uses your network interface's MAC address plus the current date-time. In theory, this version is even less likely to have collisions than version 4. Indeed collisions are virtually impossible. If that is the kind of UUID you want, you can create one by calling another library. Most operating systems nowadays come bundled with a UUID generator, such as uuidgen in BSD and OS X. Then pass the bits or hex-string to one of the constructors or factory methods found on java.util.UUID.


Updating static GTFS data android

Question: I have an android application that takes a static GTFS data that I manually turned into a database.
How do I update this GTFS data automatically, or is that not possible?
Comment: Do you want to update your database representation of the GTFS? Or do you mean you want to take what's in your database and produce a new set of flat files adhering to the spec? Or do you mean that there is now an updated GTFS that has been published and you want to replace the data your application is using?
Answer: There is not to my knowledge any ready-made, reusable solution for doing this. However, I can share what I've done in the past.
There are three parts to what you're trying to accomplish:

Automatically detecting and downloading updates to the GTFS feed. A simple approach might be to subscribe (in a feed-reader) to the RSS feed published by GTFS Data Exchange for your agency, which will at least help you know when new data is available so you can manually prepare an update for your app. A completely automatic approach might require the development of a custom tool to poll either the RSS feed or the transit agency's website directly to recognize when new data is available, then download and process it.
Generating a new database from the downloaded data. Here there are some existing resources you can leverage. I myself have written a small utility in C that generates a SQLite database from a GTFS feed; you could perhaps use this as a starting point and modify it to work with your own database schema. If you'd rather stick with Java, the OneBusAway project publishes a number of developer tools you might find useful, including a Java library for working with GTFS data in CSV format.
Deploying the updated database to your users. If your app is designed so it accesses transit data through an API hosted on your own server, this may be as simple as copying over the new database and restarting the app server. If your app instead reads from a database installed on the device itself, pushing updates may be more difficult; I'll have to defer to someone with more experience publishing Android apps in that case.

None of these things is terribly difficult, but it is true that keeping the data used by a transit application up-to-date requires essentially a whole other application itself.

Updating static GTFS data android


Darktable ignores embedded JPG for preview

Question: I am using Darktable 3.2.1 and I can't get it to use the JPGs embedded in RAW files for preview within Lighttable. There is an option named don't use embedded preview JPG but half-size raw in the preferences but it doesn't have any effect. Whether it's checked or not, Darktable always generates previews by processing the RAW file, which is very slow. This issue has made Darktable quite unusable. Is there any way to fix it?
Comment: i actually thought about an stopgap solutions. Yoy can try getting irfanview (dont forhet to install plugins too) then use the thumb nail viewer that comes with it. It has option to select what program to open files with. If you cant then there is also windows camera codec pack that lets you see the thumb nails. İf you are on Linux you can try finding. Thumbnail browser or if you are in Gnome desktop (which wastes lots of ram but whatever) sudo apt-get install gnome-raw-thumbnailer ufraw-batch to see the thumb nails in Ubuntu
Comment: well you can try moving them to a different directory to clean the clutter at least which should work good with the camera codec pack or the Gnome pack i mentioned.
Comment: let me give you some tips for the time being. you can try taking RAW+Basic small jpeg setting in camera then setting the darktable to use them for previews instead... Also maybe its your slow storage coupled with high cpu and ram usage. Slow hdd. Usb over camera/slower card Reader or just very slow sd card? Try doing some speed tests and monitor your CPU/RAM usage by using the task manager. Worst case being your other programs (antivirus etc) using the hdd so you should try monitor ing hdd usage too.
Comment: Thanks. I don't know how to set Darktable to use JPG previews, the relevant option is being ignored as explained in my Q. I don't think it's the disk as the preview is slow only the first time I look at the photo. Afterwards preview is near instantaneous.
Comment: from the same menu select light table (its between import and dark room) and check high quality thumb processing to small then go to cpu gpu memory and try to fiddle with disable backends. İncrease memory a little bit for thumb nail cache then try enabling opencl support. After closing the program try finding these cache files then delete them. It might have a problem avout color management too which will lengten the process.
Comment: Using an external viewer is indeed an option but it won't let me flag the photos I want to edit.
Answer: darktable can only use the embedded JPG if it is large enough to cover the size of the preview (source).
I had the same issue with images of one of my cameras and indeed, when I reduce the window size, at some point it automatically switches to the embedded JPG.  So the best solution in this case is probably to do the culling with a reduced window size and only maximise it for the actual processing.
Answer: The whole point of a raw editor is to process the raw data, not the embedded pre-processed JPEG data. Darktable only uses the embedded JPEG-data for the very initial preview, which you can see directly after importing as thumbnail in the lighttable (but that also takes some resources, although minor). After processing, including just opening the picture in the darkroom mode, the processed RAW data is used as thumbnail.
If darktable is slow for you, I recommend you get faster hardware, either CPUs or GPUs (latter is recommended).
Just using the embedded JPEG-data for thumbnails won't make your experience with darktable or any other raw-data processing programm faster.
For more details on how darktable handles thumbnail creation, please refer to the manual section 18.104.22.168. Thumbnail creation:

[...]
When darktable imports an image for the first time, there are two possible sources from where to take a thumbnail. darktable can either try to extract an embedded thumbnail out of the input image – most raw files contain these kind of thumbnails generated by the camera – or process the image by itself using default settings. You can define how darktable gets its thumbnails in the GUI preferences dialog (see Section 8.1, "GUI options").
[...]
Comment: I understand  the point of a raw editor. I'm talking about the preview. Darktable takes about 3 seconds per photo to show a preview of it because it generates it by processing the RAW instead of displaying the embedded JPG. This makes it very difficult to sift through a few thousand photos to quickly mark the ones I want to process.
Comment: Thanks for the edit to your answer, but the problem is that this GUI option doesn't work, as I mentioned on my question. It is possibly being overridden by some other option, or it's ignored under some circumstances. I need help with this specific problem, not generic advice.
Comment: That's hard to debug from remote. My first question would be if the RAW file actually contains a JPEG and how you determine if darktable does not the way you expect it.
Comment: The RAW files do contain JPG preview as I can extract them from the RAW using a Python library for example.
I don't know for sure what DT is doing, but I have two reasons to think it's not using the JPGs: (1) it takes ~3 seconds to visualize a photo when accessing the preview for the first time with the W shortcut in lighttable (2) the preview does not look like the extracted JPG, but like the photo processed using DT default RAW processing parameters.


Windows 8.1 automatic repair loop (INACCESSIBLE_BOOT_DEVICE)

Question: Today, my pc with Windows 8.1 installed suddenly started crashing on start up, and then rebooting and showing the 'Automatic repair' screen. I tried solving this in multiple ways already:

I tried creating a USB drive with a copy of Windows 8.1 on it on my laptop, and then on my pc select refresh pc - when I insert the USB drive it says the inserted media isn't valid. I don't have the original installation cd
I tried using startup repair, it just runs for a minute and then it
says the problem can't be fixed using startup repair
I tried a system restore, but it gives the error '0x80070057'. Unfortunately, there's only one system restore available
I tried using the following commands in the command prompt:
bootrec /fixMBR
bootrec /Fixboot
bootrec /rebuildBCD

However, after the last line it says that no installations were found
(I made sure to activate the windows partition using DISKPART)

I didn't recently install any suspicious programs, and I've been running Windows 8.1 for over a year now without any problems. Can anyone please help me? I really need to be able to use my pc
Update:
I gives the error INACCESSIBLE_BOOT_DEVICE. I've disconnected all my hard drives except the SSD that Windows is installed on, I made sure it is booted from, I changed the SATA cable, but nothing helped. Also, when I try to enter safe mode from the Automatic Repair screen, the INACCESSIBLE_BOOT_DEVICE error message still shows
Comment: What method did you use to create the USB Drive, do you have access to another system at all?
Comment: @Sam3000 I have access to a laptop with Windows 10 installed
Comment: Have you used the media creation tool located here to create the USB drive you mentioned? It should create a valid installation media: http://windows.microsoft.com/en-GB/windows-8/create-reset-refresh-media
Comment: @Sam3000 yes I have, I tried both the regular and the regular N version (both 64-bits) as I wasn't sure which one I had, but neither worked
Comment: Do you see any error messages when it crashes on boot?
Comment: @Sam3000 it says 'Your pc ran into a problem and needs to restart' for about a second after the windows loading screen, then it restarts and goes to the automatic repair screen
Comment: @Sam3000 see my updated question, I missed part of the error message because it goes away so quickly
Comment: Have you tried typing: `bcdedit /set {default} bootmenupolicy legacy` in the command prompt?
Answer: This appears to be a known problem with Windows 8.1 - dubbed the "Automatic Repair Loop" by many. Given that you have managed to make a recovery USB drive, the following has worked for some people:

Step 1: Boot from your USB drive.
Step 2: Select "Advanced repair options"
Step 3: Select "Troubleshoot"
Step 4: Select "Advanced Options"
Step 5: Select "Start up settings"
Step 6: Select "Restart"
Step 7: The computer should restart. Now you want to hit the 4 key, which is safe mode.
Step 8: You should be able to log in now. Restart the computer and the computer should boot normally.

There are some alternatives to try if the above doesn't work:
Step 1: Boot from your USB drive.
Step 2: When the install screen pops up, look to the bottom left and select "Repair Your Computer".
Step 3: You will now see a screen that says "Choose an option". Select "Troubleshoot", then "Advanced Options", and finally "Command Prompt".
Step 4: You should now see the command prompt. Type "bcdedit" (without quotes) and hit enter.
Step 5: A list should have appeared. Towards the top, you should see "resumeobject" (It is under "default"). Highlight the long number, including the brackets, and copy.
Step 6: Now type "bcdedit /set (the long number you copied) recoveryenabled No" (Without quotes). Hit enter.
Step 7: You should now see the message "The operation completed successfully"
Step 8: Type "Exit" (Without quotes)
Step 9: Reboot

If this does not work, I would suggest returning to Command Prompt and following these steps, to check there isn't an issue with your SSD.
Step 1: Type "chkdsk /r C:" (Without quotes) The scan should start.
Step 2: This could take several hours depending on the size of your SSD
Step 3: Once the scan is done, type "exit" (without quotes).
Step 4: Reboot
Answer: Easiest way to get outta this automatic loop is to get into advanced options and choose command prompt. Then type this exactly all on one line .
copy c:\windows\system32\config\RegBack\*   c:\windows\system32\config

This will throw you back into your login screen with a temp profile.  Get yourself into user accounts and make a new account. Make sure you give it admin privileges . Reboot. At windows user screen login with new account. Delete previous user account.  Reboot and presto problem all gone.


How do I perform an erasure error in stim?

Question: An erasure error is a heralded error that completely destroys a qubit (e.g. resets it or maximally mixes it). The qubit is gone but you are told it's gone. How do I simulate this kind of error using stim?
Comment: Note: received this question by email, copying here for posterity.
Answer: Since stim v1.12, you can use the HERALDED_ERASE gate or the HERALDED_PAULI_CHANNEL_1 gate to get heralded erasures.
Note that you will still need to find a decoder that understands the erasures. For example, as of this writing, pymatching will just ignore the heralds and do normal decoding instead of erasure-informed decoding.

For more complex erasure errors, you can sort of emulate erasures by combining CORRELATED_ERROR, ELSE_CORRELATED_ERROR, and an ancilla. This ancilla qubit is not physical; it's just a way of explaining what you want in terms of a circuit. Each heralded error should flip the ancilla qubit in addition to applying its normal error effects. In this way, measuring the ancilla will reveal the herald. Then you can declare detectors and etc on this measurement result, like with any other measurement.
Comment: Craig Gidney, did you try this method? what threshold/error-rate does it give, e.g., for unrotated surface code with perfect measurements?
Comment: @YaronJarach I didn't try a full scale circuit simulation.
Answer: Adding my two cents on "finding a decoder that understands the erasures" - here are slides I made in the past, which seems to be valid for the newly updated HERALDED_ERASE feature in Stim as well. Thanks for adding this feature!


how to access add ons for shadow of the colossus

Question: I've downloaded/installed the Wanders Pack add on for Shadow of the Colossus but cannot find the in game items - the bow, cape and the black/white finish for Agro.
How do I activate/access these items? There is nothing on any of the game menus that mentions downloaded content.
Answer: According to this reddit article, you can access the Wander Packs items by opening up your map and then pressing triangle.
This can be seen done in the first few seconds on Youtube


Using CNNs to detect incorrect label images in dataset

Question: What I want to do is to train a model to identify the images that are incorrectly labeled in my dataset, for example, in a class of dogs, I can find cats images and I want a model that detects all those images that are in the wrong class. Does any one tried this to have more details or does any one have any ideas? I'm open for all ideas and thank you in advance.
Answer: As far as I undertood you, you have a database where you have a set of 3 items per data: the image, the label and a boolean pointing if that label is correct or not.
You want to train a model where you can classify the correct labeled and the incorrect labeled data.
This problem is equivalent to changing all the incorrect labels to the other label if we are talking about binary classification.
Assuming the problem is NOT binary classification (which is the same problem as training a new classic CNN model for image classification), you should train a new model which involves a CNN and the current label as input and one single output:

Build a CNN wich takes the image as input and outputs the most posible class (inputs a NxM image and outputs a vector of K classes with the probability of each class).
Take the predicted label and use a feed forward network to predict if the label is correct or not according to the outputs of the CNN. Maybe all CNNs outputs are similar and its very likely to confuse the label even if one of them is the highest, this is solved by the FFNN.
Try a transfer learning technique, there are 2 networks inside!

Good luck and regards!


Price of items that should come in pairs?

Question: The Poisoner's Gloves wondrous item(s) cost 5,000 gp. However, I can't find any ruling stating that gloves (or similar items) come in pairs. So, is 5,000 gp the cost of one poisoner's glove?
Answer: No, it is the price for a pair (Note that the 2500 price you gave is for crafting the item; buying it is twice that). All magic items that take up a slot take up that entire slot, and all prices are for a complete magic item and cannot be reduced for buying only part of it, unless otherwise specified. Hands is a single slot; the only type of item you can normally have two of is magic rings. That means whether a hands slot magic item is a pair of gloves or a single glove is just flavor; there is no mechanical difference.
The Glove of Storing is an excellent example of how this works:

This device is a single leather glove[...] A glove of storing uses up the wearer's entire hands slot. The wearer may not use another item (even another glove of storing) that also uses the hands slot. Source.
Comment: Thanks for the price correction. I keep mixing that up. I'll fix it now.
It matters whether or not I get one or two Poisoner's Gloves because they do not operate collectively.


MapInfo Pro 12.5 Pan Control not going upward when measuring a distance

Question: MapInfo Pro 12.5  (32 bit)
In one workspace I am measuring a distance - I can pan left right and down, but not upwards.
The pan works in another workspace in all directions.
Why does it not work in the workspace?
Is there a particular setting in the Map Preferences or Map Options that needs to be selected to enable the pan to work in all directions.....?
Below is an image of Map Options
Answer: It's the "Autoscroll" option that controls whether the map pans if you move the cursor "outside" the window while drawing or measuring.
You do however seem to have "Autoscroll" enabled.
Another thing that can prevent it, is if the border of your map window is outside the application area of MapInfo Pro, as you see here:

You can fix that by scrolling the map window back into the application area.
Comment: Thank you Peter - yes very simple in the end. The Autoscroll panning works in each direction as long as the window is at the extent of the application. Thanks again - it works well now!


What technique is most efficient for turning a canoe fast?

Question: I recently got involved in canoe racing and I am curious about the most efficient techniques of turning a canoe around a buoy without losing your forward speed.
Comment: I've axed the second question here. If you have a question about exercises for canoeing lets get that in its own question. Focused is better
Answer: If the turn is a sharp turn around a buoy the trick is to pivot.  Depending on how fast you are going, the prow needs to be a bit past the marker.  Then pivot around it first with a bow pull and then a cross body pull at the stern.
For example: if you are going around a buoy to the starboard and have your paddle on the starboard side too, as you pass the marker start with a pull straight at the gunnels as far to the bow as you can (while still retaining good form).  Then as the stern swings, switch to a cross body pull as far to the stern as possible.
I think a cross body pull to the stern is more powerful than a pry even if you feel a bit like a pretzel doing it.


How does magnetic charge in string theory arise?

Question: In string theory, all of the standard model charges (electric, color, and weak hypercharge) arise from Kaluza Klein theory and through the interactions between strings and branes.
But little is said about the magnetic charge, which is a property of M5 branes. All that is said is that it is the dual under the electric-magnetic duality. But does it arise due to KK theory and interactions, or is it just a fundamental innate property that does not arise due to anything else?
Does this question make sense?
Comment: Related - https://physics.stackexchange.com/q/5665/85745
Answer: First, let me remark in passing that in orthodox string phenomenology, none of the standard model charges arise as they do in old-fashioned Kaluza-Klein theory, i.e. from gravity in compactified dimensions. They either come from branes, or from the gauge charges of the heterotic string.
You ask where magnetic charges (i.e. monopoles) come from in string theory, and mention the magnetic charge of the M5-brane. I am far from sure that every monopole in string theory can be viewed as an M5-brane. I think that the way to approach this question is to consider how monopoles arise in grand unified theories, then the phenomenon of electric-magnetic duality, and finally, how electric-magnetic duality arises in string theory.
In grand unified theory, a kind of monopole discovered by 't Hooft and Polyakov can arise as a soliton. But the study of dualities revealed that such solitonic monopoles sometimes have an equal claim on being regarded as fundamental objects, since the dual set of elementary particles can, in turn, be constructed from the monopoles. The study of "electric-magnetic duality" often yields the necessary existence of a whole ensemble of "dyons" (charged electrically and magnetically) related by duality transformations.
So far I have just been talking about field theory. However, these field theories with electric-magnetic duality appear to originate in string theory, where electric-magnetic duality corresponds to a change in perspective regarding compact dimensions.
It's a vague answer, but I nonetheless believe it's correct to say that the existence of magnetic charge in string theory is bound up with the duality symmetries of string theory, and the existence of dyonic ensembles. I find it hard to be more specific because there are so many different duality relations, and none is more obviously fundamental than the others. It could be that my inability to be more specific is because string theory hasn't yet penetrated beyond the dualities to something more fundamental, or I may just have missed the memo explaining why one particular fact is the root of all the stringy dualities involving monopoles.


How can I change the IP address of a running switch (HP 2510)?

Question: The switch is running at a remote location and is connected to a network with the IP address 10.10.10.10. How can I change the IP address to 10.10.10.11 via telnet? The switch has to stay reachable and must not get an IP address via DHCP.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
Answer: It can be problematic to change an address remotely. The best option is to do it in person from the directly attached console. To move the switch to a different subnet, that is indeed what is required. In your case, it's still in the same subnet with the same gateway, so you can just telnet in and change it. The instant the command is entered, your telnet session will stop, but you should be able to telnet to the new address and continue. (save the config, etc.)
When moving to a different subnet, the gateway has to be changed as well. You'll lose contact the instant either the gateway or address are changed. And the address has to change first. If you have machines in both networks, and changing the address of the switch will not otherwise break the network, then logging in to each network allows you a local path (not through a gateway) to the switch in either subnet. Change the address, go to the machine in the other network and continue your work.
If you have console (out-of-band) access, none of this mess is required.
Answer: You normally would just overwrite it with e. g.:
vlan 1 ip address 10.10.10.11/8

But if you stay on the same subnet, the switch will complain:
The IP address (or subnet) 10.10.10.11/8 already exists.

If this is the case (you want to stay in the same subnet and just change the IP address inside this subnet), then you'll have to delete the previous IP address first. But then you'll will loose your remote connectivity, if you cannot reach your switch through another subnet. So that's probably not an option.
A working solution is to use the HP menu to change the IP address instead of using bare configuration commands. Perform the following steps:

Open the interactive HP menu with the command menu.
Select option 2. Switch Configuration....
Select option 4. IP Configuration.
Select the action Edit.
Edit your IP address according to your needs and press ENTER.
Select the action Save.

You'll loose your connection immediately, but you'll also be able to immediately reconnect to the new IP address.
Answer: If you have more than one VLAN running (lets say 10 with 10.10.10.10 and 20 ) on the switch you could give the switch an IP address in another VLAN Interface (i. e. VLAN 20 with 220.127.116.11); check if you could connect to it (220.127.116.11) and if it is so you can change the IP address (10.10.10.10) while connected via telnet to the other VLAN interface (184.108.40.206) on the switch.
Please think of it and check (2nd VLAN will be routed to your location and so on) if this will be a oppertunity for you befor doing it.
Answer: Use the reload command to issue a delayed reload to the switch. Then make your change and see if it worked. If you messed up, the switch will reboot with the old configuration intact, enabling you to try again until you get it right.
https://grumpytechie.net/2015/03/06/using-the-reload-command-with-hp-switches-hp-networking-series-part-2/
Answer: Your production setup  can be impacted, if you wants to change ip address of switch in production hours . And you might loss access to switch as well.
If switch is connected in HA having both active and passive switch or active -active switch then ,  there is a possibility to change ip address of switch in production hours . Remove HA cable between switch make them independent devices and shift all work load on any one of switch , on remaining switch you can change ip address .
If both switches are not in HA . Then schedule activity post production hours . And take switch console access and processed with activity .


What is the difference between Static code analysis and code review?

Question: I just wanted to know what the difference is between static code analysis and code review. How are each of these two done?  More specifically, what are the tools available today for code review/static analysis of PHP?  I would also like to know about good tools for code review for any language.
Comment: In two words? "A brain".
Comment: A code review is generally a manual process whereby another programmer looks over your code.  It's a way to spot little mistakes or deviations from coding conventions etc, and a good way to improve overall code quality.  Static code analysis is something you can use a tool for, though I have never done this myself.  Interested to see what answers others have
Comment: See also: [What the difference between a code review and a code audit?](http://stackoverflow.com/q/34454294/562769)
Answer: Code review is something people do, static analysis is something machines do. There are (sometimes good) static analysis tools. Code review is when a colleague/mentor/professor/friend goes over your code and gives you constructive criticism.
Static analysis is, on the other hand, an automated process in which a machine, informed by what it knows about the language it is analyzing (usually from the type system), analyzes a program and tries to pick out things that could be incorrect, inefficient, poor style, or otherwise suboptimal.
Comment: @Buhb: it crucially adds knowledge of the context. A code reviewer should understand if the code is doing what is expected to do. A static tool will (at best, if the language allows for it via some decoration/assertion/contract) check that formally everything is ok... So you could put it the other way: static analysis is a sort of code review, performed algorithmically.
Comment: I've always been under the impression that code review is a sort of static analysis, since it's a way of measuring the health of the software without executing it.
Comment: Just to add, **Lint (static analyst):** Dude that's not needed!! **Colleague (Reviewer):** You can do it that way too!!
Answer: Static analysis is the process of analyzing a software without executing it. This is very good and recommended, but you have to keep in mind that

different static analysis tools have different understanding of the code they are studying, hence they can signal (or not signal) different issues. One tool can give a clean report, and the other may complain about a million things.
a dynamic tool (to name an example, think of valgrind) can find many other issues, at the price of a serious burden on the resource consumption (time, memory usage). This is so because you are usually running an instrumented version of the software. Notice that, by being instrumented in some way (replace your malloc with a debugging malloc) it is not exactly identical to your software (as you can see from the execution times)

Both of these approaches suffer from the lack of context: they don't know what the sw is supposed to achieve.
Code review is done by another coder, who supposedly knows it and can check

if the code is right
if the software is semantically correct.

It is much more expensive and it has a varying degree of repeatability but is a great help.
As always, there is not a single silver bullet which will fix all the bugs and avoid all the problems.
Applying - as much as possible given the place, the code, the time, the three forms of check (static, dynamic, more eyes (and brains) actually looking at the code) is recommended.
ps: I must note that it is usually much better to apply the tools from scratch. Converting a legacy system is a much less pleasurable experience, due to false positives. If you start from scratch and always aim at keeping the analysis tool clean, you will probably avoid a lot of problems.
pps: as for tools, it depends on the language. In the C and C++ world you can start by looking at Visual Studio itself, which contains a built-in static analysis tool. A relatively complete list can be found on Wikipedia.
ppps: Static analysis is more suited to static languages, like C or C++. For Python it can be really difficult to say if a name which refers to a list at a point will refer to a list for the rest of the program, due to its dynamic properties. This doesn't mean that nothing can be done, as a JIT effort like PyPy shows.
Answer: Code Review is when A senior or a dedicated authority checks your code, your way of coding, the standards followed in the code and specifically the logic level of the code
As far As static analysis is concerned, it is the analysis of computer software  that is performed without actually executing programs built from that software (analysis performed on executing programs is known as dynamic analysis)
The List of tools as per the technology is given in below link
List Of Tools for Static Analysis
Hence code review and static analysis are completely different terms.
Comment: OM's answer is essentially correct, except that I quibble with 'A Senior or a Dedicated Authority checks your code...'.

It's true that some dysfunctional shops conduct code reviews in this parent/child manner, many (and better) shops have a peer-to-peer code review system that doesn't resemble a teacher grading a homework problem.

Where I work it's just as common for a junior to review a senior's work.  The objective is to have a second pair of eyes look at all code before it is checked in.
Comment: @JimInTexas, same in our shop. I would say the most important (long term) outcome of code reviews is spreading knowledge, unifying practices and architectural / design vision across the team. In this respect, a junior reviewing a senior's code is at worst a great way of learning local best practices - but who says a senior never makes mistakes and a junior can never spot these?
Answer: Code review is more qualitative assessment, static code analysis is more quantitative assessment.

Hey, boy, this method can be written better

vs, f.e

Decreased performance. It is inefficient to identify an empty string
  by using 'wcslen(str) > 0' construct. A more efficient way is to
  check: str[0] != '\0'.
Decreased performance. The expression of strlen(MyStr.c_str()) kind
  can be rewritten as MyStr.length()
Decreased performance. In case 'Order' is iterator it's more effective
  to use prefix form of increment. Replace iterator++ with ++iterator.

While real errors can (obviously) exist and be detected by SCA

Incorrect format. Consider checking the N actual argument of the 'Foo'
  function
The expression was enclosed by parentheses twice: ((expression)). One
  pair of parentheses is unnecessary or misprint is present
A call of the 'memset' function will lead to underflow of the buffer
  'dest.lfFaceName'
Comment: sorry to insult you. As far as what my (disappeared?) comment was intended to say - do you know of any reason why a human being cannot offer the same comments you provide as examples of output from static code analysis?
Comment: @sq33G: No. Any person with office supplies (practically infinite amount of paper) can simulate arbitrary Turing machine. However it is boring and time-consuming. (Possibly not the one given but say undefined behaviours in C).
Comment: Ah. So the real answer to the OP's question is that Turing machines are not human-complete.
Answer: Static analysis is when an artifact is analyzed without being executed. Although it can be applied to any artifact, it is often applied to source code or object code and refers to the use of specific tools to analyze and gain information about these work products. These tools produce reports that are interpreted by an engineer for use in determining the quality of the system under construction, and as a guide to planning development and maintenance. Wikipedia has a list of tools for static analysis, organized by language and with a brief description of their capabilities.
Reviews are a human evaluation of some work product, which could be code. Reviews can also be conducted on designs or other documents as well. The idea is that people familiar with the work product other than the developer are looking at it in order to find mistakes, ranging from security problems to violations of the coding standard.
Technically, a code review can be considered a form of static analysis, since the code is not actually executed during the review. However, in common terminology, "static analysis" typically refers to machine parsing of source or object files while "review" indicates that humans are the one doing the analysis.
Answer: Code review is useful technique to smell problems in source code very early stage. As part of this exercise many issues like performance, scalability, and coding standards identified and rectified. This will improve code quality.
Static analysis is used for analyze code quality metrics like cyclometric complexity, maintainability index, depth of inheritance, and class couplings.
Various tools available in the market to analyze code qualities. C# developer uses Microsoft visual studio for generating metric reports.
Answer: static code analysis is performed by automated tool, code review is done with people before the code is committed.
Tools for code review:
1.beyond compare
2.the diff of version control software
These tools are always used to generate the difference between the old version and the new version.
Comment: 1) It doesn't have to be before the code is committed - code review is done by people and 2) I find the description of diff tools as code review tools "interesting" certainly they are tools used to identify code for review but if I were asked about code review tools I'd probably point at those that help manage the process (I've used Kiln and Crucible for example).


I've got oil in the coolant, but no coolant in the oil - Renault Twingo RS

Question: I just checked the fluids of my Twingo RS and made de discovery that there is oil in the coolant. So naturally i thought headgasket. But there is no coolant in the oil, no smoke out of the exhaust, no power loss, no fluid loss (at least not that i can see because the fluid level has been the same for a while). So is it possible to be something else than the headgasket? I don't think i have an oil cooler but sometimes theres oil running trough the thermostat housing?
Comment: The fluid will only move from a high pressure to a low pressure, so if the leak is on the head gasket between a high pressure oil way and an coolant path, then there will be no coolant in the oil, just oil in the coolant.  Are you saying that none of the fluids have dropped?  How much oil is in the coolant?
Comment: Is the gearbox fully manual?
Comment: Gearbox is fully manual, I dont think the oil has dropped significantly, it is still at the half way mark and i didnt refill it since i guess 4 months. There is a small layer on top of the coolant (clear coolant below) so it isn't mixing to mayo.
Comment: If it has an oil cooler, it may be defective.
Comment: If no oil cooler, then doesn't this indicate a crack in block or head somewhere?  Has vehicle ever been driven in hot weather while extremely low on coolant?  Has vehicle ever been parked in super cold weather without proper antifreeze mix?
Comment: No oil cooler as far as i know, and i have driven it in hot weather but not low on coolant. I did find some threads where people had the same issue and it was the thermostat housing that has warped because of heat or the seal had gone bad.
Answer: The most common cause of oil in the coolant is a problem with the head gasket which allows higher-pressure oil to flow from an oil passage into the coolant.  This may be due to the gasket itself or a warped cylinder head.
Less common, but also possible, are a cracked cylinder head or a cracked engine block.
Another possible cause, which you have ruled out with your manual transmission, is a leak in the transmission oil cooler which is usually inside the radiator.  Of course this is not engine oil but transmission fluid but it can be difficult to tell the difference when mixed into the coolant.
I'd say your next step is to remove the cylinder head and inspect the head gasket for cracks or splits in the areas between oil and coolant passages.
Some vehicles also have an oil-to-water heat exchanger, often near the oil filter, and this may also be the cause if your vehicle has one.


Downloading and installing files

Question: I'm pretty new to Ubuntu. When I first got my PC I tried downloading a client to play runescape on (Orion Pro) The file downloaded fully but never gave me an option to install? Also the same for java player. All I got was the downloaded file but no place to load the startup process, just a bunch if files which I really don't understand. If anyone could help with what I need to do that would be great.
Answer: You've got a Windows mentality about installing files which you have to lose in order to succeed in installing files in Ubuntu. In general the extension suffix on the downloaded file will tell you how to install it.
First of all you should search for the application you want in the Ubuntu Software Center. For example Java (OpenJDK Java 7 Runtime) can be installed from the Ubuntu Software Center.
If that doesn't work, files that end with the extension .deb are easy to install. Just double click on the .deb file and it will open for installation in the Ubuntu Software Center.
To install the RuneScape client in Ubuntu open the terminal (Ctrl+Alt+T) and run the following commands:
sudo apt-add-repository ppa:hikariknight/unix-runescape-client
sudo apt-get update
sudo apt-get install unix-runescape-client

These commands will work on all currently supported versions of Ubuntu. The ppa:hikariknight/unix-runescape-client is an Ubuntu Launchpad PPA (Personal Package Archive) for the RuneScape Unix Game Client. Packages installed from PPAs are not officially supported by Ubuntu, but adding the PPA to your software sources makes it possible to install packages from that PPA, either in the Ubuntu Software Center or from the terminal. The unix-runescape-client package is preconfigured to use the Java package from the Ubuntu Software Center by default.
You can also install generic Linux binary files in Ubuntu. These files are usually downloaded as an archive in various archive formats, the most common of which is the .tar.gz format. There will often be a file in the archive called INSTALL (or sometimes README) which contains the instructions for how to install the package from that archive. These instructions are sometimes explicit and easy to follow, but sometimes the installation instructions are incomplete or make unrealistic assumptions about the knowledge of the person who is installing the package, so it is easier to install the same package from a .deb file if there is one available.
Answer: Welcome to ubuntu.
You need to be aware that Ubuntu is not Windows, and therefore will not run windows applications you download from the internet.
But don't worry. Most likely there are alternative software available for you.
i don't know much about RuneScape, but Orion Pro seems to be a recording software. Check up on www.winehq.org for information about how to play RuneScape on Ubuntu.
Java plugins are available in the software center, or from installing ubuntu-restricted-extras as follows:
sudo apt-get update

sudo apt-get install ubuntu-restricted-extras

Else you can try installing icedtea java plugin with:
sudo apt-get install icedtea-7-plugin

That should enable java support in your browsers at least.
Answer: First of all, you should forget about Windows-style download an installer and install the software method. Ubuntu uses deb packages, mostly they are in repositories, so, you should install from there.
Perhaps you are familiar with Android and Google Play: so, it is something similar. Locate Software Center in your Ubuntu system, and search there for the needed softwares.
Time to time it happens that some software isn't in Software Center. Then you have to search for a PPA repository, add that and install from there. Just if none of the methods above didn't succeded, you can download and install from untrusted locations, but I think that this is not advisable for a beginner.
Try to read and learn as much as possible about Ubuntu and Linux, because this is somehow a different world.

Downloading and installing files


Align test options with respective `radio` buttons

Question: I've created a simple quiz application.
How can I vertically align text with radio buttons.?
Here is the code- Codepen.
The problem specially arises with long text labels.
For example, in question no.9,12 & 14, the misalignment is pretty evident.
I tried a lot of solutions available on stackoverflow, but none of them seem to be working for me.(eg:How to vertically align radio buttons with text on the same line?)
Comment: Because your label is taking the whole width. If you set the following CSS rule to your label: `label{display:inline-block; width: 80%;}` the lay-out will be fixed or use the option as @Goombah gave below
Answer: Use
label
{
  display: inline;
}

Like here (Codepen)!
Answer: Just change the label style from inline-block to inline, this way it won't break when the solution takes more than one line:
Edited CodePen
label{
  display: inline;
}

Hope it helps!


Are there pumpkins in Minecraft 0.7.1?

Question: I'm trying to make a Snow Golem, but all I need to do is get a jack-o-lantern. But I can't find any pumpkins.
Comment: Based on http://www.minecraftwiki.net/wiki/Pocket_Edition It doesn't appear like pumpkins or jack-o-lanterns are available yet.
Answer: Only melons are available in Pocket Edition right now. Also, snow golems, Iron golems, and endermen are not implemented into Minecraft Pocket Edition as of yet.
Answer: Apparently not, sadly. I haven't found any proof saying No, but I can't edit them into the game and the wiki page doesn't talk about PE on the pumpkin page.

Are there pumpkins in Minecraft 0.7.1?


Hunter PGV diaphragms tearing

Question: I have a 5-zone irrigation system with 1" Hunter PGV valves. This year, I have replaced the diaphragms twice in the same two zones after 10 years of trouble-free operation. All four of broken diaphragms had a small tear in the exact same spot. There is no debris in the valve body when I replace the diaphragm. These two zones feed spray heads; the others feed mostly rotors. Why would two of five zones start tearing diaphragms?
Comment: The only thing that I can imagine being different is water pressure. Have you noticed any change?
Comment: Nothing out of the ordinary pressure-wise. Hunter's support people emailed me to say if there's no debris, the valve must be out of spec and contact a distributor.
Answer: I discovered that there was a part missing from the valves that kept blowing diaphragms. There is a white support ring that sits inside the valve body, under the diaphragm. On the two zones that kept failing open, it must have stuck to the diaphragm's plunger piece when it was first replaced. After replacing the missing piece (Hunter part number 331300), I haven't had a problem since.
FWIW, Hunter and their local distributor were worthless for sorting this out. Hunter blew me off with a talk to a dealer response, and the dealer said the part wasn't available separately from the valve. The support ring is available online, and is much cheaper than whole valves, even after shipping.

Hunter PGV diaphragms tearing


"Get" Button On App Store Is Blurred Out For Almost EVERY App

Question: I have been having an issue lately with my app store app. When I go to buy an app, I've found that nearly every app I try to buy has one thing in common--the "get" button is blurred/greyed out. When I try to press on the "get" button when it is like this, it has no reaction, therefore, I cannot buy the app that I want. It is absolutely FRUSTRATING and I want to know how to fix it. Who knows--one day, I may need an extremely important app for a serious reason and I won't be able to buy it. And I don't want that. Is the reason for this perhaps because my father has enable restriction on my IPad? Is the way to fix it for him to put in the restricions code? But whatever the reason or way to fix it is, I want answers, and I hope you can give them to me.
Comment: When you say "nearly every app I try to buy" do you mean every app or **almost** every app?  Have you asked your father if he put restrictions on your downloads?  Have you tried to log out of the App Store and log back in?
Answer: Most probably the download apps restriction has been enabled. Ask whoever enabled this to disable this restriction either temporarily or permanently. I would also check that you are signed into the correct region in App store settings and that your account is verified and has no outstanding payment issues.
To check go to;
Settings > General > Restrictions
Hope this helps.


Vertex wont snap to edge

Question:
I'm trying to get a vertex of one object to snape to the angled edge of a different object, and even though I have the snap feature turned on, and the snap feature set to edge, the vertex just passes by the edge.  I've tried both including the second object in edit mode (as seen in the gif) and not including it while in edit mode, but it doesn't seem to make a difference.  It's important that the Z location not change, so I'm moving the vertex strictly on the X or Y axis.  Since the edge is angled, there no easy way to know the precise coordinates of where I need the vertex to end up, otherwise I'd just type it in. Same reason I can't set my 3D cursor there.  Lacks the precision I desire, and right now I'm just eyeballing it which is sending my OCD into overdrive.  Please help!
Comment: The GIF is very low quality, try zooming in and recording it. Could you add the blendfile please ? https://blend-exchange.giantcowfilms.com
Answer: One thing you can do is select the edge you want to snap the vertex on and then subdivide it, this way you have a new vertex on said edge that you can move to the location you want the snap to happen, then simply snap the two vertices together, and then remove doubles just to be sure you don't have ovelapping vertices.
Answer: Snapping (Shift+Tab) works with the same object's edges, as well as with another object's edges. Try to play with an additional option of the snap tool (active, closest, median, center, etc).
Comment: I do not know what you are building, I just have a feeling that you do it wrong way. If you have to deal with such type of snapping, there must be an easy way, like extruding, loop-cutting, using normal transform orientation, etc. Just a thought.

Vertex wont snap to edge