This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -name *.c -exec astyle --style=allman --add-brackets --pad-oper --unpad-paren --pad-header --break-blocks --align-pointer=type {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 取脚本存储的路径,直接使用 $DIR | |
| # see http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in | |
| DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function($) { | |
| $(function() { | |
| $('#returnData').html(''); | |
| $.ajax({ | |
| url: "./api/list.php", | |
| success: function(data) { | |
| $("#returnData").html(JSON.stringify(data)); | |
| } | |
| }); | |
| }); // end of document ready |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div> | |
| @foreach ($list_array as $key => $list_item) | |
| <div> | |
| @foreach ($column_array as $key => $column) | |
| {{ $list_item[ $column ]}} | |
| @endforeach | |
| </div> | |
| @endforeach | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var screenshotUrl = 'http://example.com/' | |
| var casper = require("casper").create({ | |
| viewportSize: { | |
| width: 1280, | |
| height: 1280 | |
| } | |
| }); | |
| if (casper.cli.args.length < 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_cell_value(sheet,row,col): | |
| # Cell Types: 0=Empty, 1=Text, 2=Number, 3=Date,4=Boolean,5=Error,6=Blank | |
| cell_type = sheet.cell_type(row,col) | |
| if 1 == cell_type: | |
| value = sheet.cell_value(row,col) | |
| if 2 == cell_type: | |
| value = u"%s" %(sheet.cell_value(row,col)) | |
| return value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sl4a | |
| import socket, struct | |
| def check_wifi_info(): | |
| droid = sl4a.Android() | |
| wifiState = droid.checkWifiState() | |
| if wifiState: | |
| ipdec = droid.wifiGetConnectionInfo().result['ip_address'] | |
| ipstr = socket.inet_ntoa(struct.pack('L',ipdec)) | |
| droid.makeToast(ipstr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # | |
| """ | |
| filename: zhcn_endnote_label_generator | |
| create datetime: 2016-05-06 | |
| author: [email protected] | |
| version: 1.0 | |
| description: > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery(document).ready(function() { | |
| $('#edit').on('show.bs.modal', function (e) { | |
| $id = e.relatedTarget.id; // 从触发按钮上获取到 id 号 | |
| // Ajax 获取数据,并且填充到表单中 | |
| $url = "/comment/api/one?id="+$id; | |
| $.ajax({ | |
| type: "get", | |
| url: $url, | |
| dataType: 'json', | |
| success : function(data){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @foreach ($records as $index=>$record) | |
| <tr> | |
| <td>{{ ++$index }} /{{$record -> id}}</td> | |
| <td>{{$record -> title}}</td> | |
| <td>{{$record -> meeting_start_date}} - {{$record -> meeting_end_date}}</td> | |
| <td> | |
| <a href="#edit" class="btn blue btn-outline sbold" data-toggle="modal" id="{{$record -> id}}">Edit</a> | |
| </td> | |
| </tr> | |
| @endforeach |