This file contains hidden or 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
| <div ng-repeat="c in commentdata" style="margin-top:-9px"> | |
| <div proccess-frame | |
| step="{{ c.step }}" | |
| steptitle="{{ c.commentTitle }}" | |
| steppicurl = "{{ c.commentPicUrl }}" | |
| stepcontent="{{ c.commentContent }}" | |
| steponvotetime="{{ c.stepOnVoteTime }}" | |
| stepdownvotetime="{{ c.stepDownVoteTime }}" | |
| createdat="{{ c.createdAt | date:'yyyy-MM-dd' }}"> | |
| </div> |
This file contains hidden or 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
| const proccessFrameDirective = ($timeout)-> | |
| { | |
| retrict: \A | |
| templateUrl: "/views/layout/project/item/comment.html" | |
| link: (scope, elem, attr) !-> | |
| $timeout -> | |
| scope.commentarr.push elem[0]offsetHeight | |
| ,100 | |
| scope.steparr.push Number(attr.step) | |
| switch attr.step |
This file contains hidden or 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 s3 = new AWS.S3(); | |
| var _now = new Date(); | |
| var sArray = req.files.file.name.split(/(.jpg|.gif|.png|.jpeg)/); | |
| var _re = crypto.createHash('md5').update(sArray[0]+_now).digest("hex"); | |
| _re = _re+sArray[1]; | |
| fs.readFile('/'+req.files.file.path, function (_err, data) { | |
| var params = {Bucket: 'limitstyle',Key:_re,Body:data,ACL: 'public-read'}; | |
| s3.putObject(params, function (err, data) { | |
| if (err) { | |
| } else { |
This file contains hidden or 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
| ;(function(window, $$){ | |
| 'use strict'; | |
| var page = $$.create({ | |
| className: 'content', | |
| autoSectionHeight: false | |
| }); | |
| page.section(0, function (section) { |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title>聯發科</title> | |
| <link rel="stylesheet" type="text/css" href="css/main.css" /> | |
| </head> | |
| <body> | |
| <header></header> | |
| <div id="section" class="content"> | |
| <div class="section-one__content"></div> | |
| <div class="section-one__frame"> |
This file contains hidden or 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
| uploader = $fileUploader.create( | |
| scope: $scope | |
| url: "http://#{$rootScope.api}/proposal/upload" | |
| formData: [{ | |
| key: \value | |
| }] | |
| filters: [ | |
| (item) -> | |
| if item.size >10000000 | |
| alert \size不得超過10mb |
This file contains hidden or 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
| //js | |
| s3 = new aws-sdk.S3({ | |
| credentials:{ | |
| accessKeyId: $mtk.config.S3.accessKeyId, | |
| secretAccessKey:$mtk.config.S3.secretAccessKey | |
| } | |
| ,endpoint: $mtk.config.S3.endpoint | |
| }) | |
| //livescript |
This file contains hidden or 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
| { | |
| "livereload" : 35729, | |
| "PORT" : 3000, | |
| "csrf": { // 是否要有csrf功能 | |
| "active": false, | |
| "ignoreMethods" : [ "POST", "GET", "HEAD", "OPTIONS", "DELETE", "PUT" ] | |
| }, | |
| "cookieSession": "mtkcookies", //設定你的cookie session | |
| "redis":{ //設定你的redis | |
| "host":"localhost", |
This file contains hidden or 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
| //backcall | |
| $http.get("http://#{api}/test/all").success(function(json){ | |
| openFile(function(filename){ | |
| saveJsonToFile(filename, json); | |
| }); | |
| }) | |
| json <- $http.get "http://#{api}/test/all".success //json 從這裡來 | |
| filename <- openfile //filename 從這裡來 | |
| saveJsonToFile filename, json |
This file contains hidden or 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
| [ 1, 2, 3 ] + [ 4, 5, 6 ] | |
| // '1,2,34,5,6' | |
| // 奇怪的點: | |
| // 1. array跟array 怎會是 string | |
| // 2. 那個 + 到底是數值相加 還是 [1,2,3,4,5,6] ? |