Skip to content

Instantly share code, notes, and snippets.

Avatar

Simon Asika asika32764

View GitHub Profile
View php 題目
請根據所給的振幅(Amplitude)及頻率(Frequency),你的程式要產生這樣的波。Input 資料由網址參數送進去。
Input
-------------------------------------
輸入的第一列有一個整數n,代表有幾組測試資料。接下來每組測試資料有2列,各有1個正整數(A、F),A代表振幅(A<=9),F代表頻率。
第一列以及各組測試資料間皆有一空白行。請參考Sample input。
View awesome-php.md

Awesome PHP

A curated list of amazingly awesome PHP libraries, resources and shiny things.

Composer

Composer Related

View awesome-php.md

Awesome PHP

A curated list of amazingly awesome PHP libraries, resources and shiny things.

Composer

Composer Related

View show.php
/**
* Print Array or Object as tree node. If send multiple params in this method, will batch print it.
*
* @param mixed $data Array or Object to print.
*/
function show($data)
{
$args = func_get_args();
// Print Multiple values
View DirectoryLocator-Sample.php
<?php
$path = 'src/Component/Todo/View/../..';
$dl = new \DirectoryLocator($path);
// __toString
// -----------------------------
echo $dl; // src/Component
@asika32764
asika32764 / mysql.sock.sh
Last active Jun 1, 2018
Using this command to create a symbol link to mysql.sock in Mac
View mysql.sock.sh
# XAMPP
sudo ln -s /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock /var/mysql/mysql.sock
# MAMP
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
# AMPPS
sudo ln -s /Applications/AMPPS/mysql/tmp/mysql.sock /var/mysql/mysql.sock
View despatch-new-event.php
<?php
// in your component
JPluginHelper::importPlugin('group');
$app = JFactory::getApplication();
$app->triggerEvent('onYourEventName', array($param1, $param2));
View php-socket-server.php
<?php
/**
* A PHP socket server demo file.
*
* @author Asika
* @email asika@asikart.com
* @date 2013-10-12
*
* @copyright Copyright (C) 2013 - Asika.
* @license GNU General Public License version 2 or later; see LICENSE
View 2013-10-24-php-tut-2.php
<?php
// index.php
$page = $_REQUEST['page'];
$page = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $page);
// page=aaa/bbb/ccc
// page=save_item
View tree.js
<script type="text/javascript">
// 三角形的高
var height = 4;
// 每一排加幾個星號
var add = 2;
// 起始的星號數量
var start = 1;
You can’t perform that action at this time.