Is there an equivalent to WinAPI's MAX_PATH under linux/unix?

Question: If I want to allocate a char array (in C) that is guaranteed to be large enough to hold any valid absolute path+filename, how big does it need to be.
On Win32, there is the MAX_PATH define. What is the equivalent for Unix/linux?
Answer: There is a PATH_MAX, but it is a bit problematic. From the bugs section of the realpath(3) man page:

The POSIX.1-2001 standard version of this function is broken by
  design, since it is impossible to determine a suitable size for the
  output buffer, resolved_path. According to POSIX.1-2001 a buffer of
  size PATH_MAX suffices, but PATH_MAX need not be a defined
  constant, and may have to be obtained using pathconf(3). And
  asking pathconf(3) does not really help, since, on the one hand
  POSIX warns that the result of pathconf(3) may be huge and
  unsuitable for mallocing memory, and on the other hand
  pathconf(3) may return -1 to signify that PATH_MAXis not
  bounded.
Comment: However, since POSIX.1-2008 you can pass `NULL` to realpath(3) and it allocates an appropriate buffer by itself. So while it is still problematic to blindly trust `PATH_MAX` most of this answer does not apply anymore.
Answer: The other answers so far all seem right on point about the *nix side of things, but I'll add a warning about it on Windows.
You've been lied to (by omission) by the documentation.
MAX_PATH is indeed defined, and probably even applies to files stored on FAT or FAT32. However, any path name can be prefixed by \\?\ to tell the Windows API to ignore MAX_PATH and let the file system driver make up its own mind. After that, the definitions get fuzzy.
Add to the mix the fact that path names are actually Unicode (well, UTS-16) and that when the "ANSI" API is used the conversion to and from the internal Unicode name is dependent on a bunch of factors including the current code page, and you have a recipe for confusion.
A good description of the rules for Windows is at MSDN. The rules are much more complicated than I've summarized here.
Edit: I changed \\.\ to \\?\ in the above thanks to the comment from KitsuneYMG.
Windows paths and namespaces are complicated. Some might even argue they are too complicated. One source of complexity is that the Win32 (and now Win64) API is a subsystem that lays on top of the Windows NT native system.
A path without any prefix is compatible across the widest range of Windows platforms. If it is restricted to 7-bit ASCII characters, then it is compatible with 16-bit DOS since version 2.0 or so (whenever subdirectories were introduced, which might actually have been in DOS 3; but DOS 1.0 only had root directories and the \ character had no special meaning).
The \\?\ prefix causes the balance of the path name to be passed on verbatim to the appropriate file system driver, which is what produces the effect of dropping the restriction to MAX_PATH characters. If the long path name is also on a network share, then you can use an extended UNC name for it with the prefix \\?\UNC\server\share\ instead of the normal UNC name \\server\share\.  Using this prefix restricts portability to Win32 and later Windows platforms, but unless you require support for 16-bit Windows on legacy hardware, that isn't a big issue.
The \\.\ prefix is a different animal. It allows access to device objects beyond the set of specially named devices that are automatically mapped by Windows as special file names into every file folder. Those special names include CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Note that all of those names are special whether or not an extension is used, or in any mix of upper or lower case. But it is possible that you have 10 or more COM ports installed. This happens quickly if you play with USB modems, or USB serial port adapters, since each unique USB-based serial port will be assigned a distinct COMn name. If you need to access the 50th serial port, then you can only do so with the name \\.\COM50 because COM50 is not a special name like COM1 is.
The MSDN page I cited above had the distinction right, I simply typed the incorrect prefix in my original answer.
Comment: *`COM1` is special but `COM50` isn't* - yet another case of stupid MS design.
Comment: Pretty sure you mean ` \\?\ `
Comment: @rr- at the time they did that, compatibility was a *very* important mandate from their big value customers. So yes it was an unfortunate decision, but it was also one that was mandated by the commercial environment which paid the bills.
Comment: Just walking by to say that holy jesus programming in C can get hairy... I miss the cozy world of Python and Java :\
Comment: @KitsuneYMG, right. I cited the wrong prefix. Its fixed now, along with a digression about what the distinction is.
Comment: \\.\ is not the prefix for named pipes ?
Comment: @v.oddou It is the prefix for named pipes because named pipes are Win32 Device Objects from the point of view of the kernel, and reside in the device object name space, accessed from User mode with the prefix \\.\
Comment: you can use `/` instead of `\\` pretty-much anywhere except on the command-line
Comment: @Jasen incorrect. You can use `start path/to/my/file` on command line without problem, but you can get into trouble if you paste a path with forward slash into many GUI applications
Comment: @LưuVĩnhPhúc so long as `path` doesn't start with a slash or contain any spaces, you can...
Answer: Well, on Linux at least, there is:

PATH_MAX (defined in limits.h)
FILENAME_MAX (defined in stdio.h)

both of these are set to 4096 on my system (x86 Linux).
Update: : Some info from the glibc manual on this

Each of the following macros is defined in limits.h only if the system has a fixed, uniform limit for the parameter in question. If the system allows different file systems or files to have different limits, then the macro is undefined; use pathconf or fpathconf to find out the limit that applies to a particular file
Comment: I suppose the maximum could vary depending on the filesystem type you're using, which would imply a runtime check, not a compile-time constant.
Comment: That looks like a portability no-no.
Answer: FILENAME_MAX is part of the ISO C standard, it works on UNIX and Windows.  However, the GNU C library documentation contains the following warnings:
"Unlike PATH_MAX, this macro is defined even if there is no actual limit imposed. In such a case, its value is typically a very large number. This is always the case on the GNU system.
Usage Note: Don't use FILENAME_MAX as the size of an array in which to store a file name! You can't possibly make an array that big! Use dynamic allocation."
Answer: You can use pathconf() to figure out at run-time, but there's also a PATH_MAX preprocessor define in <limits.h>.
Answer: You can use the realpath function to allocate a buffer big enough for a specific path. If you pass it a null pointer as the 2nd argument it will allocate a buffer big enough for the path. The man page probably explains it better than I can:

realpath() expands all symbolic links and resolves references to /./, /../ and extra '/' characters in the null-terminated string named by path to produce a canonicalized absolute pathname. The resulting pathname is stored as a null-terminated string, up to a maximum of PATH_MAX bytes, in the buffer pointed to by resolved_path. The resulting path will have no symbolic link, /./ or /../ components.
If resolved_path is specified as NULL, then realpath() uses malloc(3) to allocate a buffer of up to PATH_MAX bytes to hold the resolved pathname, and returns a pointer to this buffer. The caller should deallocate this buffer using free(3).

http://linux.die.net/man/3/realpath
Answer: limits.h
/*
 * File system limits
 *
 * NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
 *       required for the NUL. TODO: Test?
 * NOTE: PATH_MAX is the POSIX equivalent for Microsoft's MAX_PATH; the two
 *       are semantically identical, with a limit of 259 characters for the
 *       path name, plus one for a terminating NUL, for a total of 260.
 */
#define PATH_MAX    260

minwindef.h
#define MAX_PATH 260


Adobe Products Central Management

Question: Is there a centralizes management product for Adobe Reader and Adobe Flash? Some of my clients have workstations and a SBS server, and I was hoping there is a product from Adobe (preferably free) that will centralize installing updates so I don't have to go around to individual PC's to do updates.
Answer: Not exactly, but you can deploy Adobe Reader and Flash player with Group Policy Objects. I do it, and it's very effective in getting these products updated swiftly (if your users are anything like mine, they won't press the big flashy message telling them to update).
Check out the pages on Adobe's website about deploying Adobe Reader and Flash Player via GPOs. Basically, you sign up for a (free) distribution agreement and they will send you links to an MSI you can deploy to your client computers. They also link to an FTP site which contains <code>.msp</code> files that you patch your central installation with when Adobe releases an update.
Answer: Check out LanGuard by GFI. It does Adobe, Java, Firefox, and all sorts of other patching.
Free? No. Awesome? Yes.

Adobe Products Central Management


Polygons depth sorting in Z-buffer

Question: Why is it that the Z-buffer algorithm does not require polygons to be depth sorted to function correctly?
Comment: Can you walk us through your current understanding of the z-buffer algorithm, so we can spot where there might be gaps we need to address in answers?
Answer: The Z-Buffer simply saves the Z value of each pixel as you draw them. That means that when you try to draw a new pixel, you compare its Z value with the one saved on the Z-Buffer.
That means that once the whole scene is drawn, and the game decided to draw one last polygon on the very far background, the value of the pixels on the Z-Buffer corresponding to that polygon will be higher than the Z value of the pixels belonging to the polygon, so they will not be drawn at all.
This guarantees that the scene will be rendered correctly, and no polygon will be drawn on top of another where it shouldn't. However the negative is the overdraw. Although there is no guarantee which polygon will be drawn first (depends on engine/framework used), there's a high chance a pixel on the screen will be drawn more than once.
As mentioned in the comments, for performance reasons, it's best to draw polygons from front to back, so that most polygons that are obscured won't be rendered at all.
Also an exception to this are semi-transparent polygons, which have to be Z-sorted and drawn after all opaque polygons are drawn.
For more information, see Z-buffering on Wikipedia
Comment: This is true of opaque polygons.  But _semi-transparent_ polygons still need to be depth sorted because the semi-transparent blend operation requires the colour of what is behind the polygon to already be in the framebuffer.
Comment: Also for _performance_ reasons, it's better to draw a z-buffered scene from front to back, thus ensuring that most rasterized pixels will fail the Z test and can skip the fragment shader entirely.  If you draw back to front with Z-buffering, then every pixel will PASS the Z test and it will be a waste of time to compute the fragment shader when the result is just going to be overwritten by the next polygon anyway.  With no sorting, we expect average performance, and it will be likely be view orientation dependent based on the order of the geometry primitives within the models.
Comment: @Wyck Thanks a lot, I added both recommendations in my answer  for completeness :)
Comment: For absolute completeness and technical correctness, this also all depends on your depth clear value and the depth test comparison used.
Comment: @MaximusMinimus Do you mean as in, some libraries/frameworks out there use their own algorithms so it might not matter at the end? Also I'm not sure if I should include more information, as the question seems to be more beginner-friendly. I added a link to wikipedia, for people wanting to learn more.
Comment: @TomTsagk - this is typically implemented in hardware, not by a library or framework.  But what I'm referring to is, in OpenGL terms, the equivalent of [glClearDepth](https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glClearDepth.xhtml) and [glDepthFunc](https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glDepthFunc.xhtml).
Comment: @MaximusMinimus Do you think this is worth mentioning? I feel like the question is aimed at more beginner-level people, mentioning too many technical details could discourage someone. If so, feel free to edit the answer to add it, as I don't have that much experience with `glClearDepth` and glDepthFunc` to phrase it in a nice way.
Comment: @TomTsagk - probably not worth mentioning, unless maybe as a footnote of some kind.

Polygons depth sorting in Z-buffer


How to start application automatically when bluetooth device is connected?

Question: Whenever I enter my car, bluetooth is connected. What I would like is my speedcam alert application to be started once BT is connected and ideally terminate application when disconnected. I am using LG G6 with Nougat.
Answer: For such automation purposes, you can use any one of the following-

IFTTT (if this happens then do this)
Automate
Tasker (paid app)

Takser is somewhat difficult to use and paid app so I will recommend you to use IFTTT or Automate.
IFTTT has supports for a variety of products such as Phillips Hue lights etc. But Automate is the easiest to use for your purpose.
Comment: Great! do you have any experience on which one is using less resources? Are they going to run as background service, eating CPU time or the system will run automation app whenever certain event is fired?
Comment: I have used automate which is not very resource hungry and I am not sure about working of it but I think it checks at regular intervals.
Comment: Turns out terminate part is impossible unless my phone is rooted, which is not possible at the moment...
Comment: Well every automation has its limit without all the privileges :)
Answer: For LG phones specifically you can use Smart Settings to automatically open apps when a specific Bluetooth device is connected, among other things.
To get to the Smart Settings, go to the Settings app, navigate to the General tab, then tap on Smart Settings.
Comment: wow, I missed that function. It does half of the job indeed, will try it. Sadly there is no option to kill the app. Maybe I use automation for killing it when BT disconnected...
Answer: In addition to the answer by Deepak Gangwar, might I also suggest MacroDroid? Among other things I use it to change the in-call volume whenever I connect my BT headset. With BT it detects the specific device paired, so it can do different things for e.g. BT headset or car. It comes as both free and paid app. The free versions has a limit to how many macros you can define (I'm not sure about the exact limit, but it is quite low), but is otherwise fully functional.
I'm not in any way affiliated with ArloSoft. Just a happy MacroDroid user.
Comment: Thanks for your input. I will give it a try as well. Having more choice is always good.


Canyon ULT and Wahoo Kickr

Question: Bought a wahoo Kickr in November and noticed a small chip to my canyon ultimate carbon frame. In January, Canyon announced the Ultimate was not compatible with Kickr. I'm dealing with Canyon and Wahoo, but curious if I should be concerned by the frame damage. Is this something serious? Bike is a 2021.
Comment: https://www.canyon.com/en-gb/support-articles/how-to-use-canyon-bikes-in-turbo-trainer.html it's a bit of a grey area and always has been for most carbon frames. They say thru axles are fine but further on say the ultimate is not compatible with Wahoo, but I read that as you can use a different trainer. But looking at your frame is it thru axle ?
Comment: That looks like something was grinding away at the frame.  When the bike is on the trainer, is there any part that would rub that spot on the frame?
Comment: Maybe bring it up with canyon, something along the lines of "you didn't tell me it was incompatible when I bought it."
Comment: This is a QR axle.
Answer: Timothy, I am not a frame specialist but I am an aerospace engineer with some knowledge of Carbon Fibre (CF). My advice would be to wait for the Canyon response, they may tell you that you have caused the damage through negligence but they should also be able to tell you the significance of the damage. Canyon are a premium supplier so I would expect them to make high quality light weight frames using the minimum amount of material through good design. During development, designers look to provide strength only where it is needed. Poorer quality producers will compensate for poor design by using extra CF and hence more weight. The drop out area is a high load area but some of the material may be to create an aerofoil form - you may be lucky. The damage should be repaired in any case, it will only get worse if left.  My concern in your case is that Canyon know that interference may occur (see Dan K link) but they have not changed the design, indicating it may be a very necessary part of the load path. Have a look here to see how a frame is made. It shows how the strength is only in tension and how the lay up process gives you strength in all directions.
Comment: Thanks for the detailed insight. Canyon assured me it was just paint. I applied a 2 part epoxy to seal the chipped paint.
Comment: That's good news, and the epoxy will fill and prevent decay.

Canyon ULT and Wahoo Kickr


Why do Lubavitchers fold their talisos under, on the shoulders?

Question: A Lubavitch chasid wears his talis with the sides folded under, at the shoulders, bunching the side material under rather than over the material that lies on the shoulder (see an example). Why?
Comment: @Menachem Russian (Shamir) edition of Kitzur S"A, it says regarding tallis: There are two ways to add tallit: first tallit from the beginning folded so that the face was out, and then the black bars are on top, with the second (more common among Russian Jews) - tallit from the beginning folded wrong side out, and then the black bars are inside.
Comment: Inspired by the comments at http://judaism.stackexchange.com/a/8609.
Comment: I don't read russian, and cannot confirm or deny: http://chabadtalk.com/forum/showthread.php3?p=168138
Answer: The last Chabad rebbe, Menachem Mendel Schneerson z'l, made a compromise between his rebbe, the previous rebbe Yosef Yitzchok Schneersohn z'l, who wore a regular Lubavitch talis and his father R' Levi Yitzchak Schneerson z'l, a kabalist, who wore an all-white talis (see page 30 of this pdf). By folding under, it appeared all white, according to the custom of his father, while still being a talis in the style of the previous rebbe. The custom then spread to the rest of Chabad.
Comment: @Ariel We arent talking about the front we are talking about the back like this. http://2.bp.blogspot.com/_sMA1Zd6ZRqw/S5lWRP3KZTI/AAAAAAAADi8/zf3aFqtIjWQ/s400/Purim_5717_Lubavitcher_Rebbe.jpg
Comment: @mochinrechavim The trouble with this answer is that it doesn't work. Take a look at a tallis - the black stripes go the other way, folding the edge of the tallis under doesn't hide them. Examples: http://www.shimona.org/images/197_Rebbe_in_Tallis.JPG http://www.spotlightdesign.com/websites/torahonline/images/rebbe-wTorah.jpg You can see the stripes just as easily as if it wasn't folded.
Answer: Since I inspired the question, I get to post the first answer:
I was told it's because the wife of the Lubavitcher Rebbe did not like the way the decorative knots on the side edges looked (they look unfinished), and would cut them off of his tallis and put in a regular seam.
So he started folding the knots under so they would not be visible (i.e. would not look bad) and the other chassidim copied him.
Comment: See more info here:  [link](https://asktherav.com/ive-seen-in-pictures-and-videos-that-the-rebbes-tallis-doesnt-have-the-knots-on-the-edges-like-all-taleisim-have-why-did-the-rebbe-remove-them-did-the-rebbe-untie-the-knots-or-cut-them-off-is/.) See Hebrew notes there where the Rebbe told a descendent of the Bamberger he should remove the knots per his grandfather's psak. I spoke with that particular fellow (his name was Baram, an Israeli contraction of the original Bamberger) and he said his impression was that the Rebbe had same concern as the Bamberger.
Answer: In Tzitzit Halacha LeMa'aseh (Chapter 8, footnote 93), R' Gurary quotes Reshimot Devarim (Volume 2 page 100) from R' Chitrik, who says that the custom of the world is to fold the Tallit over, so that the edge of the tallit is on the outside. The custom of the Chabad Rabbeim is to fold it under. so the the edge of the Tallit is on the inside.
In Kobetz Ha'oros U'Beurim - Oholei Torah #534, page 30, Rabbi Avraham Holtzberg suggests that this was done in order to conceal the black stripes on the Tallit.
Rabbi Gurary questions this answer, since when it is folded this way the stripes are even more visible.
Either way, the answer seems to be that Chabad Chassidim started folding the Tallit this way because their Rebbe did it this way.


Are most normal human beings capable of controlling laughter?

Question: Say you were at a funeral, and a family member of the deceased said something unintentionally hilarious as part of a eulogy, but only funny to a very small number of people at the funeral. Obviously, it would be very socially inappropriate to laugh, but are normal (neurotypical) people capable of stopping laughter right off or preventing it from starting, or is it normal to not have complete control over laughing?
Comment: most people at a funeral are not in a normal state. They are highly stressed for a variety of reasons, and will have less control over emotions as a result. This includes both bursting out laughing and being really angry at someone else for being unable to control an outburst of inappropriate laughter.
Answer: Yes, it's possible to control your laughter. There are several methods of controlling your laughter or laughing without anyone being hurt in the process. Such as

Think of something sad and depressing: Although this can be unpleasant, it usually takes care of the uncontrollable urge to laugh. If sadness doesn't work, fear is also extremely effective. Think of a scene from a horror movie you just saw or a car accident. This is physically proven to work because the adrenaline (the fear hormone) released from your brain when you have these thoughts will block out the endorphins (the happiness or laughing hormone). It may take some practice to convince yourself enough of the fear, but once you have mastered it, it's very effective.
Force yourself to turn your laugh into a cry: if the occasion is something sad such as a funeral. Some people sound like they are laughing before they cry.
•If it gets really bad, hold your nose and cover your mouth with that hand. Then people can't see your grin, and you can laugh as hard as you wish inside yourself. You may start shaking, but that's okay, it can be covered as crying. Try not to let any sound out, but if you do ease up by accident, it sounds much like a sneeze or a strange snort.
Pretend to pick your teeth: Open your mouth wide and pretend to pick away at something stuck. Not only does it totally hide your smile, you also clean your teeth at the same time! Be careful though because the face made is funny enough to make others start laughing when they see what you're up to.

http://m.wikihow.com/Stop-Laughing-at-Inappropriate-Times
Comment: All of these are long-term methods, at least relative to laughter that jumps from zero to sixty and back within a nominal ten seconds. I'd assume most people can stifle their laughter given at least a few of these precious seconds, but I'm really looking to stop that first pip from escaping.


2-7 hand ranking

Question: In deuce to seven hand ranking which is commonly used for draw poker if there are two players and they both have a pair then how the winner will be decided ? does the kicker card to break the tie will be of higher rank or lower rank.
eg: P1 has 3d 3s 2c Qh Ac and P2 has 3c 3h 4s As Kh
Answer: 2-7 is simply upside down poker. The hand ranking are simply reversed so what would be the worse hand in a regular hand ranking is the winner in deuce to seven. The answer to your question is that the lowest pair would be the winner.
This is true of the whole hand ranking so keep in mind that flushes and straights work against you and Aces are bad. The best hand in the game is the name of the game, 2,3,4,5,7 off suits. If you understand the five card rule for regular poker determining the winner for deuce to seven is as simple as just giving the pot to the worst hand.
And anticipating a related question suites only work against when it is a full five card flush. If both players have 23457 and neither has a five card flush it is a split pot. If you both had flushes, the lowest flush would win and the same if you both had straights, the lowest straight would win.
Where this might get confusing is that 2-7 is only one of two forms of lo-ball poker. The other form which is typically played in high low Omaha and stud games and often has a qualifier of Eight or better for low, meaning that your low must be eight or lower, has the best low hand as a five high straight. The low is determined only by the five lowest cards without flushes and straights being considered in determining the low hand.
The proper name for five card draw 2-7 is "lo-ball". Before 1987 when stud poker and Hold-em gained a legal status in California one of the few places in the US were any kind of poker was legal, five card draw was the only game allowed and "lo-ball" was the dominant game.
If you want to have some real fun at your home game instead of playing Omaha eight or better for low, play Omaha hi lo with 2-7 for low. It will get loose.
Comment: (A) To answer the OP's actual question, 3-3-A-Q-2 defeats 3-3-A-K-4 because the Q is lower than the K. (B) There is one exception to the "just poker hands reversed" rule: In 2-to-7 draw, a wheel is not a straight, but is ranked as no pair, A-5-4-3-2 high. (C) There are actually *three* ways to rank lowball hands: 2-to-7, A-to-5 (as in California lowball, Razz, Omaha, and most other H/L games), and A-to-6 (aces are low, straights and flushes are bad--this is often called "London Lowball")

2-7 hand ranking


How to have my solar system stick that would be edible

Question: I am doing a solar system project in my science bell. I have the choice to make edible food. So I wanted to make cookies for the solar system. Here's the problem, I can get all the colors I need with my parents, but I need to find out how to make it stick without using glue, or icing. How do I make it edible to eat afterwards. My project is due on May, 10th 2016 and any response before that would be great.
Comment: Can you give us some more details on how you're building it? Will the pieces hang on a mobile? Be mounted to a poster? On pegs in a diorama? And why specifically can't you use icing? Royal icing is the default "bakery glue" that usually holds together things like gingerbread houses, but with some more info I could suggest an alternative.
Answer: It's really easier to do with icing, but if you make a really pale dough such as a sugar cookie dough, you can color it.
I once made pie-chart shaped cookies by doing this, then making wedges in various colors & sizes, then squishing them all back together into a log, and slicing it into rounds.  I don't know if it was the colors that I was using, but I found that they lightened up a bit as the cookies baked, so you'll want to make the dough darker/deeper than desired.
The trick is in getting the mottled look of some of the planets -- what you want to do it color two or three chunks in the different colors found on the planet, and once they're each well blended, break them into little bits, then toss them together before squishing it all back into a single ball (or sheet).  You might want to be a little more specific in your squishing things back together with the earth, if you want to do the continents + oceans ... but you can cheat and do blue & white (oceans + clouds) so you don't have to be as precise.
If you wanted to do it in icing, you can get the mottled look by loading two colors in the bag, so you get a little of each color with each squeeze.  A star tip will help to make each less distinctive.  You can see the effect at:

http://geeked.gsfc.nasa.gov/?p=5355  (scroll down 'til you see the orange bits)
https://www.flickr.com/photos/gsfc/4311777957  (top right one; waited 'til it crusted up a bit before I smoothed it down)


Civi Event discount

Question: I need to use a discount that is activated when the person registering for an event checks a box on the registration form. How do I connect the checkbox on the form with the discount?
Comment: Are you meaning the standard Civi event registration forms, or some other form?
Comment: A standard Civi event registration form.
Answer: I have done something similar using a custom template (.extra) and some jQuery. Here is how it worked:

Created a custom field which is the trigger, in our case "are you a member"
Setup a price field in a price set that has line items for the regular pricing and the discount pricing.
Use jQuery to hide the price set initially.
When user selects an option in the custom field it triggers the jQuery which shows the price set and the rows of the price field that are appropriate to the selection. So in our case if they select that they are a member it shows only member pricing if the select that they are not a member it shows only non member pricing.

This scenarios was created for an organization that didn't want to have members login to get the member discount so this put them on the honor system. We have used this method with various similar scenarios.
Hope this helps.
Comment: Thank you! This sounds like just what I need.....now to figure out the details. :)
Answer: Don't think this is possible with some custom code addition in an extension.
You might try adding two similar events with read-only checkboxes -

On one event, this checkbox will be enabled by default. Add discount to this event page only.
Second event will have this checkbox disabled by default. No discount added to this page.

Civi Event discount


What is output power exactly?

Question: I'm trying to comprehend what one would see if one could observe what's happening in the antenna wire.  Is the difference between a 1 watt and a 4 watt transmitter just that the amplitude/voltage on the antenna will be higher?
Comment: Welcome to Amateur Radio SE.  Be sure to take the tour at https://ham.stackexchange.com/
Answer: Yes.
Just like any other electronic device producing a signal, the transmitter is "really" applying a voltage to the output, which causes a current, and so on.
But we talk about power more often because power is a much more useful figure to work with for RF engineering above the level of designing circuits; voltage and current can be traded off (while power stays constant) so there's an arbitrary scaling factor that can be avoided.
(And once you have a electromagnetic wave propagating through the air, the voltage depends on the distance you measure it across, so if you want volts you can only get volts-per-meter. That's a good unit for measuring field strength — but field strength is not the same thing as power (they're related by the gain of your antenna).)
What voltage you find on the conductors of the antenna will depend on exactly what two points on the antenna you measure. But it is always the case that the output power is proportional to the square of the voltage (measured in a consistent way), just as in more familiar cases where the usual formulas apply:
$$ P = VI = V\left(\frac{V}{R}\right) = \frac{V^2}{R} $$
Within the antenna, $R$ is fairly impractical to calculate, but constant for any two points (if it weren't, it wouldn't be a linear system and you would get highly undesirable intermodulation). But on the feed line — the (typically coaxial) cable between the transmitter and the antenna — there is in fact a value you can use for $R$, the characteristic impedance of the cable (usually 50 or 75 Ω for coaxial cables).
(In RF systems we talk about impedance $Z$ instead of resistance $R$, but the difference is irrelevant to this particular question, so I stuck to basic-electricity concepts.)
Comment: As far as I understand it, the field impedance around the antenna can be calculated at _one_ point. Once you get far away from the antenna it becomes the impedance of free space, about 377 ohms. I got the impression from the second paragraph ("traded off") with distance, but voltage and current will always be in that ratio of 377 volts per ampere in free space. But the impedance can be whatever you want, if there's an antenna or feedline around. Might merit some rewording to avoid ambiguity.
Comment: @PhilFrost-W8II I've revised my answer to clarify I'm not talking about the impedance of free space ("voltage … on the conductors of the antenna"). Does that work?
Comment: LGTM, with some hair splitting -- "once you have a electromagnetic wave propagating through the air , the voltage depends on the distance you measure it across" -- this is also true when measuring voltages on the antenna. There's also a [definition of voltage, or more precicely electric field potential, at just one point](https://electronics.stackexchange.com/a/73386/17608). Or you can look at the electric potential difference as the distance between two points approaches zero to find the gradient at one point in V/m like you say. Not sure if they lead to the same results WRT field impedance.
Answer: @Kevin's answer is correct.  Power is the product of voltage and current.
In your question you ask if it is just higher voltage, and it may well be, but more commonly they both go up at the same time to get more power (amplitude).
Since you asked how you can see what is happening on the wire, I would direct you to the Wikipedia entry, which has a great animation.  (I can't copy the animation here so you will need to follow this link to see it):
Wikipedia - Dipole Antenna (Right-click on this and open it in a new tab)
Back in the old days, we would often use small light bulbs as dummy loads on low-power transmitters to see the amount of power being put out as we made transmitter adjustments.  We would just solder them to an antenna plug (PL-259) and plug them in instead of an antenna.
Radios today do not need transmitter adjustments so that isn't really needed, but you definitely could see the difference in power output between 1 and 4 Watts with a small bulb.
For larger transmitters we would use regular 100-Watt light bulbs.
Antennas have a characteristic impedence, Z, with three components, inductance, capacitance and resistance.  When the inductance equals (and thus cancels) the capacitance, it is called being in resonance.  This means that the only component left is resistance.
The equations are complex, and for that reason it is best to talk about properly-tuned antennas.  At that point the equation P = E x I works without any further math.  Power (Watts) equals electromotive force (Volts) times current (Amps).
The light bulbs would present a purely resistive load, simulating a resonant antenna.
Those old tube-type transmitters have several adjustments that needed to be made to tune them properly for maximum power output and we could see that by the brightness of the bulb.
Of course, you can do the same with a simple Wattmeter.  But we're hams so we had to be different and innovative.
When building a dipole it is very important that the Capacitance and Inductance truly cancel each other out.  You want a resonant antenna.  The way you do that is by adjusting the length.
While adjusting your antenna length you use a SWR (standing-Wave Ratio) meter, which shows the amount of power being reflected back to the transmitter.  When you are at the correct length for the frequency you are using the SWR will be at its lowest as the antenna accepts the power and puts it out on the wire.
At that point the antenna is seen by the transmitter as a purely resistive load.  Thus the other equation that @Kevin showed.  p = E^2 / R  - Power in Watts equals the voltage squared divided by the resistance.
Standing waves are similar to the animation in that Wikipedia entry, except they are happening in your feedline and basically turning into heat, wasting power that would go out to the antenna.
But more importantly for your answer, the patterns of current and voltage are way different in non-resonant antennas, and visualizing them is difficult and unique to each configuration.
Here is a good reference on dipole antenna theory, including visualizations of the radiation patterns:
Full-Wave Dipole
But you will notice that the current is low in the middle in that link.
Instead, we use half-wave dipoles where the current is highest in the middle so the voltage is the lowest.  (This is where I am diverging a bit from your assumption in the question - because at the antenna feedpoint we want highest current at lowest voltage, and that creates higher amplitude.  In other words, Amplitude is measured in terms of power, not just in terms of voltage)
Here's a link about all that:
The Half-Wave Dipole Antenna
Each kind of antenna has a characteristic resistance.  For a dipole it is roughly 72-75 Ohms.  So you use a coax like RG-59 or RG-6 (like for cable TV) to match it and connect it to your radio.  Most radios today can handle 50-75 Ohm antennas just fine without a tuner.
You can still use non-resonant antennas with a tuner but the picture is more complex in terms of visualizing what is going on.
Anyway, I believe the best answer to your question is found at that Wikipedia page.  They have done a good job of animating what is happening with a resonant antenna so you can "see" it.
Comment: Looks like your link to Wikipedia got lost (the link goes to antenna-theory instead).
Comment: TNX, @Kevin.  Got it.

What is output power exactly?


If I cast the Speak with Plants spell and then cast Geas on a plant creature, can I continue to control it after Speak with Plants ends?

Question: Say I cast the Speak with Plants spell, targeting a plant creature, and during the duration, I cast the Geas spell on the plant. Can I continue to control the plant after the Speak with Plants spell ends?
Comment: Related: [Is a spell suppressed or removed when the target temporarily becomes invalid?](https://rpg.stackexchange.com/questions/133379/is-a-spell-suppressed-or-removed-when-the-target-temporarily-becomes-invalid)
Comment: Do you have a reason for thinking it will or won't work?
Comment: @Someone_Evil since geas can only be cast on a creature that understands me, I don't know if geas would continue to work after Speak with plants is gone
Comment: Related: [Are plants creatures or objects?](https://rpg.stackexchange.com/q/152240/52137)
Comment: @someone For what it's worth the *speak with plants* spell does explicitly mention something called a "plant creature" though I'm unsure what that means
Comment: Related on [Can you continue to issue new commands throughout the duration of Geas?](https://rpg.stackexchange.com/questions/163776/can-you-continue-to-issue-new-commands-throughout-the-duration-of-geas)
Answer: "You place a magical command on a creature that you can see within range".  Plants, like humanoids, monsters, and undead, are creatures, so they are valid targets for the spell.  You can only give the initial command while the plant can understand you, but after that, it will follow those commands or take psychic damage, and will be "charmed by you for the duration".  You will be unable to issue additional commands without casting Speak with Plants again, as "a creature that can't understand you is unaffected by the spell".
Comment: I think it would help to provide the reasoning for why the target of a spell only needs to be a valid target when the spell is cast, not for the entire duration. (There's probably a question on here that covers it, but I can't think of one)
Comment: Why do you think you can give it additional commands at all?
Answer: Geas will continue to have an effect.
Here's the first few sentences of geas, with my emphasis:

You place a magical command on a creature that you can see within range, forcing it to carry out some service or refrain from some action or course of activity as you decide. If the creature can understand you, it must succeed on a Wisdom saving throw or become charmed by you for the duration. While the creature is charmed by you ...

The first sentence defines what the spell can target: a creature that you can see within range. Any creature, including a plant that qualifies as a "creature", is a valid target, provided that you can see it and it's within the 60-foot range.
The creature does not need to understand you to be a valid target. You can geas a moose if you want, and the spell will take effect.
The second sentence defines what happens, and the first part of that sentence sets a condition for what happens: if the creature can understand you. This is because you may not know if a creature can understand you when you cast the spell! If you geas an orc and issue commands to it in Old Toonish, you're risking the spell having no effect because the orc grew up in the southlands and can't make head nor tails of your Toony accent.
If the creature can understand you, and it fails a saving throw, then the creature is charmed, and the condition for the remainder of the spell's effects is defined: while the creature is charmed by you. Note that this also doesn't say anything about the creature understanding you; they just have to remain charmed (that is, having the charmed condition) by you.
So: If you cast speak with plants:

You imbue plants within 30 feet of you with limited sentience and animation, giving them the ability to communicate with you and follow your simple commands.

If you then geas one of the plants (assuming your DM agrees it's a creature), then the plant can almost certainly understand your commands and it may be affected by the spell if it fails a Wisdom save.
However, when speak with plants wears off (after its duration of ten minutes), the plants will lose their sentience and animation; depending on the nature of your command, they may be incapable of obeying your instructions, and thus may take psychic damage, etc. The geas is still in effect; it's just that the plant isn't any good at following the command you gave it.
Comment: @NautArch My reading of _geas_ is that incapacity to follow the command doesn't prevent the damage from being dealt. You could command someone to juggle six hundred-pound anvils for an hour every day. The only restriction is that you can't command the target to do something suicidal; you can command them to do something that seems impossible.
Comment: Interestingly, would that mean it would take the damage?
Answer: Geas is probably suppressed, but ask your DM
According to Jeremy Crawford:

There's no rule governing what happens when a valid spell target temporarily becomes an invalid target. A good rule of thumb is that the spell is suppressed while the target is invalid.

This suggests that, since the Geas spell requires the target to understand you, then the spell is completely suppressed after Speak With Plants ends. However the spell is only suppressed, not removed, so if you cast Speak With Plants again or otherwise reestablish communications before the duration of Geas runs out, it will come back into effect.
However, in that same quote from Crawford, he notes that there isn't a hard rule here. Your DM could just as easily interpret it as "it keeps following your orders" or "the spell is canceled". I'd suggest talking to your DM and figuring out beforehand how this will work if you plan to use this tactic in-game.
Comment: I'm not sure I follow. If you were using google translate, and I told you something in Spanish which you then translated and understood, I feel like even when you close google translate you would still have some idea of what I said, even if you can not translate it to Spanish and repeat it back to me. All the more so if I had placed a magical command on you. It's not like you have a 1 second memory after all.
Comment: @jgn You're correct, that is a perfectly reasonable interpretation, which is why I suggest asking your DM. However, my answer was largely from a "how do the rules actually work" perspective. The second paragraph is trying to explain how the seemingly unintuitive situation could make sense, if the DM wants to go with the more strict interpretation.
Comment: _Geas_ also requires you to be able to see the target when you cast it, but it's assumed (or so I assume) that the caster doesn't need to keep looking at the target for the duration for the spell to remain in effect. So I don't see how not being able to communicate with the target after the spell is cast makes it an "invalid target" any more than not being able to see it.
Comment: @Marq I think that's different though, it says you need to see the target to cast the spell, whereas a creature not able to understand you is "unaffected".
Comment: @AgentPaper My reading of the spell description is: **if**  **then**  **else** . This condition is checked when the spell is cast, and it creates the effect that lasts for the duration of the spell. It's not checked continually for the spell's duration, and the effect, once created, doesn't depend on the condition continuing to be true.
Comment: @Marq That's one way to read it, but it isn't the default reading according to Crawford. But yes it is somewhat ambiguous and could be interpreted that way as well, hence "ask your DM".
Comment: Crawford talks about an "invalid target". The valid target for _geas_ is "A creature you can see". There are valid targets for _geas_ that are unaffected by it.


Can I bring glass goblets onboard?

Question: I was gifted some glass goblets by a relative, and I would need to bring them back to my place on a Ryanair flight. Assuming that they fit in my cabin baggage (and probably taking on me the risk that they break), are they allowed onboard? In theory I see no restriction, but if they break (intentionally or not) they develop sharp objects, which are banned by Ryanair (and most probably every other flight company around). So how is the rule usually interpreted?
Comment: Are the goblets new and in a box? The issue may not be the airline but security, and you might have to go through secondary screening. If you are checking a bag, they can survive if swathed in bubble wrap or 'peanuts' and surrounded by clothing.
Comment: In the end I took them and had no problem. However, I did not explicitly declare them.
Comment: I asked about a case with a glass front and I was told to put it in hand luggage, not in hold.
Answer: I am not sure what is your start point and destination.
However, I will get the TSA rule that should be the strictest. Also, I am assuming that the rule to glass goblets is the same to glass cup.

You may transport this item in carry-on or checked baggage. For items
  you wish to carry on, you should check with the airline to ensure that
  the item will fit in the overhead bin or underneath the seat of the
  airplane.
To help officers get a clear look at your bag and reduce the need for
  additional screening, we suggest you pack your bag in neat layers
  (layer of clothes, layer of electronics, layer of clothes, layer of
  shoes, etc.) and wrap cords tightly around electronics items.
Even if an item is generally permitted, it may be subject to
  additional screening or not allowed through the checkpoint if it
  triggers an alarm during the screening process, appears to have been
  tampered with, or poses other security concerns. The final decision
  rests with TSA on whether to allow any items on the plane.

Source: TSA
Comment: I have taken crystal glasses and decanter as hand luggage through security at Glasgow airport. I was subjected to a bag search as the lead in the crystal made them opaque to the X-rays. As the security officer said "Well, at least you have proof now that its real crystal."
Comment: I presume you mean the TSA rules that would the the most restrictive. Ryanair don't fly in America so,it cannot be the TSA rules that must apply.
Comment: Even if  you get as specific as "crystal drinking glasses" it comes back as allowed in carry-on or checked baggage so, I would say yes.

Can I bring glass goblets onboard?


Data from space missions

Question: Is in general possible to download data from space missions? I mean "raw" data from sensors instead of the few artistic pictures released to public. Or do scientists keep those files in their secret vaults?
Answer: NASA requires all missions to release the raw data on a regular basis, in particular to the Planetary Data System. ESA releases their data to the Planetary Science Archive. Russia releases it's data to the Solar System Data Archive. Other organizations are found under the umbrella "International Planetary Data Alliance", which has a whitepaper here giving the names of all of the organizations with such data.
Comment: This is incredible! Just [an example](http://i.stack.imgur.com/3FGc9.png) now I'll never get anything done.
Answer: Certainly it is "possible to download data from space missions".
A great example is the FUNcube program which is sponsored by AMSAT-UK.  According to their webpage 'More than 900 stations, including many at schools and colleges around the world, have received and decoded the telemetry.'  I'd suggest taking a look at URL  https://funcube.org.uk/  which has information about what is involved and links to further details.
And FUNcube is by no means the only satellite you can monitor.   http://www.pe0sat.vgnet.nl/decoding/satellite-telemetry/  contains links to a great deal of pertinent "how-to-do-it" information; just choose the "Satellite" dropdown from the menu bar to get an idea of what is possible.
Comment: I love FUNcube! Are they still actively selling the [Dongle Pro+](http://www.funcubedongle.com/?page_id=1073)? I never get a reply when I try to ping them by e-mail. Coolest [SDR](https://en.wikipedia.org/wiki/Software-defined_radio) I've ever seen!
Comment: According to  http://www.funcubedongle.com/  , the Funcube Dongle Pro+ is "In Stock" and there's a click-to-order hyperlink that takes you to an ecommerce site --- so it looks promising :-)
Comment: http://www.funcubedongle.com/?page_id=1029  has a full disclosure about the company selling them and the fellow who runs the enterprise (Howard Long, G6LVB)...along with his UK corporate registration #, so it seems legitimate just based on that.  I'm in the USA, not the UK, but I'd suspect you might be able to contact him directly based upon his amateur callsign if he's listed in the UK equivalent of the "callbook" or in "qrz.com", etc.
Comment: I'm quite sure they are out of this world in reputation! ;-) OK I'll try a QSO thanks! fyi I have asked [this related question](http://space.stackexchange.com/q/17444/12102). UPDATE :I checked again *FUNcube replied just fine!* it was a 3rd party issue I was thinking of.

Data from space missions


How different are tissue-specific fibroblasts from each other?

Question: I am planning to utilize a new system in our lab, in which I will co-culture cancer cells from different tissues with fibroblasts.
I have the option to receive skin-derived primary fibroblasts. I have been told the normal fibroblasts are very similar all over the body. Is this really true? I assume that fibroblasts secrete factors, for example, that are tissue specific. The question is, how quickly do they adapt to a new environment? For example if I take these skin-derived fibroblasts and co-culture them with breast cancer cells, how long will it take the fibroblasts, if any, to become more like fibroblasts derived from the breast?
Answer:
I have been told the normal fibroblasts are very similar all over the body. Is this really true?

No.

Strong evidence indicates that fibroblasts in different parts of the body are intrinsically different, and there may be differences between them even in a single region [3].

They have morphological similarities, but they act differently (at least in cultures):

Examination of skin and lung fibroblasts derived from the same human fetuses revealed significant in vitro differences. Fetal lung cultures had faster cell replication rates, greater [$^3H$]thymidine incorporation into DNA, higher cell numbers at confluency, smaller cell volumes, decreased cellular RNA and protein contents and lengthened in vitro life spans when compared with fetal skin cultures. In addition, these cell cultures had different responses to the addition of hydrocortisone to culture media [1].

They hardly adapt to a different serum (in vitro) [2]. Yet they have a great capacity to differentiate (in vivo):

[...] fibroblasts also seem to be the most versatile of connective-tissue cells, displaying a remarkable capacity to differentiate into other members of the family. [...] "Mature" fibroblasts with a lesser capacity for transformation may, for example, exist side by side with "immature" fibroblasts (often called mesenchymal cells) that can develop into a variety of mature cell types [3].

References:

E.L. Schneider, Y. Mitsui, K.S. Au, S. Stuart Shorr. Tissue-specific differences in cultured human diploid fibroblasts. Experimental Cell Research. Volume 108, Issue 1, August 1977, Pages 1–6. DOI 10.1016/S0014-4827(77)80002-5
Zamansky, GLEN B., et al. "Adaptation of human diploid fibroblasts in vitro to serum from different sources." Journal of cell science 61.1 (1983): 289-297.
Alberts B, Johnson A, Lewis J, et al. Molecular Biology of the Cell. 4th edition. New York: Garland Science; 2002. Fibroblasts and Their Transformations: The Connective-Tissue Cell Family. Available from: http://www.ncbi.nlm.nih.gov/books/NBK26889/


What is the natural replenishment rate of oil?

Question: What is the natural replenishment rate of oil? Are extinction events connected with higher production?
Answer: Almost nil on human time scales.
The total estimated reserves (this number keeps changing over time) are of the order of 300E9 m^3. For convenience lets say all of this oil formed over the last 300 million years at a constant rate. Then the rate of formation is  1000 m^3 per year or ~6000 barrels of usable oil.
This obviously is a simple back of the envelope calculation and doesn't account for oil that has been lost/degraded/converted to other hydrocarbons over time. Also the rate of formation varies a lot (depends on climate, position/structure of plates and what not).
Comment: This answer could use some references. I suspect an estimate on the basis of reserves must be orders of magnitude off because it doesn't account for the fact that most (almost all?) molecules of hydrocarbons produced are not trapped or preserved.
Comment: @kwinkunks True, but for human purposes, what isn't trapped is lost. You could argue that by introducing humans to the production process we can get rid of the losses and gain a much bigger source, but that's outside of the scope of the question IMO.


mi shebeirach for yourself when calling a relative up for an aliyah

Question: I have been looking at the halachot for a son who is the gabbai and who calls his father up for an aliyah here and I know that there was a question about it, but my question is about after the aliyah. When making the מי שבירך afterwards, one often includes the name of relatives. How does the gabbai refer to himself if the father wishes to give a bracha to his children? The gabbai adds in something like "avi umori" out of respect, so he probably doesn't need to add "achi" if his brother and family get the מי שבירך but does he refer to himself and his children in the third person?
Comment: Like @Daniel, I've generally heard "_v'osi_" (except by one _gabay_ whose command of Hebrew was, apparently poor, who said "_v'es osi_").
Comment: I have seen gabbais mentioniong themselves on occasion, and in my experience, usually they just say "oti, vishti, etc."
Answer: I've seen the Gabbai Sheni say it instead, to avoid the distasteful move of calling out "God bless me!"
Answer: I have been a gabbai and my sons are gabbaim. My sons refer to their brothers as 'Ploni ben Avi Mori' and their sons as 'Bni Ploni' without using their own names. I think that they would also refer to their wives as 'Ishti Plonis bas Ploni' and that is often how I would do it when I was gabbai.
Note that we would first check with the rav of the shul to make sure what the minhag was before doing this. This was not just something that we came up with on our own.
Comment: Are you or your sons respected halachik authorities that we should care what you have chosen to do? Were your decisions based on some other authority that you can cite? After all, we don't know you.
Comment: @DoubleAA I was giving the minhag as my LOR and the rabbonim at the shuls that my sons are gabbaim have explained to us what to do. This includes the bais medrash at YU where one of my sons served as gabbai when he was there (before he got semicha).
Answer: My son is gabbai and asked our Rav what to do.
He calls me up and refers to me in the brocho afterwards as אבי מורי הכהן. In the brocho afterwards he refers to all other family members as he would for anyone else, i.e. אשתו, בניו, בנותיו etc and not אמי, אחי, אחיותי


Why is it always rainy in Addis Ababa?

Question: I watch the news and in the weather forecast it's always rainy in central Africa, especially in Addis Ababa. Why is that?
Comment: Over what sort of timescale are you looking? It could just be their wet season right now.
Comment: No you check urself. its always wet no matter what
Comment: Looking at it, the climate seems to be fairly consistent, as a combination of elevation and other things. There are also frequent thunderstorms, which might not last long, but will add to the amount of rainy days.
Comment: @Alex thats a pretty bold statement - would you be able to provide the historical records showing that it is always raining in Addis Ababa?
Answer: Addis Ababa lies 9 degrees north of the equator at about 2300 metres in altitude. Its' mean annual rainfall is about 1090 mm, with an average daily  probability of rain of about 41%. The inter-tropical convergence zone in this part of East Africa is a little anomalous, but sufficient to bring long rains in July-August, and short rains in March-April. Given the altitude, latitude and synoptic climatology, there is nothing unusual about this rainfall, though as Kwinkunks points out, if you happen to hit an unusually wet 'long rainy season' it might seem unusually wet.
Comment: Ethiopians don't think of themselves as 'Central Africans', and the horn of Africa is a very different climatic regime to that of the rest of Central Africa. If the question is posed in the regional sense (not including Addis) then the rainfall is much higher, consistent, more frequent, and typical of tropical rain-forest worldwide, as in the Congo and Amazon rain -forests.

Why is it always rainy in Addis Ababa?


What do recruiters mean when asking for an 'updated resume'?

Question: I now am looking for a new job. I have my resume posted on sites like dice, monster and so on. This resume contains all my details: contact info, technical skills, working history and education. It omits irrelevant information like gender, age, race, etc. Of course, my resume is current, describing my present job situation. I was really surprised to receive a lot of emails from recruiters, where they described positions that 100% match with me. These recruiters asked me to send an updated resume - but they didn't provide any details about what appeared out of date. What do they want to see in an updated resume?
Comment: I think you're over thinking it.  The recruiter will usually have no way of telling if the resume is up to date, so they will just automatically ask to be safe.  If it's current just say so, it won't be an issue.
Comment: If your resume is already up to date as-is, why don't you TELL them that it's already updated?
Comment: Most people don't update their resume until they are looking for another job, so the only resume they have is the one from their previous job search.  The recruiter wants one that includes your current position and experience.  However, anyone who says that they have 100% match is wrong.  The only job you're 100% matched with is the one you already have.  Any job that doesn't require you to grow your skill set is one you'll be bored with quickly.  Look for jobs where you're an 85% or 90% match.  Those are the ones worth pursuing.
Comment: In my experience, 99% cases where a "middleman" recruiter asks for an updated resume, they are just "following a template". You see, there are the so-called "active" and "passive" job-seekers. The active job-seekers probably update their resume every week or more often, but once you land a job, you become "passive" and updating resume becomes less of a priority. The recruiter, of course, has to send maximum people through the door, and will try to contact both categories. They need an updated resume from "passive" job-seekers, and make their life simple by asking it of "active" job-seekers.
Answer: There are a couple of possibilities that come to mind here:

Time difference between posted resume and now - If you put your resume up a few months ago, there may be new details to update in your resume that could be worth adding that aren't in the resume you posted on-line way back when. Some recruiters may want to know if there is something more recent you could send them. There are times where I've had a posted resume that is more than a month old and so I could imagine someone wanting something more recent as reasonable.
Resume customized for a specific position - Sometimes you could customize your resume for a position by being selective in the achievements of your experience since some may be more relevant than others. In this case, it is about a specific position that may be a great match if you know to update your resume for this specific position.
Comment: More likely just a generic statement they put out to all applicants
Answer:
I was really surprised to receive a lot of emails from recruiters,
  where they described positions that 100% match with me.

You should be surprised. Because that never happens when someone who really has a position for you contacts you. Meaning, they are puffing up your ego. Why? Read on.

These recruiters asked me to send an updated resume - but they didn't
  provide any details about what appeared out of date. What do they want
  to see in an updated resume?

The fact they are asking for an "updated" resume immediately after stating you are a "perfect fit" should sound alarms off in your head.
The reality is they want some kind of direct contact from you to continue the "conversation" with you. Also, recruiters are basically cattle herders. So by puffing up your ego in one line and then placing implied doubt in the next line is their way of gaming you.
Another aspect of this is some agencies have tools that monitor resume sites and then act on your data. Meaning if you make one simple change to your resume, their system flags it and then that might trigger an e-mail being sent to you.
In general you should always look at cold contact from recruiters as what it is: A cold contact. If they have a gig you want, take a deep breath, put on your armor and try to deal with them. But from my experience of 20+ years in the tech world, anyone contacting you like this is a waste of time at best. And if you do contact them directly you might just end up on a "sucker" list where more sketchy recruiters will be contacting you with more "great" offers that are a "perfect fit."
Comment: "Because that never happens when someone who really has a position for you contacts you." Technically I have been contacted once about a job that was a 100% match for my skills - I knew that job was real and open because it was my old job.
Comment: +1 - As a contractor I have a LOT of contact with recruiters and the ones who have a real, actual job and have actually read your CV can be spotted a mile off. The e-mail will be tailored, or more likely, they'll actually call you. The VAST majority (99.9%) of e-mails from recruiters are effectively SPAM.
Answer: Your resume may be up to date, but most people's aren't. It's easy to upload your resume to one of those sites and then forget about it for a while. For myself, I haven't updated my resume in about a year, and it was about 2 years since I had updated it before that. I've done a lot of stuff in since that time and would definitely have quite a bit to add if a recruiter wanted to see a current version. And that isn't even accounting for the fact that I would want to tailor my resume to the position if I were actually applying for a specific job.
Recruiters know this and are working under the assumption you're the same way. They aren't implying your resume looks out of date, they are simply giving you the opportunity to make whatever updates you want before they take it and forward it off to potential employer. If you are comfortable with your resume as it is, you can simply respond that what they see is good to go.
Answer: I wouldn't overthink this.
It's likely the recruiter has matched you via search tools, and may not have given too much of a look over your resume (may use tools similar to the clients ATS which score a match to the job description as they have no background to evaluate similar skills).
It's also possible given they've given you info on the job that you will think "oh, I should mention x".
And if you are on job boards like Indeed they get a webified version of your resume, not the doc you uploaded.
So the easiest solution is just to boilerplate in their email to ask for your updated resume, there is no likely ulterior motive by doing this.
Comment: This is it. The request is a standard opening when dealing with any recruiter.
Answer: It's usually 1 of 3 options:

You are missing information. This is usually a time gap, including where you are currently employed. If you are unemployed, they are looking to see that time referenced on your resume. It can also be contact info, residential city, or even job duties that appear to be missing in your work experience.
They are using a template (because they get a TON of resumes lacking content).
The resume they received is not the one you think they have.

Advice: Send in the resume anyway. It shows you can follow instructions when needed and it keeps the conversation short, sweet and direct. That's the fastest way to move your application to the next step.
Comment: For your first item, I don't see how a recruiter would know if someone is missing anything. You're also making assumptions about the OP's resume since there's no indication that they have a time gap and/or unemployed. For your second item, I'm not sure what you mean; however, again, there's no way a recruiter can fully know if a candidate is missing information. The candidate may not even be qualified. For your third item, this is strange. How would a candidate not know what they have sent out? Overall, I think your answer here is a recruiter making assumptions about a candidate.
Answer: Usually, when a recruiter (or anyone else) says they want an updated resume, they mean a resume that's appropriate for applying for the position in question. In other words, they don't want a resume that's been on your hard drive collecting dust for two years. It needs to have all the trainings you've completed, all your experience, all the way up to the present day.
It also needs to be customized for the job. I recently wrote a blog on how to customize your resume, but I'll give you the short version here.
1. Include key words. If the job ad says they want someone with "WordPress" experience, make sure the word "WordPress" is in your resume.
2. Make sure you present your experience in terms of your accomplishments, not just what your boss assigned you to do. So say, "Created a responsive version of our landing page," not, "Tasked with front-end design duties."
3. Emphasis your transferable skills. Especially if the job is a bit out of your wheelhouse.
Lastly, I'd add a little unsolicited advice: Apply for a ton of jobs! Never get your hopes up about a single one. That updated resume will help you get past the screening process, but personality and chemistry has a lot to do with how well you do in the interview process. You're not going to click with everyone. So you need to cast a wide net to find someone you'll click with.
Good luck!
Comment: Did you read the existing accepted answer? Do you think you added something?
Comment: When I switched job last year (for the first and so far only time in ten+ years of "career") I applied for one and only one single job. Of course I was afraid if they wouldn't take me, but they seemed a perfect fit, while 99% of the other companies didn't. And they **were** the perfect fit and are until now. Better prepare for less interviews, but prepare **well** instead of sending out "tons of" unpersonal, off-the-shelf applies - and I, personally, wouldn't have had the time to prepare as well for "tons of" jobs.


Strange annoying 1px line when I save a PDF from InDesign

Question: I am creating a PDF file from InDesign and sometimes(90% of the times) when I export my work from InDesign into a PDF file a strange annoying 1px line appears(view immage) at the edge of the document... Did you ever had this problem? Why does it appear ?
Comment: im thinking this is because of the same issue that was discussed in this(link at the end) questions answer but not sure , maybe i find a quick solution http://graphicdesign.stackexchange.com/questions/3489/why-doesnt-size-resolution-in-indesign-match-the-pdf
Comment: try a different setting in distiller to see if that works
Answer: This is called stitching. You can turn off smooth line art or use any of these solutions:
http://kb2.adobe.com/cps/403/kb403359.html
Problem is know from CS2+
Comment: I tried saving with the following Compatibility settings: Acrobat6(PDF 1.5) and the lines didn't appear anymore! Yupee! but as usually they would randomly appear(sometimes yes and sometimes no) I hope they will not appear again in the future...
Comment: hope so to, but still glad to solve your problem :)
Comment: PDF 1.3 vs 1.5 has nothing to do with the issue you're having. The only major change you've made is to save with transparency intact. This may not be compatible with all printers' RIPs. The problem is not stitching, which never shows up where you're seeing it. This sounds like it may be a version of the "dreaded white box" problem. Google '"dreaded white box problem" Indesign' and check the InDesign Secrets and Adobe Forum links.
Answer: Export to PDF doesn't add anything to the document. I can think of a couple of straightforward possibilities for what you're seeing. The most likely, based your example, would be an unintended grey stroke on the rectangle that fills your document. I was able to reproduce your sample using a 25% black 1 pt stroke. Since the default position for a stroke is Centered, you end up with a 1/2 pt visible inside the document boundary. If you set a stroke color with no documents open, then later closed InDesign, a 1 pt stroke of that color would become a default for any new shapes or strokes.
You can also see something similar to this if your content almost fills the page, but not quite, but this doesn't have that appearance.
You can test either of these by extending the rectangle beyond the page into the bleed space, then exporting the PDF without bleed.
If neither of these changes the situation, reset your InDesign preferences (Ctl-Alt-Shift or Cmd-Opt-Shift while the program is loading) and try again.
Answer: I have a solution, please follow the steps below, it will help you:

Export your PDF file from Indesign as usual.
Open your PDF file if the file did not open automatically after saving it.
As you are viewing your PDF file In Adobe Reader, go to Preview / Preferences / PDF.
Unselect Smooth text and line art.
Close the image and export it again and you good to go.
Comment: interesting.. i'll try this :)
the question I asked is quite old, from 2011..

Since 2011 I noticed that this 1px line appears when I have 2 or more PDF files opened at a time.

If I close all PDF's I have opened and just open one at a time it seems to look right..
Comment: note: I am saving as PDF 1.6 or higher.


Not Able to Find ESRI.ArcGIS.Client For ArcGIS Runtime .Net SDK on WPF Samples

Question: I am trying to re-produce the demonstrated sample at this link but I am not finding the ESRI.ArcGIS.Client any where in .Net Runtime SDK references or even from "Add ArcGIS Reference" wizard from Arc Object tools but still not seeing any ESRI.ArcGIS.Client

Answer: The ArcGIS Runtime SDK for WPF was a predecessor to the current version of the Runtime that includes support for Windows platforms, which is the ArcGIS Runtime SDK for .NET.  The Runtime for .NET includes support for WPF in addition to other platforms.  Although the API surface (namespaces, names, etc) differs, most of the functionality that was present in the Runtime for WPF is available in the Runtime for .NET, in addition to many new capabilities that have since been added.  The main class used in the example you've linked, LocalGeoprocessingService, is available in the Runtime for .NET, and the API reference for it can be found here.
Note that the ArcGIS Runtime is for building stand-alone applications that incorporate GIS capabilities.  If you're looking to extend the functionality of ArcMap or ArcGIS Pro, then the Runtime is the wrong product.  The "Add ArcGIS Reference" dialog in your question is for adding references to ArcObjects libraries, which are primarily used for building extensions for ArcMap or other ArcGIS Desktop programs.  The ArcGIS Runtime libraries are separate from those.


Is there a way to figure out a lamp's color temperature from a photo?

Question: Let's say we have some incandescent, flourescent, luminescent lamps and LEDs, and there are photos made with different cameras in auto mode with each of these lamps on, and with a white sheet of office paper lit by it. Is there a way to tell the color temperature of each lamp from the photo's EXIF data?
Comment: The question is unclear to me. Is only one light on in each photo? Or are all the light on in all the photos?
Comment: Only one of each light bulbs is on, since we don't wanna mix the colors. You can also interpret it as only one light bulb exists with unknown color temperature, and we shoot it with different cameras on auto. I just wanted to give a slightly broader example. A real life scenario would be trying to find out color temperatures of light bulbs in other people's photos on the internet where the photo contains metadata. Flickr shows lots of EXIF data, and it's primarily where I intend to try this.
Answer: Some cameras have a section in the 'maker notes' section of the EXIF info that includes such information, but far from all cameras do. Even with the ones that do, not very many applications that show EXIF data will display that information in the EXIF data. Some raw convertors will open raw files using that value in the EXIF info as the default value if the selected options for opening raw files specifies such (as opposed to an option selected to open all files with a preset value such as 5200K).
Among the tools I routinely use, it isn't displayed. But if I upload an image taken with my Canon EOS 5D Mark III to Flickr and allow the EXIF info to be displayed, anyone can click on the "Show EXIF" link and then scroll way down to see it.
Here's a piece of a screen shot from a portion near the end of the EXIF info for this image at flickr:

Notice that the "Color Temperature Auto" and "Color Temperature Measured" values are identical. That indicates that when the camera is set to "Auto WB" the measured color temperature/white balance is used.
But keep in mind, color temperature is only a single axis across the entire color wheel we call White Balance. Artificial light sources are often well off the color temperature axis that is basically defined by the color of black body radiators at different temperatures. For instance, in addition to having a color temperature of about 3700K, traditional fluorescent bulbs also emit a green tint along the green←→magenta axis and need correction in the magenta direction. On the other hand, many of the popular LED stage lights found in small clubs are also at about 3700K but also have a decidedly magenta tint that requires compensation in the green direction along the green←→magenta axis. Both types of light are the same basic color temperature but look very different without compensation on the green←→magenta axis that is approximately perpendicular to the blue←→amber color temperature axis.
Answer: The color temperature should be printed somewhere on the bulb itself. Try looking at the small print around the base. You may also consider using a colorimeter that is able to measure the ambient temperature.
While you can take a raw photo and see an estimated color temperature in raw processing software, the values can vary. Bulbs with temperatures that vary by only a few hundred K may not be distinguishable when "measured" by cameras not designed to be used for colorimetry.

Camera auto, custom white balance, and software auto rarely match. Which, if any, is the "correct" temperature?
Ambient and mixed lighting in the environment will influence results.
Display calibration will affect attempts to refine "measurements" visually.
Different lenses can alter results. Consider the following images taken with the same lamp and white card, but different lenses. Custom white balance was set for each lens immediately prior to taking the photo. Values obtained were 2805K, 3164K, 6490K.

Which "measurement" reflects the temperature of the bulb? This is not just a calibration issue. As long as photos look right, it doesn't matter what the camera "thinks" the color temperature is.
Other factors may influence results: Metering, shutter speed, aperture, distance to subject, etc. Using the second lens from earlier, temperatures ranged from about 3000K to 3200K when setting custom white balance with the same lamp and white card.
Comment: If the answer is that we cannot with a sufficient degree of precision determine the real color temperature (even assuming perfect calibration of the bulb and exact match to its advertised color temp on the label) just from EXIF data, then I guess that's my answer. Gotta use the tools designed specifically for that purpose then until consumer cameras get better (or *if* they ever become usable for that purpose).
Comment: My intention was to figure out the real color temperature achievable in practice by the lamp, because whatever the manufacturer prints on the lamps as intended color temperature might be miscalibrated or distorted by chemical compound mixture proportions of the coloring. Also, incandescent and other gaseous lamps will just change color based on supplied electric power parameters. So, the question, rephrased, was "Is it possible to determine the real color temperature of light at the time the photo was taken, using the EXIF data provided by the camera" assuming it was calibrated well enough.
Comment: Cameras are not designed to get accurate color temps.  As long as photos *look* right, it doesn't matter if the camera reports 2805K, 3164K, or 6490K.  It's not just a calibration issue.  What to calibrate to change 6490K to 3000K?  Some colorimeters, used to calibrate monitors, can measure the ambient color temperature.
Answer: When I shoot raw with my camera ( Nik3300) and upload to Lightroom in the  develop module de temp slide  will show degrees Kelvin
Comment: can you add a screenshot as an example?
Answer: Issues
By default, fields relating to color temperature, white point, etc. in the EXIF data contain values that relate to the user experience goals of the camera manufacturer. They are not based on an established industry standard and are not scientific in the sense that two products may produce different color temperature values for the same scene due to differences in the way data is recorded or differences in user experience goals.
EXIF data can contain arbitrary values. The EXIF values in a file containing EXIF data are editable by anyone or piece of software with write access to the file.
Conculusion
EXIF data can be unreliable as a source of truth. Whether or not that unreliability matters depends on the particular application for which the EXIF data is a decision making input.
Better LoL Catz are one thing. Launching the missiles? Another.
Comment: I know it's not perfect, but it would be still neat if there was some level of certainty like within ±300 kelvins
Answer: I have tried to do that to find out which filter I should use on my flash, but it does not seem possible with a Nikon D7000. Now I use the app 'Light Spectrum Pro', it works great. I also found an alternative, 'Cine meter 2', which is very expensive compared to the app I use. It is very cheap compared to a professional light meter (800 - 1500 dollar), and seems to do pretty much the same, so I may very well buy it later.


How to access values in node object?

Question: Hi i am unable to access values from a node object inside a preprocess_views_view . Below is a screenshot of my object and i want to access the value highlighted. How can i do that?
Comment: Yeah...infact i've created a custom view for my search result listing..I need to override a url in the view. That's why i need to access these elements so i can override the url.
Answer: There are several options:
You can use the getter method for the node id (available for all entities):
$node->id()

You can use magic methods to access any field of any content entity:
$node->nid->value

The above code will actually trigger the below:
$node->get('nid')->get(0)->get('value')->getValue()

Comment: $node->id() works in hook_node_presave($node) and $node->nid->value doesn't, thanks.
Comment: Some field may be emtpy. You have to  `if (!$entity->get('field_name')->isEmpty()) ` to prevent errors
Answer: To get the node id you can use $node->id(). Any object extending ContentEntityBase has this method.
You can look at the Node class to see what public getter methods are available (also, ContentEntityBase and Entity).
Note that protected values cannot be overwritten without a setter method - so you'll need to create a new variable from your preprocess hook to do this.
Answer: Debugging a content entity object is not very useful. Instead, debug its array representation ($node->toArray()), you can access that data then like this:
$node->get('field')->property. For example $node->get('nid')->value.
For base fields like the ID, there are usually also methods, in this case $node->id() as mentioned by others.
See Entity API Cheat Sheet for more information.

How to access values in node object?


Should questions that compare Blender and  be allowed?

Question: I can see that a category of questions that would potentially be very problematic would be questions along the lines of "Which is better, Blender or Maya?". Now, such a broadly general question such as this shouldn't be allowed for other reasons, but what if it's more along the lines of "How does Blender handle materials differently from Maya?" or "Which renders faster, Blender or Maya?"? Should such comparative questions be on-topic for this site or off-topic?
Answer: I think questions focusing on interactions between applications are fine like "How do I prevent texture corruption when exporting to application x's format?" are fine. I think comparing performance in general is a can of worms that should stay firmly closed.
Comment: Agreed. Questions like "Why should I choose Blender over X" type of questions should be avoided.
Answer: Questions that do this should either

relate to any interaction the two software have. (file formats they might share, how to efficiently import/export from either to the other etc.)
ask if Feature X from from (other 3D modeling software) is available in Blender
ask what similarities they might have  OR
ask if it is possible to perform a certain task in Blender (for people who use other 3D software and are interested in trying Blender)
Comment: +1. Sometimes best way to describe a feature: "You know, like  has"
Answer: FAQ:

What kind of questions should I not ask here?
Avoid asking questions that have nothing to do with Blender Stack Exchange.
  This is not a random discussion area, it's a place for improving our community and website together.


What are ways that I can donate my extra breastmilk?

Question: I am an overproducer which is a blessing and a curse. Has anyone had any experience donating breastmilk? What are the different types of milk donation programs and organizations?
Comment: Hi, welcome to Parenting!  Your question right now isn't really answerable, because it doesn't really have the necessary detail to get a good answer.  Are you looking to find a particular program - in that case, location is relevant (country, state, province, etc.)  Are you looking to find out what the differences are between different types of programs?  Are you looking to find out what questions you should ask to verify a program as being a "good" program?  Etc. - a specific question will hopefully get you good and useful answers.
Comment: I agree with Joe that you may need a little bit more detail here. I looked into donating to a milk bank when I was nursing, and so this is answerable (although recommending a specific one may not be possible, depending on how many users we have in NYC!)
Comment: I see. Thanks for both of your input, this is the first question I have ever posted.
Comment: re-edited, is it better now?
Comment: Better. I may tweak it a little more later for you (don't take offense at that, it's how the StackExchange model works), but in the meantime I'm going to re-research what I think I know. Haven't been breastfeeding for a few years :)
Answer: There are couple ways to donate milk.
Informal or "direct" donation. This is by far the oldest way of providing milk to somebody else's child, although historically it was a wet nurse who directly breastfed, not handing somebody frozen milk. However, this is still done today. When I was nursing my daughter, another new mother had a double whammy: she had low production, and her child had a poor latch. A group of us provided our surplus until they were able to work out all the issues.
If you don't happen to know a nursing mother who needs extra, it may be possible to find one through the internet. MilkShare, for example, is a "connection point designed to give mothers who are unable to produce their own milk with some tools to explore private milk donation". Milk Match matches up donors and babies in need by zip code. (I found those in an article from 2008, so there may well be others by now; I mention them as examples, and have no experience with either site. Local LLL leaders or other nursing support may know of smaller local examples.)
Formal donation to a milk bank. Be aware that there are both non-profit and for-profit milk banks; think about which you would prefer to use. Many non-profit milk banks around the country are affiliated with Human Milk Banking Association of North America (HMBANA); they will accept, pasteurize, and sell donor milk to hospitals for use by pre-term or very ill infants. (The charge to patients/hospitals covers the pasteurization and overhead costs of the milk bank.) Alternatively, for-profit milk banks will process and fortify donor milk and sell it to hospitals for use by pre-term or very ill infants; the cost for patients appears to be higher, though. In both cases, the milk donor isn't compensated for their milk.
I'm biased towards the non-profit model, and have linked to resources that also lean that way. It just feels... nicer to me. That may not be an option depending on your geographic location or personal preference, though. Do what feels right for you — it's your milk :)

Whether you're donating directly or to a milk bank, you should be mindful about what you're putting in your own body. Most breastfeeding mothers are careful of their diet anyway, but when the milk will be used by a baby whose allergies you don't know or who may be dealing with other physical stresses (e.g. an infant in the NICU), be extra careful. Many milk banks have requirements for donors to take a blood test and not use nicotine or illegal drugs, for example. Informal donation is likely to have similar restrictions, although that depends on the family who wants the milk.
Side note: It's also possible to sell your milk yourself online, but customers are not limited to mothers buying breastmilk to feed babies. Some adults apparently like to drink it, too. Just mentioning it as a possibility: personally I'd much rather help an infant in need.

Additional resources for more reading and information:

Becoming a Donor to a Human Milk Bank (La Leche League International article)
Thinking of Donating Your Breastmilk? Read This First.
Answer: Depending on how old your child is, consider first the possibility that you may need that milk later (a cautionary tale).
My wife was a huge over-producer when we had our baby girl, to the point where a lot of the milk had to be expressed and simply thrown away somehow. We started looking into donating her breast milk, but meanwhile started freezing it in sterilised ice cube trays, then putting these cubes into containers in our chest freezer. We managed to save up several kgs of milk this way.
Our chest freezer is set to around -18 degrees celcius, and we had been assured by the nurses that the milk would store for up to six months at that kind of temperature.
However, while we were looking into how to donate this milk, my wife became ill, and her supply dropped right down (to the point where we couldn't adequately feed our girl straight from the breast anymore). The best advice we got from the nurses to help the supply come back was, even when it was feeling like we should just give up, keep on trying to feed our girl from the breast, and try to express at other times in the day with a pump. Not much ever came out, but the fact that her breasts kept getting this "demand" from both the pump and the baby would in time cause the supply to come back up to meet the demand.
While my wife was regaining her health and supply, the large amount of frozen-milk-cubes we'd built up in the freezer had suddenly become a godsend. During each attempted feed which only gave our girl a small amount of milk, I'd be warming up a few milk-cubes in a bottle sitting in warm water, which we'd give to her when her feed from her mum was complete. By the time her supply had come back in full, we were almost reaching the last cubes we had frozen and put away (very lucky timing).
So, it all worked out in the end. My wife's supply came back to match our girl's needs, and at 14 months old, she's still getting a morning breastfeed immediately after waking up each day, before getting solids for the other hours she's awake. But at the time, if we hadn't managed to put away our own milk, we would've had to look into getting milk from other people (or using formula as the supplement, which we didn't want to do).
As a side-note, if you go to do this, figure out how many millilitres are in each milk-cube on average. The cubes created by our ice cube trays turned out to be (on average) around 10 mls each, and knowing this made it easy to know how many cubes to warm up to feed our girl (e.g. need 30, 40, 50mls for a feed? We'd simply warm up 3, 4, or 5 cubes respectively).

Absolutely donate as well, but I'd recommend freezing some for yourself, just in case. It's unlikely that this will happen to you too, but it's nice to be prepared for unexpected eventualities. Of course, if you've already been breastfeeding your child for some time and you're still over-producing, I'll direct you to the answer from Erica for actual advice on donating. :)


How to invert vertex colors in Blender?

Question: So there is no built-in functionality to invert vertex color o.O
How can I invert vertex color on an active object?
Answer: This is all that is needed, and the way I prefer to access vertex colors. It works in any mode:
import bpy

obj = bpy.context.active_object

for ipoly in range(len(obj.data.polygons)):
    for idx, ivertex in enumerate(obj.data.polygons[ipoly].loop_indices):
        ivert = obj.data.polygons[ipoly].vertices[idx]
        col = obj.data.vertex_colors.active.data[ivertex].color
        obj.data.vertex_colors.active.data[ivertex].color = tuple(1-x for x in col)

If you want UI button add it with this micro addon (save as .py file into addon folder):

bl_info = {
    "name": "Invert Vertex Colors",
    "location": "3D viewport > Header > Paint menu in Vertex Paint mode",
    "version": (0,1,0),
    "blender": (2,7,6),
    "description": "Inverts vertex colors of active paint layer",
    "author": "Jerryno",
    "category": "Paint",
}

import bpy

class InvertVertexColors(bpy.types.Operator):
    bl_idname = "paint.invert_colors"
    bl_label = "Invert Vertex Colors"
    bl_description = "Invert vertex colors of active paint layer"

    @classmethod
    def poll(self, context):
        try:
            return context.active_object is not None
        except (AttributeError, KeyError, TypeError):
            return False

    def execute(self, context):
        active = context.active_object
        for ipoly in range(len(active.data.polygons)):
            for idx, ivertex in enumerate(active.data.polygons[ipoly].loop_indices):
                ivert = active.data.polygons[ipoly].vertices[idx]
                col = active.data.vertex_colors.active.data[ivertex].color
                active.data.vertex_colors.active.data[ivertex].color = tuple(1-x for x in col)
        return{'FINISHED'}

def menu_entry(self, context):
    self.layout.operator("paint.invert_colors", icon='IMAGE_ALPHA')

def register():
    bpy.utils.register_module(__name__)
    bpy.types.VIEW3D_MT_paint_vertex.append(menu_entry)

def unregister():
    bpy.utils.unregister_module(__name__)
    bpy.types.VIEW3D_MT_paint_vertex.remove(menu_entry)

if __name__ == "__main__":
    register()

Comment: aliasing can help speed up the dot lookups of `active.data.polygons` and `active.data.vertex_colors.active_data`. I suggest this, it's always less dense to read. https://gist.github.com/zeffii/8eede8ff41d6dac47448/revisions
Comment: @zefii nice, also good it's a gist now, feel free to make it public.)
Answer: or use foreach_set
import bpy

def invert_vcols(color_layer):

    # foreach_get requires us to pass it a container (list) with
    # the same amount of elements as " len(color_layer.data)*3 "
    # 3: because each vertex color has 3 components: [r,g,b]
    components = [1.0 for n in range(len(color_layer.data)*3)]

    # this writes the current [r,g,b,r,g,b,.....] of color_layer.data
    # into the " components " variable
    color_layer.data.foreach_get("color", components)

    # this subtracts each component from 1 and overwrites " color_layer.data "
    color_layer.data.foreach_set("color", [1-c for c in components])

    bpy.ops.object.mode_set(mode='OBJECT')
    bpy.ops.object.mode_set(mode='VERTEX_PAINT')

obj = bpy.context.active_object
invert_vcols(obj.data.vertex_colors.active)

You can use foreach_set because each component of each vertex color gets inverted.
Answer: You can invert vertex colors with this script (which I found online and improved):
import bpy
import random

# get and store the object in object mode
obj = bpy.context.active_object
mesh = obj.data

# set active vertex paint layer
color_layer = mesh.vertex_colors.active

v = 0  # current vertex in loop

# iterate over the verices and invert their color
for poly in mesh.polygons:
    for idx in poly.loop_indices:
        col = [(1 - color_layer.data[v].color[i]) for i in range(3)]
        color_layer.data[v].color = col
        v += 1

# We have to refresh Vertex Paint mode to see the changes
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.mode_set(mode='VERTEX_PAINT')

Just select your object, set one of the vertex colors on your object to be active, switch to Vertex Pain mode and run the script.
It would be nice if someone improved it further and added UI button :)

How to invert vertex colors in Blender?


Careers in French still shows English user data

Question: The idea of a Careers 2.0 in French is really good, but I still only have a single profile. All my current profile information is in English, not just because that was the only language Careers supported, but also because I'm targeting employers outside of France. With the new option to display Careers in French, all the titles and headers are in French, but my entries are still in English. Can you add a feature to translate, but keep the English data for the English Careers site?
Answer: I think the win here is to allow you to have multiple CV's.  A CV per language you're fluent in.  We took a look at all the computer translations, and they're awful.  And paying professional translators to do user generated content is extremely complicated and expensive.
This isn't a "right around the corner" feature, but we have been thinking about the idea and will update once it's closer on our schedule.
Comment: I don't want automatic translate, or paid translator. To have the possibility to do it myself would be a good first step.
Comment: @Stephane I think that's what Will meant... he was just ruling out the possibility of automatic translation of CVs into different languages.