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
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
new sap.m.Text({ | |
text: { | |
parts: [ | |
{path: "Width"}, | |
{path: "Depth"}, | |
{path: "Height"}, | |
{path: "DimUnit"} | |
], | |
formatter: function(width, depth, height, dimUnit){ | |
return width + " x " + depth + " x " + height + " " + dimUnit; |
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
@dialog = new sap.m.Dialog | |
title: "Google Map" | |
content: [ | |
new sap.ui.core.HTML | |
content: "<div id='mapConteiner'></div>" | |
] | |
#ダイアログ閉じる処理 | |
beginButton: sap.m.Button | |
text: "close" |
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
button = new sap.m.Button | |
text: "Action!!" | |
press: [message: "Hello :)", (evt, param) -> | |
jQuery.sap.require "sap.m.MessageToast" | |
sap.m.MessageToast.show param.message | |
] | |
button.placeAt "content" | |
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
if (oSession.HostnameIs("localhost") && oSession.uriContains("/odata/")) { | |
oSession.host = "10.100.100.100:8000"; | |
oSession.PathAndQuery = oSession.PathAndQuery.replace("bank/", ""); | |
} |
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
http://qiita.com/n_morioka/items/a7a52314aeb2ab86fa61 | |
import urllib2,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler({'http': 'http://proxyアドレス:8080'})) ); by = urllib2.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation') |
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
sap.ui.jsfragment "util.Detail", | |
createContent: (oController) -> | |
# ここに普通のJSViewのcreateContentと同様にUIコントロールを追加して | |
# 最後にreturnします。 |
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
static function OnBeforeRequest(oSession: Session) { | |
// ... | |
//services.odata.orgへのリバースプロキシ設定 | |
// | |
//localhostdで/Northwind/というコンテキストがある場合に | |
//services.odata.org:80ドメインへリクエストを投げます。 | |
if (oSession.HostnameIs("localhost") && oSession.uriContains("/Northwind/")) { | |
oSession.host = "services.odata.org:80"; |
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
coffee: { | |
compile: { | |
files: { | |
// 1:1 コンパイル | |
'path/to/result.js': 'path/to/source.coffee', | |
// コンパイルして1つのファイルに結合 | |
'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] | |
} | |
} | |
} |