This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In your article "Fats and Cholesterol: Out with the Bad, In with the Good" | |
http://www.hsph.harvard.edu/nutritionsource/fats-full-story/#references there | |
is a citation to nine studies in this sentence: | |
"What really matters is the type of fat and the total calories in the diet. | |
(7-15) Bad fats, meaning trans and saturated fats, increase the risk for | |
certain diseases." | |
Your article focuses on reduction of "bad fats" including saturated fatty | |
acids. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var good = 0, | |
bad = 0, | |
reqtime; | |
function post() { | |
reqtime = new Date().getTime(); | |
$.when( $.post( 'https://graph.facebook.com/YOUR_APP_ID/accounts/test-users', { | |
locale: 'en_US', | |
access_token: 'YOUR_ACCESS_TOKEN', | |
installed: true, | |
permissions: 'read_stream,email,user_likes,user_interests', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Colors for prompt | |
COLOR_RED=$(tput sgr0 && tput setaf 1) | |
COLOR_GREEN=$(tput sgr0 && tput setaf 2) | |
COLOR_YELLOW=$(tput sgr0 && tput setaf 3) | |
COLOR_DARK_BLUE=$(tput sgr0 && tput setaf 4) | |
COLOR_BLUE=$(tput sgr0 && tput setaf 6) | |
COLOR_PURPLE=$(tput sgr0 && tput setaf 5) | |
COLOR_PINK=$(tput sgr0 && tput bold && tput setaf 5) | |
COLOR_LIGHT_GREEN=$(tput sgr0 && tput bold && tput setaf 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Controller: | |
class ModlessController < ApplicationController | |
def model_params | |
params.require(:model).permit(:tag_list) | |
end | |
end | |
Model: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def update | |
@model.update(model_params) | |
respond_with(@model) | |
end | |
def model_params | |
params.require(:model).permit( :name, :tag_list, :tags ) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ModelsController < ApplicationController | |
before_action :set_model, only: [:show, :edit, :update, :destroy] | |
respond_to :html, :json | |
def update | |
Rails.logger.info "==============" | |
Rails.logger.info params[:model][:tags] | |
Rails.logger.info params[:model][:tag_list] | |
Rails.logger.info "==============" | |
@model.update(model_params) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
params.require(:modle).permit( | |
:name, :user_id,:image, | |
:tag_list, :tags, :description | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COLOR_LIGHT_RED=$(tput sgr0 && tput bold && tput setaf 1) | |
COLOR_LIGHT_CYAN=$(tput sgr0 && tput bold && tput setaf 6) | |
COLOR_RESET=$(tput sgr0) | |
say -v ? | while read line; do | |
voice=`echo $line | awk '{ print $1 }'` | |
phrase=`echo $line | sed -E 's/^.+# //'` | |
echo "${COLOR_LIGHT_RED}say -v ${COLOR_LIGHT_CYAN}${voice}${COLOR_RESET} $phrase" | |
say -v $voice $phrase | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ReactCSSTransitionGroup transitionName="fadeIn"> | |
{this.state.loading && <Loading key={0} />} | |
{this.state.error && | |
<div className="alert alert-block alert-danger" key={1}> | |
Error: { messages[ this.state.error ] } | |
</div>} | |
{this.state.success && | |
<div className="alert alert-block alert-success" key={2}> | |
Success! | |
</div>} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Top level component | |
<component> | |
<UserModal isOpen={this.state.whatever} /> | |
</component> | |
// UserModal | |
{ | |
render:function() { | |
return <BaseModal {...this.props}> |