Restrict calendar booking to certain 'slots' in SharePoint 2010

Question: In SharePoint 2010, is it possible to only allow people to add events to a calendar with restriction in place. e.g. only between the hours of 9am and 5pm, or only in predefined slots (which could be set in another calender). Ideally would then use colour codes so the user can see at a glance what slots they can book in.
Answer: You'd likely need to add javascript validation to the newform to limit that or use content approval on the items.


SP 2010 Security Trim a Control for Permission Group

Question: I am working in Sharepoint 2010, I have a button in a content editor webpart on a page. I have set up two groups each with custom permission levels. Is it possible to security trim the webpart so that it only displays for people in the first group and not in the second group? Can I use security trimming with custom permission levels, or do I have to use OOTB levels? Any suggestions or tips for how best to accomplish this are appreciated.
Comment: You can [use javascript to check whether a user is part of a group](http://stackoverflow.com/questions/22122139/check-if-current-users-belongs-to-sp-group-using-javascript-client-side-object-m) using `IsCurrentUserMemberOfGroup` method.
Answer: You can use Audience Targeting to show and hide web parts based on

rules-based audiences(Global Audience),
SharePoint groups, and
distribution-list memberships

Note: this is not the same as security trimming, however, it may server your requirement. Check this tutorial on how to do it step by step
Comment: Hey Ahmed, this does hide the button. Is there a significant difference between audience targeting and security trimming? This is kind of a new subject to me, so I don't know whether it would be better to use one method or the other.
Comment: Security trimming basically means the user has no permission to access the object in question. So, for example, if you set a permission on a list, only users who have permission will be able to access and view it and more (depends on what permission level they have). However, audience targeting only controls the view of an object on a page, so the user might not be able to see the object, i.e. a list, however, she/he can access (from the site content)


What does this patent cover? USD705533

Question: What does this patent actually cover? If there is a key holder with a completely different design etc. but the same theory does that infringe? I mean does the look/design just have to be different or what?
Answer: The cited patent is a design patent. Design patents cover the ornamental design of a functional object. Thus, the specific function is not covered by patent, but you should avoid making a product that looks like what is shown in the patent's figures. If your key holder is truly a "completely different design", it is likely fine with respect to this patent even if it functions similarly. There is a gray area regarding whether similar products look similar enough to infringe on design patents so you may want to consult with an expert before going to market. As always, I caution that the fact that you may avoid infringement of this particular design patent doesn't mean there isn't some other relevant patent art that you need to make yourself aware of.

What does this patent cover? USD705533


How does the IS/LM model respond to organic GDP growth when the money supply is held constant?

Question: If GDP increases (due to tech change/good investment), interest rates would move up along the LM curve and down along the IS curve, so what happens to the equilibrium? Do we assume GDP cannot grow without money supply growth, because an increase in interest rates along the LM curve would kill investment, bringing GDP back to equilibrium?
Answer: We would move upward along the LM curve. However if there is growth because of investment or some technology shock that would cause the IS curve to also shift upward.
IS: When the growth "shock" you mention happens, there is now more demand for goods (Demand= C+I+G in a closed economy), without any change in interest rates. Since demand shifts, supply goes along with it in IS-LM and GDP increases
The IS captures the GDP-to-interest rate relationship (along the curve) since this relationship has now changed, we must shift the curve. Specifically we have more GDP now per unit of interest rate compared to before. Since interest rates didn't change in your example, but there is more GDP (caused not by an interest rate increase) the IS curve must represent more GDP for each interest rate, which - if you draw it now - is a shift to the right of the IS.
LM: Represents what happens to interest rates when GDP increases. This relationship has not changed, so we don't have a shift. The reason this relationship has not changed is because the only reason interest rates are increasing now, is because of GDP, something the current LM curve already captures. (If it would be for something else, like money supply change, there would have to be a shift.)
So there can be growth without money supply increases. However since there is now more demand for money (because there are more things that we can buy) but not more supply of money, then money increases in value, i.e. the "price of money" which in a way is the interest rate must go up. For that reason, part of the growth will be reduced (as investment goes down), but we will still have growth. If money supply also increases exactly enough to accomodate the GDP increase (typically is the case in reality) the interest rate will not increase and the LM would also shift and we do not have the mentioned negative effect.


I ended up having unprotected sex with the man I wish to marry, although I didn't want to

Question: I ended up having sex with my boyfriend who I plan on marrying, but did not plan on having sex with before marriage. Now that this has happened, I am extremely upset and ashamed of my act aswell. Will God forgive me and help me get rid of this depression? Also, I pray I don't get pregnant. I am extremely depressed with what I have done and I cannot even seek forgiveness for my act seems like the worst I could have done!! Also, I don't want to get pregnant and I pray to God to protect me and save me from   all this.
Comment: marry him immediately please, so the mistake doesn't repeat
Comment: @Rafid this is not a good nor feasible advice, First both should repent sincerly secondly it is the boy who should marry the girl or ask for her hand in marriage first.
Comment: @ياsr i agree with some of your points
Answer: What you did is extremely bad but Allah is a lord that has Mercy on his servant and forgive them, try to pray to Allah and ask for his forgiveness and don't that it as a joke because by Allah what you did is nothing but zinna.
In addition don't leave that your man if possible, marry him as soon as possible so that Allah may have mercy on both of you and forgive him.
But I want you to know that after the praying for forgiveness, both of you should forget about past, leave it for Allah seek and focus on your present and future, I mean don't try it again
Maa Salam

I ended up having unprotected sex with the man I wish to marry, although I didn’t want to


Carbon copy cloner to image OS X lion and restore from disk image

Question: Is it possible to create an image of my 64gb 2012 Macbook Air using Carbon Copy Cloner so that I can recover from that image (if my Mac does not boot) even if I am not connected to the internet?
Answer: The getting started section of the CCC online documentation will get you on your way.
For Carbon Copy Cloner support, please post questions to the Bombich Software Help Desk
Comment: The answer should be self contained here and only use links to gove more information.


Visa query about Turkey

Question: I have ordinary Pakistani passport with valid USA visa. Can I be granted Turkish tourist visa for seven days on arrival at Istanbul airport?
Comment: If you have a valid US visa, you can avail Turkey e visa. You can't enter Turkey without Turkish visa doesn't matter what valid visa you have on Pakistani passport.
Answer: From the official site of pakistan embassy and ministry of foreign affairs :

Official passport holders are exempted from visa for their travels to
  Turkey up to 90 days. Ordinary passport holders are required to have
  visa to enter Turkey. Ordinary passport holders with a valid Schengen,
  USA, UK, Ireland visa or residence permit may get their one month
  single entry e-Visas via the website www.evisa.gov.tr.

Since you have a valid USA visa, you can apply for an e-visa from the link given above.
Answer: It seems yes, if you have an hotel booking and adequate financial means. (source: https://en.wikipedia.org/wiki/Visa_policy_of_Turkey). But this is just Wikipedia.
You may need to look on Turkey embassy website of Pakistan for better information.

Visa query about Turkey


campagnolo wheel on shimano or sram drivetrain?

Question: I have a road wheel that has Campagnolo splined hub and 10 speed cassette.  I'd like to know if anyone has any experience running a Campy wheel on Shimano/Sram drive train?  I know the measurements of the cassette sprockets are a bit off but wondering if you can get acceptable shifting performance.
Answer: I don't have experience with that exact setup. I have used a Shimano-9 wheel on a Campy-9 drivetrain, and it more or less works. With the addition of a shiftmate, you can mechanically compensate for the differences in cable pull. It's a little fussy getting set up right, but it does work.
Also, (not that you asked, just in case someone else finds this thread in the future), Mavic sells a cassette that fits Shimano splines but has Campy-10 spacing, for use on a Campy drivetrain. I'm not aware of a cassette that does the reverse, but it wouldn't surprise me if one is out there.
Comment: And derailleur. It's a more expensive option.
Comment: Another option, of course, is to change out the shifter.
Comment: Hard to say if changing the derailer would be necessary.  If basic geometry is OK the issue is the distance between steps (and the pull direction).  The shifter controls the distance between steps,  but of course different shifter/derailer systems may have different degrees of "mechanical advantage", and that would be the fly in the ointment.  (Sometimes the old friction shifters have advantages.)
Comment: +1 on the shiftmate. I use one on my campy 9-speed shifter so that I can use a shimano compatible cassette. Works perfectly and never had a problem. The shiftmate is a travel adapter consisting of (effectively) two pulley wheels of different diameters. There is no problem with mechanical advantage. Shift systems don't use a tremendous amount of force, it really is all about displacement.
Comment: Your link is broken
Answer: I've seen it in the other direction - usually from nuetral support, shimano wheels on campy drivetrains and it's servicable if you want to finish a race, but it'll never be completely smooth.  honestly, sell that campy wheel and buy a shimano one on craigslist.  The campy stuff sells for more typically, so you'd probably even come out ahead.  Unless of course you're trying to swap stuff between bikes, which, in general will be problematic with campy + shimano.
Comment: I've also seen it in the other direction. I had a friend who raced a lot of cross and preferred campy components but ran a 10spd Shimano wheel/casssette. He swore that the tolerances were so close between the two that it worked fine. He was also racing cross with that setup so there's a good chance he couldn't tell the difference between all the mud and sod wrapped up in the drivetrain.


I am switching out a 8 gauge aluminum wire on a 30 amp 2 pole breaker for my dryer less than 25. Can I use 10/2 copper? '

Question: I have an old house where some aluminum Branch wiring was used. On the oven, water heater and dryer. There is an 8 gauge aluminum wire for the dryer on 30 amp double pole breaker. I already bought and installed 10/2 solid copper Romex wire. Home Depot was sold out of 10/3. When I got home my receptacle and plug are both on a three-prong so it worked out. But should I have an extra hot anyways and switch out the receptacle also? My number one concern is fire safety with my family. Will I be okay?
Comment: Did the old aluminum #8 cable have 3 insulated wires: black, red, and white? What are the wires in the new #10 copper cable? I thought these old dryer cables were missing the ground but had three insulated conductors and so should be designated /3 without ground.
Comment: How did you attach the 10/2 wire?  Where did you connect each wire?
Comment: "I have a 19(fill in the year) house "` is more informative than "I have an old house "
Comment: @chux-ReinstateMonica Aluminum branch wiring pretty much narrows it down to an 8-year period between 1965 and 1973.
Answer: The #1 threat to your family is the 3-wire connections to range and dryer.
This wiring method was allowed due to intense lobbying by the appliance industry.  But what those connections do is BOOTLEG ground off the neutral wire. It was always illegal everywhere else, but this was delayed until 1996 for dryers and ranges due to their lobbying.
The problem with bootlegging ground off neutral is if the neutral wire gets loose anywhere, even just a socket pin, then it becomes a 100% certainty that the chassis of the appliance will be energized at 120V. Touch it and anything grounded (like the washer, or a sink, or another 3-prong appliance) and BLAMMO.
You must admit this is a "freshman" attempt at improving safety, which is under-supported by good research.  You're on the right road though.
Oh... and next time, deal with a real electrical supply house.  Home Depot is a terrible place to buy almost anything.  Their selection is limited, their stocking is terrible, and their prices are ridiculous. (they once bothered to undercut other businesses, but now that you're convinced they're the best deal in town, they stopped undercutting and are just rooking you. CostCo is doing the same thing BTW.) As things were, since they were out of 10/3 it would've been wiser to go to 8/3 (you're always allowed to upsize).
Anyway, replace both the dryer's cord and the receptacle with NEMA 14-30 type, and also remove the bonding strap on the dryer, which is responsible for bootlegging ground. Very important, that!
The heavy aluminum wire is fine, but...
Obviously you've found some articles on the Internet that rips up aluminum wire.  There's validity to those, as regards small 15-20A branch circuits such as to lights and receptacles, but it wasn't aluminum's fault.  Aluminum lugs happily take any wire (that's why your panel uses them) but copper lugs do not like aluminum wire.  In the 1960s in response to a copper shortage, they hastily approved for alumiunum use a bunch of outlets and switches previously designed for only copper.  Those copper lugs refused to play well with the aluminum wire, and there were serious problems at the terminations.  Also the installers were poorly educated on use of aluminum wire.
Mind  you, heavy aluminum feeders have never been a problem.
Since then, every single thing about aluminum has been changed.  A new wire alloy was made specifically for branch circuit wiring, called AA-8000. (the old AA-1350 alloy was straight up power-line aluminum, yes, the power lines are aluminum).  The approvals were canceled and a new standard - CO-ALR (R for Revised) - now applies to switches and receps.
Now, your #8 feeders to dryer and water heater were wobblers: at #8 they are in the gray zone between the worrisome "#10-12 small branch circuit wiring" and "#6 and larger reliable heavy feeder".  I would treat them as feeder; make sure they are terminated properly, then don't worry about it.
Each appliance
For the water heater, my recommendation is to double-check the connections to the Al wire at both ends - make sure they are on Al-Cu breakers (which were not affected by the CO-ALR standard change)... and on the other end, go into a modern approved terminal that is CO-ALR.  If it's not, no big deal -- just pigtail it with copper, then use an approved aluminum splice.  For mortals, that means an Alumiconn (#14-10), MAC Block (#14-#6), or Polaris splice (#4 and larger).  As long as the connections are clean and torqued to spec, I wouldn't worry about it.
Use a torque wrench to tighten the screws.  Very important. Most splice failures trace back to improper torque, and even electricians get torques right only 25% of the time (and that presumes +/-20% tolerance, which is pure luck, so basically nobody has a calibrated arm.)
Of course with the water heater, you now have that 10/2 cable you improperly used for the dryer.  That has to come out.  If you take it up carefully, you can reuse it for the water heater, as 10/2 is legal there (re-mark the white wire to be a hot wire; water heaters don't need neutral).
For the dryer and range, the deal-killer is the 3-wire connection.  So we definitely will replace the dryer's cord and receptacle with a 4-prong NEMA 14-30 type, and rewire the range as appropriate. This includes removing the neutral-ground bootleg jumper from both range and dryer.  What wire do we use?  It's legal to retrofit a ground wire, so you could continue the old aluminum 3-wire in service (as I advise on the water heater), IF:

The cable was a legal type at the time it was installed, meaning either a) an insulated white neutral, or b) SE cable (neutral webbed around the hots).  AND
The socket is CO-ALR rated, or, you pigtail with MAC Blocks.

However given that you already know the drill, and the cost of Cu 10/3 is not extreme, you might just replace it with that.  Remove the 10/2 carefully and use it for the water heater.
You cannot retrofit a neutral or second hot wire, nor can you retrofit on stuff you just installed... so the 10/2 has to go.
Comment: Removing the dead front of my GE panel I see my dryer cable is stranded aluminum, three insulated conductors red, black, white and no ground. The cord is a 3 wire 3 prong. Decades ago I pigtailed the aluminum in the box with 10 awg solid copper. I have in hand a 2-pole 30 A GFCI breaker. Can I just install the breaker and not change the receptacle to a NEMA 14-30? Do I leave the ground and neutral bonded on the back of the dryer or do I remove the bond? Since I have a 1970 GE SPLIT BUS panel
Comment: . . . I would switch off the breaker, test to insure it is off, loosen screws, remove conductors. Insert new breaker (THQL2130GFTP)  switch in OFF, pull down white stranded lead and insert into neutral bar, insert three conductors, torque (to what?), switch breaker on. Should I have the dryer unplugged during this?
Comment: @JimStewart NONONONO you MUST remove the neutral-ground bootleg strap on the oven or dryer, or else the GFCI won't work and it'll just kill you anyway.  Once you've removed that strap, there's no additional *safety* benefit to switching to NEMA 14 recep, but Code requires that.  The NEMA 14 recep must be labeled "GFCI Protected / No Equipment Ground".  The stickers come with the GFCI, but you can label it any way you please.
Comment: Yes. The torques will be marked on the breaker or in its instructions.  Unplugging the dryer shouldn't matter, just have it OFF.
Answer: Nope. You'll need to pull this out and replace with the correct cable (or wires in conduit.)
The correct cable does NOT "give you an extra hot" - the cable you had gave you two hots and a neutral and NO ground. The cable you have now installed gives you two hots, a neutral illegally running on the bare grounding conductor, and NO Ground. You can't add a ground to it (which you could have done for the old cable) because you can't run neutral on a bare or green wire, and you can't add a neutral wire separate from the cable (which you can do when retrofitting a ground to an old ungrounded cable.)
You need 10/3 cable (4 wires, ground is not counted in cable designations) or you need 3 wires in metallic conduit (acting as the ground), or 4 wires in non-metallic (or flexible metal) conduit, a 4 prong dryer plug, and a correctly wired to your dryer 4 prong dryer cord. "What you had" lost its grandfathered (54 year old...? I think Harper said 1966 for that code change) legality when you opted to replace it - the replacement needs to meet current standards/code.
As an aside - if fire safety is your main concern, 10/3 MC or AC cable (flexible metal armor) would be a definite upgrade from NM, without the need to learn to bend conduit, if you find that daunting.
Comment: It was the 1996 NEC code cycle that first limited grounding range and dryer circuits via the neutral conductor to existing installations.(NEC 250-60)
Comment: Either that or OP installed only one hot leg with a neutral on the 10/2 and left the other pole empty.  This will undervolt the outlet to 30A@120V and likely destroy the dryer.
Comment: @Ecnerwal OP did not report that they successfully tested the dryer yet.  They may have asked this question out of fear, recognizing that they may have done something wrong.  For now we don't know.  They allude to an "extra hot" - this makes me wonder if they connected white->neutral, black->hot, ground-> ground... following the pattern of other 2-wire connections in the panel.
Comment: Generally that will mean the dryer quite noticeably does not work, @J...
Comment: If running cable would require excessive demolition and refinishing, would it be possible to install a transformer near the appliance to supply the neutral, leaving the bare wire for use as just a hot?
Answer:
Home Depot was sold out of 10/3. When I got home my receptacle and plug are both on a three-prong so it worked out.

It did not work out
The third prong on a dryer cable is neutral, not ground. Your dryer is wired incorrectly even by old NEC standards using the (bare) ground conductor as neutral. One could brainstorm a lot of reasons why this is a very bad idea, but it is kind of aside from the point.
If you are worried about fire safety get the right cable and install it to NEC specification.
I would personally not allow anyone to use the dryer until this was fixed.
Answer: Since you have removed the original cable I think you are required by code to install a cable with three insulated conductors plus ground.
If you already have 10/3 copper without ground installed, you MIGHT be allowed to establish a separate ground, but either way you must change the receptacle to accept a 4-prong dryer plug, then get a new cord and connect it properly to the dryer.
Comment: OP installed 10/2 - which is incorrect and a violation -  there is no "10/3 without ground"
Comment: @Ecnerwal I thought the original dryer cables had three insulated conductors without an uninsulated ground.
Comment: Typically SE cable (which got a special exemption for this use for the same reason that the connection was allowed at all - appliance politics over safety) with the neutral conductor on the braid. And not relevant once the original wire has been ripped out. and replaced; question states it was replaced with copper 10/2.
Comment: My house was built in 1970 and has the original cable (stranded Al) and receptacle for the dryer. My recollection from pigtailing the ends decades ago is that the cable has three insulated conductors and no bare metal ground. @Ecnerwal are you saying that there is no such cable and so my recollection must be wrong? Our electric range has a larger diameter cable with four stranded aluminum conductors, three insulated , black, red, blue, and one uninsulated. The dryer circuit is on its original 30 A breaker and the range on its original 50 A breaker.
Comment: OP does not have the original cable in place. OP ripped out the original cable and replaced it with modern 10/2 copper, with ground. Therefore OP does not have 10/3 without ground, (or aluminum 8/3 without ground in OPs case), even if such cable existed historically. So: "If you have 10/3 copper without ground" is referring to a fictional situation not in this question.
Comment: I think I have stranded aluminum 8/3 without ground. Does such a thing exist? I don't want to pull the dryer out. I guess I will take the dead front off the panel and see.


Is vocal pitch trained or natural?

Question: I know some people with 4 octave voices that sing purely for fun and yet others with a mere (comparatively) 2 octaves who are serious singers. Why is there such a big difference in this? Is it to do with nature, or nurture, or both?
Are some at an advantage because of their parents' genes? And how can you make your voice change its range?
Comment: This is almost too big to know where to start [though I hope someone gives it a try]. Most untrained or at least unpractised people with 4 octaves have 2 usable & 2 of squeaky breathlessness. I used to have 3 ½ untrained but well-practised. Broad guess, I'd say genetics; you can't 'train' much more range than you have... a bit, but not much.
Answer: It's a bit of both. You have what you have, genetically, and some people have a great range of 4 octaves (rarish), compared to a lot who have a decent two octave range. The latter is enough for most stuff, and changing key helps! With some training, another couple of tones at one end (or both) is possible, but quality of voice can suffer at each end.
Increasing range happens with lots of use, and also being aware that certain vowel sounds are easier to sing at the edge of one's range.
When singing solo, most songs can be accommodated with a couple of octaves, especially with any aforementioned key change. Problem comes when singing harmony with others whose ranges are also limited. Occasionally, a key which fits all cannot be found, as I sometimes find in various ensembles. Or the guitarist can't/won't change key...

Is vocal pitch trained or natural?


Temperature monitor for a rifle barrel?

Question: Is there any good Raspberry Pi tutorials for making a temperature monitor that can be used to monitor the temperature of a rifle barrel? So far, I can only find tutorials for contact-less temperature sensor for Arduino, but not for Raspberry Pi.
Comment: What sensor do you plan to use? The rpi uses 3.3V logic so your sensor would need to be compatible with that or you would need to convert voltages. What do you plan to do with the temperature data? You might be better off using an arduino.
Comment: I was thinking of using the MLX90614, just because I can't find any that are specifically meant to be used with a Rapsberry Pi. I plan to compare muzzle velocities with respect to barrel temperature. It seems that using an Arduino would be easier, but I was hoping to avoid having to add extra bulk to my system.
Comment: Sparkfun carries the 3V version of that sensor. If you got that you would be fine from a voltage standpoint.
Answer: Not trying to talk you out of your choice to use a contact-less temperature sensor, but perhaps you should consider a sensor that was directly mounted to the gun barrel (e.g. a thermistor). Why?

"The measured value [with the MLX90614] is the average temperature of all objects in the Field Of View of the sensor."
Thermistors are more accurate; 0.1°C - 0.2°C. OTOH, "the MLX90614 offers a standard accuracy of 0.5°C around room temperatures." And of course this assumes the MLX90614 is "focused" on the region of interest on the gun barrel.
Cost: $0.75 vs $19.95

In summary, you may get better (more accurate, more reliable, more repeatable) results with a thermistor. For mounting the thermistor to the gun barrel, you should also consider a dab of silicone grease to reduce the thermal resistance between the barrel and the sensor.
You asked about tutorials. There are many that cover using thermistors with Raspberry Pi, and you can also find some that use the contact-less MLX90614... this one includes some code
One final point: Without trying to be pedantic, you mentioned in your comment that "adding bulk" was a concern. You've not described your entire system, but the RPi has no analog input. Unlike the Arduino then, the sensor-to-RPi interface will be digital instead of analog, and (if you're using a thermistor) this will require added components. The RPi also will require a heftier power supply than an Arduino. All of that said, the MLX90614 does have an I2C serial interface which makes it a good choice if you're fixed on using the RPi.
Comment: Thanks Seamus! This is great info! Could you recommend a way to temporarily mount the thermistor to a rifle barrel? I thought about using an o-ring, but I'm concerned about the o-ring acting as a heat sink and expanding.
Comment: @CarlosRobinAlvarenga: If it were me, I'd likely try a simple rubber band first. It seems to me that the most important aspect of this is to make an effort to optimize  the heat transfer from the barrel to the sensor. Toward that objective, I'd try a wide rubber band, and a generous [dollop](https://www.merriam-webster.com/dictionary/dollop) of the **silicone grease** ref'd in my answer. And as usual with these things, you'll need some experiments to validate the setup (i.e. make sure you're reading different temperatures with reasonable accuracy).
Comment: I agree with starting simple, but a rubber band may be too simple. Depending on the type of gun, I'd be concerned that will melt to the barrel.

Temperature monitor for a rifle barrel?


connect to ethereum from web3

Question: i have tried following the mentioned steps at  this
but this connects to remix IDE. i want to connect to real ethereum wallet and use ether from there. please help.
Answer: Yes, if you want connect with main net or testnet (Ropsten,RinkeBy,Kovan) then you can use infura https://blog.infura.io/getting-started-with-infura-28e41844cc89 . you can also get details from here. After that you need to deploy you contract from truffle, you can start from here https://medium.com/@gus_tavo_guim/using-truffle-to-create-and-deploy-smart-contracts-95d65df626a2  or you can deploy directly on ethreum wallet https://www.codeooze.com/blockchain/ethereum-wallet-private-chain-deploy/
If you are using ethereum wallet GUI then just you need ABI. which you can get from Remix IDE. And Create wallet address and then you can deploy your contract.

connect to ethereum from web3


Waiver of Mandatory Minimums: why would that be up to the prosecutor and not a judge?

Question: Under Florida Law, the 10-20-Life waiver of mandatory minimums is at the discretion of the prosecutor.  Why is this not at the discretion of the judge and at the discretion of the prosecutor?
Answer: The short answer is that this is because the Florida legislature decided to do so.
Why would they do that?

Prosecutors are perceived to be more consistently in favor of "tough on crime policies" than judges, so allocating the authority to prosecutors makes it likely that waivers will be granted more sparingly.
Prosecutors have the authority to plea bargain and bring a lesser charge that doesn't have mandatory minimums in any case. So, the waiver provision merely formalizes the ability of prosecutors to do openly something that they could have done through the back door in any case.
This follows the pattern of many other states.
Comment: In addition to this, Manditory Minimums are a restriction on judicial power. Allowing judges to waive them defeats the purpose of Manditory Minimums in the first place. The District Attorneys (and through them, their subordinates, who are generally the actual prosecutors) are executives, who have the power to drop prosecutions or refuse to prosecute if they feel that doing so serves the process of justice. This new power is an extension of this into the sentencing phase. And since it's passed by the legislature, and helps the accused, no one really has standing to challenge it.
Comment: @shaur Good points.
Comment: @sharur Worth pointing out, however, the federal sentencing guidelines and mandatory minimums in many states (including Colorado) have a "safety valve" clause that allows mandatory minimums to be waived in certain extraordinary circumstances.


My Age of Empires HD won't progress past Joan of Arc: The Siege of Paris

Question: I tried using the cheat "I R WINNER" after restarting, and this did not work. I also tried deleting my profile and using "I R WINNER" to get back to the mission and this did not work. Now I've lost my original progress and I'm still stuck. Any advice is much appreciated.
Comment: Stuck how, stuck where? I think I remember being stuck somewhere in the southern part of the city/map, and going through and around the city wall to the next scripted sequence.
Comment: If I remember correctly, in the Siege of Paris there is a specific win condition. I think it was bringing Joan to a certain place. Defeating the Britions won´t give you victory. I remember that it is possible to defeat the Britons (without cheating), but that it doesn't give you the victory.
Answer: Ok, so I installed the game again and launched the campaign level. I Typed 'i r winner' and to me it worked instantly. Casing doesn't seem to matter.
At this point you could try to do the following:

Make sure your spacing is correct, there is a space between the 'I' and 'R' but from the looks of it, you seem to have that already correct
Repair the game in steam (right-click the game -> properties -> Local files -> Verify Integrity of game files
Disable any workshop items you have installed
Try the cheat 'black death', this worked for me
Try the cheats 'torpedo2' and 'torpedo3' and 'torpedo4' to kill all other players. (worked as well for me)

Note that you can backup your profile by copying the profiles from this folder 'Steam\steamapps\common\Age2HD\profiles' to a save location.
Comment: I was under the impression black death killed all units, wouldn't that cause you to lose? Especially as the main objective of the scenario in question is to get Joan to a specific location.
Comment: @IG_42 well I tested all the cheats listed above and it worked. Maybe I should have made that more clear


Outlook sent folder problem

Question: Does anyone know how to change the display of my Outlook Sent Items back to "who I sent them to" instead of showing the messages are sent by me?
Answer: Right click on a listview column header name (for example Sent), then choose "Customize Current View" then choose "Fields", then of course you would select "To" from the left side.
Answer: Even though there is an answer to this, I want to present it in pictures to make this easier. I'm using Outlook 2013.
The archived Sent Items Folder was showing my name instead of showing the recipient name as shown below

To make the change go to View tab and select View Settings under the Current View Section.
Click on Columns to bring about the Show Columns dialog.

Follow the numbering for easy steps.
Now that you have To in the list of columns, just remove the From from the list by clicking on it and selection Remove.
Click OK and OK. Now all the items in your (archived) Sent items folder will be listed by the recipient name in descending order.

Outlook sent folder problem


What is the most probable cause of terminal freeze / unresponsive keys?

Question: What is the most probable cause of terminal freeze / unresponsive keys? I'm a relatively new Linux user (2 yrs) and am still learning to use the command line. I have used xkill and similar commands to clear a stuck process, but in some cases the keys simply don't respond and I've reverted to pulling the battery due to impatience. My question is - if the keys on the terminal are unresponsive then is it because there are processes still working, unseen by me, that have not finished? If I can't use my keyboard, then I'm unable to execute ANY command. Were I to be patient and let the software complete its tasks, would I at some point regain access to the keyboard? Or are there situations where I can never regain active keys without a reboot? Thanks.
Comment: There is not really enough information to answer your question. For example, does just one terminal window become frozen, or the whole desktop? Do non-keyboard activities (mouse, etc.) continue to work? Can you log in from somewhere else when this happens? What application is running when this happens? It's worth noting that non-full-screen non-curses applications running on the terminal won't prevent your keypresses from showing up, because the kernel continues to do cooked mode terminal input processing, so even hung applications in a terminal won't usually cause the effect you're describing
Comment: Do you start a (heavy) process in these cases? Can you cancel it via `CTRL+C`? What commands are we talking? Does it happen randomly, even without you putting in commands?
Comment: Sorry - first timer here. I'll try to be more specific. Last time this happened, I was interacting with the GUI (Linux Mint) from the command line, learning to use nemo to open applications. I surely had several processes going including error messages. The terminal locked up and my first reaction is CTRL+C, but terminal does not respond, nor mouse because I'm stuck in terminal. Also, power button doesn't respond. I know the cause is me - too many commands - but question is - will the system recover through waiting? Right or wrong, I'm deliberately pushing the system to learn results.
Comment: I believe I caused my last few terminal freezes through trying to learn how to open applications from the terminal rather than the GUI - I've learned how to do this since my last post. Still interested though as to whether a freeze is permanent - for ex - does the terminal buffer get filled and lag behind - if so, I imagine that it would clear. But most freezes that can't be fixed with Ctrl C / S or Q seem to lock me up permanently. Thanks guys.
Answer: If a terminal is frozen but not the rest of the GUI, then the first place to check is if you typed Ctrl + S, (which stops output to the terminal) and the fix for that is to type Ctrl+Q (resume output).
Because OP explicitly said "terminal", however, there is no reason to suspect the GUI.
Further reading:

What does "XOFF ignored, mumble mumble" error mean?
Ctrl-s hang terminal emulator?
Comment: Thanks - I will write this down and apply next time. In most cases when this happens, it's due to trying too many things too quickly on my part. Appreciate the response.
Answer: If it is a gnome-terminal:  Possibly the "read-only" mode is toggled.
Right click anywhere in the input/output panel, and unselect "read-only" (by clicking on it) in the pop-up context menu to release the terminal from the frozen state.


C language portability

Question: How exactly is portability of a language like C is determined? I've learned that compilers are ISA specific. If this is true, how is C portable? Or is it that just the source code written in C is portable but not the executables? Aren't the executables ISA specific for examples applications for x86 are separate from the applications for Apple (assuming Apple uses Motorola/PowerPC microprocessor)?
Answer:
is it that just the source code written in C is portable not the executables?

Correct. Some people call it write once, compile everywhere.
http://en.wikipedia.org/wiki/Write_once,_compile_anywhere.
The other alternative is write once, run everywhere. Java is a good example of this.
http://en.wikipedia.org/wiki/Write_once,_run_anywhere
And even though you can achieve partial cross platform portability, you should never expect your code to run everywhere without modifications.
Comment: @TimWilliscroft: Portability problems are typically caused by non-standard libraries and bad programming practices; and are not caused by C or its standard libraries. A simple example would be using a non-standard GCC extension or failing to correctly serialise/de-serialise data for IO.
Comment: C source code not portable to different compilers or ISA's or OSes without quite a bit of extra-lingual shennanigans. Simple things like the size and alignment of standard types are not standard in C, so porting software that will exchange data with other instances of itself can be quite challenging. Refer to GNU Autoconf/Automake for a (possibly obfuscated) example of the hoops C programmers will jump through to get portability.
Answer:
is it that just the source code written in C is portable not the executables?

Exactly. You need to recompile your C program on every platform. C compilers generate machine code which is portable only to a very limited extent, between machines of the same processor/memory architecture and OS. That is why you see different binary distributions of multiplatform apps (e.g. browsers), such as "Linux 64-bit Intel" or "Mac OS X 32-bit PowerPC" (OK, the last one is just an illustration, I know Apple switched to Intel a few years ago :-).
Answer: It's not just ISA specific. For example you ask:

applications for x86 are separate from the applications for apple?

Yes, they are, even though Apple uses x86 hardware. C binaries are architecture and operating system specific.
Comment: @Steven314: Your comment is a tangent. It has nothing to do with whether hardware is standard or not, and everything to do with the fact that OS X has a different binary format (Mach-O) than that of, say, Linux (typically ELF).
Comment: @Steve: EFI vs BIOS only matters for booting and OS internals; the hardware architecture, which is the CPU instruction set is same, because it's same CPU.
Comment: Comments deleted, mainly because I should never have included the mac thing in the first place. My mention of ABI (Application Binary Interface) and call conventions may still be relevant (a third item to add to "architecture and operating system"). They aren't hardware relevant, except in that ABIs tend to be designed for particular architectures (e.g. available registers), but they are relevant to binary portability. This isn't a file format issue - ELF is used on Windows and Linux (by gcc), but you probably can't take an object file from one to the other.
Comment: @vartec you said C binaries are operating system specific too, is it because O/S itself is ISA specific, thus C binaries become O/S specific indirectly?
Comment: @Saurabh - all native executables are OS specific, because the OS specifies the file format. Also, a C standard library must implement many functions by calling the operating system, so even if the file format were standardized, the code itself couldn't run on another OS. This is standard for languages that compile to native code, as opposed to some virtual machine code such as the JVM (Java Virtual Machine). It is possible to compile C for a virtual machine, but never done that I know of. LLVM comes closest, but is intended as a compiler back end - not a compile-once-run-anywhere environment.
Comment: @Saurabh - being ISA specific is an issue too, but not the only issue. And some operating systems run on many different kinds of hardware - this is partly why Linux has a tradition of distributing applications in source code form.
Comment: @Saurabh: no, I'm saying that binaries are different even if you only change OS, but stay on same hardware. Because there are different executable formats http://en.wikipedia.org/wiki/Comparison_of_executable_file_formats
Answer: Most of the question has been answered but I'd like to add than durability is another thing you might have to take in account.
For example, JAVA can be written once and run on any platform where the VM (today, it's called "Runtime Environment"). But another advantage is that you can run Java 1.1 code from 1995 in your 2011 machine. Which is not possible if your code was compiled on i386 and you try to run it on your AMD64 architecture.
You get the improvements of the virtual machine itself as well.
Then, I would say that in general, going from the least portable to the more portable languages you would have: Assembler, low level compiled language like C, then C++, then interpreted languages or the ones that run within a virtual machine.
I'm not really a Java defender, at least not for the language nor the community for example, but it's the way to go if you're looking for portability and the least performance loss compared to C.
Answer: Good answers about write once compile anywhere.
People like to think about C as a portable language because of its popularity and the high
probability of a C compiler being available for future target platforms.  Another factor is the standard library which helps with common programming tasks in a platform independent way.
So I would say the portability of a language is determined by:

Level of standardization.
Availability of compilers for different platforms/architectures.
Depth and breadth of portable libraries.

Realistically though almost any complex C application will require some work to move over to a new platform due to hardware or operating system dependencies.  That process is known as porting.
Answer: "Portability" has multiple meanings.  With respect to C, it means the following:

Compilers have been implemented for C for a wide variety of hardware and operating system platforms, which was a Big Deal back in the early '70s;
There is a universally agreed-upon standard for the language itself, as opposed to each compiler implementation recognizing a slightly different variant of the language (again, a Big Deal when C was first designed, as there were multiple variants of languages like Pascal and BASIC that weren't universally recognized);
Because of this standard, conforming code will produce the same behavior when compiled on different platforms.

The source code is portable, but a new binary has to be generated for each target.
Note, however, that C source is rarely "trivially" portable; most applications require you to go beyond what's defined by the language standard, using extensions that are unique to a particular platform, so in practice source code isn't 100% portable.
Note, however, that C does leave quite a lot up to the implementation.  The exact sizes of various data types, the behavior on overflow, etc., are all up to the implementation; the standard provides the minimum requirements that an implementation must conform to, but the implementation is free to go beyond those limits.
Answer: Whatever ISA is, C isn't ISA specific. I assume you're not referring to the now-obsolete slot for PC extension cards.
There are standards-compliant C compilers for very many platforms, and as long as you use fully standards-defined language features in your source code, you should be able to compile it on any C compiler for any platform.
However, one gotcha is that the C standard leaves a lot of behaviour of features as either implementation defined or as undefined behaviour. This is done to make the C language more generally useful for low level programming, avoiding cases where some precisely defined behaviour is a poor match for what the hardware supports on some platform. However, it does make it a little harder to write portable programs.
Also, unlike some languages, C doesn't come supplied with a huge library of the kind that Java or C# provide. You can get very portable libraries to do just about anything, but you have to do some work to build them and get them to work together.
C does have a standard library, of course, but its scope is relatively limited in comparison with Java, C#, Python, etc etc.
Comment: ISA = instruction set architecture a.k.a. hardware architecture

C language portability


How to cope with classical references?

Question: It seems like references to classical literature are unavoidable in virtually all materials enjoyed by native speakers - I was watching an episode of 蚁族的奋斗 where a group of young men are talking informally around the dinner table, and one of them casually spouts off ""实在不行了我回沂蒙山陪我妈种树去,当地主,娶个村姑,养条狗,这叫"门墩、胖狗、肥丫头,农夫山泉,它有点甜"。, after which they all laugh heartily. Now, I'm sure that there is some type of historical or literary context behind what he said, but I have been unable to find any indication as to a) which text this quotation was drawn from or b) how I ought to interpret it. More than the hanzi or the tones, it seems to me that cultural references pose the greatest challenge to learners of Chinese as a second language. Can anyone shed some light on this quotation, or point me towards a resource where its historical background is discussed?
Comment: You stumped me on this one! I wouldn't laugh at all if I was at their table :P.
Answer: I have not watched this drama so my interpret may not be accurate. From what is said, this line is self-mockery and ironic, but in a humorous and relaxed tone.

门墩、胖狗、肥丫头 concludes the modest values of Chinese countrymen with a ragged verse. It doesn't look like from any specific reference, at least I am not aware of. However, in modern Chinese literature about country life (especially rural reform), there were some well known lines that were in the form of 3 words in parallel, such as "篱笆、女人和狗". A similar construct may hint/recall similar subject or value statements.
农夫山泉有点甜 is taken a famous TV commercial for 农夫山泉 (mineral water brand). This line is purely self-mockery. The subtext is "Even if I fail to struggle in the city, I become a peasant (against my own wish), at least I have sweet water to drink."
沂蒙山 is national wide known for its poverty. Even the speaker does have aspirations for what he said, the "happily ever after" tone in his words is unlikely to realize. This context confirmed that his intent of these words is purely being self-mockery and humorous.
To summarize, what he really means is "There is no other option but to struggle in the city no matter how hard it is."

When his friends heard this and laughed, it means they shared the same feeling and the subtext could be "cheers to you, Mr. Brightside!"
Again these are just guesses without having watched the drama. Having heard of it from many friends, I'll probably watch it some time...
Comment: Interesting. By the way what does "篱笆、女人和狗" mean?
Comment: @QuestionOverflow it illustrates a typical traditional farmer's village - during the day, men are out in the fields, the village is all about hedges, wives and watchdogs. It was a chapter name of a novel about mind liberation of Chinese farmers (w.r.t. acknowledging women have right to divorce or leave hometown.)
Comment: I think it was also adapted into a TV series? I was very young when this was shown on TV. I think your interpretation is fairly good, especially when you've never read the novel.
Comment: Ah.. I see. Learn something new today :)

How to cope with classical references?


Using multiple RTC libraries in one program

Question: There are multiple RTC libraries available, can I load several RTC libraries into my code and then use the functions I like from each one?  Will there be some conflict if for example I include DS1307.h   and RTCLib.h and other RTCXXXX.h libraries as well?
Comment: Thanks guys, the real issue is that the functions available from just one RTC library are often lacking. I haven't found a "super" RTC library that incorporates the best ideas of the many libraries out there. I don't feel like writing or editing a library so I'll just convert my sketch to deal with the present best of breed.
Comment: I think that in case of the RTCs it might actually work, but it's not advised, and may introduce some really weird problems.
Answer: If you want to load multiple RTC libraries I guess you are connecting to multiple RTCs.
If they use the same interface to communicate, i.e. I2C there is a possibility you will initialise the bus multiple times.
You should be OK with the functions not clashing, because they are within classes, but its possible some of the referenced structures/ classes my clash.  You might be able to resolve this by namespacing the libraries.
An alternative might be to write your own library that handles all of the RTCs that you are interested in.  This will force you to consider what each RTC requires and identify problems.
At the end of the day I agree with what Gerben is saying.  Don't do it unless you really have to.
Answer:
can I load several RTC libraries into my code and then use the functions I like from each one?

It will depend on the libraries. Most likely they had some persistent variables, global to the routines, that help information exchange. If only some of the routines are used and others not, values in those variables may not be consistent.

Will there be some conflict

That will depend on the way those libraries are implemented. No way of telling without seeing the code.
The point of doing this is a little bit suspect. It is not clear to me why you would want to have more than 1 RTC in an environment. If you are thinking about giving your program the option to function with multiple RTCs (but using one RTC at any given time), you can use either macro (at compile time) or wrap the RTCs in a logic layer (at run time).
For example, you can have a rtc_init() to reset different RTCs; and rtc_read() to return the time from the rtc. rtc_read() can be implemented based on which RTC is detected during initialization...


Why couldn't Tina Disapparate from her execution?

Question: In the execution scene in Fantastic Beasts and Where to Find Them, when Newt takes down the guards, Tina is standing on the chair above the death potion and yelling for Newt to help her. Why couldn't she just Disapparate from it?
Comment: Because she was "drugged" and didn't have her wand?
Answer: There are no canonical evidence on security setup at Magical Congress of the United States of America (MACUSA) headquarters. But based on the books there are places where Disapparation does not work.
Hogwarts does not allow Disapparation:

"He must have Disapparated, Severus, we should have left somebody in the room with him. When this gets out –"
"HE DIDN'T DISAPPARATE!" Snape roared, now very close at hand. "YOU CAN'T APPARATE OR DISAPPARATE INSIDE THIS CASTLE! THIS – HAS – SO"
Harry Potter And The Prisoner of Azkaban, Chapter 22, Owl Post Again

In fact, the Ministry of Magic had stopped Apparition in and out of the Ministry, after Voldemort had taken over. It is basically a security feature.

"We know everything important," Harry went on, addressing Hermione. "We know they've stopped Apparition in and out of the Ministry; We know only the most senior Ministry members are allowed to connect their homes to the Floo Network now, because Ron heard those two Unspeakables complaining about it."
Harry Potter and the Deathly Hallows, Chapter 12, Magic is Might

It's most probably because Gellert Grindelwald was trying to take over that MACUSA stopped Apparition.
She did not have her wand:
Wands make it easier to disapparate and Tina did not have her wand. Based on Does a wizard need a wand to Apparate?

The following day Snickerton led a band of men to arrest the accused witch. Cornered at her shop, she was unable to explain why she owned no scissors. Snickerton insisted that her hands should be tightly bound to stop her cursing them all and set about searching for the wand he swore he had seen her using. After several hours, however, he had found nothing suspicious, and his friends were starting to doubt him.
At last, Madam Crimp asked whether she might at least be unbound to scratch her chin, on which there was a large wart. Unable to see the harm in this, her foolish accusers agreed.
The moment Madam Crimp touched the wart, it sprang out of her face, revealing itself as her concealed wand. She promptly Disapparated along with a large bag of gold, and was never seen in London again.
Wonderbook: Book of Spells - Chapter 4
Comment: Also she didn't have her wand
Comment: Will update the answer. I though it was not needed.
Comment: The first part would also explain why they didn't apparate after they got their wands, and why Queenie had to carry them out in Newt's suitcase.
Answer: Disapparition from the death cell was almost certainly prevented.
The room Newt and Tina were in was a death cell, designed for the executions of wizard criminals. MACUSA would surely know that wizards capable of Apparating would attempt to Disapparate from the room and escape their impending death.

"SCENE 67
  INT. CORRIDOR LEADING TO DEATH CELL—DAY
A long black metallic corridor leads into a pure white cell, which consists of a chair suspended magically over a square pool of rippling potion.
NEWT and TINA are forced into this room by the EXECUTIONERS. A guard stands at the door." - Fantastic Beasts and Where to Find Them: The Original Screenplay

Therefore, it would be a very egregious oversight to not prevent wizards from Disapparating from the death cell. It's not impossibly difficult to prevent Apparition - most wizard houses do it.

"Professor, why couldn't we just Apparate directly into your old colleague's house?'
'Because it would be quite as rude as kicking down the front door,' said Dumbledore. 'Courtesy dictates that we offer fellow wizards the opportunity of denying us entry. In any case, most wizarding dwellings are magically protected from unwanted Apparators. At Hogwarts, for instance –'
'– you can't Apparate anywhere inside the buildings or grounds,' said Harry quickly. 'Hermione Granger told me." - Harry Potter and the Half-Blood Prince, Chapter 4 (Horace Slughorn)

Considering that neither Apparition nor the means to prevent it are unobtainably difficult sorts of magic, MACUSA would almost certainly prevent wizards from escaping their death cell that way.


What's an easy way to complete the "2-wheels" distance challenge?

Question: One of the challenges in the Saintsbook is to drive your car a certain distance on two wheels.  I usually get a tiny 2-wheel distance every time I jump the car over something, but this seems like a really slow way to max out this challenge.  Is there a quicker way to get my car up on 2-wheels and keep it there?
Answer: I found that the easiest way to complete this challenge was to do it through normal gameplay. Grab cars with loose suspensions (like pickup trucks, golf carts, SUVs, etc.) and powerslide (hold down Ⓐ on Xbox 360 or ✕ on PS3 by default; it's the handbrake) around corners a lot. I pretty much powerslide around every single corner in every single car. Doing this, I was able to get this challenge pretty quickly.
Occasionally, I was in a cars driving along the highway and had someone knock my car so it was tipping on its side with one set of tires on the ground and the other resting along the median/guardrails, which also allowed me to rack up 2-wheel driving distance. If you really want to try to grind this at once instead of doing it organically through gameplay, this would probably be the easiest way to do it. With a car with a high enough suspension, you can just drive halfway up onto the median/guardrail yourself and do it.
Comment: I haven't been powersliding, but I'll give that a shot, thanks!
Comment: Make sure to aim for empty spots in the intersection ... I'm not sure, but I think hitting another car will end the two-wheels stunt, even if you're still on two wheels for a bit after the collision.
Comment: Did you have good luck with a powersliding a particular car?  I've tried several pickup trucks (sometimes with the torque upgrades for extra speed) and I don't seem to be getting it very frequently.  Was it more of a just random/luck thing, even with those cars?
Comment: I've found that the easiest way to do method 2 (the "guardrail method") is in a tank.  If you get a tank, and find a somewhat low concrete barrier/wall, you can drive up and down off of it and easily max out the 2-wheels distance.  Ironically, tanks have no wheels...
Answer: What I did was get on the highway and scoot up to the median, I could usually get roughly 50-100' per try until I either dove over the median or wrecked my car.


1yr baby feeling hungry at night but not feeding instead crying

Question: My 1yr old baby had fever two days ago.That time he avoided solids and Had only breastfeed milk. But now he refuses to breast feed during night .But crying for long time due to hunger... I just gave little water and tried long time make him sleep. I don't know why he refuses but crying for breastfeeding. I don't what to do.
Comment: Do you know for a fact that he's hungry? If he had a fever recently, he may be crying at night because something hurts. Have you had a talk with your doctor or nurse?
Comment: Fever is not really a reliable indicator for teething; I'd be more worried about an ear infection. Fussy, reduced intake, crying at night, recent illness... I can't tell you how often this is a presentation for an ear infection, especially if the fever was due to an upper respiratory infection.
Comment: If he's not eating, he's probably not hungry... if he had a slight fever, he may be teething... there's often a fever with teething.
Comment: How much of a fever?
Answer: I am no expert but it does sound like teething. Refusing to eat and fever are symptoms. I hope you can see these:
Teething can raise your baby's body temperature, but only slightly. Any fever over 100.4 F/38 C  is a sign that your child is probably sick.
Link

What are the signs a baby is teething?
Some babies get through teething with no signs at all, but many
  parents report that their babies do experience discomfort. The most
  likely signs of teething include:
Irritability or fussiness
Drooling (which can cause a facial rash)
Swollen, sensitive gums
Gnawing or chewing behavior
Refusing to eat
Trouble sleeping
Is it true that teething can cause a fever, diarrhea,
  or a runny nose?
Some parents say their baby also gets a fever, diarrhea, or a runny
  nose just before a new tooth arrives, but there's no scientific proof
  that teething causes these symptoms. The American Academy of
  Pediatrics says that although a baby's body temperature may rise
  slightly when teething, a true fever (rectal temperature of 100.4
  degrees F or higher) and diarrhea aren't normal symptoms. If your
  child has a fever along with other symptoms such as lack of appetite,
  vomiting, lethargy, or diarrhea, call her doctor to rule out anything
  more serious.

If you can't just search for teething and you'll get a similar list of what to expect and what symptoms  the infant/child exhibits.
As anongoodnurse has pointed out, an earache/infection or other illness might also be the cause. See your doctor any time you have a concern or the baby's fever is high lasts beyond a reasonable period.
Comment: I notice you often just add "LINK" to your answers. What if the link rots? It's better to summarize pertinent points in your answers, which are usually helpful. But "LINK" is not an answer.


Question about the DNA glycosylase enzyme assay/formamide gel loading buffer

Question: Often for the DNA glycosylase enzyme assay we can see that the DNA glycosylase is incubated with oligonucleotide in 37C and then reaction is stopped by addition of formamide gel loading buffer (80% formamide/1 mM EDTA, pH 8.0y0.1% bromophenol blue/0.1% xylene cyanol). How the reaction is stopped by this buffer?
Comment: Do you have a reference for that?
Comment: Cloning and Characterization of a Functional Human Homolog of Escherichia coli Endonuclease III
Aspinwall, Richard ; Rothwell, Dominic G. ; Roldan-Arjona, Teresa ; Anselmino, Catherine ; Ward, Christopher J. ; Cheadle, Jeremy P. ; Sampson, Julian R. ; Lindahl, Tomas ; Harris, Peter C. ; Hickson, Ian D.
Proceedings of the National Academy of Sciences of the United States of America, 1997, Vol.94(1), pp.109-114 [Peer Reviewed Journal]
Comment: Formamide is a common loading buffer for denaturing gel electrophoresis of nucleic acids. I'd assume that it also denatures most enzymes and stops the reaction that way.
Answer: Escherichia coli endonuclease III (which I will now refer to as Nth), and the human homolog hNTH1, has both glycosylase and AP lyase activity. The section of the article you're referring is describing an assay of lyase activity. The assay tested both Nth and hNTH1 as well as HAP1, a human AP hydrolase that cleaves 5' to the AP site. Nth and hNTH1 were found by this assay to cleave 3' to the AP site. HAP1 is dependent on $Mg^{2+}$ for catalytic activity. hNTH1 (and likely Nth, given the high conservation) are dependent on $Mg^{2+}$ for substrate specificity (Eide et al., 2001). hNTH1 and Nth contain an $Fe-S$ cluster that is involved in DNA binding (Thayer et al., 1995).
Originally I thought that the reaction is stopped with EDTA. EDTA is a chelating agent; it binds and sequesters metal ions and prevents their use by enzymes. EDTA would prevent catalysis by HAP1 and DNA binding by Nth/hTNH1.
However, Chris pointed out that the loading buffer contains 1 mM EDTA while the reaction buffer contains 5 mM $MgCl_2$. While the paper doesn't give the volumes of reaction and loading buffer mixed together, it is perhaps unlikely that EDTA chelation of $Mg^{2+}$ is the sole mechanism for stopping the reaction. The high concentration of formamide (80%) in the loading buffer could then be responsible. Formamide is commonly used to denature nucleic acids and, at high concentrations, would likely have an effect on enzyme function.
References

Eide L, Luna L, Gustad EC, Henderson PT, Essigmann JM, Demple B, Seeberg E. 2001. Human Endonuclease III Acts Preferentially on DNA Damage Opposite Guanine Residues in DNA. Biochemistry-US. 40(22):6653–6659
Thayer MM, Ahern H, Xing D, Cunningham RP, Tainer JA. 1995. Novel DNA binding motifs in the DNA repair enzyme endonuclease III crystal structure. EMBO J. 14(16):4108–4120.
Comment: How much magnesium is present in the buffer? The EDTA in the buffer is only 1mM, so only 1mM of magnesium is complexed. I doubt that this is enough. Additionally, this buffer is not only TE but contains 80% Formamide.
Comment: @Chris: Thanks, that's a good point. The reaction buffer contains 5 mM &Mg^{2+}$. However, they don't give the volumes of reaction and loading buffer that are added to each other and electrophoresed. Do you think that formamide is the major factor stopping the reaction? I assumed it was there to denature the DNA. Does it also denature enzymes? Or perhaps the enzymes don't function on ssDNA.
Comment: I think so. I haven't checked if formamide reacts with proteins. That would be one possibily.
Comment: I've edited my answer, though I don't feel it answers the question anymore. I wish I could find some literature about it.
Comment: Thank you very much for your help. As you mentioned in your response, AP andonucleases may  incise 3' and 5' to the AP site. I read more about it and I am confused at some point. I have found:

There are four possible incision sites for AP endonucleases, and the enzymes have been classified according to their sites of incision:
class I and class II AP endonucleases incise 3' and 5', respectively, to the AP site, both leaving 3'-OH and 5'-P termini.
If for class II AP endonucleases incision is at 5' to the AP site, how it is that there is generated 3'-OH and 5'P?
Comment: Gary M. Myles and Aziz Sancar (1989). "DNA Repair". Chemical Research in Toxicology 2 (4): 197–226
Comment: @Piesel Perhaps you should ask that in a new question. Basically the phosphate will be on the 5'C of the AP ribose.


Do seventh chords have more inversions than triads?

Question: Because seventh chords have four notes, wouldn't it make them have more inversions than a triad?
Comment: @mistercoffee66 - possibly because mathematically if nothing else, it's fairly obvious - thus virtually rhetorical?
Comment: sorry for basic question, I just wasn't completely sure.
Comment: It's a basic but perfectly valid question. I don't know why it got down votes.
Answer: Yes. They have root position, first inversion and second inversion which we have also seen with triads and are exactly the same with the root on the bottom, the 3rd on the bottom, and the 5th on the bottom respectively. However we also now have third inversion which has the 7th on the bottom.
Answer: Yes - the more notes avaiable in any chord the more inversions you can have.
An inversion is named purely by its lowest note, so since seventh chords by definition are comprised of four notes, ther will be, in rising order named from the lowest note they are roo, 1st, 2nd and 3rd inversions. The last probably sounding the weakest.
Of course with four notes, there are more voicings available as well.
Root in key C could be C E G B, C E B G, C G B E, C G E B, C B E G, or  C B G E. All of which are playable on piano at least.
Answer: yes, they do. You are correct.


How to describe someone who strongly believes in caste system?

Question: How do I describe a person who strongly believes in caste system? Does even a word exist to describe the same?
Comment: Google Books reports *casteism* in use since 1827, *castism* since 1868, and *casteist* since 1921.
Comment: In the UK at least, such a person would be morally equated with someone who strongly believes in, say, slavery or genocide. So even if there *is* a term specific to that particular "belief", we'd normally want to use more familiar terms *(asshole, dinosaur, monster)* so everyone would know just how much we despise them. And "neutral" terms such as ***hierarchist*** simply wouldn't cut it, because they prevent us from expressing our disapproval.
Comment: As @TRomano pointed out, it is very important to understand the context that you would like to use this word in so that we suggest something appropriate. An example sentence would be enough in my opinion.
Comment: This doesn't seem to me to be necessarily a matter of opinion.  A person who strongly believes in monarchic succession is a _monarchist_ or _royalist._  A person who advocates for a feudal system is a _feudalist._  I don't know of a corresponding word for someone who advocates for a caste system, but I don't see why it couldn't exist.  If one were discussing the sociological history of India, it would be a handy word to have available.   _"Casteist?"_: https://books.google.com/ngrams/graph?content=casteist&case_insensitive=on&year_start=1800&year_end=2008&corpus=15&smoothing=0
Comment: I am not a fan of fascism or anarchism, but it is nice to have different words for proponents of each of them, rather than lumping them together as _a-holes, and dinosaurs._
Comment: Voting to close as primarily opinion based.  If OP wishes to paraphrase his opinion, and then ask for a word or words that might express that opinion succinctly, I'd vote to reopen.
Comment: Yeah, in America we call them racist for some reason... The color designations are a social caste system completely unrelated to race. Which is why there needs to be a proper word to adiquately address this. The problem is the people charged with this are all members of the social caste whites.
Answer: Since caste in India signifies a social hierarchy, different classes (though I think caste in its meaning is actually stronger than class), possibly

elitist

could be used for members of the upper caste who feel the way you describe. Usually the top of the pyramid look to maintain their status. But elitist possibly doesn't have the strong feeling that

racist

carries. It's unfortunate that racist by definition applies only to race. If different castes were thought of as different races, it might be appropriate with all the connotation associated with it.
** In UK law, discrimination based on caste is being considered as a form of racism, the debate has been going on for years.
Other terms which might be associated with someone who believes in the caste system are

casteist
feudalist

An exponent of caste is someone who promotes the ideas of the caste system
An advocate of caste is someone who promotes the practice of the caste system
Answer: There aren't many words related to the idea of a caste system in English, because such systems are uncommon in countries with English as the primary language. Probably the best choice for a person who supports a caste system would be classist. Be aware that this carries a negative connotation. Saying someone is a classist is an insult; you're saying that they support judgement, discrimination and mistreatment of others based on their social standing.
I don't know of any words or idioms which have the same meaning but express a positive opinion. The closest opposite would be something like egalitarian, meaning a person who doesn't discriminate and treats people fairly. However, this term includes more than just social standing, because it is a general term. Skin color, gender, age, etc. are all included here.
If you're trying to say something beyond just that the person supports a caste system, then please elaborate on what exactly you want to say. English has plenty of words for issuing value judgements.
Answer: You could simply use caste believer, which sounds neutral enough in my humble opinion.
And it's obvious that I'm not the first who's ever used this term. There are 7 results in Google Books (it's used as part of a longer phrase in some results) and a lot more in Google search results.
Answer: jaati (जाति) in Hindi is the word for caste.
jaativaadee (जातिवादी) in Hindi is the word for casteist. They modifier "vaadee" translates to plaintiff in English, the person bringing the suit in court, or pointing out a difference with an public objection, like "you are drinking from the wrong fountain", or the NYC Central Park Karen who had her dog off the leash and reported the Black bird-watcher who objected to the police, as an attacker. That Karen is definitely a jaativaadee.
Just import the Hindi word into English. They own the intellectual property, I'd say.
Google Translates this incorrectly as "racist", but there is no other word for race in Hindi, but jaati (जाति), they are conflated.
Another possibility is to call casteists Karens, although you would have to stop conflating that with persons merely complaining to the management because the service is actually lousy.
Answer: "Bourgois" as sited by the Marxist seems the most appropriate.  Those who hold the power of materialism, finance and law over all others.  The Burgoise wish to maintain theiro elite power over all others using race, material ownership, wealth etc to maintain their hold.
Comment: No; bourgois is used to describe members of a particular class, certainly, and those may plausibly have a self-interest in maintaining the class system, but the term says nothing in itself about their actual beliefs.


iTextsharp: Add image and text in a loop (IE, Firefox, Chrome)

Question: I have a form with a button that generates a pdf file. The file loops through an array of images and text and insert each image and text on an absolute position of the document. I can add the image, without the text and it works well. I can also add the text without the image and all work well. However, When I add both at the same time, I get the error that
there was an error processing the document.

Here is the code
[HttpPost]
    public FileStreamResult ff(MyModel model)
    {
        MemoryStream workStream = new MemoryStream();
        Document doc = new Document();
        doc.SetMargins(50, 25, 25, 30);
        PdfWriter.GetInstance(doc, workStream).CloseStream = false;
        PdfWriter writer = PdfWriter.GetInstance(doc, workStream);
        writer.CloseStream = false;
        doc.Open();
        PdfContentByte cb = writer.DirectContent;
        string path = "";
        Image Img;

        int num = 0;
        float imageSize = 160f, margin = 5f, position = 600;
        ColumnText ct;

        foreach (var item in model)
        {

            /*ct = new ColumnText(cb);
            myText = new Phrase(new Chunk(numbering[num] + " " + item.Caption, FontFactory.GetFont(FontFactory.TIMES, 9, Font.ITALIC)));
            ct.SetSimpleColumn(myText, doc.LeftMargin + margin, position + 5f, imageSize, 2, 15, Element.ALIGN_LEFT);
            ct.Go();
            x += 10;
            y += 12;*/

   /////The code above and the code below(withing the loop) do not work when they are together but work well when they are not together

            path = item.path;
            Img = Image.GetInstance(path);
            Img.ScaleToFit(imageSize, imageSize);
            Img.SetAbsolutePosition(doc.LeftMargin + margin, position);
            Img.Border = Rectangle.TOP_BORDER | Rectangle.RIGHT_BORDER | Rectangle.BOTTOM_BORDER | Rectangle.LEFT_BORDER;
            Img.BorderWidth = 1f;
            doc.Add(Img);

            num++;
            position -= imageSize;
        }

        document.Close();
        byte[] byteInfo = workStream.ToArray();
        workStream.Write(byteInfo, 0, byteInfo.Length);
        workStream.Position = 0;

        return new FileStreamResult(workStream, "application/pdf");

    }

Internet explorer and firefox display an error There was an error processing the page. There was an error reading this document(18).
Chrome does display the page, but the arrangement of the pictures is wrong. The second picture appears first and the last picture fails to show up, but is border is displayed as the last image(like an empty canvas)
what am I doing wrong please?
Answer: Does it help if you set the filename of the result?
var result = new FileStreamResult(workStream, "application/pdf");
result.FileDownloadName = "test.pdf";
return result;


Can Dominicans with US visas visit Niagara Falls on the Canadian side?

Question: We have friends, a married couple from the Dominican Republic, coming to the US on 30-day visas. We are US passport holders, and would like our friends to the Canadian side of Niagara Falls. Are they allowed to enter Canada for a few hours to a day with their DR passports and US visas? Do they need a visa to enter Canada and can they leave the US and re-enter with their 30-day US visas?
Comment: Are those single entry visas?
Comment: And are Dominicans allowed to visit Canada without a passport?
Comment: @DJClayworth I think (s)he probably does mean that - it's fairly clear that the OP is the (US) host, and the visiting Dominicans are the ones with potential issues.
Answer: You can find out if you need a visa to visit Canada at the CIC site. Filling in the appropriate answers will tell you that citizens of the Dominican Republic need a visa to visit Canada, unless they have resident visas for the US.
You can apply for such visas. The site above will tell you how. You will also have to ensure that the US visas your guests have are multiple entry. And all of you will need to bring your passports.1
As US passport holders you yourselves can visit Canada without visa of any kind.

There are alternatives to passports for US citizens, as you probably know, but if you have passports you may as well use them.


Known .aff problems?

Question: I'm working on a new project.  The video editors have the latest avid version, and our sound team is working with the latest version of protools.  We've been encountering problems with that file extension, as opposed to an OMF.  Is this a known problem?
Answer: With the latest version of AVID, they've nicked the "Open Timeline" idea from FCP - you can pretty much put anything into the timeline and it will do it's best to work with it. Whether or not you like/agree/whatever, the feature is probably here to stay.
So, to answer your question, there are a number of issues with AAF, regarding Multiple sample rates in the timeline, multiple framerates in the timeline and some types of MXF media. The Avid/Digi forums have some info if you want to go searching, but MOST of the errors are due to the first two. The solution seems to be to use embedded media and force it to WAV format in the export box. (I'm pretty sure you can do this with consolidated media as well, but I've never tried it.)
Comment: Add one more to the list. If you are having persistent issues (esp. Assertion Errors) on your AAF, have the editor open the AAF in Avid and look for un-rendered audio transitions and/or "add edits". It's a bit of an Avid glitch that a transition close or happening on an "add edit" will cause the AAF to fail outside the Avid. Alternately, you can have the editor output OMF's (which can require some extra work) which seem to avoid the issues entirely.
Answer: What sort of problem? I've never encountered any problems that weren't user generated I'm afraid to say (please don't take that wrong way).
Answer: i've seen a number of questions like this asked on the gearslutz post production forum.

Known .aff problems?


Passport comparison between Germany and Canada.

Question: The Henley and Partners Visa free index 2018 lists the German passport as the most powerful in the world with a visa free access to 177 countries. My wife holds a Canadian passport and she is eligible to travel to 172 countries visa free. A US passport holder can travel to 173 countries visa free which is one more than Canada. We are curious as to which are these 5 countries which provide visa free access to Germans but not to Canadians and the one country which provides visa free access to US citizens and not to Canadians. Kindly elaborate.
Comment: It may be true that Canada is good for 172, and US is good for 173, but they're not the *same* 172 countries. For example, US citizens need a visa in advance for Turkey and Venezuela but Canadians do not. You can compare [Visa requirements for Canadian citizens](https://en.wikipedia.org/wiki/Visa_requirements_for_Canadian_citizens) and [Visa requirements for United States citizens](https://en.wikipedia.org/wiki/Visa_requirements_for_United_States_citizens). And of course, [Visa requirements for German citizens](https://en.wikipedia.org/wiki/Visa_requirements_for_German_citizens).
Comment: @GregHewgill Hasn't the US-Turkey visa friction subsided?  Also, the charge for Canadians to enter Turkey has historically been much higher than for US citizens.
Comment: @phoog: I don't know whether the friction has subsided, I'm just looking at the Wikipedia articles which are usually pretty up to date but are not definitive. Things change all the time, of course. The summary is that things are not anywhere near as simple as the OP presumes.
Answer: Brazil, Iran, Vietnam, according to this site. They seem to calculate differently, as the numbers differ (161/158).


Travel with an Italian residence permit

Question: I am an Egyptian citizen. I have a family residence permit for Italy for five years. I want to book a flight from Egypt to Rome Transit in Athens. I want to make sure if the Italian residence permit allows me to travel through Greek airlines.
Answer: Yes, your EU residence permit (whether as a family member of an EU citizen or not) allows you to travel to other Schengen states for 90 days out of every 180 days. You do not need a visa or any other special permissions for this itinerary.
Comment: I would add that the same is true of any residence permit issued by any Schengen country.
Comment: @DavidSupportsMonica no.  To travel to another *Schengen* country, within the 90/180 rule, *any Schengen residence permit* will do.  To travel to a *non-Schengen* EU country without a visa (or, technically, to exceed the 90/180 rule in Schengen) it must be a family member residence card and the traveler must be accompanied by (or joining) the family member.  Otherwise, a Nigerian living in Geneva would have to get a visa to go shopping in France.
Comment: @phoog Thanks. I'll delete my erroneous comment.

Travel with an Italian residence permit


Orthography in different languages

Question: Why do some languages in their written form tend to follow the spoken language (e.g. Italian, Spanish) keeping the orthography "synchronized" with the phonetic evolution of the language, while other languages (e.g. English, Tibetan) are much more conservative in their written form, while the phonetics of the spoken language evolves in time?
Comment: are you asking about how orthography changes over time to accommodate language change, or about the relation between orthographic structure and sound structure?
Comment: 'why' is a a hard question to answer, usually speculative in nature. Since orthography is a conscious invention, more subject to technology developments (like printing) and cultural norms (maybe a single authority decided to maintain old forms). All languages go through phonetic changes, but there's no guarantee how radical they may be (English had the Great Vowel Shift affecting a number of vowels, but Spanish only diphthongized a few).
Answer: This has to do in large extent with the measure how the language community is productive with regards to writing stuff. If you have lots of literature and written communication in general, you will be more conservative in changing the orthography because you decrease the ability to read the old records.
However I do not find the comparison with Italian or Spanish particularly appropriate as their orthography did not exactly change all that much either because of the nature of phonetic changes  - e.g. Latin [j] changed to [dž], then to [ž], then to [š] and finally to [x] in Spanish. But it evolved this way in all contexts, so orthographically it could be represented in all periods by the same grapheme. There can actually be confusion, because the grapheme  can be pronounced the same in certain contexts.
So the difference between Spanish/Italian and English is because in English the phonetic changes were much more context dependent, resulting in phonemes splitting into two (just like Latin /g/, which split into /g/ and /x/ in Spanish, where the latter merged with the product of latin /j/ - this was much more frequent in English).
Comment: Can you please add sources? In particular, for "If you have lots of literature and written communication in general, you will be more conservative in changing the orthography" (I'm not sure this is true) and for "Latin /g/ ... split into /g/ and /x/ in Spanish"
Comment: It seems Latin /g/ was generally lost in Spanish after a vowel, became /g/ word-initially before a back vowel and /ʝ/ word-initially before a front vowel, and became /θ/ after a consonant and before a front vowel. See [History of Spanish Consonants](https://www.staff.ncl.ac.uk/i.e.mackenzie/cons.htm), which references Penny, Ralph. 2002. A history of the Spanish language (2nd ed.). Cambridge: Cambridge University Press. As far as I can tell, /x/ in modern Spanish only comes from Latin "g" in learned words/cultisms; it was not the result of natural phonetic development.
Comment: Yes, you are probably right with the cultisms. Anyway, this is not much of a linguistics question but that of a language management. The orthography is always a result of a more or less conscious linguistic analysis and therefore subject to decisions - i.e. the orthography changed (or did not) because the language authorities (in the broadest sense of the word) consciously decided so for certain reasons, i.e. it is not for reasons intrinsic to the language itself.
Answer: You are  referring to the different levels  of phonemic orthography among languages:

A phonemic orthography is an orthography  (system for writing a language) in which the graphemes (written symbols) correspond to the phonemes (significant spoken sounds) of the language.
Languages rarely have perfectly phonemic orthographies; a high degree of grapheme-phoneme correspondence can be expected in orthographies based on alphabetic writing systems, but they differ in how complete this correspondence is. English orthography, for example, is alphabetic but highly nonphonemic.
However, the Italian and Finnish orthographic systems come much closer to being consistent phonemic representations.

While the reasons for the different levels of  phonomeic orthography may vary among  different languages, as far as the  English language is concerned it appears that the Great Vowel Shift has something to do with it:

English orthography is highly non-phonemic.  As with many languages spoken over a wide area, it would in any case be hard to construct an orthography that reflected all of the main dialects of English, because of differences in phonological systems (such as between standard British and American English, and between these and Australian English with its bad–lad split, or even between adjacent counties of Britain).
The irregularity of English spelling arises:

partly because the Great Vowel Shift occurred after the orthography was established;
partly because English has acquired a large number of loanwords at different times, retaining their original spelling at varying levels;
and partly because the regularisation of the spelling (moving away from the situation in which many different spellings were acceptable for the same word) happened arbitrarily over a period without any central plan.

However even English has general, albeit complex, rules that predict pronunciation from spelling, and several of these rules are successful most of the time; rules to predict spelling from the pronunciation have a higher failure rate.

Orthography in different languages


How to resolve the dependency on Microsoft.EntityFrameworkCore.SqlServer and Microsoft.EntityFrameworkCore.Tools?

Question: I am trying to create an application using Microsoft SQL Server database using Entity Framework Core.
This is what I have done so far
Step 1: From Nuget Package manager I have installed: Install-Package Microsoft.EntityFrameworkCore.SqlServer
Step 2: From Nuget Package manager I have installed (for Entity Framework commands) : Install-Package Microsoft.EntityFrameworkCore.Tools –Pre
And my project.json looks as under
{
  "version": "1.0.0-*",
  "buildOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "Microsoft.EntityFrameworkCore.SqlServer": "1.0.1",
    "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview3-final",
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.0.0"
    }
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": "dnxcore50"
    }
  }
}

But it throws error
a) The dependency Microsoft.EntityFrameworkCore.SqlServer >= 1.0.1 could not be resolved.
b) The dependency Microsoft.EntityFrameworkCore.Tools >= 1.0.0-preview3-final could not be resolved.
Screen shot

I am using

VS 2015 Update 3
Not net framework 4.6.1

Why it is throwing the error and how can i fix it?
Answer: I think is because you are missing Microsoft.EntityFrameworkCore, try this:
    "dependencies": {
        "Microsoft.NETCore.App": {
          "version": "1.0.0",
          "type": "platform"
        },
        "Microsoft.EntityFrameworkCore": "1.0.1",
        "Microsoft.EntityFrameworkCore.SqlServer": "1.0.1",
        "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview3-final"
    }

You won't need to restore the packages using Nuget, the changes in project.json should automatically restore those packages.
The above works for me, if it doesn't for you maybe there's something else, let me know.