Skip to content

Instantly share code, notes, and snippets.

View p208p2002's full-sized avatar

Philip p208p2002

View GitHub Profile
import React, { Component } from 'react';
import './index.css';
import vip from 'AppSrc/img/vip.png'
import PropTypes from 'prop-types';
import PaypalButton from './PaypalBtn.jsx';
const CLIENT = {
sandbox: 'xxx',
production: 'xxx',
};
<?php namespace Listener;
use PaypalIPN;
require('PaypalIPN.php');
function write_log($str,$status,$data_array) //傳入資料夾名 想寫近的狀態 資料
{
$textname = $str.date("Ymd").".txt"; //檔名 filename
$URL = "./log/".$str."/"; //路徑 Path
if(!is_dir($URL)) // 路徑中的$str 資料夾是否存在 Folder exists in the path
#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
cv::Mat quantizeImage(const Mat& inImage, int numBits)
{
Mat retImage = inImage.clone();
uchar maskBit = 0xFF;
#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int main()
{
Size size(281, 369);//the dst image size,e.g.100x100
Size size2(2810, 3690);//the dst image size,e.g.100x100
Mat dst;//dst image
#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int main()
{
Size size(281, 369);//the dst image size,e.g.100x100
Size size2(2810, 3690);//the dst image size,e.g.100x100
Mat dst;//dst image
<?php
echo "hello world!";
"scripts": {
"start": "node scripts/start.js",
"build": "set PUBLIC_URL=https://你的帳號.github.io/儲藏庫/index所在資料夾&& node scripts/build.js",
"test": "node scripts/test.js"
},
{
"name": "my-website",
"version": "0.1.0",
"private": true,
"homepage": "https://p208p2002.github.io/me/build",
"dependencies": {
...
},
"scripts": {
"start": "node scripts/start.js",
@p208p2002
p208p2002 / GitHub curl.sh
Created December 18, 2018 09:03
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int convertToWebSafe(int color) {
//0 51 102 153 204 255
// 25 76 127 178 229
if (color >= 229)
return 255;