Skip to content

Instantly share code, notes, and snippets.

View oscar60310's full-sized avatar
🐬

Ivan Tsai oscar60310

🐬
View GitHub Profile
@oscar60310
oscar60310 / A - Counting Sheep.cpp
Last active April 11, 2016 08:52
Google code jam Qualification Round
#include <iostream>
#include <cstdio>
using namespace std;
bool dig [10] = {false};
int digc(int n)
{
int digs = 1;
while(true)
{
n /= 10;
var http = require('http');
var express = require('express');
var request = require('request');
var bodyParser = require('body-parser');
var port = process.env.port || 1337
var app = express();
const token = "Your_token";
const page_token = "Your_page_token";
@oscar60310
oscar60310 / server 2.ts
Last active August 4, 2016 06:42
Line Bot
const secret = "";
var http = require('http');
var bodyParser = require('body-parser');
var express = require('express');
var port = process.env.port || 1337
var app = express();
app.use(bodyParser.json());
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
BackgroundColor="White"
x:Class="XaDemo.View.RestaurantLayout" >
<Grid RowSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
//控制loading圈圈
private class ActivityIndicatorScope : IDisposable
{
private bool showIndicator;
private ActivityIndicator indicator;
private Task indicatorDelay;
public ActivityIndicatorScope(ActivityIndicator indicator, bool showIndicator)
{
this.indicator = indicator;

講師一

  • 一開頭主持人的ppt要換成自己的嗎?
  • 主持完要請大家下載ppt
  • native hybrid
  • 給主管驗要先開好三個app模擬器
  • p16 右邊三個如果要講就都講(cloud integration…)
  • p17 演進加上的文章標題
  • 確認環境的時候直接開電腦操錯給大家看來確認
/******************************************************************************/
/* MEASURE.C: Remote Measurement Recorder */
/******************************************************************************/
/* This file is part of the uVision/ARM development tools. */
/* Copyright (c) 2005-2006 Keil Software. All rights reserved. */
/* This software may only be used under the terms of a valid, current, */
/* end user licence from KEIL for a compatible version of KEIL software */
/* development tools. Nothing else gives you the right to use this software. */
/******************************************************************************/
var request = require('request');
var url1 = 'http://beta.json-generator.com/api/json/get/414r5rM-z';
var url2 = 'http://beta.json-generator.com/api/json/get/VJqDcHMbM';
/* normal callback */
function getdata1(callback)
{
request.get(url1,function (error, response, body) {
callback((JSON.parse(body)).success);
});
}
function image(req, res) {
var stream = req.pipe(fs.createWriteStream('./temp/xa'));
stream.on('finish', function () {
try {
var shortid = require('shortid');
var id = shortid.generate();
var azure = require('azure-storage');
var blobService = azure.createBlobService('mspxa', '');
blobService.createBlockBlobFromLocalFile('image', id, './temp/xa', { contentSettings: { contentType: 'image/jpeg' } }, function (error, result, response) {
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XaDemo.View.MainPage"
Padding="0">
<AbsoluteLayout VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand" Padding="0">
<Image AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="1,1,1,1"
Source="https://mspxa.blob.core.windows.net/restaurant/bgb.png" Aspect="AspectFill"/>