Skip to content

Instantly share code, notes, and snippets.

View rc1021's full-sized avatar
🏠
Working from home

許益銘 rc1021

🏠
Working from home
View GitHub Profile
### 城市搜尋器
link: https://github.com/rinvex/country
version: `5.1.*|5.2.*|5.3.*`
@rc1021
rc1021 / DemoClass.php
Last active November 13, 2016 03:10
brief switch in laravel
<?php
// Hi, I am Charles<mufasa.hsu@gmail.com>
// let's go...
namespace App;
use Exception;
class DemoClass
@rc1021
rc1021 / mailchimp-api-demo.php
Created December 13, 2016 06:56
mailchimp-api取得電子報列表的範例(來源:https://github.com/drewm/mailchimp-api
// 建立 instance
$token = '';
$MailChimp = new \Drewm\MailChimp($token);
// 取得電子報資源
$tmp = $MailChimp->call('campaigns/list', $params['args']);
// $tmp['data'] 是電子報列表
$campaigns = $tmp['data'];
@rc1021
rc1021 / xamarin_tabbedpage_bar_bottom.md
Last active January 10, 2018 05:29
Xamarin Android TabbedPage Bar 置底作法

歡迎加入我的 LINE ID: easter1021

Xamarin Android TabbedPage Bar 置底

在網路上參考幾份文件,最終選擇使用 Sergey Metlov 的範例,以下內容是我實作時遇到的問題以及詳解。

此篇文章執行的作業系統為 Windows 7 學習時間 10 分鐘

Screenshot

Alt iOSAlt Android

@rc1021
rc1021 / CustomerPage.xaml
Created March 3, 2017 07:55
How to: NavigationPage in XAML
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:App1.Pages"
x:Class="App1.CustomerPage">
<Label Text="Say something here..."/>
</ContentPage>
@rc1021
rc1021 / AutoArrangement.xaml
Created March 29, 2017 05:56
Custom layouts with Xamarin.Forms: auto arrangement cells (not finish)
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:App1"
x:Class="App1.AutoArrangement"
Title="Auto-Arrangement">
<ContentPage.Content>
<local:GridListView
@rc1021
rc1021 / PasswordEntryCell.cs
Last active April 14, 2017 06:02
加入PasswordEntryCell,讓 Xamarin 具有密碼輸入的 EntryCell
/**
* 這檔案是參考 https://forums.xamarin.com/discussion/21298/entrycell-password 並加以修正。
* 主要是 xamarin 目前暫無密碼輸入的 EntryCell,
*
* 我增加的部份:
* 1. 建立 BindableProperty 讓 XAML 也可以使用 Value 屬性 | 2017.04
*/
using System;
using Xamarin.Forms;
@rc1021
rc1021 / jquery-scroll-bottom.js
Last active August 8, 2018 06:56
指定 selector 如果有捲軸時,當滑動至底部時觸發事件
/**
* @description jQuery-scroll-bottom。
*
* 指定 selector 如果有捲軸時,當滑動至底部時觸發事件
* @module ScrollBottom
* @author 許益銘 <mufasa.hsu@gmail.com>
* @example
* require('./jquery-scroll-bottom');
*
* // method 1
let _ = require('lodash');
//Input
var input = [
{ key: '1', val: 'a' },
{ key: '2', val: 'b' },
{ key: '3', val: 'c' }
];
//Desired output
@rc1021
rc1021 / main.html
Last active December 24, 2017 12:36
demo serializeArray of form to json object
<!DOCTYPE html>
<html>
<head>
<title>demo serializeArray of form to json object</title>
<script type="text/javascript" src="main.js"></script>
</head>
<body>
<form>
<input type="text" name="desc" value="demo serializeArray of form to json object.">
<input type="text" name="users[0].name" value="user A">