Skip to content

Instantly share code, notes, and snippets.

View bokuweb's full-sized avatar
👾
Working from home

bokuweb bokuweb

👾
Working from home
View GitHub Profile
eBookApp = angular.module 'EbookApp', []
eBookApp.controller 'MainCtrl', ($scope, $http, Ebook)->
$scope.onChange = ->
res = Ebook.search($scope.searchWord).then (res)->
unless res is "none" then $scope.res = res
eBookApp.factory 'Ebook', ($http, $q)->
class Ebook
NUM = 100
<!DOCTYPE html>
<html lang="ja" ng-app=EbookApp>
<head>
<meta charset="utf-8">
<title>AngularJS autocomplete demo</title>
<meta http-equiv="x-ua-compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<script src="js/angular.min.js"></script>
<script src="js/angular-resource.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<title>clock widget</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'>
<style>
body {
color:#fff;
-webkit-app-region: drag;
}
{
"name": "nw-demo",
"main": "index.html",
"window": {
"transparent": true,
"toolbar": false,
"frame": false,
"resizable": false,
"always-on-top": false
}
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (event.getAction() == KeyEvent.ACTION_UP) {
switch (event.getKeyCode()) {
case KeyEvent.KEYCODE_BACK:
//3. 広告表示
ImobileSdkAd.showAdForce(this, IMOBILE_INTERSTITIAL_SID, new ImobileSdkAdListener() {
//4.広告が閉じられた場合(閉じるボタン、もしくはクリックボタンがタップされた場合)
@Override
public void onAdCloseCompleted() {
class window.Game
require './enchant'
$ = require 'jquery'
constructor : (w, h)->
enchant()
@_game = new Core w, h
@_game.fps = 60
start : (@_num)=>
@_game.preload ["res/test1.png"]
window.onload = function(){
cc.game.onStart = function(){
//load resources
cc.LoaderScene.preload(["./res/test1.png"], function () {
var MyScene = cc.Scene.extend({
onEnter:function () {
this._super();
this.sprites = [];
var size = cc.director.getWinSize();
for (var i = 0; i < 7500; i++) {
Damage = cc.Layer.extend
ctor : ->
@_super()
show : (num)->
size = cc.director.getWinSize()
digits = @_getDigits num
console.log digits
for i in [0...digits]
label = new cc.LabelTTF "", "Arial", 48
Damage = require('./damage')
Layer = cc.Layer.extend
ctor : ->
@_super()
cc.eventManager.addListener
event : cc.EventListener.TOUCH_ONE_BY_ONE
swallowTouches : true
onTouchBegan : @onTouchBegan.bind this
res =
textureImage : "res/particle_texture.png"
texturePlist : "res/particle_texture.plist"