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
# Using `Ember.HTMLBars.makeBoundHelper` is deprecated. Please refactor to using `Ember.Helper` or `Ember.Helper.helper`. [deprecation id: ember-htmlbars.make-bound-helper] | |
IFS=$'\n' | |
for pp in $(grep -R 'Handlebars.makeBoundHelper' * | awk -F':' '{print $1" "$2}') | |
do | |
filename=$(echo $pp | awk '{print $1}') | |
searchStr=$(echo $pp | awk '{print $2" "$3" "$4" "$5}') | |
newStr=$(echo $searchStr | sed 's/}}/ }}/g' | awk '{print $1" "$4" as |"$2"|}}"}') | |
echo "sed -i '' 's/Handlebars.makeBoundHelper/Helper.helper/g' $filename" >> ember-convert-helper-syntax.sh | |
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
// https://github.com/tildeio/htmlbars/blob/master/packages/morph/lib/dom-helper.js#L129-L131 | |
if (contextualElement) { | |
this.detectNamespace(contextualElement); | |
} | |
// works if replace the above block with this: | |
if (tagName === 'svg'){ | |
this.namespace = svgNamespace; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ember Starter Kit</title> | |
<link rel="stylesheet" href="https://rawgithub.com/emberjs/starter-kit/v1.0.0/css/normalize.css"> | |
<style> | |
html, body { | |
margin: 20px; | |
text-align: center; |
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
print `clear` | |
puts "Welcome to the game. Enter your name:" | |
name = gets.chomp | |
max_guesses = 3 | |
correct_number = rand(1..10) | |
(1..max_guesses).each do |i| | |
print "Guess a number between 1 and 10! --> " | |
guess = gets.chomp.to_i |
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
htmlFunc = function(html, outerToo) { | |
// get a range for the current metamorph object | |
var range = rangeFor(this, outerToo); | |
// delete the contents of the range, which will be the | |
// nodes between the starting and ending placeholder. | |
range.deleteContents(); | |
/* Heyjin added this line. *************************/ |
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
App = Ember.Application.create(); | |
App.BarChartComponent = Ember.Component.extend({ | |
tagName: 'svg', | |
attributeBindings: 'width height'.w(), | |
margin: {top: 20, right: 20, bottom: 30, left: 40}, | |
w: function(){ | |
return this.get('width') - this.get('margin.left') - this.get('margin.right'); | |
}.property('width'), |