What is the use of /boot (lvm based) in partitioning?

Question: As separate /home partition helps in easy reinstallation/upgrade. Does having /boot help while dualbooting with windows? I mean is it useful for normal desktop/notebook users or it is advanced technique that need to be deployed in servers?
Answer: [The information in this answer about GRUB2 and LVM is largely due to Jan's efforts; originally this answer was severely in error, and Jan deserves credit for the improvements I have made. -Eliah]
When not using LVM, a separate /boot partition is primarily useful for ensuring that the files necessary for booting are close enough to the beginning of the drive, when the / partition is itself not at the beginning of the drive. For example, you might want to put your linux-swap partition very near the beginning of the drive, since on some drives data near the beginning of the drive is potentially accessed more quickly. Then you could have a small /boot partition, followed by your linux-swap partition, followed by the / partition (then followed by other separate partitions if you have them, such as /home).
For quite some time, this has been largely unnecessary, because with newer BIOSes, you can usually boot a system whose boot files are in a partition far from the beginning of the disk. Still, there is very little disadvantage to doing so (unless you make /boot so small that it fills up--it should probably be about 250 MiB), so many people who partition manually still do this.
Older boot loaders like LILO themselves had limitations that made separate /boot partitions helpful, as Jan points out.
When using LVM, if your / partition is on the LVM, it used to be necessary to have a separate /boot partition. In such a configuration, the /boot partition is not be a partition of the LVM, but rather a partition on the disk before the LVM starts. This is because boot loaders could not read files from an LVM. So you could never boot into your system on the LVM if it didn't have a separate /boot partition (see this and this for details).
The ability to read files from an LVM was added with GRUB2, which means that all recent versions of Ubuntu (Ubuntu 9.10 Karmic Koala and later) have it. So with proper configuration you can have your entire Ubuntu system in an LVM without a separate /boot partition. See this page for details about how to configure this. (In fact, the only currently supported Ubuntu release that uses the original GRUB instead of GRUB2 is Ubuntu 8.04 LTS Server; every other non-EoL release--10.04 LTS, 10.10, 11.04, and 11.10--uses GRUB2.)
If you're using LVM but not for your Ubuntu system drive, just for a storage drive, or for some part of your system (perhaps for /home) but not /, then a separate /boot partition is not necessary, even if you are using an old (pre-GRUB2) system.
In summary, a separate /boot partition is largely a matter of personal preference for systems that do not use LVM, whereas an older system installed on an LVM might need one.
Comment: This is correct, however slightly outdated. Recent versions of grub2 can read /boot from a LVM volume. https://wiki.archlinux.org/index.php/GRUB2#LVM (Link to Arch Wiki, not sure which version of Ubuntu would ship a recent enough version of grub.)
Comment: 250 MB is much too small for /boot these days. Use 1 GB at the least.
Comment: @Jan Thanks for the info--I have edited my answer to reflect this. If you can suggest further improvements, please comment further or, if you prefer, please feel welcome to edit my answer yourself.
Comment: @Jan Regarding which versions of Ubuntu ship new enough GRUB to do away with /boot for LVM...according to http://www.gnu.org/software/grub/manual/grub.html#Changes-from-GRUB-Legacy, it looks like all versions of GRUB2 are capable of this. So that would include any recent version of Ubuntu. I'll edit my post again to reflect this.
Comment: Question: Is any of this relevant if all of your hard drives are SSDs?  In that case, since the drive has no disks, there really isn't an ideal place (beginning of the drive) to store a boot or swap partition, is there?
Answer: /boot exists for technical and historic reasons.
The boot loader (grub or lilo) must be able to access its own files, the Linux kernel and the initial ramdisk. Those files are placed in /boot.
Early version of lilo could only access some subset of the HDD, would only understand a limited number of filesystems (practically only ext2), and required the filesystem to reside on a primary or logical partition (i.e. no md RAID or LVM). Therefore, it became common practice to have a small /boot partition.
Modern versions of grub are much more flexible, and, therefore, in many cases a separate partition for /boot is no longer required.
For dual booting Linux and Windows, /boot is irrelevant (although I like to use the boot partition's boot sector for the boat loader.) However, when dual booting different Linux installation, it's common to share /boot.
Answer: You can a should also use a single /boot partition when installing multiple distributions ( as well as a single swap partition ).
None of those distributions own 100% of the /boot info so /boot should not be in any partition of a single distribution.
Comment: I don't agree. Having single `/boot` for multiple distributions would cause problems when updating kernels or GRUB.


What were the Space Shuttle's rules about flying through clouds?

Question: I have heard that the tiles on the space shuttle were sensitive to being wet, in that they might be damaged. I recently saw this photo, ported to be of the Space Shuttle launching. It struck me as weird, having flown through clouds, which contain significant amounts of liquid water. What were the flight rules for flying through clouds with the Shuttle?
Comment: That seems to be the [last launch of the Endeavor](http://apod.nasa.gov/apod/ap110518.html), here's [a video too](https://www.youtube.com/watch?v=0YBWaFIs1Rc).
Comment: AFAIR, we weren't so much worried about the Thermal Protection System getting wet as we were worried about impact damage caused by liquid precipitation.
Comment: Yeah, the rules below seem designed mostly to avoid lightning hazards and liquid precipitation.
Comment: There's a report here that mentions damage in natural rain (not artificial spray) but not from non-precipitating clouds. That might explain the difference. http://www.nasa.gov/centers/dryden/pdf/88136main_H-1484.pdf
Comment: It seems like hitting water droplets in a cloud at high speed would cause some impact damage...
Answer: Based on the picture I assume you are asking about launch constraints due to clouds (versus cloud rules relating to shuttle entry and landing).  Fortunately there is a nice human readable summary here, and the cloud rules are

Cumulus Clouds:
       Do not launch through cumulus-
      type clouds with tops higher than the 41 degree F
      temperature level.  Launch may occur through clouds
      with tops as cold as 23 degrees F if the cloud is not
      producing precipitation, there is a field mill within 2
      nautical miles of the cloud, and this field mill and all
      field mills within 5 nautical miles of the flight path read
      between -100 volts per meter and +500 volts per meter
      for the past 15 minutes.
      - Do not launch through or within 5 nautical miles
      of the nearest edge of cumulus-type clouds with tops
      higher than the 14 degree F level.
       - Do not launch through or within 10 nautical miles
      of the nearest edge of cumulus clouds with tops higher
      than the -4 degrees F level.
Disturbed Weather:   Do not launch if the flight path  is through any
  non-transparent clouds that extend to  altitudes at or above the 32
  degrees F level, which are  associated with disturbed weather
  producing moderate  or greater precipitation, or melting
  precipitation, within  5 nautical miles of the flight path.
Thick
  Clouds:   Do not launch if any part of the  planned flight path is
  through a layer of clouds within  5 nautical miles, is 4,500 feet
  thick or greater, and the  temperature is between 32 degrees F and -4
  degrees  F.  Launch may occur if the cloud layer is a cirrus-like
  cloud that never has been associated with convective  clouds, is
  located entirely at temperatures of 5 degrees  F or colder, and shows
  no evidence of containing water  droplets.
Anvil Cloud:   Do not
  launch through an attached  or detached anvil cloud if it is within 10
  nautical miles  of the launch pad if  it is determined to be
  electrified  and could trigger a lightning strike by flight through
  the cloud. Launch can be permitted if the conditions  in the launch
  criteria directives for Volume-Averaged  Height-Integrated Radar
  Reflectivity (VAHIRR) are  met. This specifies the distance, time,
  radar and field  mill measurements required to ensure safe flight. The
  condition of an anvil cloud must be evaluated for these  criteria when
  it is within 10 nautical miles of the launch  pad.
Debris Cloud:  Unless VAHIRR launch criteria  directives permit, do not launch if the
  flight path will  carry the vehicle through a debris cloud which is
  not  transparent and less than three hours old.  Launch  may not occur
  within five nautical miles of these debris  clouds unless: 1) for 15
  minutes preceding launch there  is at least one working field mill
  within five nautical miles  of the debris cloud; 2) all electric field
  mill readings are  between -1 kilovolt and + 1 kilovolt per meter
  within  5 nautical miles of the flight path for the past 15 minutes;
  3) weather radar has detected less than 10 dbz of  reflectivity in the
  debris cloud within 5 nautical miles of  the flight path for 15
  minutes.
Smoke Plume:   Do not launch if the flight path  will carry
  the vehicle through any cumulus cloud that  has developed from a smoke
  plume while the cloud is  attached to the plume, or for the first 60
  minutes after  the cumulus cloud detaches from the smoke plume.

The Eastern Test Range also had range safety cloud constraints, to wit:

Direct visual observation of the shuttle is required  through 8,000
  feet.  This requirement may be satisfied  using optical tracking sites
  or a forward observer.
– A cloud ceiling of 6,000 feet is permitted
  for short- duration launch windows if all required range safety
  instrumentation systems are functioning.
– A cloud ceiling of 4,000
  feet is permitted if:
a)  The cloud layers between 4,000 and 8,000
  feet are not more than 500 feet thick.
b)  The vehicle can be seen
  by the Eastern  Range airborne and/or the ground forward  observers
  through 8,000 feet and they can  communicate with the flight control
  officer.

There were other weather related constraints at the link provided earlier.
There were weather constraints for the abort landing sites as well.
And, there were many and different weather rules for landing.  Also summarized at the link.


Great sounding solos without obvious harmony

Question: When I hear a guitar player like Joe Bonamassa on YouTube playing a solo (fast) without any accompaniment and it sounds great , I always wonder how they do it. I can improvise over chord changes and sound halfway decent because I'm harmonizing, but with out that I don't sound very good. Are they using chord tones more often which implies harmony or is it something else ?
Comment: It would be helpful if you gave a concrete example of what you mean, but the obvious answer is of course the use of chord tones and guide tone lines.
Answer: It is difficult to play melodic lines which don't sound like scale patterns. For that you need a good (I dare say) natural melodic sense but also there are some tricks that help you in getting a focused melodic sound.

You can stress root notes /tone like a superfast drone note, but that is almost like harmonizing
There is a good technic on drawing chords, so people learns scale patterns or licks that "draw" a chord virtually, so a solo can be comoposed by a mixture of different patterns which indeed, are drawing again an harmony
Playing modal or bluesy and knowing the alterations for those can help you to make surprising melodies, since you are again, changing the underlying harmony. Somo intrincate jazzy solos make heavy use of those.

I assume you know how chords are formed, in that case a basic chord drawing is playing 1-3-5, specially 1-3 which gives you a more typed tonality.
For me a good melody is always one that helps you understanding the harmony. If you whistle Greensleeves, you'll se the melody is powerful because it is imposing you a bit the chords, tone and modality. On the other hand, it is surpring if you remove accompainment to Beatles' Julia. In the first line, you'll find your self snging the same note like ten times but your brain thinks it is recognizable because you have the 2 chord changes on the background in your head. If you remove them, it is surprinsing is simply a boring monotone.
Comment: "It is difficult to play melodic lines which don't sound like scale patterns": Or arpeggios! Equally boring if not more so.


What is the difference between 2048 and 4096 key size?

Question: We are using a Self-signed certificate for our SSO with 2048 key size (which we are generating from Salesforce). I understand that this will only last one year. If we switch to 4096 key size, what would be the implications?
Answer: Many services do not support 4096-bit keys. A web search came across So you're making an RSA key for an SSL certificate. What key size do you use?, where the author explains the primary differences between the two.
It basically comes down to speed, security, and compatibility. Many platforms are not compatible with 4096-bit keys, using 4096-bit keys will slightly increase the login time, and most feel that the extra security is not currently worth it (including major players like Amazon), since you're just going to be cycling certificates anyways.
Basically, you can either continue to use 2048-bit keys that are known compatible with all major systems, or you can spend a bunch of time researching if all the systems involved will even support 4096-bit keys just for the added convenience of another year of certificate service.
Comment: Hi sfdcfox, thank you so much for the link and explanation! This helps me a lot.
Comment: @SamanthaYoung You're welcome. Just remember to do your research periodically; it's likely that a better form of encryption might become standard as processing power continues to climb. For now, it's probably best to just go with what we already know works.
Comment: @sfdcfox - I have a question here, are these self-signed certs SHA-1 or SHA-2? How to find out? I didn;t find any documentation from sf reg this, appreciate your help.
Comment: @Khyber Up until last year or so, they were SHA1, but should now be SHA256. Any decent key management system should be able to tell you. Download the certificate and check its properties (e.g. in Windows, right-click, choose Properties, and go to the far-right tab to display the certificate information).


What's the difference between 不能,买不到,不用?

Question: Recently i saw such sentences as "火车站的东西真不能买" and " 以后的事,以后再说;而不能肯定的事不要说" 。 I know that 能 means " be able to... " but I'm confused in these sentences . Can you explain its meaning to me in more detail?
Comment: One interesting fact why should not buy things from train station is that they are always of high price but low quality. Moreover, you can easily find the same things elsewhere but much cheaper.
Answer: First, translations for your examples.
火车站的东西真不能买。= (You) should not buy things from train stations.
不能肯定的事不要说。= Don't say the things that you are not sure about.
According to the dictionary, your understanding is mostly correct. "能" by itself means "able", "be able to", "ability", etc. However, also note that these sentences are oral language, so they are more or less derives from daily experience and simplifications.

"不能买". This is a common phrase that is used to express forbidding. Equivalent to "不要买" but with stronger emotion against the action.
Another example: "人不能不讲道理。"= One should not be unreasonable.

"不能肯定" simply means "cannot affirm", i.e., "not sure", where "cannot" approx. equal to "not able to".
Answer: as always context is most important in chinese, and the meaning of these phrases may vary a bit depending on the situation.  lets go ahead and address them in some examples to help understand a base comparison:
不能 most common use is to mean  "cannot", its also possible to mean "should not" in some context. here it is fairly straightforward "the stuff at the train station really cannot/should not be bought"
your second sentence is using a cannot definition as well, "cannot be sure"

you do not have an example sentence for context on 不用, so I will simply say that it can very commonly mean "not needed", such as the example 不用搭車-- no need to drive/ride a vehicle etc.

I save 買不到 for last as the most complicated from a grammar point of view.  just in case here is a quick review of result complements:
certain verbs do not tell you anything about the result of the action.  a special secondary verb can be added as a complement to show this result.  到 is a common way to show completion of an action when in a complement.
what we have here is a negative result complement.  so this phrase can be read as "did not buy".
Answer: Other answers have already explained quite well, let me give some more insights.
能 means be able to, can, which emphasize the ability the one who perform the action.
要/应该 means will/should, which emphasize the willingness of the one who perform the action or the willingness of someone else (sometimes the one who talks to you, sometimes implicitly refers to a common sense) that imposes to the one who actually perform (or try to perform) the action.
Normally, when you try to persuade someone (or oneself) not to do something, you express the willingness. However when you insist strongly, as if the one doesn't have the ability to do that. This means pretendedly, you deny the action not by your willingness but by one's lack of ability.
买不到 emphasize the objective fact that there's no way to buy it. (you cannot find it in the market) 到 has the meaning of reach, there's no way to reach it by buying. Similarly to 来.
不用买 not necessary, no need to buy it, there's nowhere we can use it.
Maybe one more expression for fun, you can use 买不起 to mean you can not afford it. 起 has the meaning of start to do something.
Answer: Question on the word 不能. Can you explain its meaning to me in more detail? For example, "火车站的东西真不能买" and "不能肯定的事不要说"。
The Chinese word 能 has four basic meanings.
(1) 能 = able to, have the capability (resources, energy, force, power, skill, knowledge, etc.) to do something.
(2) 能 = can (could, be willing to) do something.
(3) 能 = to be allowed to (have permission to) do something.
(4) 能 = to happen (or exit, be realized).
The meaning of its opposite 不能 could be an opposite of the above usages of the word 能. 不能 usually has three levels of "disagreement".
(1) 不能 = can not (not able to, not willing to)
(2) 不能 = should not (It's better not), as advice or suggestion.
(3) 不能 = must not (you'd better not, you are not allowed to), as strong advice or warning.
For example,
(1) 火车站的东西真不能买 = You'd better not buy anything at the railway station. = The goods sold at the railway station are either expensive or counterfeit stuff.
(2) 不能肯定的事不要说。= It's better not to say anything that you are not sure for yourself.
Answer: You are correct that 能 means "be able to", or "can", which is the case in the second sentence,

"...不能肯定的事不要说" - ...don't say the thing that is not able to ascertain.

For the tricker first sentence, we first need to recognize it is a warning/advice to "not to do something" rather than talking about the "ability/able to do something", then ask what "不能买" mean.
We recall that an equivalent term of 能 is "可以(may)", so the sentence can be expressed as "...不可以买", and translated to "...may not buy". At this point, we further recognize that "may not do" can literally mean "should not do", so the correct translation is:

"火车站的东西真不能/可以买" - In fact (真), (one) should not purchase anything/things sold in the train station.
Answer: In the context of the sentence "火车站的东西真不能买" (huǒchē zhàn de dōngxi zhēn bùnéng mǎi), "不能" (bù néng) is not used to describe ability or competence, instead it means "should not""not advisable" ," indicating that it is not a good idea to buy things at the train station.
More exmaples:
这里的饮料不能喝。(Zhèlǐ de yǐnliào bùnéng hē.) You should not drink the drinks here.
他们的建议不能听。(Tāmen de jiànyì bùnéng tīng.) You should not follow their advice.
这个地方不能去。Zhège dìfāng bùnéng qù. You should not go to this place.
Hope this can help.

What's the difference between 不能，买不到，不用？


How to prevent android application interface from exiting

Question: I'm developing an android application using AppGyver on a HP E2P18AA (Android 4.2).
I want to prevent the user from exiting the application(because the tablet will be in a public place), either by :

Disabling the buttons and the naigation bar.
Hiding the navigation bar permanently.

Or any other idea.
Thank you in advance.
Answer: While you can override the device's back button, you probably cannot override device's home or application list buttons without rooting the Android OS.
Place the device inside a cover which prevents user from clicking those buttons. :D
Answer: you can hide the Navigation Bar permanently using either build.prop file:
qemu.hw.mainkeys = 1 // write that line at the end of the file

OR
adb command prompt:
 adb shell >
 su >
 pm disable com.android.systemui >

and for more information about how to achieve that or how to edit build.prop file , refer to my answer here.


Looking for one or two modules related to locking and update scheduling

Question: Some people are going to think this is too trivial to look for modules or almost put it in a leftPad category perhaps, but there are so many things in npm I have a feeling these two requirements are covered and so am interested to see what other people have done.
I inherited this codebase that has this sort of long updating function with a number of steps.  It has sort of a custom locking flag that is half-set-up to expire but doesn't actually have the expiration code.  Anyway, the main thing is to prevent the update from happening while something else is happening.  Except sometimes we know we definitely need to update as soon as possible, but not right in the middle of a current update.  This stuff is not actually quite working.
So I am looking for one or two modules to do two things:

a lock with an expiration that two different long-running functions (that call other functions with callbacks) can use to make sure they don't step on each other
a simple module/function that says 'do this function now, or run it again after it finishes its current run'.

Or possibly something that handles both of those might actually make sense in this case, even though from my description it may not be obvious what they have to do with each other.
The expiration is if there is some case that I don't anticipate that causes the lock not to be removed, we don't want to be stuck forever.
Comment: What is *npm*? Please [edit]
Answer: This is what I decided I need to do: I created a really simple module now-or-again and am using the existing lock-lock with its maxPending feature instead of an expiration time.
The way I am using those two modules is identical to the examples in the READMEs.


Transporting groceries

Question: What's the best way to transport groceries on rough roads without breakage? (My town has a generous budget for potholes.) I currently use a 2-wheeled cargo trailer, but it there anything I can do to cushion the more delicate items (i.e., eggs)? What about items like milk, where every pothole causes the liquid to slosh around?
Comment: I remember seeing a horrible movie where they were transporting a volatile chemical by semi, and they suspended it in the air in the back of the truck with rubber cords/cables.
Comment: That looks like a pretty nice two wheeler.  How do you like it?  Does the mounting work well?  The mounting on my two wheel bike trailer often swings in and hits my rear bike wheel.
Comment: @sixtyfootersdude - The mounting is sturdy, as is the trailer. However, the hitch mechanism can get stuck from time to time; loosening the hitch's axle and rotating it back to vertical takes care of that. No issues with the hitch hitting the rear wheel while riding.
Answer: Delicate items would probably survive best in a small backpack.  Your body acts like a natural shock absorber so anything strapped to your back should get the smoothest ride, especially if you're out of the saddle for the bumpiest sections.  Remember to keep the pack light though.
Put heavier items like milk on a rear rack, rear panniers or ideally on a trailer.  On your back they can get really tiring and on a front rack they can really destabilize your front wheel (even worse for something that sloshes around).
Fragile and heavy?  (e.g. jars, glass bottles)  Put them in a carrier on the rear rack, but make sure they're well padded from both the bike and each other.
Answer: I don't transport a lot of groceries, but physics tells us that we really shouldn't worry about going up and down so much, but that we should worry more about things getting knocked around.  An egg in the carton shouldn't break simply because you accelerate it quickly, it's going to get broken when it takes flight and then falls back down.  Uneven pressure is the problem here. Remember, the back of a truck probably isn't any smooter of a ride than your bicycle. You should make sure that your groceries are tightly packed, so that they can't move around so much, and maybe even use bungy cords with a nice soft foam on top and on the bottom to ensure they don't bounce up and down when you do hit a pot hole.
Comment: I chose [darkcanuck](http://bicycles.stackexchange.com/questions/380/transporting-groceries/381#381)'s as the best overall answer, but this makes an excellent point. +1!
Answer: How do you feel about modifying your trailer?

adding some suspension could absorb some of the bumps
bigger wheels and high profile (i.e. lots of rubber) low pressure tyres would also go a long way towards smoothing out bumps in the road, though a warning: if they're too wide they might reduce your manoeuvrability with the trailer attached
some permanent padding for your trailer (and maybe a waterproof cover to keep said padding dry if you don't already use one)

Otherwise maybe just a padded bag for the delicate items (and if there's only a few, definitely stick it on your back as darkcanuck suggests for maximum suspension).
Comment: I might be able to get bigger tires for the trailer's 16" wheels, that's not a bad idea.
Comment: Burley replied to me with this CYA email:

"We have not tested the Nomad to accommodate wider tires so we cannot guarantee structural integrity or safety with any modifications."
Comment: as an engineer (in australia) it makes sense to put it this way from an ethical/legal point of view - if you're not completely sure, you don't dish out engineering advice. otherwise someone can sue you if you're wrong, so equally, I'd say the same, especially having not even seen the trailer or done any kind of analysis on wheel sizes/widths/... but...
Comment: ... unless this thing is an especially light frame or there's little space around the wheels, then it'd *probably* be fine. if you have any friends/family with a mechanical engineering degree or mechanics who do any custom frame design/modification/etc, ask them for some advice, and how sure they are about it one way or the other (and don't sue them if they're wrong if you've only asked them for some quick/free advice!)
Answer: Something like the Bob trailer could be useful.  It has suspension.
The BoB trailer is a one wheeled trailer so probably modifying yours to work like the Bob would be impossible.  However if you were to build a new one making something like the bob could be a good idea.
My understanding is that one wheel trailers are better for rough conditions.

Edit: The other benefit may be that you can weave around potholes more easily.  I have a two wheeled trailer right now too but it is tricky to avoid potholes with three wheels at different spots on the road.  This may be easier with a single wheel trailer that tracks directly behind your bike.
Comment: Unfortunately, replacing [my trailer](http://www.flickr.com/photos/neilfein/3754134016/) isn't something I can afford right now, but I've had my eye on the Bob suspension trailer for some time-- it looks like a sweet piece o' gear.
Answer: I've had experience transporting a laptop, which I also didn't want to jostled. The best padding for it was not an official "laptop sleeve", but wrapping it in bulking fleece jacket, and then stuffing that into my pannier, which made a tight fit. I would be inclined to take the same approach with a carton of eggs: wrap them in fleece jacket, stuff that in a container, and strap it tightly to the trailer.
Also, let a little air out of the trailer tires for some free shock absorption. ( I used that trick today when taking my 3 month old on his first bike ride, in a rear-facing car seat strapped into a bakfiets ).

Transporting groceries


Formula for instrinsic gas value in Ethereum yellow paper

Question: In the Ethereum yellow paper 6.2 there is a formula (54) defining g_0 refers to a sum which is indexed over i. But i doesn't occur on the right side except by making a distinction between i = 0 and not(i = 0). Why is this expressed in such a compilicated way and not as a simple product. Or am I missing an implicit dependency on i?
Answer: The Yellow Paper is not known for its readability. :-)
I'm not sure how to express this as a "simple product", though. The idea is that transaction data is a bunch of bytes, and the non-zero bytes cost more gas than the zero bytes.
Perhaps the confusion is over the double use of i. In the right-hand side, i is the actual value of a byte (not an index).


The image gets blurred after zoom or scale action in GIMP. How to get clear image?

Question: Since I am a beginner, I don't have much knowledge of designing tools. I am trying to resize the image using GIMP but it gets blurred. Please tell me how to get clear image after resize?
Answer: As image is an Rasterized based element, every image formed up with no.of pixels together. So when you enlarge a small image, automatically the pixel will expand and shows like blurred. That's reason where "Resultion" point comes, more resolution = more pixel in an inch = clarity stays long while expand.
That's why Vector objects won't show blurness....due to it's formed with line based drawings.
So your image will blur, if you scale it.
Answer: You cannot enlarge an image without blurring.  A big sharp image contains a lot more data than a small image of similar sharpness. When you enlarge the image, you are not adding any detail/data in it. Big image, little data => blur.
Answer: This is going unnoticed but I have a feeling that the SCALE DOWN command is blurring a lot more than it should. This wasn't the default behaviour of GIMP in older versions. So there is definitely a problem with this software. We all know that scaling an image renders its properties lost but this isn't the case here. There is something wrong with GIMP 2.10 series.


Origin of the expression "Dead to rights"?

Question: I was watching a TV show and this term was used.
I am familiar with the definition, but I was wondering the origin of the phrase. It does not make sense to me if taken literally.
Reference
Comment: That's actually a good question!
Answer: W.S. Farmer & J.L. Henley, Slang and Its Analogues, vol. 2 (1891), says that "dead to rights" means "certain; without doubt," and asserts that it is simply an amplification of the earlier term "to rights," meaning "completely to one's satisfaction." Dead appears in a similarly amplifying way in such current phrases as "dead broke," "dead certainty," "dead heat," and "dead ringer."
Christine Ammer, The American Heritage Dictionary of Idioms (1997) gives a sense of how much the meaning of the phrase has evolved:

dead to rights In the act of committing an error or crime, red-handed. For example, They caught the burglars dead to rights with the Oriental rugs. This phrase uses to rights in the sense of "at once."

Harold Wentworth & Stuart Flexner, Dictionary of American Slang, first edition (1960) gives both meanings:

dead to rights 1 Certain. c1880. Colloq. 1939: "You've got him dead to rights...' Gardner, D. A. Draws, 185. 2 Caught in the act of or irrefutably accused of an illegal, immoral, unethical, or antisocial act.

But the Robert Chapman & Barbara Kipfer, Dictionary of American Slang, third edition (1995) agrees with Ammer's narrower definition:

dead (or bang) to rights adv phr by 1859 With no possibility of escape or evasion; in flagrante delicto; red-handed: ...was caught "dead to rights" and now languishes in the city Bastille—San Francisco City Argus

UPDATE (9/17/2013): I did some checking in Google Books search results and found a source that probably explains Chapman & Kipfer's "by 1859" dating. George Matsell, Vocabulum; or, The Rogue's Lexicon (1859), contains this entry:

DEAD TO RIGHTS. Positively guilty, and no way of getting clear.

To like effect is a glossary entry in George Burnham, Memoirs of the United States Secret Service (1872):

DEAD TO RIGHTS, caught, with positive proof of guilt.

So it appears that Farmer & Henley didn't fully grasp the sense of "dead to rights" as the phrase was used in the latter half of the nineteenth century, though the meaning that Slang and Its Analogues ascribes to the term certainly does appear in some contemporaneous writings. For example, from "Born and Raised in Mobile," in Sweet & Knox, Three Dozen Good Stories from Texas Siftings (1887):

"You never heard what became of Wes Brutus?" inquired the driver.
"No; I expect he's sloshing around, though. Wes was a bully boy."
"Well, now, pardner, your [sic] just dead to rights; he was for a fact—ah! you folks are going to try Foot & Walker's line, are you? That's right; that's correct.

FURTHER UPDATE (1/24/2017): The earliest match for "dead to rights" that an Elephind search of multiple old newspaper databases returns is from "Pickpockets at the Depot: Caught in the Act—One of the Gang in Prison," in the [Harrisburg] Pennsylvania Daily Telegraph (August 14, 1862):

This morning, upon the arrival of one of the trains on the Northern Central Railroad, a passenger named Loring Gillis, of Buffalo, New York, felt a hand inserted in one of his pockets, and before it could be removed, he turned suddenly around, and succeeded in coloring [sic] its owner, a dapper, flashy dressed individual of thirty or thereabouts, with "pickpocket" written all over him. Upon feeling for his pocket-book, containing about two hundred dollars, Mr. Gillis found it was gone. The "chevalier," like all his class when caught "dead to rights," tried to shut Mr. Gillis' eye up with the "virtuous indignation" game, but finding that no "go," tried to close it with one of his fists. Here, too, it was foiled, for Mr. Gillis showed a superior proficiency in the "manly art," and the "chevalier" was finally forced to succumb. During the scuffle two individuals, supposed to be pals of the pickpocket, were seen to run from the crowd, but from some cause were not pursued and arrested.
Comment: It may be worth pointing out it's originally police slang ("We've got him dead to rights") and the *[Vocabulum; or, The Rogue's Lexicon](http://archive.org/details/cu31924073798740)* (1859) was compiled by George Matsell, the first New York City Police Commissioner. His preface says much of the "language of the rogue fraternity" was entering general use.
Answer: Dead to rights version is primarily American slang...

The British version normally uses bang/banged...

In both cases, the first word means exactly (as in "That's dead right!", "That's bang on!"), and the to rights component means completely. Because it often appears as catch/have someone dead to rights (have enough proof to show that someone has done something wrong), it's often assumed there's a connection with legal rights, but I'm sceptical of that.
I think it's more likely an extension from the now-obsolete to right[s] = at once, immediately.
Both versions occasionally appear with the singular form to right, but so infrequently I would say they're really just mis-repetitions.
Comment: @Hugo: Absolutely. Which is why I imagine if PC Plod ever wonders exactly why he uses the expression, he thinks in terms of *bang up = send to prison*. Which probably explains why in BrE you occasionally hear it as ***banged** up*.
Comment: It's very much a police phrase: "We've got 'im bang to rights, guv!"
Answer: dead quiet, dead serious, dead drunk
It is obvious that this use of "dead" before an adjective has nothing to do with "death/end of life". So etymology should give us a hint, but etymonline only registers this use without any explanation of this curious use.
My view, and I think that's the only possible explanation, is that "dead" in this special use is a transformation of another word that in the course of time was
shortened and slowly took on the form of dead.
This word can only be "total/totally". I suppose that such structures as "dead drunk" came into use at a time when the ending -ly was not yet a firmly established marker for adverbs from adjectives, that is to say, the structure was probably
"total drunk". The first syllable of "total" may have changed from tot to tet/ded and was finally written dead. Actually this "dead" is another word and dictionaries should have two entries: dead # 1 and dead #2.
Answer: The "dead" part means "no possibility of recanting" - someone caught "dead to rights" has no alibi.  It might also mean "his rights are dead" - because we caught him red-handed.
But that's another one.
This one is an idiom, and by now is a cliche (old, trite, worn-out).
The OED might have a more definite origin - at least, they'll track the idiom back to the beginning.
Comment: The OED's first quotation is the 1859 in Sven Yargs' answer.
Answer: I think the simple explanation is pretty obvious — the case is closed and the individual is certain to be convicted, therefore dead to their civil rights.
Wikipedia article.
Answer: I understood that 'dead to rights' was also a reference to the pitiable condition of a moving target, where the shooter has a clear shot and literally aims slightly to the "right" (or just in the direction of where the target is heading). This is a fairly easy shot to take and most often a guaranteed hit.
For an individual to be caught 'dead to rights' would mean that it was too late for him/her and he/she was destined for whatever punishment was coming. Having someone 'dead to rights' would put you in the position of the shooter, illustrating the power you have over the coming moment when the punishment will occur.
Perhaps this is the less academic answer, but I thought it worthy enough to mention.
Answer: I heard the expression from my mother who had English ancestors. I thought it meant that  'dead to rights' meant that the person had NO rights because he committed a crime that had lots of witnesses and proof that he was guilty....therefore NO rights.


Can an iPhone be hacked during a phone call?

Question: If I called someone can they hack into my iPhone just by being on the phone with me and knowing my phone number? I was also transferred to another person during the phone call, if that would make a difference. Or could they see my WiFi password that's on my phone etc?
Comment: No Publicly known such methods.. Until unless you follow their instructions to do some operations/installations on your phone.
Answer: While not theoretically impossible, this is highly unlikely.
For this to happend there would need to be a vulnerability in iOS that could be leveraged for  this. While there are vulnerabilities in iOS (and in any software), unless I have missed something there is nothing that could be used for an attack just through a phone call.
That does not rule out that there is an unknown vulnerability, a so called zero-day, that makes this possible. By definition we would not know about that. However, I would say that such a vulnerability is quite unlikely, and if one was discovered it would be considered a big deal and be all over the tech news. Apple would be embarassed and forced to quickly publish a patch to fix it.
If such a vulnerability were found, it would probably be used primarily against high value targets (threats to national security, government officials, celebrities) and not against random people. Such a golden egg is valuable, and you would not want to risk it being discovered (and patched) just to hack low value targets.
As an example of a similar vulnerability I should mention Stagefright. By leveraging a bug in a video library it was possible to hack Android phones just by sending an MMS with a malicious video file. The phone would get infected as soon as the MMS was opened.
But to conclude, this is not something I would spend time worrying about when I recieve phone calls.
Answer: Well, whilst iOS and others are getting hardened, everyone is ignoring the GSM baseband processors. This second operating system was written years ago, and is proprietary to Qualcomm (and others) and is riddled with bugs and security vulnerabilities.
As IMSI catchers are getting cheaper (e.g. Stingray), it is getting easier to execute malicious code on your device without you even knowing about it.
See here:
http://www.osnews.com/story/27416/The_second_operating_system_hiding_in_every_mobile_phone
https://www.devever.net/~hl/nosecuresmartphone
https://news.ycombinator.com/item?id=7062489
and a good YT vid from DeepSec 2010 talk 'All your baseband are belong to us': https://www.youtube.com/watch?v=fQqv0v14KKY
The so-called secure phone 'Blackphone 2' is largely pointless.


Prepaid SIM with data USA and Europe

Question: I'll traveling to Europe and NYC in April/May and I want to know if there is a prepaid SIM that works in all Europe (I don't know which countries I'll visit) and in NYC? I only need LTE connection.
Comment: *all* Europe? From Kazakhstan via San Marino to Iceland and everything in between?
Answer: Yes, of course there is. I myself use Glocalme which covers some 56 countries to provide data to multiple devices since it's a mobile hotspot. Edit: but it is not a SIM, it's a mobile hotspot.
There are a large amount of international SIM cards available at the other end of a Google search, although I found their prices quite high.
UK SIM cards provide great opportunities. Three's Feel At Home allows you to use their data in 34 other countries which covers most of Europe and the USA, although my experience was it's very slow. But sure, it's there. Similarly Vodafone UK has packages which allows you to use your data in Europe but I believe not the USA. Both of these SIM cards are readily available on eBay. I do not have experience with Vodafone.
Comment: Edited to clarify what it is.

Prepaid SIM with data USA and Europe


Tridion sites 9.1 - the Business Process Type (in publishing tab) is from time to time switched to 'None'

Question: Tridion sites 9.1 the Business Process Type (in publishing tab) is from time to time switched to 'None', and when publishing the target of course disappears.We then manually switch it back to the correct one.Just wondering What might be the cause for this switch.
Answer: I faced the similar issue recently and that was because of the content import (using content importer or using import export service). You can check if there is a content porting activity that happens just before Business Process Type is set to "None". If that is the case then make sure you exclude the BPT from the export package.
This happens sometimes when you export the entire publication with all dependencies and import them to a higher environment as well.
Answer: Check each Publisher Topology Manager weblogs for all your publishers in case one of your Topology Managers is going offline periodically.
Comment: Thank you Chris, This happens only on one and the same publication, all other publications are OK.
Comment: Very peculiar. I don't expect this link to be impacted by availability of Topology Manager.


Yammer WebPart for SharePoint 2007

Question: Does anyone have any idea where I'd be able to get the SharePoint 2007 Yammer Web Part from?  I appereciate that it's been retired but it's something that I'd like to make use off prior to my planned SharePoint upgrade.  The previous links now redirect to the AppStore Yammer Application for SharePoint 2013.
Answer: Based on Yammer for SharePoint 2010 – FAQs (last update: 03.10.2013), the yammer web part should be unavailable for SharePoint 2007:

Is there support for MOSS 2007? As of July 1, 2013, support for MOSS 2007 ends. No support will be available after that date.

The link Yammer SharePoint 2007 Web Part is not valid anymore and official yammer web part for SharePoint 2007 is unavailable for download.
Third party yammer web parts
http://spark.codeplex.com/
Comment: If it isn't supported anymore by Yammer, this is a valid answer even if it isn't what you want to hear. You should probably reach out to Yammer directly to see if it is available, they can probaly get it to you even if it isn't publicly available anymore, just don't expect support, by their own admission it isn't supported.
Comment: I appreciate that its out of support, that doesn't make my reason for wanting to use it invalid.  I've seen the Spark utility but it's not really relevant for what I'm after.  I'm just wondering / hoping if anyone in the community had a copy before it was taken down.
Comment: MS (unless I'm mistaken) continue to have unsupported products within their various sites and communities available, stuff like MS Money, the Expression range and misc sunset release products.  All I'm saying with the above is that I'm aware its out of support and has been intentionally removed but I'm wanting to ask if anyone within the SP community has a copy of it lying around.  The SharePoint 2003 Page Capture Web Part (for example) got some mileage in later editions of SharePoint, I'm just after something similar.  If no-one has a copy in the next week or so, I'll mark this accordingly.
Answer: You can use Yammer Embed with a content editor web part to place yammer content into SharePoint 2007.  See this:  https://developer.yammer.com/connect/
Comment: I've  been doing this a while now but at the time I wanted to know if the 2007 Web Part was more elegant.
Comment: If you want to have better styling (and more coding), you can always fall back to using the REST interface to get json back and bind that via your favorite javascript library.

Yammer WebPart for SharePoint 2007


How is UAC a security improvement?

Question: What does User Account Control on Windows offer in terms of security? It's just an extra click to potentially run a virus.
Comment: The main thing UAC achieved was to reduce the number of applications that simply take it for granted that they will be running with administrator privilege.  Speaking as a sysadmin, before UAC that was a major problem for me: there were *lots* of applications that wouldn't run out of the box because my users weren't admins.  Nowadays this is extremely rare.  Never would have happened without UAC.
Answer: Basically, there are two kinds of protection. First is user - such window prompt makes the user think about what he is doing and if this action was really intended. With UAC it is simpler to guide users in regards to what should be accepted and what must be restricted. Second protection is the system itself - even with administrator rights there are many limitations on running processes.
For those who want to delve into details, here is a link to the blog of renowned security expert Joanna Rutkowska: http://theinvisiblethings.blogspot.com/2007/02/running-vista-every-day.html. In this post she explains UAC and a vulnerability that was found back in 2007.
Comment: Also good to read is Russinovich's UAC isn't a security feature blog post. http://blogs.technet.com/b/markrussinovich/archive/2007/02/12/638372.aspx
Answer: There is always a limit to how much the OS can protect the user from himself.
But UAC is firstly concerned with blocking processes from performing potentially destructive actions without your knowledge, so it asks for your explicit approval. Yes, you might still run a virus because you wanted to see the dancing pigs - but that's YOUR choice to ignore the warning (and basically, thats what it is: Continue at your own risk).
But there is a tradeoff here: You can set UAC to require a password for EVERYTHING, but that would be so invasive and disruptive that everyone would either ignore it or shut it off completely. This way, if you WANT, you CAN pay attention to when it really matters (apparently), or you can consistently and explictly choose NOT to.
It's like when you get in your car and start driving - the car starts beeping because you're not wearing a seatbelt, which you should. But you can ignore that if you want to, at your own risk.

How is UAC a security improvement?


Is the meaning and usage of the term "ROM" different in different devices?

Question: ROM - Read Only Memory
Does this term mean the memory which should only be read and not written to , or the memory which can only be read ?
"ROM in PC's and laptops are usually seperate chips in the motherboard where BIOS is present (Please correct me if I am wrong) . Can they be overwritten (I guess we can) ?
When we consider an android phone , it gets really confusing . What is the difference between ROM and "internal memory" in an Android phone ? It seems the same .
Comment: In my younger years learning programming on a Xerox Sigma 6 mainframe, the compiled files that were linked to create an executable were called Relocatable Object Models (ROM.)
Answer: True ROM is extremely rare nowadays.  Most everything that used to be ROM is actually non-volatile RAM, like flash memory.  However, people occasionally use the term to refer to data that could be put into ROM if we were so inclined.  Usually the operating system uses the MMU to prevent any writes.
The Android operating system allows providers to install software that the user is unable to erase without rooting the device.  Thus, from the user's point of view that memory is effectively read only, even though it might physically reside on the exact same chip as memory the user thinks of as read/write.
Comment: So , 'generally' , in Android phones and many others (which I am not aware of) , the same hardware (I guess , NAND flash) is used as  our 'ROM' and also as our internal 'storage' ? It is more of a software issue to designate part of the memory as 'ROM' . Is that right ?
Comment: @Appy: if I remember correctly Android *used to* store the system ("ROM") and user settings/applications on two separate partitions (that *could* be stored on separate devices, but weren't necessarily). Recently (in the ICS era) it switched to a model where system and user space shared a partition (to avoid "wasted" free space on the system partition).
Comment: @JoachimSauer .. In the above context you used ROM as "*content* of ROM" (right?) . Another small issue .. In the world of PC's and Laptops , ROM (meaning the *content* of ROM) referred to usually very low level stuff like BIOS . OS is on the hard-disk . But in case of Android , ROM (meaning the *content* of ROM) means OS (primarily) and I dont think bootloader comes under ROM . It looks like exaclty opposite usage in a way . Please correct me if I am wrong .
Answer: As Karl explained true ROM memory is very rare (and used in pretty specialized uses). Most memory that's referred to as ROM is actually re-writable these days, that does include the BIOS of pretty much every modern PC.
Also, the term "ROM" has been used to refer to the content of that ROM memory. For example, distributions of the Android operating system are often referred to as "ROMs" (ROM Manager is a popular application for managing the OS on a rooted Android device). This particular case shows that even when the system was never stored on real ROM memory, the fact that for the average user the memory is considered "read-only" leads to it being called ROM.
Answer: It really depends on the type of ROM which is used (type of hardware):

Can only be read - PROM (Programmable ROM) - it is is programmed only once and can only be read.
Usually can only be read - EPROM (Erasable Programmable ROM) - can be erased by strong UV light, but this is not a typical/easy process so it is only read usually.
Can be read and written - EEPROM (Electrically Erasable Programmable ROM) - can be read/written like RAM but is volatile.
Comment: EEPROM is non-volatile. Also, those 3 are not the only possible options, there's also mask-programmed ROM that's not programmable, instead it's produced *with specific values already stored*.
Comment: EEPROM is also not quite "read/written like RAM": it usually requires a higher-voltage signal than standard RAM chips.  And of course no discussion of non-volatile memory would be complete without a shout out to [bubble memory](http://en.wikipedia.org/wiki/Bubble_memory).


Breakdown of Wilmott's Binomial Tree derivation of Black-Scholes equation

Question:
Hi guys,
I tried to follow the chapter of PWIQF on binomial model and got stuck when it derived the Black-Scholes (please see image). I tried to backtrack the said equations but couldn't trace back the derivation. I tried looking at Hull's derivation and it's totally diff. since he used the binomial distribution's equation instead of the binomial tree approach of Wilmott.
Can somebody be so kind and show how to go from discrete binomial tree to black-scholes? I'm familiar with taylor series but I don't know what equations applied it to along the way.
Thanks in advance!
Answer: Earlier in the chapter, Wilmott derives the equation
$$V = \frac{V^+ - V^-}{u-v} + \frac{uV^- - vV^+}{\left(1 + r\delta t\right)\left(u - v\right)}$$
from the non-arbitrage argument $\delta\Pi = r\Pi\delta t$, where $\Pi = V - \Delta S$.
If you then use the expansions for $u$ and $v$,
$$u \approx 1 + \sigma\sqrt{\delta t} + \frac{1}{2}\sigma^2\delta t \\
v \approx 1 - \sigma\sqrt{\delta t} + \frac{1}{2}\sigma^2\delta t$$
and expand $V^+$ and $V^-$ using the Taylor Series expansions, you will obtain the Black-Scholes Equation (to first-order in $\delta t$). The expansion for $V^+$ looks like (again to first-order in $\delta t$)
$$V^+ = V\left(uS, t + \delta t\right) \approx V\left(S, t\right) + \sigma S\sqrt{\delta t} + \frac{1}{2}\sigma^2S\frac{\partial V}{\partial S}\delta t + \frac{\partial V}{\partial t}\delta t + \frac{1}{2}\sigma^2S^2\frac{\partial^2V}{\partial S^2}\delta t.$$
The expansion for $V^-$ is similar.


galaxies in a specific radius in different shapes of universe

Question: Let the distribution of galaxies be a number like $n$. we want to find the total number of galaxies within the radius $r$ from a specified point. in which shape of the universe (flat, open, closed) the number we get is higher? ($n,r$ are the same in this universes and only the area (volume) in each universe is different).
Comment: By distribution do you mean something like the number density? I don't see how you can represent "the distribution of galaxies" by a single number otherwise.
Comment: @zephyr . yes I mean number density. I want to find for example for r = 500 MPc, In which type of universe the total number of galaxies are higher?
Comment: As a hint, do you have equations that allow you to calculate distances in the universe that depend on the curvature? Usually it will depend on either $k$ or $\Omega_k$.
Comment: So what else changes between your three universes? Or are we allowed to assign arbitrary values for $\Omega_m$, $\Omega_\lambda$, $H_0$ etc.? I'm a bit rusty with the Friedmann equations, but I'm quite sure you need to provide some more information for a meaningful answer.
Answer: It seems clear to me that this is a homework question. I believe what the question is after is to look at the equations for distances in the universe as a function of curvature and see how this curvature affects things. Read, for example, sources like this one or this one.
As with most of things in cosmology, there's lots of equations and many ways to write them. A relevant equation would be the following angular diameter distance:
$$D_M = (1+z)^{-1}
\begin{cases}
\frac{1}{\sqrt{\Omega_k}}\sinh\left(\sqrt{\Omega_k}D_c/D_H\right), & k = -1 \\
D_c, & k = 0 \\
\frac{1}{\sqrt{\left|\Omega_k\right|}}\sin\left(\sqrt{\left|\Omega_k\right|}D_c/D_H\right), & k = +1 \\
\end{cases}
$$
In this case, you can see the three forms it takes for a closed universe ($k=-1$), a flat universe ($k=0$), and an open universe ($k=+1$). It should be pretty clear that if you chose some volume with some radius calculated by $D_A$, you'd get different volume sizes and thus different amounts of galaxies in each volume for the three universe types.
By looking at the equations and playing around with them, you should be able to convince yourself which universe type results in the largest volume.


Open-source (clinical) decision support system?

Question: I am looking for recommendations for an open-source (clinical) decision support system that is based on ANN (artificial neural network, deep learning) technology. I would like to use it for my own education, but the license should also be permissive enough to allow possible commercial use at a later time. A Java-based implementation would be best. I am thinking of something like the output of an ongoing or past research project at a well-respected institution. I am mainly interested in the decision engine, much less so (except by way of example) in any domain-specific knowledge.
Comment: @Malvin9000 In short: A neural network is a tool for approximating functions, maps from one domain, to another domain, where both are expressed as numerical features -- this includes classifiers (A function from input features to 1 hot classes). It is very awkward to express all clinical situations and desired actions as tranformations from one numerical feature vector to an output numerical feature vector.
Where as a  LCS is a tool for recognising situtations and generating rules on what to do (from training data), and then selecting actions based on those rules. Try asking on CV stack ex.
Comment: If I were building a clinical decision support system an ANN would not be the technology to use. A LCS (learning classifier system) would be my first stop.
Comment: @Drux Did you ever end up finding one?
Comment: @Oxinabox Why is a LCS the better approach for a CDSS?
Answer: I would suggest taking a look at SciKit learn - it is Python rather than Java but has a very permissive, (BSD), licence and is actively used, developed and supported.  It is fully open source and free.


Can a lawyer advise a pro se litigant for technical purposes, without representing them?

Question: May an attorney or legal advisor sit with a pro se litigant to advise on admissibility and/or rules in an Adversarial Chapter 11 proceeding?
Comment: If you are presumably paying this attorney or legal advisor for their advice, why not have them represent you?
Answer: The answer to this question is a function of local rules adopted by the U.S. Bankruptcy Court for the district where the action is pending. Those rules are not uniform.
Usually, the answer would be no. The federal courts have been reluctant to allow "limited representations" relative to the state courts.


Owl carousel not working on product details page in Magento2

Question: I have used owl carousel for related products in magento2.1.8. It is working fine for desktop and iPad but not working on mobile. On mobile view product base image not display and owl carousel takes large width. If I remove owl carousel base image is coming and remaining page is working fine without scroll.
Comment: can you post the code that you are using for init the carousel? and when you say "not working" what isn't working? is it a display issue, a count issue, a styles issue?
Comment: Hi Circlesix, Check my question I have edited it
Comment: I am also facing same issue. anyone know solution then please share with us! Thanks!
Comment: it's still really hard to know what might be going on with the additional information you provided. But when i was first working with owl carousel and magento 2, i found it hard to get them working right. I decided to use slick instead. It might be worth your time to pop owl out and put slick in, and see if there is just something in the two builds that might not be playing nice. http://kenwheeler.github.io/slick/
Answer: After some testing, I have found the issue. The div section with a class of columns is set to display: flex on screen sizes 767px or below.
Obviously, a display setting of flex is better for smaller views, so to overcome this issue, setting overflow to hidden, scroll or auto on the div.column.main has fixed the issue.


How do you rectangulate a quadilateral selection in photoshop?

Question: What this is for is that, i have a lot of scanned documents with passport size photos in each of them. The photos are aligned randomly. I need to separate them out.
What i currently do is make selection using polygonal marquee tool, then use Free Transform to straighten it out and later crop, resize and save the pp photo.
I want to define an action that would automatically turn my selection into a properly aligned rectangle and crop the selection.
Is there a way to achieve this in a way better than my current way?
Comment: How would the action know the direction and extent of the Free Transform you are performing? I assume each selection is different.
Comment: I would give it the 4 corners of a randomly aligned quadilateral and somehow the action should be able to transform the 4 corners into a regular predefined and properly aligned rectangle. Would this even be possible?
Yes, every selection is different.
Comment: Nope. Not possible in actions. *Might* be possible in a script.
Comment: I *love* the wording of this question. :)
Answer: If you have Photoshop CS6 or newer, the Perspective Crop tool might be just what you're looking for. Hit C to select the Crop tool, then Shift-C for Perspective Crop.
There's two ways you can use this: Click the four corners of the item as you've been doing with Polygonal Marquee, or drag a rough rectangle around the item and then adjust the corners individually into the quadrilateral shape you desire. Then just hit Enter and Photoshop will re-perspectivize the quadrilateral into a perfect rectangle.
Comment: I have CS5. But I was thinking of upgrading anyway, so now seems to be the best time.
I just did some research on perspective crop and it seems to be exactly what i want. Thank you.
Comment: Glad I could help! Don't forget to click the green "Accept answer" checkmark button if my answer was the one you needed. Good luck!
Answer: Photoshop has a built-in script that is designed for exactly this purpose. It goes back at least to Photoshop 6, iirc.
From the File menu, choose Automate > Crop and Straighten Photos (that's a clue, right there) and let the program work its magic.
This works for single or multiple images within a single image, and creates new documents for each extracted image.
Comment: This method doesn't seem to work for me. The selection is not mapped correctly into the cropped image.


When should I allow Intimidate checks to rout enemies in 4e?

Question: I know that in 4th edition, you're allowed to make an Intimidate check against a bloodied enemy to send it running.  As far as I've seen in the rules, there doesn't seem to be any real limitation other than this.  What should I do if a player chooses to max out their Intimidate score to take advantage of this?  Should I always allow it, or case by case?  What about situations with elite or solo enemies?
Answer: First things first: from what I can tell, that rule has never been errata'd, so we can go by what's in the Player's Handbook.
I would say allow it at pretty much any time, but don't forget that you can add circumstantial bonuses and penalties (+2 or -2). If the enemy's side is clearly winning, the bloodied creature would be less likely to retreat. Many monsters won't speak the characters' language, and thus the intimidate check would suffer from a -5 penalty. You can optionally choose to give extra penalties for checks against elites and solos (-2 and -5, respectively, would be appropriate, but I haven't checked those numbers to see if it would make it too difficult).
Also remember that intimidate is a standard action, so a character who is taking his turn to intimidate an enemy can't do much else. If they fail, they also can't try to intimidate that same target again during the encounter, so it's usually a safer bet to beat the enemy into submission rather than trying to intimidate it. Besides, 4E combats can drag sometimes, so having a few monsters surrender when they're already bloodied might just speed up the game.
Finally, be creative with the term "surrender". Some creatures might lay down their arms and cry for mercy, offering anything that might spare their lives. Others might run away, instead, and that means they could come back later with bigger and more powerful friends. Turn a successful intimidate result into an interesting plot point, making your adventure more dynamic.
Comment: And don't forget that the default target number is the monster's Will + 10. So it's a hard roll to start with unless someone's really focused on being good at Intimidation.
Answer: Yes, always allow the check. That doesn't mean you can't control the success rate though.
The check is vs. the target's Will defence, OR a DC set by the DM.
So if you think it unlikely a given monster would be intimidated then set the DC higher, or if you don't want the monster to be intimidated then simply tell the player he failed after his roll, he doesn't need to know the roll was pointless.
Don't do this all the time though, of course, you must not let the players ever know the role was pointless, let the dice decide when you're not so bothered about the outcome.
Answer: Some suggestions for guidelines. Older RPGs concerned with this issues had morale checks at 50% of the original number of creatures and then 25% of the original number of creatures. In the case of the larger beasts (epics in 4e parlance) this would be figured as a factor of hit points. I would set your DCs accordingly. It should be most difficult if the target is bloodied and all his compatriots are otherwise still standing, and the most easy if there only a few left and facing a total kill.
Comment: Downvoting this because there is an objective rule in the PHB about it, and the question isn't looking for house rule suggestions.
Answer: Well, not everything reacts to being intimidated the same way--it doesn't always have to be surrender or retreat--it could just be avoiding attacking the scary guy, or deciding the scary guy is the biggest threat and needs to go down first, or fighting worse and granting combat advantage, or in some cases, well, you know what they say about cornered rats becoming tigers . . .
Comment: Welcome to RPG.SE. Have a look at our [FAQ] when you get a chance :). While your answer provides an interesting flavor point there is an actual game mechanism already in place here that I think this answer overrides; I'm not sure that's a good thing in this case.


Adding Friends on Different Platforms to Real Racing 3

Question: I'm using the Android version (Jelly Bean/Nexus 7) of EA Real Racing 3, and my friend is on the iOS version.  He keeps sending me invites, and when I accept them from facebook, it keeps sending me to the google play store.  How do I accept his request?  Is there no link between platforms maybe, or what is going on?
Answer: Try sending him an invite as well so he can respond, also make sure your game is signed on through facebook


Trying to install Boot Camp Drivers on MacBook2,1 for Windows XP

Question: I am trying to install Boot Camp Drivers for windows XP on a Late 2006 MacBook (MacBook2,1) but i cannot find any drivers for it. Could you help me find some?
Answer: The Boot Camp drivers for (really) old iMacs is included on the OS X Snow Leopard installation DVD. This DVD can still be purchased from Apple. Since Snow Leopard was released in 2009, the DVD should contain the XP drives for your 2006 Mac.
Since OS X Leopard was released on DVD in late 2007, the Boot Camp drivers on this DVD should also work with a XP installation on your Mac.
Apple does have a Boot Camp - Windows XP Drivers Update 2.1 website which states the following:

Note: This download contains complete copies of Boot Camp Windows XP Drivers (version 2.1).  If you have Boot Camp drivers already installed, it will update them.  If you do not have any Boot Camp drivers installed, it will install version 2.1 drivers onto your already installed Windows OS.

Since the Post Date is Apr 24, 2008 and the website mentions OS X Leopard, I would assume the download would contain the drivers for all 2006 Macs that can run Windows XP. The web site has a special note, which is repeated below.

Important: Installation of Boot Camp 2.1 is required before installing Windows XP Service Pack 3 (SP3)

There is also a Boot Camp Drivers Update 2.2 for Windows. However, this does not appear to contain all the XP drivers. Therefore, this update should be applied after installing Boot Camp 2.1.


VMWare ESXi 4.0 Two datastores One Virtual Machine

Question: I have a physical machine that has two separate raid arrays, one for data and one for the OS. I would like to convert the server to a Virtual machine to run on an ESXi server. However the ESXi server does not have a single datastore large enough for the contents of both arrays. Is it possible to host the boot drive on one datastore and the data drive on another?
Answer: Yep this is very possible. When you are adding the second hard drive it will give you the option to keep the drive with the VM or to specify the data store that it is on. I think it's the second or third screen when adding a drive.
Answer: Yes, you can do that.  You can either create a new virtual disk or use an existing virtual disk at which point it will ask you which datastore it should be created or loaded from.  I just tested this on 2 different datastores with my Windows XP VM on ESXi 4.0, and it works with no problems.


Merging several measures of score's part in LilyPond

Question: I'm wondering if is it possible to notate a score like on the picture below in LilyPond. The problem here is that the third measure of the topmost part (which is flute, actually) should be stretched across several measures of the piano part. This measure has no actual time signature, and it is played in a free manner.
Answer: Here is sort of a skeleton to work with. All the involved features are explained (including examples) in the notation manual anyway.
<code>\new Score \with { \remove "Timing_translator"
                   \remove "Default_bar_line_engraver"
                   \numericTimeSignature
                 }
\new StaffGroup
<<
  \new Staff \with { \consists "Timing_translator"
                     \consists "Default_bar_line_engraver"
                   }
  {
    \time 3/4 R2.*2 \cadenzaOn
    \scaleDurations 2/1
    { a'4( gis'4~ \tuplet 3/2 4 { gis'8[ c'' b'] f''[ e'' g''] } b''2)
      as'4( es'~ es'8[ es''] as''[ c'''] es'''4)
    }
  }
  \new PianoStaff \with { \consists "Timing_translator"
                          \consists "Default_bar_line_engraver" }
  <<
    \new Staff \relative { \time 3/4 c''4 c c c c c
                           \time 2/4 c c
                           \time 4/4 c c c c
                           \time 2/4 c c
                           \time 4/4 \repeat unfold 16 c }
    \new Staff { \clef "bass" \repeat unfold 30 c }
  >>
>>
</code>
Comment: Wow! Thank you a lot. It is what I needed. Almost. Can I synchronize measures from both parts back after the stretched measure ends? By the way, I don't quite understand what's wrong with the tags (agreed about the title though :) ), but I'll try to fix it up.
Comment: Well, I think I get it. I just need to turn cadenza off.
Comment: I found yet another option to do the same thing, which IMHO does the job just a little more clearly. All you need to do is to create a measure with the command "\set Timing.measureLength = #(ly:make-moment 12/4)" and resize/scale it by "\scaleDurations 24/12".


Windows event id for battery level change

Question: I need to create a task in TS based on battery level change.
Let's say my battery drops from 67% to 66%. How can I run a task based on this event. Does Windows log this at all? I couldn't find this information anywhere.
Comment: Which version of Windows?
Comment: WIndows 10 (and preferably W7 as well)
Answer: I need to create a task in Task Scheduler based on battery level change
Windows doesn't log this kind of detail as events. You can however use something like the batch file below and create a custom event.

Battery.cmd
This batch file monitors the current battery percentage charge and creates a user defined event if the charge drops below a user defined threshold value.
@echo off
setlocal EnableDelayedExpansion
rem set threshold value
set _threshold=82
:start
rem get the battery charge
rem use findstr to strip blank lines from wmic output
for /f "usebackq skip=1 tokens=1" %%i in (`wmic Path Win32_Battery Get EstimatedChargeRemaining ^| findstr /r /v "^$"`) do (
  set _charge=%%i
  echo !_charge!
  if !_charge! lss !_threshold! (
    echo threshold reached
    rem create a custom event in the application event log
    rem requires administrator privileges
    eventcreate /l APPLICATION /t WARNING /ID 999 /D "Battery charge has dropped"
    goto :done
    ) else (
    rem wait for 10 minutes then try again
    timeout /t 600 /nobreak
    goto :start
    )
  )
:done
endlocal

Notes:

The Eventcreate command works on Windows XP up to and including Windows 10, it requires administrator privileges to work
Set _threshold as required
If the battery falls below this value an event with ID 999 will be generated in the APPLICATION event log with the description Battery charge has dropped
Modify the eventcreate command as required for your situation.
Modify the timeout delay as required for your situation.

Example output:
My battery currently has a charge of 81%. I set the threshold to 82. Here is what happens when I run Battery.cmd:
> battery
81
threshold reached

SUCCESS: An event of type 'WARNING' was created in the 'APPLICATION' log with 'EventCreate' as the source.

And here is the new entry in the Event Log:

eventcreate syntax
EVENTCREATE [/S system [/U username [/P [password]]]] /ID eventid
            [/L logname] [/SO srcname] /T type /D description

Description:
    This command line tool enables an administrator to create
    a custom event ID and message in a specified event log.

Parameter List:
    /S    system           Specifies the remote system to connect to.

    /U    [domain\]user    Specifies the user context under which
                           the command should execute.

    /P    [password]       Specifies the password for the given
                           user context. Prompts for input if omitted.

    /L    logname          Specifies the event log to create
                           an event in.

    /T    type             Specifies the type of event to create.
                           Valid types: SUCCESS, ERROR, WARNING, INFORMATION.

    /SO   source           Specifies the source to use for the
                           event (if not specified, source will default
                           to 'eventcreate'). A valid source can be any
                           string and should represent the application
                           or component that is generating the event.

    /ID   id               Specifies the event ID for the event. A
                           valid custom message ID is in the range
                           of 1 - 1000.

    /D    description      Specifies the description text for the new event.

    /?                     Displays this help message.

Examples:
    EVENTCREATE /T ERROR /ID 1000
        /L APPLICATION /D "My custom error event for the application log"

    EVENTCREATE /T ERROR /ID 999 /L APPLICATION
        /SO WinWord /D "Winword event 999 happened due to low diskspace"

    EVENTCREATE /S system /T ERROR /ID 100
        /L APPLICATION /D "Custom job failed to install"

    EVENTCREATE /S system /U user /P password /ID 1 /T ERROR
        /L APPLICATION /D "User access failed due to invalid user credentials"

Further Reading

An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
eventcreate - Create a Custom Event in the Windows Event Viewer.
schtasks - Create / edit a Scheduled Job/Task. The job can be created on the local or a remote computer.
wmic - Windows Management Instrumentation Command.
Comment: @MiHa Up to you. Whichever is easiest to understand and maintain :)
Comment: I really like this! From your POV, it's better to create events and run event based task (e.g. PS script)? Or... modify this script to run my PS script, if battery level drops by 1%. I assumed that Windows is creating events for battery level change. I didn't think about this approach, which might be better.
Comment: @MiHa [Logging power / battery events](//stackoverflow.com/q/18514076), http://www.robvanderwoude.com/sourcecode.php?src=battstat_xp and http://www.robvanderwoude.com/sourcecode.php?src=battrun_xp and might also be worth a read
Answer: There is a Microsoft-Windows-Battery ETW provider with BatteryPercentRemaining event with ID 13. You can code a project that uses TraceEvent to create a realtime listener for this Microsoft-Windows-Battery provider. The event has the entries RemainingPercentage to show the status and PercentageChange to see the change:

When you see this event and see the -1 change for PercentageChange, run the program you want.
Answer: OK, the script provided by DavidPostill does not work.
It's nice little script, but the code is either erratic or outdated.
Here is the fixed one:
@echo off
setlocal EnableDelayedExpansion
rem set threshold value
set _threshold=30
:start
rem get the battery charge
rem use findstr to strip blank lines from wmic output
for /f "usebackq skip=1 tokens=1" %%i in (`wmic Path Win32_Battery Get EstimatedChargeRemaining ^| findstr /r /v "^$"`) do (
  set _charge=%%i
  echo !_charge!
  if !_charge! lss !_threshold! (
    echo threshold reached
    rem create a custom event in the application event log
    rem requires administrator privileges
    eventcreate /l APPLICATION /t WARNING /ID 999 /D "Battery charge has dropped below the threshold."
    goto :done
  ) else (
    rem wait for 1 minute then try again
    timeout /t 60 /nobreak
    goto :start
  )
)
:done
endlocal

I suggested this edit into DavidPostill's answer, but I don't know why it wasn't approved...
Comment: He set me on the right track, which is why I accepted his answer, but thank you very much! for your fixed script.
Comment: While fixing the code, I came to realise how buggy and erroneous the `findstr` is... Way too bad! Seriuosly, Microsoft? I'm impressed by DavidPostill's dirty little hack to get the job done.
Answer: There is a much easier way to check battery level.  In navigation area just put mouse over the battery icon and it will give a percentage.
Comment: Please read the question again carefully. Your answer does **not** answer the original question.
Comment: Yes,but thats really not what I wanted... I wanted to monitor battery level automatically and based on battery level do some stuff (again automatically)
Comment: this guy must be an engineer!!!! ;-)


Improve learning skills

Question: I want to improve my learning skills. Is there any advice or a good method for that? For example, I want to read an article or book and retain as much information possible. But sometimes I read and lose focus, or when I read I can't remember everything as well as I'd like to.
Comment: Take notes. Rephrase in your own words. Practice using the information. When I was really unmotivated, I used to read some textbooks aloud in a mock-German or -Indian accent just as a way of forcing myself to focus... There are many good books out there on study skills; I'm biased toward the ones from Judi K-Turkel.
Comment: Vary up the tasks you study for. Have objective goals for what you want to read and know specifically what you want from what you are reading. Take notes. Design courses around what you read.
Comment: Depends on the subjects you want to learn IMHO. There are two things to consider, keeping the general idea in mind, learning the key facts and absorbing them. Both learning skills have different strategies to improve.
Answer: Short answer
Practice!
Long answer Practice (smart)! The more time you spend being a student (studying, reading, summarizing, asking questions, taking notes, and pursuing answers) the better you will become at being a student. For more specific tips, check out this article by Scott Young. He focuses on methods that allow you to study smarter rather than harder. The key to this is to recognize that all knowledge is interrelated; everything connects to everything else,  and therefore no learning is wasted. I find his tips and hints to be useful, though I cannot learn quite as efficiently as Young claims one should be able to.
Answer: Something to look into is style of learning. For example, I'm a haptic learner, which means I learn best through doing. 'Doing' in this case can be a simple as making flashcards. On the other hand, I can try and read a text book all day, and I won't retain much at all. Therefore, 30 minutes of making and drilling flashcards is a much more efficient use of my time instead of an hour spent reading.
Everyone learns slightly differently. If you learn best when you hear something, try recording the lectures and playing them back. If you are a visual learner, maybe look into plotting out lecture points on a white board. Honestly this is just something that you need play around with, though you'll find many ideas to get you started on the internet.

Improve learning skills


Can you apply jailbreak tweaks to a non-jailbroken device using a file browser such as Phone Disk?

Question: Is it possible to use an iOS browser for Mac such as Phone Disk to apply a jailbreak tweak to a non-jailbroken iOS device?
Comment: The carrier name  (or iPod or iPad text in the upper left corner) can be changed by editing backup files.
Comment: Another one that can be done without jailbreaking: http://hbang.ws/infolder/.
Comment: What sort of tweaks?
Comment: @Vlad This is mostly hypothetical, but in general, probably system tweaks (specifically to the lock screen and Springboard).
Comment: I have not tried Phone Disk but my guess is there are areas (such as /System) where a non-jailbroken iPhone won't allow you to write (due to missing privileges). You can mess around with apps' data though, since that will not require superuser access.
Answer: It depends.
There are some hacks, such as a hidden panorama mode, which reportedly work without a jailbreak. The App to use on your Mac or PC to make the necessary changes to tweak your iPhone is called iBackupBot. I'll bet if you dig around those files, you may find more cool things.
Remember, a jailbreak consists of a firmware image which has been modified, presumably at the binary level. (Odds are that jail breakers don't have access to iOS's actual source code. So, they'd use tools like binary/hex editors.) Hacks that require binary changes can't be used without changing the code that the phone executes. Changing the binary code is the essence of a jailbreak.
However, sometimes, as in the case of the hidden panorama mode mentioned above, apps (or even parts of iOS, more below) will read "settings" or "preferences" from external files. In those cases, simply supplying another value by editing property-list files may cause the app to act differently.
Apps that tap into the Settings app to store their settings write those settings to the phone's persistent storage as property-lists, which are simply a special form of XML.
In the panorama mode example, the Camera app looks inside the relevant property-list file to check for a "flag" or a switch which will turn panorama mode on or off. There just isn't any user interface for turning the mode on or off. (For clarity's sake: The XML to turn panorama on is not in the same place that most settings are.)
Using the tool mentioned in the article, I've noticed that technically, which icons are shown on SpringBoard is also editable. There are tens of property-list files which configure the system, you just need to have access to them and know what values might be useful.
iOS uses a lot of "Property Lists" and XML, and knowing what does what can yield interesting results. Just bear in mind that most of the "useful" hacks are either available via Settings, or only via a binary jailbreak.
Comment: That is pretty cool. Kind of like a way to bypass the need to jailbreak if all the "tweak" involves is a `defaults write` command to set a hidden preference that the device has code to handle. So the real answer to this question is a resounding - no you can't get new code to run or change existing code, but yes - some plist files can be edited or created within an app's sandbox to enable non-default and hidden behavior of existing apps.
Comment: Besides the panorama mode preference (which I discovered) there is also a preference to enable an autocorrections bar.

And, actually, tweaks are dynamic libraries loaded into executables by something called CydiaSubstrate, and they modify the Objective-C runtime.
Comment: That looks interesting. A program that lets you modify `.plist` files from an iPhone backup could come in handy.
Comment: @conradev - Wow, thanks for the insight! Do you have any websites I can use to as a reference? Also, totally forgot about the autocorrect bar.
Answer: No, you cannot run jailbreak tweaks without being jailbroken.
To jailbreak, from the lowest-level point-of-view, means that you have the ability to patch the kernel (modify the core operating system code). A couple of the kernel patches that are common in every jailbreak  is one that mounts the / partition as read-write (so you can modify operating system files) and one that makes it so you can run unsigned code (either code that isn't approved by Apple or approved code that has been modified).
Almost all jailbreak tweaks make use of CydiaSubstrate (MobileSubstrate) which allows you to hook into running processes (run your own code inside them). Hooking works by rewriting the beginning of functions in a process's code, and that requires code signing to be disabled (which requires the kernel patch mentioned earlier). Also, CydiaSubstrate needs to inject itself into launchd (the process that manages all other processes in iOS), and that can only be done as root (the superuser) which requires placing a script in /private/etc/rc.d (a directory whose contents are each executed as root when the operating system boots) which requires write access to the / partition.
Additional Information
The actual iOS operating system is on a partition separate from your data. The user/data partition (/dev/disk0s1s2) is mounted at /private/var and can be written to. The operating system partition (/dev/disk0s1s1) is mounted at / and cannot be written to unless you've patched the kernel.
In your iOS filesystem browser on your computer, you can only access files in /private/var/mobile/Media. This is because the USB filesystem access daemon afcd (the code that your iOS filesystem browser connects to on the device) is jailed to that directory (it cannot access anything outside of it). When you jailbreak, you can install afc2d which is a replacement for afc that is no longer jailed.
iOS apps are jailed to their own directory and cannot access anything outside of themselves.
Editing your iOS backup does allow some simple modifications to be made. The backup, however, only contains files from the user/data partition (/private/var), so you will only be able to modify files there.
Answer: No. Tweaks and items found outside of the App Store are not given permission to run on iOS. Any program must pass a series of checks before it is allowed to execute. Jailbreaking removes (most of) these checks.
Moreover, they all require various frameworks and libraries also not included in Apple's mobile operating system.
Lastly, you may only copy things to your user account. Tweaks and apps found in Cydia require root access (and that can only come by way of jailbreaking).
Answer: Some of these old posts contain misinformation. You can install cydia apps/tweaks and maintain a sandbox.
The weblin and ipwnstore are cool stuff. Most of my tweaks still do rely on being out of the sandbox.
Comment: Please expand on this a bit. I can help with grammar if you are not a native speaker - just flag it and let us know. Thanks for pointing out old information by an edit or a new answer.
Comment: I took a look at those two stores. They only install apps (or tweaks that modify files in the strictly in the mobile user's partition), so this is technically nothing that hasn't already been said.
Answer: If the tweak is for a specific app that is in the Appstore. for example phantom for Snapchat. since you can get to the app folders of Snapchat could you manually extract each file to where it goes