Subject: Oz: you can melt-fat on the couch?

From: DocOz: Fact or Fiction? <[email-masked]>
Date: Tue, 08 Jul 2014 12:35:40 -0700

Fact or Fiction?
You can lose 20-lbs no matter your body type?

DocOz's Response: FACT!

DocOz devoted an entire episode to this exciting discovery.
Doctors and surgeons aren't talking about this, bc they make money if your over-weight.

View DocOz Clip: http://www.feueau.com/oz/slim/down/fix.shtml
Episode 501

To stop further notifications - write  Updated Notifications Services
115 Hadley Way-C o u n c e , TN 3 8 3 2 6 or visit http://www.feueau.com/3kr/dfoo4.4odoe

hanks @Mark, BTW now that I have checked I can say that this method is working in v1. It still useful in some cases. Note that object property names(keys) are not necessarily true or false, it can be anything that you might wanna map to a class name.   orca Aug 29 '12 at 18:49
4	  	
I just want to add, I was having an issue because I was using syntax like  {classname: '$index === selectedIndex'} and it wasn't working. When I pushed everything together and used == instead of === it worked.  {classname: '$index==selectedIndex'}   Lucas Feb 13 '13 at 23:16 
  	  	
How can I use an expression for the classname too? For example ng-class="{'item-focus-'+focusIndex : focusIndex >= 0}" -- this does not work, but illustrates what I have in mind   Casey Feb 20 '13 at 8:04
  	  	
@Casey Unfortunately not all javascript expressions are valid angularjs expressions. Perhaps you could ask for a separate question. Please state your intent too, as you might not even need such expressions.   orca Feb 24 '13 at 19:53
  	  	
My intent is to derive a classname with a variable value when a condition is met. without doing it in the controller, is this possible?   Casey Feb 24 '13 at 23:49he "new" syntax is buggy for me (as of v1.1.5). My code ng-class="{'favoriteon': favorite > 0 , 'favorite': favorite === 0, '<server value>': favorite < 0} would correctly evaluate my initial (server) value and then make one correct toggle. The third toggle would break. Seems like a three state switch does not work correctly with this syntax. I had to revert to the "old" array based syntax to achieve the desired result. My code works with: ng-class="{'1':'favoriteon', '0':'favorite', '-1':[email-masked]'}[favorite]   kmehta Aug 27 '13 at 0:39 
  	  	
what should I do if I want customize only one of several classes this way? ex.: active class in class="well view  made it ng-class="{well: 1, view: 1, active: condition}" for nowy, I was asking, what you really want to happen in the end. Deriving class name is probably not your only option. I would gladly try to help if your intent was clear, but I cant think of a reason why you need such capability. That is why I suggested asking a separate question.I realize there may be workarounds for my particular use case (which I am already employing), but I'm interested in a solution for the abstract problem -- or knowing definitively that there isn't one.  it is not a workaround if a solution does not necessary have the same problem. Without knowing about your problem, let me tell you what I mean by that. Perhaps you could use two ng-class directives, one for item-focus and another for index. In CSS, you could then check for existence of both classes using something like .item-focus.4 If thi
 s solves your issue, I would not consider this as a workaround. It is using right tools for right purposes. If this does not solve your issue, that again means you should ask a separate question.   orca Feb 26 '13 at 16:28None of the current solutions work if there are any newlines at the end of the directory name - They will be stripped by the command substitution. To work around this you can append a non-newline character inside the command substitution - DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd && echo x)" - and remove it without a command substitution - DIR="${DIR%x}".   Can you suggest a real world situation where a directory would have a newline at the end? I think that would tend to be rather unhelpful. Typing it in the shell sounds very difficult, and I can't imagine how it would help users understand the purpose of the directory (which I view as the reason for naming). There are two very common situations: Accidents and sabotage. A script shouldn't fail in unpre
 dictable ways just because someone, somewhere, did a mkdir $'\n'. 
  	  	
Tyipcally, the caller of the script can easily provide the input to that script it needs, such as "/home/me/userx/bin" since the caller knows the path it's using to access the script. Because Linux uses the inode model from Unix (awesome feature), it's often tricky to find the answer automatically. And, even using the techniques mentioned below, it can be tricky. For example, a script can reside at more than one path (ln without -s). If the fragility those considerations add is not a concern, the answers using BASH_SOURCE and the like do the job.   ash Aug 22 '13 at 19:11