1.as2.0, as3.0基本語法(按紐動作都可被正常轉換)
2.限制1MB以下大小才可轉換
目前兩種方法:
1.使用google web線上轉換
( developers.google.com/swiffy )

2.下載Adobe 輔助外掛在flash內轉換
(參考以下步驟)
步驟1.至 google develop ( swiffy download )

步驟2.安裝Adobe Extension Manager CS6


<style type="text/css">
.LoseStyle{
color:#E23636;
}
</style>
<?php
$spend02 = 0;
if( substr($spend, -1) == "%" )
(String)$spend02 = explode( substr($spend, -1) ,$spend )[0];
else
$spend02 = $spend;
if( $spend02 >= 0 )
{
if( substr($spend, -1) != "%" )
echo number_format($spend02,2);
else
echo number_format($spend02,2).substr($spend, -1);
}else{
?>
<a class="LoseStyle">
<?php
if( substr($spend, -1) != "%" )
echo number_format($spend02,2);
else
echo number_format($spend02,2).substr($spend, -1);
?></a>
<?php } ?>
ex : FormatNumber( 1277.32 , 2 , BetScoreTag[i] , 1 );function FormatNumber(n , m , obj , c ) { var _tmpNum = n ; if( String(n).substr(-1,1) == "%") { _tmpNum = Number(n.split("%")[0]); } _tmpNum = _tmpNum.toFixed(m); _tmpNum += ""; var arr = _tmpNum.split("."); var re = /(\d{1,3})(?=(\d{3})+$)/g; var spend = arr[0].replace(re,"$1,") + (arr.length == 2 ? "."+arr[1] : ""); if( parseFloat(spend) < 0 && c == 1 ) { obj.style.color = "D81A1A"; } obj.innerHTML = spend; if( String(n).substr(-1,1) == "%") obj.innerHTML = spend +(String(n).substr(-1,1)); }
<!-- Javascript -->
<script>
$(function () {
$("#drag").draggable({
handle: "#handle"
});
$("#drag1").draggable({
cancel: "#handle1"
});
});
</script>
<!-- HTML -->
<div id="box" style="width:600px;height:200px;border:0px solid black;margin-bottom:5px">
<div id="drag" class="drag">
<p id="handle">可拖曳</p>
<p style="font-size:12px;">將滑鼠移到黃色區塊內即可拖曳此方框</p>
</div>
<div id="drag1" class="drag" style="cursor:pointer;">
<p id="handle1">不可拖曳</p>
<p style="font-size:12px;">不在黃色區塊的範圍內都可拖曳此方框</p>
</div>
</div>
//Content.php <table> <?php for($i = 0 ; $i < 5 ; $i++ ){ ?> <tr> <td><?php echo "---->".$i."<br>"; ?></td> </tr> <?php } ?> </table> <!-- 開始緩存 --> <?php ob_start(); ?> 要轉成pdf的內容こんにちは世界 <!-- 取得緩存內容 --> <?php $content = ob_get_contents(); ?> <!-- 關閉緩存 --> <?php ob_flush(); ?> <!-- 關閉緩存 印出 --> <?php ob_get_flush(); ?> <!-- 關閉緩存 不印出 --> <?php ob_end_clean(); ?> <!-- 測試緩存內容 --> <?php echo "<br>php Cache:".ob_get_contents()."<br>"; ?><form method="post" action="html2pdf.php"> <input type="hidden" name="Content" value=<?php echo $content; ?> <input type="submit" name="submit" value="Submit"> </form>
//html2pdf.php
<?php
require_once(dirname(__FILE__).'../html2pdf.class.php');
try
{
//freeserif
$content = '<page style="font-family:javiergb">'.$_REQUEST['Content'].'</page>';
$html2pdf = new HTML2PDF('P', 'A4', 'fr', true, 'UTF-8', 0);
$html2pdf->pdf->SetDisplayMode('fullpage');
$html2pdf->setDefaultFont('javiergb');
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$html2pdf->Output('ticket.pdf');
}
catch(HTML2PDF_exception $e) {
echo $e;
exit;
}
?>
html2pdf.php$html2pdf->setDefaultFont('javiergb');
此字型支援 Utf 各種語系顯示,轉換出來的中文才會正常//input.php
<form method="post" action="verif.php">
<input type="text" name="inputAuth">
<input type="submit" name="submit" value="Submit">
</form>
//verif.php <?php require_once '../PHPGangsta/GoogleAuthenticator.php'; $ga = new PHPGangsta_GoogleAuthenticator(); $checkResult = $ga->verifyCode("K12QLNQAICOTOP6C", $_REQUEST['inputAuth'], 1);// 2 = 2*30sec clock toleranceif ($checkResult) { echo 'OK'; } else { echo 'FAILED'; }
這邊透過google api 可以產出 key , 跟 QrCode , 都可以在手機app設定上輸入//getAuth <?php require_once '../PHPGangsta/GoogleAuthenticator.php'; $ga = new PHPGangsta_GoogleAuthenticator(); $secret = $ga->createSecret(); echo "Secret is: ".$secret."\n\n<br>"; //得出key(手動輸入) $qrCodeUrl = $ga->getQRCodeGoogleUrl('Blog', $secret); echo "Google Charts URL for the QR-Code: ".$qrCodeUrl."\n\n<br>"; //得出QrCode(手動輸入)?>
K12QLNQAICOTOP6C可以得出一個參數便是結果囉
<div id="c3" class="spinner" style="z-index: 999;visibility:hidden">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
#c3{
top:33%;
left:27%;
position:fixed;
}









<html>
<tr>
<td>123</td>
<td>456</td>
<td>789</td>
<td>
<button type="button" onclick="updatePanel();" >編輯</button>
</td>
<input type="hidden" class="hidden1" value="666" />
</tr>
</html>
<html>
<div class="Update Form" aria-hidden="false">
<li><input type="text" name="InputField1" /></li>
<li><input type="text" name="InputField2" /></li>
<li><input type="text" name="InputField3" /></li>
<input type="hidden" id="InputField4" name="old_PermID" />
</div>
</html>
<head>
<script type="text/javascript">
$('table tbody').on('click', 'td button', function () {
var tr = $(this).closest('tr');
document.getElementById("InputField1").value= tr[0].cells[0].innerText;//123
document.getElementById("InputField2").value= tr[0].cells[1].innerText;//456
document.getElementById("InputField3").value= tr[0].cells[2].innerText;//789
document.getElementById("InputField4").value=
$(this).closest('tr').find('input.hidden1').val();//666
});
</script>
</head>
tr[0].cells[0].innerText;//123
( only for chrome , IE )
而全面改用以下 , 或是將資訊利用for迴圈去繞update的html結構document.getElementById("InputField4").value= $(this).closest('tr').find('input.hidden1').val();//666( only for chrome , Firefox , IE )
About Laravel 5 After use Form::open occur some error
|
var nevbyte:Number=0;
var sum:Number;
var kbit:int;
var clockTimer:Timer = new Timer(1000,0);
clockTimer.addEventListener(TimerEvent.TIMER,onTick);
clockTimer.start();
function onTick(event:TimerEvent)
{
sum = Play_ns.info.byteCount - nevbyte;
kbit=sum/1024;
trace(kbit);
panel.byteload_txt.text = String(kbit);
nevbyte=Play_ns.info.byteCount;
}
<html>
<head>
</head>
<body>
{{ Form::open(array('action'=>'LoginCheckController@check', 'method' => 'post')) }}
<div >
<div>
account:<input type="text" class="form-control" id="" name="acc"/>
pwd: <input type="password" class="form-control" id="exampleInputPassword1" name="pwd"/>
<button type="submit" class="btn btn-default">Submit</button>
</div>
</div>
{{ Form::close() }}
<!-- input type 屬性可參考 -->
<!-- http://www.w3schools.com/tags/att_input_type.asp -->
<?php
$msg = Session::get('msg');
if( $msg =="Success")
{
echo "loginSuccess";
}
if( $msg =="Fail")
{
echo "something wrong";
}
if (Session::has('message'))
{
Session::forget('message');
}
?>
</body>
</html>
<?php
class LoginCheckController extends BaseController {
public function check()
{
/* $acc = Input::get("acc");
$pwd = Input::get("pwd"); */
$rules = array(
'acc' => 'required|alphaNum|min:5',
'pwd' => 'required|alphaNum|min:6'
);
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
$output = "Fail";
return Redirect::to('loginEx')->with('msg', $output);
}else{
/* {....call login api } */
$success = true;
if($success)
{
$output = "Success";
return Redirect::to('loginEx')->with('msg', $output);
}else{
$output = "Fail";
return Redirect::to('loginEx')->with('msg', $output);
}
}
$setting = 'cassandra:host=10.20.30.222;port=9160;cqlversion=3.0.0';
$username = "";
$password = "";
$db = new PDO($setting, $username, $password);
Route::get('api/pdo_cass/create' , function(){
$db->exec ("CREATE KEYSPACE yapdo WITH REPLICATION =
{'class' : 'SimpleStrategy', 'replication_factor': 1}");
}) ;
Route::get('api/pdo_cass/get' , function(){
$setting = 'cassandra:host=10.20.30.222;port=9160;
cqlversion=3.0.0';
$username = "";
$password = "";
$db = new PDO($setting, $username, $password);
$db->exec ("USE \"nl_keyspace\";");
$result = $db->query("SELECT * FROM account")->fetchObject();
var_dump($result) ;
}) ;
Route::get('api/pdo_cass/insert' , function(){
$setting = 'cassandra:host=10.20.30.222;port=9160;
cqlversion=3.0.0';
$username = "";
$password = "";
$db = new PDO($setting, $username, $password);
$db->exec ("USE \"nl_keyspace\";");
$db->exec("INSERT INTO test (id, map_test)
VALUES (1, {'val1': 2, 'val2': 1, 'val3': 3});");
//注意若插入key值等同原來值,就會自動將之後欄位值更新
}) ;
Route::get('api/pdo_cass/delete' , function(){
$setting = 'cassandra:host=10.20.30.222;port=9160;
cqlversion=3.0.0';
$username = "";
$password = "";
$db = new PDO($setting, $username, $password);
$db->exec ("USE \"nl_keyspace\";");
$db->exec("DELETE FROM MastersOfTheUniverse
WHERE mastersID IN ('Man-At-Arms', 'Teela');");
}) ;
$servers = array("10.20.30.222:9160" , "10.20.30.223:9160") ;
$pool = new ConnectionPool("devKeyspace" , $servers) ;
$sys = new SystemManager('127.0.0.1');
$sys->create_keyspace('Keyspace1', array(
"strategy_class" => StrategyClass::SIMPLE_STRATEGY,
"strategy_options" => array('replication_factor' => '1')
));
// Use composites for column names and row keys
$sys->create_column_family('Keyspace1', 'Composites', array(
"comparator_type" => "CompositeType(LongType, AsciiType)",
"key_validation_class" => "CompositeType(AsciiType, LongType)"
));
Route::get('api/cass/get ' , function()
{
$servers = array("10.20.30.222:9160", "10.20.30.223:9160" ) ;
$pool = new ConnectionPool("nl_keyspace" , $servers) ;
$column_family = new ColumnFamily($pool, "table_name");
$result = $column_family->get('key');
echo $result["col"];
echo $result["value"];
foreach($result as $key => $columns) {
print_r($columns."
");
}
});
Route::get('api/cass/insert_update' , function()
{
$servers = array("10.20.30.222:9160", "10.20.30.223:9160" ) ;
$pool = new ConnectionPool("nl_keyspace" , $servers) ;
$column_family = new ColumnFamily($pool, "a3");
$result = $column_family->insert( 'a4' , array('col' => '100' ,'value'=>'4444') ) ;
//注意若插入key值等同原來值,就會自動將之後欄位值更新
});
Route::get('api/cass/delete' , function()
{
$servers = array("10.20.30.222:9160", "10.20.30.223:9160" ) ;
$pool = new ConnectionPool("nl_keyspace" , $servers) ;
$column_family = new ColumnFamily($pool, "table_name");
$result = $column_family->remove('key');
});
Route::get('api/test/openlist/get/{limit?}' , function($limit = 50)
{
$result = DB::select("SELECT * FROM OpenList where id = ?"
, array(1) );
return Response::json($result) ;
});
Route::get('api/test/openlist/get/{limit?}' , function($limit = 50)
{
$result = DB::select("SELECT * FROM OpenList where id = ?
AND serverid = ?", array(1,54671) );
//欲查詢變數順序,依array內容順序
return Response::json($result) ;
});
DB::table(“OpenList”)->get();//查詢所有
DB::table("OpenList")->take(5)->get(); // 只查5筆
DB::table('users')->where('name', ‘uccu’)->get();
// 查name欄位值為uccu的資料
DB::table('roles')->lists('title', 'name');
//查roles裡的title,name欄位
$users = DB::table('users')
->where('votes', '>', 100)
->orWhere('name', 'John')
->get();
Route::get('api/sqlcmd/insert/' , function()
{
DB::insert('insert into users (id, name)
values (?, ?)', array(1, 'Dayle'))
});
Route::get('api/sqlcmd/insert/' , function($limit = 50)
{
DB::table("users")->insert( array('name' => 'hahaha' ,
'email'=> 'hahaha@gmail.com') );
//一次插入一筆資料
DB::table('users')->insert(array(
array('email' => 'taylor@example.com', 'votes' => 0),
array('email' => 'dayle@example.com', 'votes' => 0),
));
//一次插入多筆資料
});
Route::get('api/sqlcmd/update/' , function($limit = 50)
{
DB::update('update users set votes = 100 where
name = ?', array('John'));
});
Route::get('api/sqlcmd/update/' , function($limit = 50)
{
DB::table('users')->where('name', ‘hahaha’)->
update(array('name' => ‘uccuu’, 'email' => 'uccuu@gmail.com'));
});
Route::get('api/sqlcmd/delete/' , function()
{
DB::delete('delete from users');
});
Route::get('api/sqlcmd/delete/' , function($limit = 50)
{
DB::table('users')->where('votes', '<', 100)->delete();
DB::table('users')->delete();
DB::table('users')->truncate();
});