Skip to content

Instantly share code, notes, and snippets.

View oscar60310's full-sized avatar
🐬

Ivan Tsai oscar60310

🐬
View GitHub Profile
樣式
tripWEB/css/myproduction.css
tripWEB/css/ball.css
tripWEB/css/myproductionTopSlide.css
tripWEB/css/info.css
tripWEB/css/jquery.jscrollpane.css
tripWEB/css/tipslide.css
Jquery
tripWEB/js/jquery/jquery-2.1.4.js
#define NUM 8
int pins[NUM] = {2, 3, 4, 5, 6, 7, 8, 9};
// 底下就是顯示某數字時,該點亮熄滅哪些腳位的定義,
// data是個二維陣列,其中10代表有10個數字(從數字0、1、2、到9),
// 然後,每個數字有8個boolean值,
// 依序代表該不該點亮七段顯示器的A、B、C、D、E、F、G、DP。
// 這部份的資料,依序對應上面pins陣例裡的腳位順序,
// 這裡的對應關係,要按照先前的接線予以定義。
// t代表true,要點亮,
clear;close all;
deltax = 0.01 * 1e-6; % um
deltat = deltax / 3e8 / 2 ;
x = 0:deltax:10 * 1e-6; % 0 ~ 10 um , 0.01 um
n1 = 1;
n2 = 4;
interface = 500;
[~,lne] = size(x);
E_in = sin(linspace(0,2*pi,300));
[~,E_in_length] = size(E_in);
import java.util.Scanner;
public class homework05 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int[] data=new int[100];
int count=0;
package dog0502;
import java.util.Scanner;
public class dog0502 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
@oscar60310
oscar60310 / 0314.java
Created March 13, 2017 16:59
0314.java
import java.util.Scanner;
public class o {
private static int number = 10 ; // 人數
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int[] A = new int[11];
int i;
function corrected = apply_cmatrix(im,cmatrix)
% Applies CMATRIX to RGB input IM. Finds the appropriate weighting of the
% old color planes to form the new color planes, equivalent to but much
% more efficient than applying a matrix transformation to each pixel.
if size(im,3) ~=3
error('Apply cmatrix to RGB image only.');
end
r = cmatrix(1,1) * im(:,:,1)+cmatrix(1,2) * im(:,:,2)+cmatrix(1,3) * im(:,:,3);
g = cmatrix(2,1) * im(:,:,1)+cmatrix(2,2) * im(:,:,2)+cmatrix(2,3) * im(:,:,3);
b = cmatrix(3,1) * im(:,:,1)+cmatrix(3,2) * im(:,:,2)+cmatrix(3,3) * im(:,:,3);
<?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"/>
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) {
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);
});
}