Can't select quota to edit on Google cloud quota edition screen

Question: I can't check any checkbox on quotas table to edit. I've tried on Firefox and Chrome. I need to edit the "GPUs (all regions)" quota to add 1 gpu.
Answer: You can't ask for quota changes while you are on a trial account. You need to activate/upgrade your account to premium. After that, make sure you have an owner role to your project as Nicholas suggested.
After that, go to the Quotas page and select a row in the table. You should be able to select the little box on the right hand side of the screen the selected quota. Then click EDIT QUOTAS on the top of the screen. It will then request a quota increase which will be sent to Google Cloud Support.
Answer: Do you have the appropriate permissions? To change your quotas, you must have serviceusage.quotas.update permission. This permission is included by default for predefined roles: Owner, Editor, and Quota Administrator. Adding one of these to your user should help.
Comment: I have the owner role. Yet I cannot edit it. likely due to my project being under an organization.


Debug Pylons application through Eclipse

Question: I have Eclipse setup with PyDev and love being able to debug my scripts/apps.  I've just started playing around with Pylons and was wondering if there is a way to start up the paster server through Eclipse so I can debug my webapp?
Answer: Create a new launch configuration (Python Run)
Main tab
Use paster-script.py as main module (you can find it in the Scripts sub-directory in your python installation directory)
Don't forget to add the root folder of your application in the PYTHONPATH zone
Arguments
Set the base directory to the root folder also.
As Program Arguments use "serve development.ini" (or whatever you use to debug your app")
Common Tab
Check allocate console and launch in background
Answer: If you'd rather not include your Python installation in your project's workspace to get paster, you can create a pure-Python driver like:
#!/usr/bin/env python

from paste.script.serve import ServeCommand

ServeCommand("serve").run(["development.ini"])

...and run/debug that in Eclipse.
Note: this is running without the --reload option, so you don't get hot deploys (i.e., you'll need to reload server to see changes).  Alternatively, you can add the --reload option to get hot deploys, but then Pydev won't stop at your breakpoints.  Can't have your cake and eat it too...
ServeCommand("serve").run(["--reload", "development.ini"])

Answer: yanjost has it right, just wanted to add that you need to make sure you do not use the --reload option, this will prevent the debugger from properly attaching itself and cause your breakpoints not to work. Just a little thing I ran in to.
Answer: I was able to get --reload working by changing the 'Working directory' in the arguments tab to not use default (i.e. select 'Other'->File System->'Root of your Pylons' app where development.ini is stored.
Answer: On linux that will probably be /usr/bin/paster or /usr/local/bin/paster for paste script, and for arguments i have: serve ${workspace_loc}${project_path}/development.ini
Answer: I also got this working (finally).  I used buildout instead of virtualenv to install pylons (instructions at: http://wiki.pylonshq.com/display/pylonscommunity/Howto+install+Pylons+with+buildout), so the instructions above needed to be changed a little as far as the paths go.
-for "Main Module", I use:
${workspace_loc:myeclipseprojectname/bin/paster}

(adding --reload made breakpoints not work for me, and I tested this a couple times)
-for "Program Arguments", I use:
serve ${workspace_loc:myeclipseprojectname/mypylonsprojectname/development.ini}

-for "Working Directory, Other:", I use:
${workspace_loc:myeclipseprojectname/mypylonsprojectname}

-as mentioned above, in "Common Tab", "Check allocate console and launch in background"
-and remember to set a breakpoint before trying.
Answer: This doesn't really answer question about how to do it in eclipse. But I've been debugging paster server with winpdb, which is quite nice graphical python debugger (you can install it with easy_install winpdb).
Just start your server e.g.:
winpdb /usr/local/bin/paster serve development.ini

And click run button.
As wayne said, it's necessary to not use --reload option. At least I wasn't able to find how to attach to actual webapp even, when selecting to which forked process debugger should enter (entering different processes can be controlled with "fork parent" and "fork child" debugger commands).
Comment: I also found out that on my case enabling repoze.profile, did cause too deep recursions, when paster is ran with winpdb.


Read gyro output values with other programming languages

Question: I have a large quantity of gyro values and I read them through the Arduino serial monitor. I'd like to know how I can use these values in other programming languages (such as C/C++/Java) after the values are read. Are there particular  libraries for the Arduino that could help me in this way?
Comment: See http://arduino.stackexchange.com/questions/1850/how-can-i-reset-the-program-on-an-arduino-uno-while-the-device-isnt-recognised?rq=1. Seems to be much that same issue.
Answer: If your Arduino sketch is printing the data as ASCII numeric strings (human-readable), then any language with support for reading and writing to a serial device can interact with your Arduino on the port it is connected to, and collect the gyro data as it is being sent.
Answer: Yes, of course you can.
In C/C++ there are different libraries depending on your operating system - that is if you even really need a library to help you at all (in Linux you certainly don't - you just use standard system calls - open, read, etc).
In Java there are a few different ones.  RXTX is a common (though not very good) one.  Personally I ise JSSC(Java Simple Serial Connector) since it contains the JNI files for all the main platforms - you don't have to get the right separate library packages for your specific OS like you do with RXTX.
Then of course there's things like PySerial for Python, Device::SerialPort for Perl, and whatever nonsense Microsoft have created for C# and their .NET stuff.
So in general: pick a language you are comfortable with, then ask Google how to use the serial port in it.


What does 'jack your beanstalk' mean?

Question: I'm watching the TV drama 'sex education'. In S01E01, a guy says to his friend 'Everybody is either thinking about shagging, about to shag, or actually shagging, and you can't even jack your beanstalk'. What does 'jack your beanstalk' mean?
Comment: Sounds like a jocular term for masturbation. 'Jack off' means 'masturbate', and Jack and the Beanstalk is a well-known children's story.
Answer: It is not a standard expression, but given the context is probably a joke euphemism for "masturbation".  "Jack off" is a slang for masturbation.  The expression plays on the title of the children's story "Jack and the Beanstalk"
It's a funny way of saying masturbate, without sounding too dirty or serious.
Comment: It's euph**e**mism, by the way.
Comment: Thanks for explaining much better than I did, in my earlier comment.
Comment: Wow. Thank you so much! Interesting expression!

What does 'jack your beanstalk' mean?


PHP considers null is equal to zero

Question: In PHP, ($myvariable==0)
When $myvariable is zero, the value of the expression is true; when $myvariable is null, the value of this expression is also true. How can I exclude the second case? I mean I want the expression to be true only when $myvariable is zero. Of course I can write
($myvariable != null && $myvariable == 0)

But is there other elegant way to do this?
Answer: $myvariable === 0

read more about comparison operators.
Comment: Unless $myvariable is a float in which case $myvariable === floatval(0)
Answer: You hint at a deep question: when should an expression be true?
Below, I will explain why what you are doing isn't working and how to fix it.
In many languages null, 0, and the empty string ("") all evaluate to false, this can make if statements quite succinct and intuitive, but null, 0, and "" are also all of different types. How should they be compared?
This page tells us that if we have two variables being compared, then the variables are converted as follows (exiting the table at the first match)
Type of First  Type of Second   Then
null/string    string           Convert NULL to "", numerical/lexical comparison
bool/null      anything         Convert to bool, FALSE < TRUE

So you are comparing a null versus a number. Therefore, both the null and the number are converted to boolean. This page tells us that in such a conversion both null and 0 are considered FALSE.
Your expression now reads, false==false, which, of course, is true.
But not what you want.
This page provides a list of PHP's comparison operators.
Example   Name                Result
$a ==  $b  Equal              TRUE if $a equals $b after type juggling.
$a === $b  Identical          TRUE if $a equals $b, AND they are of the same type.
$a !=  $b  Not equal          TRUE if $a not equals $b after type juggling.
$a <>  $b  Not equal          TRUE if $a not equals $b after type juggling.
$a !== $b  Not identical      TRUE if $a not equals $b, or they are not of the same type.
$a  <  $b  Less than          TRUE if $a is strictly less than $b.
$a  >  $b  Greater than       TRUE if $a is strictly greater than $b.
$a <=  $b  Less than/equal    TRUE if $a is less than or equal to $b.
$a >=  $b  Greater than/equal TRUE if $a is greater than or equal to $b.

The first comparator is the comparison you are using now. Note that it performs the conversions I mentioned earlier.
Using the second comparator will fix your problem. Since a null and a number are not of the same type, the === comparison will return false, rather than performing type conversion as the == operator would.
Hope this helps.
Answer: To identify as null or zero by:

is_int($var) if a variable is a number or a numeric string. To identify Zero, use is_numeric($var) is also the solution or use $var === 0
is_null($var) if a variable is NULL
Answer: Try ($myvariable === 0) which will not perform type coercion.
Answer: Use the php function is_null( ) function along with the === operator. !== also works the way you'd expect.
Answer: The second solution wouldn't work either. The === operator is the solution to your problem.
Answer: If your zero could be a string, you should also considere checking the "zero string"
($myvariable === 0 || $myvariable === '0')

Answer: I hade faced a similar issue in one of my projects, with a minor difference that I was also using the values ZERO as a valid value for my condition. here's how I solved it using simple logic to separate NULL from zero and other values.
    if (gettype($company_id) === 'NULL') {
        $company = Company::where('id', Auth::user()->company_id)->first();
    } else {
        $company = Company::where('id', $company_id)->first();
    }

Answer: $myvariable===0

$a === $b

Identical TRUE if $a is equal to $b, and they are of the same type
Answer: There's an is_null function, but this will just replace your $myvariable!=null
Answer: For my case i found this soulution and it works for me :
if ($myvariable === NULL) {
    codehere...
}

Comment: If doing like this then you should use triple equal signs: `===`

PHP considers null is equal to zero


Can every particle be regarded as being a combination of Black holes and White holes?

Question: Can the statement be regarded as true? That every particle, or element in the universe can be regarded as a combination of black hole and white hole in variable proportion.
Comment: Except for colorful objects that also include red holes, green holes, blue holes. Huh!? There aren't any white holes in the Universe because they're the time-reversed histories to black holes that would violate the second law of thermodynamics. Each microstate one could call a "white hole microstate" is actually a black hole microstate. And black holes only deserve to be called in this way if they're large enough - heavier than the Planck mass and compact objects. Normal objects in the Universe are composed of elementary particles which are much lighter and they're not (usefully) black holes.
Comment: The Compton wavelength of elementary particles is too large to allow them to be black holes (or white holes for that matter). Also, white holes don't exist as Lubos says correctly. Which you could have found out easily by Googling.
Answer: You first have to understand what a "white hole" is. It's the time reverse of a black hole. It was rightly pointed out in previous answers that white holes violate the second law of thermodynamics. Now, like anything in thermodynamics, this makes them unlikely but not impossible (unlikely here usually means unlikely even in an astronomical number of universes ...). But if you keep that aside, there is a more beautiful picture of what a white hole is: it is a quantum superposition of all possible black holes of about the same size. There are so many ways to make a black hole, and they come in so many microstates, that the quantum superposition corresponding to a white hole is astronomically unlikely, ... but not impossible.
Such considerations could be important if you ask what the relation is between elementary particles and black holes. This has been answered already: if you try to make such a comparison you would have to realise first that all known particles are so light that those black holes would be tiny, in fact billions of times smaller than the smallest distance conceivable in physics: the Planck length. Because of this, comparing known particles with black holes, or imagining them as being built from black holes, black, white or otherwise,  is not considered to be a fruitful exercise in theoretical physics.
Comment: @RonMaimon, good, i want to believe that too, but suppose we say that in this universe we have an excess of kerr black holes relative to kerr white holes given by some astronomical statistical number of $10^{10}$ against 1. Where all those extra kerr black holes are connecting to? if the white hole is an analytic continuation of the black hole then there can be no excess: the mapping needs to be one-to-one
Comment: so, from the perspective of observers that cross a Kerr black hole and exit after a while through the corresponding white hole; how do they explain away to the observers they might find outside, the astronomical improbability of having found a white hole? will the outside observers agree that this is just a fortituous fluctuation of an otherwise thermal membrane?
Comment: @user56771: Your comment is why the extended Kerr is not taken seriously--- it can't possibly describe travel to another universe. Penrose said that you just get cooked at the Cauchy horizon, but I think you come out in this universe.
Comment: @user56771: It is impossible to have an "excess" of Kerr black holes--- the two concepts of Kerr black hole and Kerr white hole are the same. You can't come out of _another_ black hole, you just come out of the same one you fell into. This is strongly suggested by AdS/CFT, but the gluing is tricky, as it is easy to get traversable CTC's in a wrong gluing, and you get no hints from the classical solution as to how it's supposed to be done.
Comment: ok @RonMaimon, but if all these observers/travelers can really exit in the same universe, they might end up afterwards and compare notes, and they'll have to agree that white holes are more abundant than what quantum gravity theory predicts. How do they reconcile this?
Comment: @user56771: There is nothing unusual about white holes--- they are the same thing as a black hole, except from the perspective of outgoing observers. Every black hole is also a white hole. There is no contradiction here.
Comment: @RonMaimon, thanks for the insight. What you say, of course, makes me wonder about this: can an infalling observer interact with an outgoing one once inside? notice that inside, the former is unable to exit through the event horizon, but the latter does not have that limitation. Does this imply that infalling and outgoing observers won't be able to see each other?
Comment: @user56771: All these things are predicated on the interior solution of black holes being somehow right, and it says that you go right through and come out again of the same hole. You can't talk to the outside observer only until you pass the Cauchy horizon going in, then again going out, and then you get ejected and you can talk to the outside again. But this is not in the literature, I don't even know how to make it work, so please take with a grain of salt. I really don't know how something comes out again, but I feel it must.
Answer: Over the years there have been suggestions that elementary particles may be black holes. However no-one has ever been able to make this quantitative and I doubt anyone believes it these days. There was some discussion of this in what is the difference between a blackhole and a point particle, and Googling will find you lots of hits on this subject.
I've never heard of the idea that particles may be a combination of a black hole and a white hole. It's hard to see how such an arrangement could be possible.
The term "white hole" is widely used in science fiction, but SF has the wrong idea about them. The equations of general relativity are time symmetric, and if you reverse the direction of time the black hole solution turns into a white hole. However there is no evidence that the time reversed solution has any physical significance, and as the comments above suggest, no-one (in the mainstream physics community) believes that white holes exist.
The nearest we come go to a white hole existing are suggestions that the Big Bang was a white hole. Have a look at John Baez's article on this for more info.
Answer: A "white hole" is the exact same thing as a black hole, as discovered by Hawking and explained by 't Hooft. The reason is that black holes can be in thermal equilibrium with radiation, and the time reverse of a thermal equilibrium state is still thermal equilibrium. This intuition is confirmed in AdS/CFT, where a thermal black hole in AdS can be described by a time-reversal invariant thermal boundary state, and so one is safe to conclude Hawking's argument is valid in quantum generality.
The question of whether particles are black holes is to my mind entirely answered by string theory. The first point is that black holes are classical, and you are talking about quantum particles. So the question is only whether the particles can be interpreted as black holes in an appropriate limit.
The F-strings from which the particles in the Standard Model are made are dual to branes, either by going to strong coupling if you are in a heterotic string theory, where the strings are revealed to be 2-branes wrapping a dimension, or else by going to strong coupling in Type IIB string theory, where you find that the F-string swaps with a D-brane.
In either case, M2-branes or D1-branes are both classically interpretable as black holes, because when you stack them up, their supergravity solution is exactly a black hole. So within string theory, it is not wrong to say that every particle is a particularly highly quantum black hole, in the smallest quantum in which it comes.
This doesn't mean the classical GR picture works for these objects; it doesn't. The other answers explain that it fails completely. But the quantum picture that all matter is extremal black holes (excluding orbifolds and other exotica) is the basic picture of modern string theory. It unifies particle physics and black hole physics in a fundamental way.


What are some good libraries for accessing REST web clients from Scala?

Question: I'd like to make a simple client that uses the Rdio API. What are my options as far as libraries go? I know of Dispatch and the WS library in Play.
Are there any others?
Answer: To be honest, I searched around and tried a few but found I was much happier using Apache HttpClient and Jackson (JSON), and jackson-module-scala directly, with some small helper classes.
Apache HttpComponents: http://hc.apache.org/
jackson-module-scala: https://github.com/FasterXML/jackson-module-scala
This is likely not the answer you were looking for, but I found that different REST APIs I was integrating with had various quirks and differences that made it hard to find the "perfect" abstraction library beyond that, and Scala makes it very easy to write your own useful traits to support this.  E.g.:
<code>val (statusCode, json) = getJsonFrom(url, ("Authorization" -> auth))
assert(statusCode == OK)
...
</code>
If you don't get a better answer, I can place some example code on GitHub when I get a chance if you are interested.


Should I wait for Recruiter

Question: I recently applied for an internship and was able to set up an initial phone interview with the recruiter. She liked me and said she would set up an interview with the manager of the division that day and said if I didn't hear back from her that day to send her an email the following day. I proceeded to send her a thank you email after the call and also ended up emailing her the next day as she asked me to with regards to the next interview. I didn't hear back from her and it has now been 3 days. I am concerned and really bummed out about it. From this point on should I just hold out from emailing her again? What could be happening? Is it possible they found someone else?
Comment: Yea I understand that I should just wait. The only difference here is that recruiter said we'd be setting something within 2 days.
Comment: http://meta.stackexchange.com/questions/194476/someone-flagged-my-question-as-already-answered-but-its-not
Answer:
From this point on should I just hold out from emailing her again?

I'd likely give the recruiter a call asking for an update as there are more than a few possibilities here that if you are feeling stressed about it, call to get some answers from the recruiter.

What could be happening?

The recruiter may have had some issues either health, personal or family that caused her to be out of the office for a few days. While this is highly unlikely, perhaps aliens came and abducted for the next few months. Perhaps she has gotten a nasty infection and has been in the hospital for a few days. Perhaps someone in her family has had a health emergency and she is away for a while.

Is it possible they found someone else?

Sure, that's possible. You don't state when the internship would start which would be another factor here. Is it starting in June or July so it is still a long time until you'd start or is this something you'd start the day after the offer? There are more than a few pieces to consider here though I really would call the recruiter and see if that gives more details. I can remember waiting for over a couple of weeks for an interview because the manager was sick with a cold.

Keep in mind that you are calling because you want to follow-up as you didn't hear back after the e-mail about what is the next step here. Thus, one call isn't likely to make you seem like a pest. Now, if you called daily for the next 2 weeks then I could see you being a pest. Don't forget that if you get the recruiter's voice mail there may be an explanation there that the recruiter may be away on vacation for this week or something.
I'd suggest waiting if you know of some point in the future that can act as a deadline. "We'll know by the middle of next week," would be a message that tells me to call on Wednesday or Thursday if I don't hear before that point in time. At this point, you don't have any such deadline so you call and ask for an update as well as what can be done for the next steps that may come soon.
Comment: Okay, my concern with calling is I don't want to feel like a pest, since I sent a thank you email and also emailed again asking about the next interview. I won't come off as a pest if I call back?

Should I wait for Recruiter


How can I debug NSManagedObjects in XCode debugger?

Question: How do you get to the values of your Entity (sub class of NSManaged Object) when in the XCode debugger?  I get lost among the NSObject and _cd_XXX structures.
Answer: If you select the entity in the variables pane and then choose "Print Description to Console" from the contextual menu, you get a textual dump of the entity.
Comment: not exactly what I was looking for but you got 6 votes and it works as described.
Answer: In the Debugger Console type
po [your_entity your_property]

I don't really know another useful way, as the entity may e.g. be faulted and also the NSManagedObject structure isn't really helpful, as you already noticed.
Answer: Go into the debugger window, right-click, "Add Expression..." and type in the expression as it would appear in the code; you can also type p <expression> in the debugger to similar effect. For example in my case:
managedObjectContext.registeredObjects.first?.value(forKey: "shifts") as? [Shift]

If you're dealing with something which is an undifferentiated NSObject or NSManagedObject or similar then this can be a bit of a pain and you may want to dump the expression as described in the other answers here, but if the object does have a proper interface (e.g., the variable has a type of NSObject but the object has a more specific class) then casting it in the debugger would generally do nicely.


How to set environment variable for everyone under my linux system?

Question: Can I have certain settings that are universal for all my users?
Comment: Is it EXPORT? append that and it is global?
Comment: i think it is only append on current session , when you open new session in terminal it would be disappeared
Comment: I was missing to run `source /etc/environment`
Comment: Yes, export is only for current session, but I didn't have good results on adding my variable to `/etc/environment` file. That's weird the only environment variable I have there is `PATH` but its content is different from the `PATH` that I see when I list all the variables via `env`
Answer: As well as /etc/profile which others have mentioned, some Linux systems now use a directory /etc/profile.d/; any .sh files in there will be sourced by /etc/profile. It's slightly neater to keep your custom environment stuff in these files than to just edit /etc/profile.
Comment: this is not global ... it is restricted to the shell.. too bad it is the most accepted answer
Comment: Scripts are not used for ROOT user.
Comment: What if some users use another shell, like zsh?
Comment: zsh will source .sh files in /etc/profile.d/, you can see it from /etc/zshrc @Matthieu Napoli
Comment: @Bily, this is not correct for all systems. For example on my Ubuntu 21.04 there is no /etc/zshrc and the global config at /etc/zsh/zshrc does not source stuff from /etc/profile.d/
Answer: If your LinuxOS has this file:
/etc/environment

You can use it to permanently set environmental variables for all users.
Extracted from: http://www.sysadmit.com/2016/04/linux-variables-de-entorno-permanentes.html
Comment: Works for me too on Kubuntu
Answer: man 8 pam_env
man 5 pam_env.conf
If all login services use PAM, and all login services have session required pam_env.so in their respective /etc/pam.d/* configuration files, then all login sessions will have some environment variables set as specified in pam_env's configuration file.
On most modern Linux distributions, this is all there by default -- just add your desired global environment variables to /etc/security/pam_env.conf.
This works regardless of the user's shell, and works for graphical logins too (if xdm/kdm/gdm/entrance/… is set up like this).
Comment: You don't need to reboot, you need to relog-in.
(No rebooting critical servers for me)
Comment: +1 you also need to reboot after adding a variable in pam_env.conf cause instantly on the fly $ echo $variablename does not show
Comment: This doesn't seem to apply to my distro, Mint 17.2. The preinstalled file is entirely commented out, and if I add something like `echo foo>/home/me/bar` and reboot (and log in again), that file doesn't get created. (There's probably a more elegant way to test this, but I wanted to be sure before commenting here.)
Answer: Amazingly, Unix and Linux do not actually have a place to set global environment variables. The best you can do is arrange for any specific shell to have a site-specific initialization.
If you put it in /etc/profile, that will take care of things for most posix-compatible shell users. This is probably "good enough" for non-critical purposes.
But anyone with a csh or tcsh shell won't see it, and I don't believe csh has a global initialization file.
Comment: `/etc/environment` actually seems to set environment variables at for me, even as the root user. I know that `/etc/environment` is on amazon linux and ubuntu. I didn't get to check if works for csh, tcsh, or zsh.
Comment: it is not specific to the shell you are using, it is truly global
Answer: Some interesting excerpts from the bash manpage:

When bash is invoked as an interactive
  login shell, or as a non-interactive
  shell with the --login option, it
  first reads and executes commands from
  the file /etc/profile, if that file
  exists. After reading that file, it
  looks for ~/.bash_profile,
  ~/.bash_login, and ~/.profile, in that
  order, and reads and executes commands
  from the first one that exists and is
  readable. The --noprofile option may
  be used when the shell is started to
  inhibit this behavior.
  ...
  When an
  interactive shell that is not a login
  shell is started, bash reads and
  executes commands from
  /etc/bash.bashrc and ~/.bashrc, if
  these files exist. This may be
  inhibited by using the --norc option.
  The --rcfile file option will force
  bash to read and execute commands from
  file instead of /etc/bash.bashrc and
  ~/.bashrc.

So have a look at /etc/profile or /etc/bash.bashrc, these files are the right places for global settings. Put something like this in them to set up an environement variable:
export MY_VAR=xxx

Comment: Note that on classic Unix systems, both Bourne shell and Korn shell also read /etc/profile - it is probably the mostly widely used location for system environment setting. Some versions of the C shell look in /etc/csh.cshrc and /etc/csh.login as well as per-user locations; others do not use any system environment setting file.
Comment: Awesome, just what I was looking for as far as setting the env for non-login shell users.
Comment: Sorry, I seem to have accidentally downvoted this when for a while the arrows weren't visible... would you mind editing this (typo "environEment" in the second to last line, for example) so I can remove the downvote?
Answer: Every process running under the Linux kernel receives its own, unique environment that it inherits from its parent. In this case, the parent will be either a shell itself (spawning a sub shell), or the 'login' program (on a typical system).
As each process' environment is protected, there is no way to 'inject' an environmental variable to every running process, so even if you modify the default shell .rc / profile, it won't go into effect until each process exits and reloads its start up settings.
Look in /etc/ to modify the default start up variables for any particular shell. Just realize that users can (and often do) change them in their individual settings.
Unix is designed to obey the user, within limits.
NB: Bash is not the only shell on your system. Pay careful attention to what the /bin/sh symbolic link actually points to. On many systems, this could actually be dash which is (by default, with no special invocation) POSIXLY correct. Therefore, you should take care to modify both defaults, or scripts that start with /bin/sh will not inherit your global defaults. Similarly, take care to avoid syntax that only bash understands when editing both, aka avoiding bashisms.
Answer: Using PAM is execellent.
# modify the display PAM
$ cat /etc/security/pam_env.conf
# BEFORE: $ export DISPLAY=:0.0 && python /var/tmp/myproject/click.py &
# AFTER : $ python $abc/click.py &
DISPLAY  DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY}
abc   DEFAULT=/var/tmp/myproject


Categorical Principal Components Analysis

Question: I performed a Categorical Principal Components Analysis in ordinal data and I created 3 dimensions. Should I use the component loadings or the object scores, as my new 3 variables?
Answer: You probably had several ordinal variables, so your objects were described by several traits and you wanted to collapse this long description into few new traits. You succeeded an now your objects are described by 3 new traits.
This description is in object scores. Component loadings tell you how original variables were transformed to new ones.
So you should use object scores (I guess, since you write nothing about what you actualy want to do).
Answer:

These are my results. It is the first time that I use this technique, so I am quite curious. I can conclude that it is not quite obvious which questions belong to the dimensions 1, 2 and 3.
Comment: You shouldn't post it as an answer. It would be better if you edited your first post


Righting a stone column that is tilting

Question: I have concrete driveway piers with a stone facade and one of them is tilting like the leaning tower of Pisa. How can I right it and keep it stable?
Comment: Please describe your piers in more detail. Height, depth, thickness, footing situation, soil composition.
Comment: Most likely the ground is heaving and moving that one because the support is too shallow, needs to do down deeper than the frost line to be stable.
Comment: Give it a proper foundation...
Answer: How handy are you? Plan to hand dig or use machines? You could do several things. My dad has successfully chained one to the truck, pulled it over past upright, dug out underneath it on one side, dumped crushed gravel and or concrete, let it back down, pull to the other side and repeat. You could also use a tractor that could lift it out of place, excavate the area and re-do the foundation. If you plan to make it permanent, lay the column down, drill holes and add rebar to them, then upon re-placing it, sink the rebar into a bed of concrete properly prepared.

Righting a stone column that is tilting


How are food dyes affected by heat and ingredients?

Question: I made a cake today using bog standard marge, white sugar, eggs, self-raising flour and a pinch of baking powder.  I added enough pink food colour (supermarket brand that comes in the tiny bottles) to make it look dark pink to red.  It baked perfectly but lost the pink colour although it did look a bit more golden that it would have done if the colourant was not in it.  The date on the bottle was "best before November 2019".
Comment: Those supermarket brand dyes are pretty rubbish TBH, it's worth getting gels instead from cake supply places.
Comment: The popularity of rainbow cakes has made gel food colouring suitable for baking much easier to access than a few years ago; I can often find gel food colouring in bigger supermarkets (in the UK) nowadays.
Answer: As @GdD has said, a lot of the liquid dyes sold in the baking aisles of supermarkets while adequate for icing etc, are not really designed for baking. If you are intending to bake with a colouring, the powdered food dyes used in Indian and Chinese cooking can produce very deep colours, but they are nearly always synthetic and have been linked to some food allergies. The post What makes food dyes heat-safe? explains more about heat tolerant dyes and lists some good alternatives.


Chord that does not fit in diatonically

Question: I'm in the key of A major. I descend down chromatically from the 5 chord of E to Eb and then to D. Where is the Eb chord from and how would I write this in roman numerals?
Comment: I'm not sure what you mean by "where is the Eb chord from" but perhaps bV.
Comment: Is it a tritone substitution?
Comment: To what?  The A?  It could definitely be.  But what is the piece doing after that?  It's identity is somewhat determined by its function.  If you were modulating to D then perhaps, also one might expect an altered 7th chord in that regard.  Can you give the whole progression, or pic of the sheet music?
Answer: If the chords are in root position, you just have a V,bV, IV sequence. If in root position, you may have to be careful of parallel fifths if they style calls for avoiding these.
Chromatic passing chords are rather common. They can be used to create smooth bass lines.
Comment: I had accurately the same association as you!  ;) I just could add 2 examples.
Answer: With scant information, it's not easy to answer 'where's it from?' But it could well be a tritone substitution. Particularly if there's a C♯/D♭ there.
A tritone substitution here is a chord containing two notes from A7. The 3rd of A7 is C♯, the 7th is G. Swap those round, and the C♯ becomes D♭ - the 7th of E♭, while the G becomes the 3rd of E♭. That A7 would usually lead straight to D, but here, the tts does that same job.
It's quite common in jazz, and makes a smooth transition. It would be called ♭V.
Comment: I think it is a chromatic passing chord bV as the music still stays in the key of A throughout. Can someone please explain what parallel 5ths are and how to avoid them
Comment: @MartinO'Brien - there is no reason at all why a tts should cause any key change. That's not how they are used.
Answer: this progression can be applied in the third line of a Blues (bars 9-10), when not only the bass or the melody steps down by a chormatic tone but the whole triad: instead of
EEEE,DDDD,AAAA,EEEE you play E-E-E-Eb,DDDD,AAAA,BBBB
Here is an example of a 16 bars "schuffle-blues" and a chorus:
like ttw says it is a V-bV-IV progression while the extended bars play V-bVI-V-I
the chorus is built on the same progrssion on the root: I-bI,bVII-bI, (2x)
(btw.: with the help of the simple music of this band I've been grown up, before the Beatles came up ...)
and here's another similar shuffle blues in F with a turn around:
https://www.8notes.com/playalong/shuffle_groove.asp
Answer: (edit: LOL somehow I had read the "Eb" in the original question as "D#" and here I'm explaining that I looked at it as Eb instead of D#.)
About the D# chord, "where is it from"... I think it's better to ask, "what can I do with it". Or "as part of what kind of harmonic pattern or trick can I see it". Whether you look at it as a chromatic passing chord or a Roman numeral of some key, depends on where, how and how long it is played. In my very subjective and anecdotal "research" I found that if the D# chord is held any longer than about half a second, it requires special attention and melody notes cannot completely disregard it. And if it is held longer than one second, I definitely want to think of it as producing a feeling of a modulation, i.e. the key might possibly be changing. And if the D# chord is played on a weaker part of the beat or measure, then it seems to require slightly less attention - just like is usual in harmony progressions. If the "weird" chord or note comes in at a weak part of the beat/measure, I'm more likely to feel it's just a chromatic passing chord.
In my subjective and anecdotal doodling experiment I found that a nice way to handle the "modulation" aspect was to think of the D# chord as Eb in the key of Bb major or G minor. For melody notes, I used the D note as a common pivot point that's present both in the keys of A major and Bb major. Making a melody line that moves to D right before the Eb chord comes made the transition sound smooth, in my opinion.
What do you think? Decide for yourself. Here are four variations of the chords A - E - D# - D - A, first with just accompaniment and then with melody.

Treating the D# chord as a tritone substitution of A7 felt a bit awkward, so I didn't do that. To be used as tritone substitution I felt that it would have to be a D#7, preferably D#9 or D#13 or something like that. In the original example it was a plain major chord and the tritone substitution approach felt like it was jazzing it up too much.

Chord that does not fit in diatonically


How to comply with the new Federal Desktop Core Configuration (FDCC), which will remove local administrator access for all users?

Question: As developers, we believe that not having local administrative access is going to severely handicap our productivity.  We will be restricted from running IIS (we're a web development shop), installing applications, running Microsoft power tools, etc.  If you're going through the FDCC process now, it would be great to hear how you are coping with these changes.
Answer: Having actively worked as a contract developer at a base that uses the AF Standard Desktop, I can tell you a few things.
1: and most important.  Don't fight it and don't do what the first person suggested "and let them choke on it".  That is absolutely the wrong attitude.  The military/government is fighting lack of funding, overstretched resources and a blossoming technology footprint that they don't understand.  The steps they are taking may not be perfect, but they are under attack and we need to be helping, not hindering.
OK, that off my chest.
2: You need to look at creating (and I know this is hard with funding the way it is) a local development lab.  Every base that I have worked at has an isolated network segement that you can get on that has external access, that is isolated from the main gov network.  You basically have your work PC for e-mail, reports etc.. that is on the protected network. But, you develop in your small lab.  I've had a lab be 2 PCs tucked under my desk that were going to be returned during a tech refresh.  In other words, be creative with making yourself a development machine +servers that are NOT restricted.  Those machines are just not allowed to be connected to the main lan segment.
3: Get the distributions of the desktop configurations.  Part of your testing needs to be deploying/running on these configurations.  Again, these configurations are not meant for development boxes.  They are meant to be the machines the people use for day to day gov work.
4: If you are working on web solutions, be very aware of the restrictions on adding trusted sites, ActiveX components, certs, certain types of script execution that the configuration won't allow.  Especially if you are trying to embed widgets/portlets/utils that require communications outside the deployed application domain.
5: Above all remember that very few of the people you work for understand the technology they are asking you to implement.  They know they want function X but they want you to follow draconian security rule Y while achieving it.  What that usually means is that the "grab some open source lib or plugin and go" is not an option.  But, that is exactly what your managers think you are going to do because of the buzz around rapid development.
In summary, it's a mess out there.  Try to help solve the problem.
Comment: Having lived with an overly burdened development environment myself, I wish more people had taken this advice!
Answer: While I've never been through the FDCC process, I once worked for a U.S. defense contractor who's policy was that no one had local administrative access to their machines. In addition, flash drives and CD-ROMs were disabled (if you wanted to listen to music on CDs, you had to have a personal CD player with headphones).
If you needed software installed you had to put in a work order. Someone would show up at your desk with the install media, login to a local admin account, and let you install the software (the reasoning being that you knew what to install better than they did). Surprisingly, the turnaround was pretty quick, usually around 1/2 an hour.
While an inconvenience, this policy didn't really cripple us. We were doing a combination of Java, C++ (MS Visual C++ and GNU/C++), VB 6.0 and some web development. For what little web development we did, we had a remote dev box we would RDP into for testing. Again, a bit of an inconvenience, but it didn't stop us from getting our jobs done.
Answer: Without ever having had the problem, today I'd probably try a virtualising solution to run these tools.
Or, as a friend of mine once opined: "Follow the process until They choke on it." In this case this'd probably mean calling the helpdesk each time you needed to have a modification to your local IIS config or you'd needed one of the powertools started.
Comment: My company (in Germany) wanted to do something similar, e.g. no unauthorized software on the machines, and such. They folded pretty quickly after I handed them the first 200 request forms for the > 1000 installed packages on my Linux box. :)
Answer: This is quite common within financial institutions. I personally treat this as a game to see how much software I can run on my PC without any admin rights or sending requests to the support group.
So far I have done pretty well I have only sent one software install request which was for "Rational Software Architect" ('cos I need the plugins from the "official" release). Apart from that I have perl, php, python, apache  all up and running. In addition I have jetty server, maven, winscp, putty, vim and a several other tools running quite happlily on my desktop.
So it shouldnt really bother you that much, and, even though I am one of the worst offenders when it comes to installing unofficial software I would recommend "no admin rights" to any shop remotly interested in securing their applications and networks.
One common practice is to give developers an "official" locked down PC on which they can run the official applications and do their eMail admin etc. and a bare bones development workstation to which they have admin rights.
Answer: From what I can tell FDCC is only intended to be a recommended security baseline.  I'd give some push back on the privileges that you require and see what they can come up with to accommodate your request.  Instead of saying I need to be a local administrator, I'd list the things that you need to be able to do and let them come up with a solution that works (which will likely to be to let you administer your machine or a VM).  You need to be able to run the debugger in Visual Studio, run a local web server (Cassini), install patches/updates to your dev tools on your schedule, ...
I recently moved to a "semi-managed" environment with SCCM that gets patches installed on a regular basis from a local update repository.  I was doing this myself, but this is marginally more efficient for the enterprise and it makes the security office happy.  I did get them to put me, and the other developers, in a special collection so that we could block breaking changes if needed (how could IE7 be a security update?).  Not much broke except that now I need to update Windows Defender manually since I updated it more frequently than they do in the managed collection!  It wasn't as extreme as your case, obviously, but I think that is, in part, due to the fact that I was able to present the case for things that I needed to do for my job that required more local control.
From the NIST FAQ on Securing WinXP.

Should I make changes to the baseline settings? Given the wide
  variation in operational and technical
  considerations for operating any major
  enterprise, it is appropriate that
  some local changes will need to be
  made to the baseline and the
  associated settings (with hundreds of
  settings, a myriad of applications,
  and the variety of business functions
  supported by Windows XP Systems, this
  should be expected). Of course, use
  caution and good judgment in making
  changes to the security settings.
  Always test the settings on a
  carefully selected test machine first
  and document the implemented settings.
Answer: Not having local administrative access to your workstation is a pain in the rear for sure. I had to deal with that while I was working for my university as a web developer in one of the academic departments. Every time I needed something installed such as Visual Studio or Dreamweaver I had to make a request to Computing Services.


How to calculate open-loop input impedance of an opamp if it is not explicitly given in the datasheet?

Question: I would like to know input impedance of opamps I'm using in the circuit, so that I can choose input stage resistors optimally. However, opamp datasheets usually don't give the imput impedance value explicitly.
(Examples: LMV321, OPA330)
How do I calculate input impedance in case it is not given in the datasheet?
Comment: The only time this sort of thing is relevant is when you're doing ultra-high-impedance measuring, in which case the input bias current is the relevant number, not the impedance.
Answer: Generally, input resistance for commercial CMOS opamps are high enough (in the 100M to G Ohms range at DC) that optimizing the circuit for it are futile, considering the optimal resistors will have mismatch themselves. This is caused by the differential input stage for the opamp being a (or two in the case for rail to rail opamps) MOS differential pair generally. As for the input capacitance for frequency domain behavior, you can see the value listed to be 2pF single ended and 4pF differential. Usually, this capacitance will not have any observable effect since the gain bandwidth of the amplifier is much lower.
For CMOS opamps, to calculate the input impedance, you can simply consider the input capacitance parallel to a very, very high resistance value, which is almost equivalent to just considering the capacitance.
Comment: This is bad advice.  Some common opamps, like the LM324 for example, have significant input bias and offset currents.  You can't just blindly use 1 MOhm or even 100 kOhm source impedance.  Always CHECK THE PARAMETERS IN THE DATASHEET.  Anything less is bad engineering.
Comment: I agree, that's why I've limited my advice to CMOS opamps only, which the rest of my answer referred to anyway. Bipolar and JFET input opamps will require an input bias current that will greatly reduce the resistive component of the input impedance.
Comment: I think this advice should carry a warning label. The LMV321 has a monstrous input bias current of 500nA(max) on a 5V rail and if this is a CMOS amp then the dominant feature of the input is this bias - a 100k resistor will develop a dc error of 50mV.
Comment: Digging through the datasheet of LMV321 (page 16) reveals that it is a bipolar input opamp, so for that opamp, you can ignore just about anything I said about CMOS opamps. There is no way a CMOS opamp will draw nA's of current through it's inputs (gates) unless you have a specificly designed one in nm CMOS.
Answer: Opamp datasheets will usually give you input bias and offset current specs, not resistance.  A resistance doesn't model what happens that well, especially for FET input opamps.  It more useful to know the worst case current that could go into or come out of each input, and how mismatched it can be between inputs.
You can still use this to calculate maximum input impedance.  The input bias current times that impedance will be the error voltage the opamp will see.  This is in addition to the input offset voltage specified in the datasheet.
For modern FET-input opamps, the input bias and offset currents are so small that they usually don't matter unless your source impedance is in the multiple MΩ range.
However, always check.  Some opamps, like the very common LM324 for example, have significant input bias and offset currents that you have to think about carefully.  Generally you are safe with 100 kΩ or less source impedance, but such rules of thumb are no substitute for reading the datasheet and making sure.  It only takes a few seconds to multiply the input bias current by your source impedance and compare the result with the input offset voltage.
Comment: Does you second paragraph imply that \$ Z_{in} = V_{os} / I_{bias} \$; where \$Z_{in}\$ is input impedance, \$V_{os}\$ is input ofset voltage and \$I_{bias}\$ is input bias current?
Comment: @khBa: No -----


How would the International Space Station be maintained unmanned?

Question: Russia's lunch to the ISS failed and the crew may have to leave it unmanned. How would the ISS run without a crew? Could some one else take it over or squat in it?
https://www.npr.org/2018/10/11/656473889/rocket-launch-failure-forces-astronaut-and-cosmonaut-to-make-ballistic-landing
Comment: There is some interesting and somewhat related reading in [Why has the ISS not been left unmanned?](https://space.stackexchange.com/q/21070/12102) and also [How long would ISS stay in orbit if it didn't get reboosts?](https://space.stackexchange.com/q/9482/12102) I don't think this is a duplicate of those, but it is possible that part of an answer to this question could be drawn from parts of answers there. I thought there might be some discussion of "space station squatting" here already but I can't find it.
Comment: Exactly my thoughts, relevant sub questions you could add (or I could raise seprately) being "Q1 can it be reboosted by ground command" (seems obvious but have to ask), "Q2 is there any vital regular maintenance (other than reboost) that needs a crew?", "Q3 is there any (technical, not political) possibility for a Shenzhou based visit in terms of docking compatibility and launch vehicle reach?" (OK, OK, I promise this isn't fishing for a sci-fi plot!)
Answer: The ISS is technically able to run without a crew, there's telemetry and command links that allow ground control to do most housekeeping tasks. That being said there's maintenance that only humans can do, and some issues can only be fixed by people on board. A recent example of this is the leak in the Soyuz module. Ground engineers would not have been able to track that down to the exact point, and they certainly wouldn't have been able to repair it.
So really it all depends on what goes wrong, there's a reasonable chance that something important will break if there's an extended unmanned period.
As for whether someone could take the ISS over it's certainly technically possible, all you need is a powerful rocket launching from a location that can reach the ISS's orbital parameters, spacecraft capable of taking crew up to it, the means to resupply it on a regular basis, and a crew that know how to run the ISS in the first place without ground support. There's 3 organizations that could do that and they are Roscosmos, NASA (although NASA currently lack a system it's on the way and NASA has the launching points) and the CNSA (Chinese National Space Agency). China would have to be a bit nuts to try it as it would be an extremely aggressive move with a lot of risk.
Comment: It's not their property @MagicOctopusUrn, and there's no agreement for them to use it. Possibly it could be construed as an act of war, at the very least it would be a serious diplomatic situation.
Comment: I see what you mean @MagicOctopusUrn. They should be capable of it, their spacecraft technology is based on Soyuz, so the docking would likely be compatible, but it would be technically risky as well as they don't know the ISS systems and they'd be working against a hostile power still in control of it.
Comment: Why is it an aggressive move for the CNSA?
Comment: Ahhh, I thought you meant aggressive in terms of their current knowledge and abilities (meaning it would be difficult for them to physically do-- which I wasn't sure is true); not aggressive as in war/act of war.
Answer: It's possible (although not desirable) to leave a space station drifting uncontrolled, rescuing it at a later time.  This happened in real life with the Soviet Salyut 7 space station in 1985.  The sensor that pointed the solar array malfunctioned, leading to loss of power, loss of telemetry and control, and eventually to the drifting and slow tumbling of the station.
Salyut 7 was eventually salvaged and repaired by Soyuz T-13.  This included docking with the derelict station (without a functioning docking radar), diagnosing and repairing the sensor, restoring power, correcting the attitude, re-heating the station, and repairing the water system (which had frozen).  It was arguably the most difficult repair in space history.
The recovery of Salyut 7 was dramatized in the Russian blockbuster movie of the same name.  The movie takes a few liberties, including a sinister flyby with the space shuttle Challenger.  However, it also includes a toy bear as a microgravity indicator:

I'm skeptical about someone else taking over an unmanned station.  First, the rendezvous and docking requires experience that only the Russians and the Americans have.  Second, getting a station back to functional status involves expertise, parts, and supplies that only the original space agencies have.  Again, these are the Russians and the Americans.
Answer: Retired astronaut Leroy Chiao has addressed this directly a few days ago in Space.com Opinion piece Soyuz Rocket's Launch-Abort Close Call Highlights Poor Space-Policy Decisions (Op-Ed). Here is a bit of it:

If the ISS has to be left without a crew aboard, this could be a serious problem. That's because a number of events could cause the ISS to lose attitude control. Why is this important? When a structure like ISS loses this control, the object tumbles.
When there is a crew on board during these events, they run the procedures to re-establish control. This is not such a big deal. Without a crew however, the antennas would quickly lose a signal lock with mission control, and the ISS computers would fail to receive commands from the flight controllers. The solar arrays would no longer point at the sun correctly, and the storage batteries would run down. The ISS would slowly die.
It would not be possible to safely attempt a docking with a tumbling station, so a new crew would not be able to get aboard to rectify things. The ISS would slowly lose altitude and re-enter the Earth's atmosphere in an uncontrolled manner. We and our international partners would lose the 100-billion-dollar-plus facility. Large pieces would survive the re-entry and could cause significant damage upon hitting the Earth.


Entity without translation

Question: I want to make entity in Drupal 8 called cash that store only numeric value (integer or float). I think, that entity not need translation.
Is it possible for us to create custom entity without language/translation?
Answer: @IgorTengab
An entity in Drupal 8 needs translation to be enabled to be translatable
For example by going to /admin/structure/types/manage/ENTITYNAME > language settings > enable translation
For more info look here
But for your purpose perhaps a light-weight alternative would be to create a custom entity https://www.drupal.org/docs/8/api/entity-api/create-a-custom-content-entity

Entity without translation


LINQ in win32 DELPHI

Question: Is it possible to use LINQ in win32 DELPHI applications
Answer: Delphi 2009 has generics, class helpers and anonymous method support, but not lambda, extension methods or type inference.  Lambda expressions are probably coming in a future version of Delphi, but they are not on the official road map yet (a new one should be coming soon hopefully).  Also Delphi for Win32 does not have access to all the LINQ libraries.
So the short answer is NO, you can't do LINQ in Win32 Delphi.  You can how ever do some similar things, and you can technically even access LINQ through COM (as you can with any .NET classes), but it would kind of defeat the point without the cool LINQ syntax.
LINQ is really a .NET technology.  While Delphi will most likely develop the language features that make LINQ possible, the underlying .NET libraries are for .NET development only.
I would suggest using RemObject Data Abstract or similar.
Comment: Umm... aren't extension methods and class helpers two names for the exact same thing?  Only difference is one of them's used in Delphi and the other's used in C#, or is there some critical bit of functionality I'm overlooking?
Comment: Class Helpers are only applied to one class.  Extension Methods are a little more broad.  They are very similar, and you could probably do it with Class Helpers, but it would require more code.
Answer: Yes and No.  LINQ can really be thought of as two different items.
The first is the SQL like query syntax.  It's what allows you to write the following in C#.
var query = from it in "foobar" select Char.ToUpper(it);

For delphi to use this version of LINQ, it would need to add explicit syntax support.  AFAIK this does not exist.
Under the hood though, all LINQ queries are translated into a set of query expressions.  These typically involve a heavy use of lambda expressions and closures. The above code is equivalent to the following non-SQL syntax version.
var query = "foobar".Select(x => Char.ToUpper(x));

I don't know the level of lambda or delegate support in Delphi but it should be possible to access LINQ in this method from Delphi.
Comment: - you have a small error, you need to replace "it" with "x".
Delphi Win32 lacks almost every feauture that makes the second example work. There is no VAR. string and char are not objects, and you don't have the short syntax lamda expressions.
So if you can do it, it would be a lot uglier.
Answer: I don't know in what version of Delphi it appeared, but in XE we have 'object functions' that can be made as closures or near equal lambda expressions.
So, as of today (26/06/2011) it is near possible to have LINQ-like expressions in Delphi (the 2nd form).
Comment: What do you mean with "object functions"?

LINQ in win32 DELPHI


.txt subtitles/transcript in VLC 2.0?

Question: Yesterday I upgraded my VLC to 2.0. I was watching some video lectures of .mp4 format. The lectures were not having any subtitles but they provided me transcript in .txt files.
I want them to be used as subtitles in VLC 2.0 but they aren't working!!
Is there any solution for opening .txt subtitles or transcript in VLC 2.0??
Comment: If your TXT files are in correct format http://matroska.org/technical/specs/subtitles/srt.html
then simply rename the file to .srt
Comment: no they are not!! they are just transcripts!!
Answer: In a .srt file, we have the time-stamps which specifies which text to be displayed when and for how long (shown below).

0 00:00:40,874 --> 00:00:44,644 KELLER: Our father, who art in heaven,
1 00:00:44,645 --> 00:00:47,313 hallowed be thy name.
2 00:00:47,314 --> 00:00:49,482 Thy kingdom come,
3 00:00:49,483 --> 00:00:54,320 thy will be done on earth as it is in
  heaven.

Whereas, in the transcript, there will be no such time-stamps.
Therefore, it is practically impossible to use transcript to display subtitles.
But, if you can work on that file, and create time-stamps (various online tools and softwares are available for this), you can convert txt file to srt.
Hope this helps. Comment if more info is needed.
Answer: This may not be ideal, but Youtube has this functionality. If you have a decent connection/time, upload it as a private video, and then you you'll have the Transcribe and Sync option where you can upload your text and have Youtube's servers take care of the syncing.

.txt subtitles/transcript in VLC 2.0?


What smart contract language does IOTA use?

Question: What smart contract language does IOTA use? Solidity?
Comment: I'm voting to close this question because it is about the legacy-network and it is a good idea to keep only Shimmer/ShimmerEVM and latest IOTA Chrysalis questions
Answer: IOTA will use a smart contract language called Abra - which is an intermediate trinary-based functional programming language.
More information on Abra can be found here.
Comment: Read the link! Thanks. How will the syntax look like? Will it be like solidity as I am familiar with solidity.
Comment: Not much info about the syntax yet. But CfB said if you know FPGA programming, you will be able learn Abra in a few days.
Comment: Is that a hint that it might be a sub(super)-set of Verilog?
Comment: @Helmar , And can we currently deploy a smart contract in IOTA ? or Is it still underway and in progress?(https://iota.stackexchange.com/q/2438/1928)


Why wont my 1000kv brushless motor work with a 10x4.5 propeller?

Question: When I run my A2212/13T 1000Kv brushless motor by itself with 11.1 or 7.4 volts(i am using 2 lipo 3.7volts 900mah and a li-ion 3.7v 900mah in series that I connected with alligator clips) it runs fine. But when I add the propeller(10x4.5) it came with, it will run for a second then stop and make a series of beeps, which looks like it's trying to reboot itself. I am using a 30A ESC. Does anyone know how to solve this problem? Thanks.
Comment: You say this is a 10x4.5x2 propeller? Or is it a tri-blade?
Comment: no, it is just a normal blade 10x4.5, search up 10x4.5 propeller and the picture of what I'm talking about should come up.
Answer: I think you're most likely running into current limits with your battery setup. The motor you linked to is spec'd for even more aggressive propellers (e.g. 10x5 and 10x6), so it's likely not the problem.
It's hard to say for sure without knowing more about the specific battery cells you're using to construct your "franken-pack" (I suspect this is a follow-up to your question about series-connected battery cells), but it's likely that your 900 mAh cells aren't rated for the continuous discharge required to spin a larger 10x4.5 propeller.
The failure mode you describe sounds like this is happening:

Initial propeller rotation from rest is supported by the burst discharge capabilities of the battery cells

This comes at the cost of abnormally high battery terminal voltage sag

The ESC freaks out because the battery voltage it sees has dramatically decreased and isn't recovering

ESC responds by cutting power to the motor and sounding a fault code
Comment: what you have answered sounds about right, but to solve this problem what battery do you suggest I should buy
Comment: You should look into higher discharge rate 3S LiPo battery packs, e.g. 30C or higher.


What is wrong with my tree?

Question: There is a tree in my backyard that has gone quite black around the trunk. The bark seems to be splitting and a liquid is collecting on the ground near the black area. Bugs and insects have also taken a liking to the area and a strong odor is present. I do not know what type of tree it is. See picture. Any help is appreciated. Thanks!
Answer: If the smell is unpleasant, your tree has bacterial canker and the tree needs to be removed, otherwise there is a risk it will, at some point, fall on its own. Sometimes trees start seeping liquid that doesn't smell, and that's gummosis which can often lead to bacterial canker, but either way, please check the stability of your tree and consult an arborist (tree surgeon in the UK). Both gummosis and bacterial canker can arise from splits or cracks in the trunk; these can be from physical damage, disease, freezing weather, or sometimes rot at the root.

What is wrong with my tree?


What should be expected from ODBC when a deadlock occurs?

Question: I'm executing sql on MS SQL 2008 using ODBC's SQLExecute().  My code calls a stored procedure which becomes a deadlock victim.  The server rollsback and the procedure is terminated, but SQLExecute() returns success.
The server trace logs clearly show the deadlock, but an ODBC trace has no sign of any problem.  The deadlocks are expected since there is a lot of concurrency going on, but my application can't recover unless its told there was a problem.
Should the ODBC driver return an error here?  The docs state that @@error should be set after a deadlock, but isn't it ODBC's responsibility to capture that info?
Answer: Arrrg! Missing "set nocount on" inside a stored procedure.  No room in the buffer for the deadlock error with all the backed up row update counts.


Change AngularJS const by selection value in HTML

Question: i have problem.
I generated project by JHipster -> angular + html,
and there i have pagination with AngularJS value -> ITEMS_PER_PAGE,
i can change this value manualy in pagination.config, but it's not the point of this project.
I need to make selection options to display number of pages -> 10,25,50,100.
<code><select id="pageSizeSelect" onchange="self.location.href='/request?pageSize='+this.value">
   <option value="10"> 10 </option>
...
</select>
</code>
how can i change this ITEMS_PER_PAGE ? By Angular ? or Java backend ?
Comment: can you post the part of your JS where the cons is set?
Answer: its just EXPORT const ITEMS_PER_PAGE = 10;
than in other .ts files its just imported :)


Media Queries - CSS only for iPhone landscape

Question: Are the same methods used to write CSS only for iPhone in landscape mode?
Answer: Yes, sure. Check: http://www.w3.org/TR/css3-mediaqueries/#orientation
@media all and (orientation:portrait) { … }
@media all and (orientation:landscape) { … }

If you want to target iphone only you have to add the resolution or the dppx density to these MQ.
Answer: You could do this
<meta name="viewport" content="width=device-width,
    minimum-scale=1.0, maximum-scale=1.0">

That forces the iPhone to render viewport the same as the device width.
Then use this css to target the landscape mode, which is +320px wide
@media screen and (min-width: 321px){
    //styles
}

Answer: If I understand you correctly, and you want to know the media queries to target a smartphone like the iPhone only when it is held horizontally, try something like this:
@media only screen and (min-width: 480px) and (max-width: 767px) {
    /* styles go here */
    body {

    }
}

Answer: actually if you use :
<meta name="viewport" content="width=device-width,
minimum-scale=1.0, maximum-scale=1.0">

then you prevent user to zoom at any time, which can cause usability problems.
I would recommand you to use :
<meta name="viewport" content="width=device-width, initial-scale=1.0">

In this case, you force your page to be displayed at it's original initial scale, and so then you can target different layout sizes with your media queries, as the layout will be resized when you will rotate your iPhone :
@media only screen and (min-width: 480px) {
    /* landscape mode */
}

@media only screen and (max-width: 479px) {
    /* portrait mode */
}

And the user can still pinch the page to zoom.


Mount point for system-wide USB disk

Question: I have a USB disk connected to a server computer which is mounted when the computer starts. I'm thinking that it's not ideal to mount it under the /media directory since it could potentially lead to a naming conflict if a user has the same name as the disk label. Should I therefor mount it in /mnt? Is there a best-practice?
Answer: I too would be wary about using directories which are managed by automounters like that.  I think /media/ used to be shared by all users, it wouldn't have been so much of a problem... but it seems ugly to use it now, at least on systems like yours.
There is not one best practice.  E.g. read: Preferred mount points for internal HDDs
A subdirectory of /mnt seems to be accepted.  That directory is for the system administrator to control, and it's well known as a possibility (even by those who disagree it should be used, I would say :).

Personally I lean towards /mnt/whatever, rather than creating something new in the root directory.  Just that the root is fairly cluttered, so if you were looking for something there you could easily miss it.
The FHS gripe against /mnt/whatever is that the historical point of  /mnt was to have a convenient directory to mount over.  I think it was a valid argument in the context of FHS, which specifies rules for distributions.  So FHS defined /media to consolidate the traditional /floppy and /cdrom, advising against putting them in /mnt.  But, as the system administrator you can always create e.g. /mnt/tmp when you need to.
Answer: That is up to you, the system administrator, to determine those conventions but it is indeed a good idea to make sure the mounting points can not conflict with anything else.
Considering that the mounting point is dynamic in this case, it would be even safer to do them in another level of sub-directory such as /mnt/usb or something similar.

Mount point for system-wide USB disk


My keyboard layout is all wrong.. And hotkeys aren't working!

Question: I'm very new at Ubuntu (I'm a recent Windows convert)
Basically when I first set up the OS I chose the keyboard layout as "English (UK)" and it's got the @ and " keys messed up! I have no idea where to find and change these settings.. I have looked around the forums a few times already and found answers that  didn't really fit my situation.. I'm just looking for where I can change that!
Also using shortcuts such as Ctrl+Alt+T that are used in certain tutorials just don't work for me!
I'm sorry if these questions have been asked before and I have used Terminal a little but I'm no pro so if you can, please dumb down the instructions a little for me :)
Answer: Okay so after spending literally hours trying to find an answer I managed to find an application to fix it and allow me to switch and all is good now...


Can I damage my Sony a6300 sensor if the sun is in my photo?

Question: I took a few photos this weekend of a mountain range, and the sun was up above them, off to the top right for most of the photos. I was taking these photos (moving the angle around and whatnot) for about 5 minutes in total. Would this damage the sensor, or is it more like "don't aim the camera directly at the sun"?
Comment: The question marked above as a duplicate specifies *where the sun appears*. That is, at sunrise - when the light and heat from the sun is passing through much more of the Earth's atmosphere than when it is high in the sky.
Comment: @MichaelClark I don't read it that way. I think that means "Where the sun appears in the photo."
Answer: This will most probably not damage the camera. However if you are taking a long time composing your shots, always having the sun in the frame, the effect of magnification that the lens has can cause damage to the sensor as the temperature would rise. Using a long lens pointed directly at the sun is also dangerous even for shorter periods. Shooting the sunrise or sunset is not a problem.
Comment: this answer couldn't be more false
Comment: Why is this wrong? He is taking landscape photos, the sun is in the frame but it is not magnified, it is equivalent as watching the sky on a sunny day. Using a lens with a great magnification and pointing it directly at the sun can indeed cause a temperature raise and even a burn of the sensor.
Comment: your original comment was 100% false. Go stare at the sun for 1 minute.
Comment: Maybe the parallel was not clear, I was trying to compare to the case when you look at the sky or over a landscape and you also see the sun, I have updated the answer to make it more undersyandable
Comment: I think it could be far more false, actually..


Can we use LWC components in React Application?

Question: Is it possible to use LWC components in React application? We are trying to get some help on this but we don't see any supporting articles so far.
Answer: Yes you can. LWC is currently open source framework available on github here with documentation here and site here
It can be used like any other framework, the only question here is why you want to use it together with react.
Answer: Not sure why you would actually use LWC within React app but you might want to check this guide describing how to use "Lightning Design System for React"


Tool for debugging makefiles

Question: I have a large legacy codebase with very complicated makefiles, with lots of variables.  Sometimes I need to change them, and I find that it's very difficult to figure out why the change isn't working the way I expect.  What I'd like to find is a tool that basically does step-through-debugging of the "make" process, where I would give it a directory, and I would be able to see the value of different variables at different points in the process.  None of the debug flags to make seem to show me what I want, although it's possible that I'm missing something.  Does anyone know of a way to do this?
Answer: Have you been looking at the output from running make -n and make -np, and the biggie make -nd?
Are you using a fairly recent version of gmake?
Have you looked at the free chapter on Debugging Makefiles available on O'Reilly's site for their excellent book "Managing Projects with GNU Make" (Amazon Link).
Answer: I'm sure that remake is what you are looking for.
From the homepage:

remake is a patched and modernized version of GNU make utility that adds improved error reporting, the ability to trace execution in a comprehensible way, and a debugger.

It has gdb-like interface and is supported by mdb-mode in (x)emacs which means breakponts, watches etc. And there's  DDD if you don't like (x)emacs
Comment: If I could I would add +100. When using remake ('brew install remake' for installation), the problem that I had to debug simply DISAPPEARED. No idea what the problem is, but who cares? :)
Answer: From the man page on make command-line options:
-n, --just-print, --dry-run, --recon
Print the commands that would be executed, but do not execute them.

-d  Print debugging information in addition to normal processing.
The debugging information says
which files are being considered for remaking,
which file-times are being compared and with what results,
which files actually need  to  be  remade,
which implicit  rules are considered and which are applied---
everything interesting about how make decides what to do.

--debug[=FLAGS] Print debugging information in addition to normal processing.
If the FLAGS are omitted, then the behaviour is the same as if -d was specified.
FLAGS may be:
'a' for all debugging output same as using -d,
'b' for basic debugging,
'v' for more verbose basic debugging,
'i' for showing implicit rules,
'j' for details on invocation of commands, and
'm' for debugging while remaking makefiles.

Answer: I'm not aware of any specific flag that does exactly what you want, but --print-data-base sounds like it might be useful.
Answer: remake --debugger all
More info https://vimeo.com/97397484
https://github.com/rocky/remake/wiki/Installing
Answer: There is a GNU make debugger project at http://gmd.sf.net which looks quite useful. The main feature supported by gmd is breakpointing, which may be more useful than stepping. To use this, you download gmd from http://gmd.sf.net and gmsl from http://gmsl.sf.net, and do an 'include gmd' in your makefile.

Tool for debugging makefiles


In poker can players agree to a draw and split the pot?

Question: E.g. if there were 2 players left could they agree to call it a draw and split the pot?  If so would both or neither have to show their hand to everyone who folded?  Or, for that matter, if a few people are playing could they all agree they don't like their cards and just do a re-deal from scratch?
Answer: So firstly the case of agreeing to split the pot. In the case of a home/private game, sure go for it. It's your game you can run it how you all want to. I mean it screams of collusion and I would never as a player at that table agree to it. I'd also be cashing out as it's not a team game and as I said it just reeks of collusion/soft play or team play between players. You can make any deal you want as long as the table agrees to it. In a casino forget that as it's technically a breach of rules as a hand needs to be shown to claim a pot or everyone bar one folds. One high stakes private cash game I dealt before they never agreed to just chopping, but I did on a few occasions see them do some equity payouts and leave a certain amount for the pot to finish the run out(granted cards were face-up). It's important to note in that scenario they were all friends, and didn't want to bust each other as they were playing socially as it was their once a month game. It's also much more common to just run multiple boards and chop it based on who wins each run out.
With regards to redrawing the hand, again in a home/private game go for it, but why bother playing? The majority of the time you're playing poker you will not have premium hands. You won't get what you're describing outside of your own private game and any half decent player shouldn't agree to those terms. I feel both questions really do you a disservice in terms of learning and playing poker correctly, and if you do end up playing even in another private game or casino you'll likely struggle.
If you're playing with friends and want to do your own rules sure go for it no one can stop you, but it's not correct playing rules and again you'll basically be crutching yourselves. I'd also say that, especially in a group of friends, if most agree to something you could be essentially guilting someone to agree when they don't actually want to, i.e. it can be very hard for some people to be the only person to say no, and they'll just go along with everyone else. Plus then if one says no you could probably summarise that they have a decent hand, thus everyone folds, totally not fair to that player. On top of that you said if a few people agree, does that mean that if 6 out of the 8 want to change you'll change the cards? Any decisions should be unanimous for everyone. If one says no that's it, don't question it again. To avoid any annoying/difficult circumstances I'd say just play the game correctly like any casino would run a cash game.
TL;DR - Can you in a private game, sure of course your game your rules, should you, probably not.
Answer: In a home game you can do whatever you like--but in a casino or other formal/structured environment, allowing the last two players to split the pot without showing would be an open invitation to collusion. Likewise, allowing the players to decide things like misdeals after they've seen cards is not going to be fair to all players. House dealers and floor persons are there specifically to keep the game fair and ensure that it runs smoothly.
Even in a home game, if it is possible, a neutral arbiter should be used. Perhaps someone who's present but not playing, or dealers could deal themselves out.
Comment: In Nevada it was my understanding that state gaming law forbids splitting pots. I read it once a long time ago, however they rewrote the rules a few years back to address online poker and this particular policy may not still be on the books.


Continuous spectral theorem example

Question: The spectral theorem can be explicitly expressed for an hermitian matrix by providing its eigen decomposition. In the more general case of a bounded self-adjoint operator with a continuous spectrum, the expression of the spectral theorem is $Ax=\int \lambda dF(\lambda) x$. This expression is rather abstract. Can someone provide a simple example of the continuous case, taking $x$ from a space of function, a differential operator A, and the detailed expressions of $F(\lambda)$ and $dF(\lambda)$ ?
Answer: Yes, let $X=L^{2}[0,1]$, and let $(Tx)(t)=tx(t)$, i.e., multiplication by $t$. This is the prototypical example in many regards. You don't have any eigenfunctions because $Tx=\lambda x$ would require $(t-\lambda)x(t)=0$ for a.e. $t\in[0,1]$ which means that $x=0$ a.e..
However, you have approximate eigenfunctions. For example, if $\lambda\in(0,1)$ and $\epsilon > 0$ is smaller than the distance of $\lambda$ to $\mathbb{R}\setminus[0,1]$, then
$$
                \varphi_{\epsilon} = \frac{1}{\sqrt{2\epsilon}}\chi_{[\lambda-\epsilon,\lambda+\epsilon]}
$$
is a unit vector in $X$ (here $\chi_{S}$ means characteristic function of set $S$). And,
$$
        \|(T-\lambda I)\varphi_{\epsilon}\|^{2}=\frac{1}{2\epsilon}\int_{0}^{\epsilon}t^{2}\,dt = \frac{\epsilon^{2}}{6},\\
           \|(T-\lambda I)\varphi_{\epsilon}\| = \frac{\epsilon}{\sqrt{6}}.
$$
As $\epsilon\downarrow 0$, the function $\varphi_{\epsilon}$ looks more and more like an eigenvector with eigenvalue $\lambda$, but it does not converge to an actual eigenvector. Continuous spectrum looks like that.
In this case, the spectral measure $F$ is
$$
        F(S)x = \chi_{S}(t)x(t).
$$
So, $F(\lambda)x=\chi_{[0,\lambda]}(t)x(t)$ and $F(\lambda+\delta)x-F(\lambda)x=\chi_{(\lambda,\lambda+\delta]}(t)x(t)$, which is related to the discussion of the previous paragraph.
Comment: Thank you, this is more detailed than the Wikipedia article, on the same example.
Comment: You're welcome. A building block for normal operators is multiplication by $z$ on some $L^{2}_{\mu}(S)$ where $S$ is a subset of $\mathbb{C}$ and $\mu$ is a finite Borel measure on $S$. You can glean most of what you need to know about the general case from looking at such an example. An atom $\lambda$ of $\mu$ is an eigenvalue with eigenvector $\chi_{\{\lambda\}}$. All other points $\lambda$ are in the continuous spectrum if $\lambda$ is in the support of $\mu$. Points outside the closure of $S$ are in the resolvent set, with $(M_{z}-\lambda I)^{-1}=M_{1/(z-\lambda)}$.
Comment: OK thank you ! I have a "soft" question connected to your answer: are Dirac distributions eigenvectors of the operator $T$, if you were to consider distributions instead of functions ?

Continuous spectral theorem example


Bayesian inference for both mean and variance

Question: Let $x_1,...,x_k$ distributed from $\mathcal{N}(\mu,\ 1/\tau)\ (i.i.d)$ and priors on mean and variance are in form:
$$\mu|\tau \sim \mathcal{N}(\mu_0,\frac{1}{\tau}) $$
$$\tau \sim Ga(\alpha,\beta) $$
Now how calculate posterior distribution?
The formal Bayesian inference says
$$P(\mu|x)\propto P(\mu)f_{\mu}(x)$$
but here we have distribution $\mu|\tau$ so I guess the inference should  be based on $\mu|\tau$, i.e.
$$P(\mu|x,\tau)\propto P(\mu,\tau)f_{\mu,\tau}(x)$$
but I'm not sure about this and how to continue.
Answer: You are correct in your reasoning. Your full likelihood, with some abuse of notation, is $P(x, \mu, \tau| \mu_0, \alpha, \beta) = \prod_{i=1}^{k}f(x_i|\mu,\tau)P(\mu|\mu_0, \tau)P(\tau|\alpha, \beta)$, so you can get your posterior distributions,
\begin{align*}
P(\mu|\mu_0, x,\tau) & \propto  \prod_{i=1}^{k}f(x_i|\mu,\tau)P(\mu|\tau) \\
P(\tau|x,\alpha, \beta) & \propto  \prod_{i=1}^{k}f(x_i|\mu,\tau)P(\mu|\mu_0, \tau)P(\tau|\alpha, \beta).
\end{align*}
If you write out the full equations, solve for $\mu$ and $\tau$ in their respective posteriors, you will get your answer.


C warning Missing sentinel in function call

Question: This is my warning.
Missing sentinel in function call

How i can remove it.
i am using linux & gcc compiler.
Comment: can you post any portion of the code? You seem to be using a sentinel function and not ending the argument list with NULL.
Comment: Hard to say without seeing the code you are trying to compile.
Comment: Typo on my previous comment, I didn't mean 'sentinel function', I meant a function that takes a list of parameters in that uses a sentinel to mark the end of the data series.
Comment: You should accept one of the answers.
Comment: Google is your friend. First hit for "missing sentinel in function call":
http://www.linuxonly.nl/docs/2/2_GCC_4_warnings_about_sentinels.html
Answer: It looks like you may not have terminated an array declaration with NULL. Without the null you may have some memory weirdness as the runtime won't know where the array ends and the next bit of memory starts.
Comment: @Mawg http://stackoverflow.com/a/21076928/895245 is the best answer, as it shows the `sentinel` attribute which is the culprit :-)
Answer: I just came across the same issue. The code which was causing it for me was...
execl("/bin/bash", "/bin/bash", fname, '\0');

but it should be...
execl("/bin/bash", "/bin/bash", fname, (char *)0);

The problem with the first version is that the list of parameters is meant to end with a null pointer. But '\0' is not a null pointer, it's a null character. So the value (0) is correct, it's just the type is wrong.
The (char *)0 is also zero, but cast as a char pointer, which is a null pointer (ie it points to address 0). This is needed so the system can tell where the parameter list ends so that it doesn't keep scanning for parameters after the last one. Doing that would get it invalid pointers which could point to any memory - which likely would cause a segmentation fault.
That (char *)0 is called the sentinel, and it's what was missing from the first example.
Finally note that NULL is defined as (void *)0, so
execl("/bin/bash", "/bin/bash", fname, NULL);

Works just as well, and is a little more convenient. (Thanks to @mah for that).
Comment: I ran into the same problem a few minutes ago. In my case, my call had already terminated with `0` but the warning was there; when I replaced it with `NULL` the warning went away -- for the same reason as yours -- the pointer casting that `NULL` has.
Comment: -pedantic: NULL is defined as `(void *)0` in GCC, but it could also be `0` in ANSI C: http://stackoverflow.com/a/31519147/895245 Bonus: `execl` gets the sentinel attribute because GCC provides it as a built-in.
Comment: Yes, NULL is a neater way to write this - thanks, I've added it to the answer!
Comment: @PeterBagnall Thanks worked. This should be marked as the answer
Answer: In Xcode if you are coding in objective-c and you are using some methods which take variable parameter list, you need to add nil object at the end of the list.
For example:
NSArray *names = [NSArray arrayWithObjects: @"Name1", @"Name2"];
//will result in the warning mentioned above
However,
NSArray *names = [NSArray arrayWithObjects: @"Name1", @"Name2", nil]; //Correct
Hope this will help!
Answer: Use (void*)0 or (void *)NULL instead of NULL
The warning is generated by the sentinel function attribute as mentioned by Jichao. Documented at: https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/Function-Attributes.html#index-g_t_0040code_007bsentinel_007d-function-attribute-3226 which says:

A valid NULL in this context is defined as zero with any pointer type. If your system defines the NULL macro with an integer type then you need to add an explicit cast. GCC replaces stddef.h with a copy that redefines NULL appropriately.

In ANSI C, NULL can be either 0 or (void *)0, but only the pointer satisfies this attribute, see also: What is the difference between NULL, '\0' and 0
While 0 would be cast to null pointer with a regular pointer argument, it is impossible to differentiate the zero integer form the zero pointer with vararg, so the difference is crucial. See: default argument promotion of pointer
True, GCC guarantees NULL to be the pointer, and since NULL is provided by GCC in stddef.h (some ANSI C headers are in GCC, others in glibc), I'm not sure if this could be broken since sentinel is a GCC extension to start with.
But I'd still write (void *)NULL or (void*)0 just to be sure.
Furthermore, both POSIX and man execl require "a null pointer" for the execl() function termination which is a prototypical example of sentinel usage.
NULL is not guaranteed to work there because it is a "null pointer constant", which is not necessarily "a null pointer", so by using (void *)0 everywhere you are more consistent with well known APIs. See also: Is ((void*)0) a null pointer constant? || Is (int *)0 a null pointer?
GCC 5.2.0 provides execl as a built-in and sets sentinel programmatically on it:
DEF_EXT_LIB_BUILTIN (BUILT_IN_EXECL, "execl", BT_FN_INT_CONST_STRING_CONST_STRING_VAR, ATTR_SENTINEL_NOTHROW_LIST)

There is also a glibc 2.21 version of execl which does not have the attribute.
Answer: A trivial example:
#include <stdio.h>
#include <stdarg.h>

void print_strings(const char* first, ...) __attribute__((sentinel));

void print_strings(const char* first, ...)
{
    va_list ap;
    const char* tmp;
    if (!first)
        return ;
    printf("%s\n", first);
    va_start(ap, first);
    while (1) {
        tmp = va_arg(ap, const char*);
        if (tmp == 0)
            break;
        printf("%s\n", tmp);
    };
    va_end(ap);
}

int main()
{
    print_strings("how are you?", "i'm fine", "and you?", NULL);
    return 0;
}

In main, if you call print_strings as print_strings("how are you?", "I'm fine", "and you?") which has no ending NULL, GCC will complain "missing sentinel".
Because we add the sentinel function attribute to the function print_strings. It is a gcc extension to specify that the variable arguments should end with NULL. So if you do not end variable arguments with NULL, the compiler could detect it and show the warning.
Comment: Finally a minimal example, +1! I'd rather use `(void *)NULL` though: http://stackoverflow.com/a/31519147/895245
Answer: You can pass NULL as:
execl("/bin/bash", "ls","-l", NULL);
The last parameter must always be 0. It is a NULL terminator. Since the argument list is variable we must have some way of telling C when it is to end.
Answer: Sentinel means to guard or protect..
So in this context the error is occuring cause you might be missng the guarding parameters.
In case you are using an Array or Dictionary then make sure that after the naming the objects you end them with the keyword nil.
Example:
[NSDictionary dictionaryWithObjectsAndKeys:@"UIAlertView", kSectionTitleKey,
              @"Show Custom", kLabelKey,
              @"AlertsViewController.m - alertOtherAction", kSourceKey];

The above statement will produce an error "Missing sentinel in function call"
Correct syntax:
[NSDictionary dictionaryWithObjectsAndKeys:@"UIAlertView", kSectionTitleKey,
              @"Show Custom", kLabelKey,
              @"AlertsViewController.m - alertOtherAction",kSourceKey,nil];

Answer: You should pass NULL as last argument of function.
Answer: I finally found a way to get rid of this strange and annoying warning.
All you need to do is to cast a nil pointer to an appropriate pointer type.
In case of UIAlertView it goes like this:
UIAlertView* alert = [ [ UIAlertView alloc ] initWithTitle: @"Title" message: @"Message" delegate: nil cancelButtonTitle: @"Cancel" otherButtonTitles: @"OK", ( NSString* )nil ];

Notice the ( NSString* )nil cast.
Have a try and let me know if this works for you.
Comment: The OP is asking about C, your answer looks like something else (objc?).


Change the name of a file that contains spaces in the name

Question: I don't know why but when I go to change this file name with mv command it comes up with the error stating not a directory.
-bash-4.1# mv {{ THEME SANITIZED }}.hacks.css myomega.hacks.css
Comment: Do you have spaces in your file name?
Answer: mv "{{ THEME SANITIZED }}.hacks.css" myomega.hacks.css will work.
Comment: have to wait 6 minutes to give you the answer which is stupid!
Comment: Glad it worked :) No problem :)
Answer: You need to tell the shell that you mean for the braces and spaces to be part of the file name, instead of being interpreted as shell syntax.
You can type file names containing special characters inside single quotes. This works for every character except the single quote itself. This is the easiest method in a script.
mv '{{ THEME SANITIZED }}.hacks.css' myomega.hacks.css

If you need a single quote inside a single-quoted string, you can use the four-character sequence '\''.
mv 'It'\'s' wierd' this_is_weird

Alternatively, you can put a backslash before any character, which makes it lose its special meaning. It doesn't hurt to put a backslash before characters that have no special meaning, but it's of course extra unnecessary typing.
mv \{\{\ THEME\ SANITIZED\ \}\}.hacks.css myomega.hacks.css

If the file name comes from a variable, use double quotes around the variable expansion to preserve special characters (with a bare variable as in mv $source $destination, some special characters in the value of the variable are expanded).
source='{{ THEME SANITIZED }}.hacks.css'
destination=myomega.hacks.css
mv "$source" "$destination"

On the command line, the easiest way to type such a file name is to rely on completion. You'll need to enter at least the first character, then press Tab.
mv \{Tab
mv \{\{\ THEME\ SANITIZED\ \}\}.hacks.css
Answer: you can use double quotes to scape or scape with slash like for example:

using double quotes:
mv "{{ THEME SANITIZED }}.hacks.css" myomega.hacks.css

using slash:
mv \{\{\ THEME\ SANITIZED\ \}\}.hacks.css myomega.hacks.css

something cool that some people doesn't know how to remove ou rename a directory when it's start with dash you can you dash dash :D

exemple:
mkdir -directory_with_dash
rm -r -- -directory_with_dash

Comment: Interesting. Where would I find such information in a book- does this pertain to LINUX only?