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
| class CityList extends Action | |
| { | |
| public function initView(Request $request, Response $response, $args = []): ResponseInterface | |
| { | |
| $cityId = 0; | |
| if (isset($args['cityId'])) { | |
| $cityId = $args['cityId']; | |
| } | |
| $body = $request->getParsedBody(); |
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
| package com.sam016.vsflatomation.service.ble; | |
| import java.util.HashMap; | |
| import java.util.UUID; | |
| public class AllGattCharacteristics { | |
| private static HashMap<String, String> attributes = new HashMap(); | |
| static { | |
| attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name"); |
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
| version: '1' | |
| services: | |
| mysql: | |
| image: mysql:5.7 | |
| container_name: mysql5.7 | |
| restart: always | |
| environment: | |
| MYSQL_DATABASE: jim | |
| MYSQL_USER: jim |
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
| private void print1DCode39(Printer printer, String content) { | |
| byte[] bytes = content.getBytes(); | |
| byte[] cmd = new byte[bytes.length + 4]; | |
| //code 39條碼指令 | |
| cmd[0] = 0x1D; | |
| cmd[1] = 0x6B; | |
| cmd[2] = 69; | |
| cmd[3] = (byte) bytes.length; | |
| for (int i = 0; i < bytes.length; i++) { | |
| cmd[4 + i] = bytes[i]; |
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
| //"1D4800" | |
| command = PrinterCommand.BarCodePositionHRI; | |
| printer.addCommand(getHexBytes(command)); | |
| //"1D6840" | |
| command = PrinterCommand.BarCodeSetHeight; | |
| printer.addCommand(getHexBytes(command)); | |
| //"1D7702" | |
| command = PrinterCommand.BarCodeSetWidth; |
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
| /** | |
| * 取回兩點間的距離 | |
| * | |
| * @param start | |
| * @param end | |
| * @return | |
| */ | |
| public static double getDistance(LatLng start, LatLng end) { | |
| double lat1 = (Math.PI / 180) * start.latitude; | |
| double lat2 = (Math.PI / 180) * end.latitude; |
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 org.xmlpull.v1.XmlPullParser; | |
| import org.xmlpull.v1.XmlPullParserException; | |
| import org.xmlpull.v1.XmlPullParserFactory; | |
| import java.io.IOException; | |
| import java.io.StringReader; | |
| /** | |
| * Created by jim on 2016/2/24. | |
| */ |
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 android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.os.Handler; | |
| import android.os.Message; | |
| import android.widget.ImageView; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| public abstract class SceneAnimation { |