This file contains 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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_screenutil/flutter_screenutil.dart'; | |
/** | |
* 红蓝爆闪 | |
*/ | |
class RedBlue extends StatefulWidget { | |
const RedBlue({super.key}); |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@color/green" | |
android:fitsSystemWindows="true" | |
tools:context="com.jh.charing.ui.frag.StationFrag"> |
This file contains 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
getUser(){ | |
let params = { | |
} | |
var res = request("my/index",params) | |
const { | |
code, | |
data, | |
msg | |
} = res |
This file contains 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
public static String getsign(String fileName) { | |
int minutes = 10; //分钟数 | |
long etime = System.currentTimeMillis() / 1000 + 60 * minutes;// | |
String light = secret + "&" + etime + "&" + fileName;//secret 就是控制台你自己写的那个token | |
String sign = UpYunUtils.md5(light);// 可以替换为自己的md5转换工具类 | |
String sign8 = sign.substring(12, 20); | |
String _upt = sign8 + etime; | |
return host + fileName + "?_upt=" + _upt; | |
} |
This file contains 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
$host = "http://ossupyun.****.com"; | |
$uri = '/androidtest/aaeb09fc85c7e3d4fb5c874efc48393e.jpg'; | |
$secret = '替换成你自己的token'; | |
$time = time() + 3600 * 24; | |
$light = $secret . "&" . $time . "&" . $uri; | |
$sign = md5($light); | |
$sign8 = substr($sign, 12, 8); | |
echo $host . $uri . "?_upt=" . $sign8 . $time; |
This file contains 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 sign($key, $secret, $method, $uri, $date, $policy = null, $md5 = null) | |
{ | |
$elems = array(); | |
foreach (array($method, $uri, $date, $policy, $md5) as $v) { | |
if ($v) { | |
$elems[] = $v; | |
} | |
} | |
$value = implode('&', $elems); | |
$sign = base64_encode(hash_hmac('sha1', $value, $secret, true)); |
This file contains 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 wxrefund(Request $request) | |
{ | |
$order_num = $request->input("sn"); | |
$uid = $request->input("uid", 0); | |
if ($uid > 0) { | |
// 先退管家订单 再推普通订单 | |
// $cond["total_price"] = array("=", 0); | |
$cond["user_id"] = $uid; |
This file contains 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
public java.lang.String toString() { | |
#if ( $members.size() > 0 ) | |
#set ( $i = 0 ) | |
return "{\"" + | |
#foreach( $member in $members ) | |
#if ( $i == 0 ) | |
"## | |
#else | |
"\",\" ## | |
#end |
This file contains 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
public static final String readHexContent(String filePath) { | |
FileInputStream in = null; | |
try { | |
in = new FileInputStream(filePath); | |
} catch (FileNotFoundException e) { | |
e.printStackTrace(); | |
} | |
int b = 0; |
This file contains 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
/** | |
* if batch> 当天的数据条数,则全部取出来 | |
* else if batch=1 ,则取当天的最后一条数据。 | |
* else 将每一天的数据按照batch均匀条数间隔取出来: 有100条 取batch条,即第49和 99 条(索引起始为0 ) , | |
*/ | |
for (int i = 0; i < everyDayData.size(); i++) { | |
if (currentBatch == 1) { | |
/*根据日期 拿到对应日期的数据 */ //还需要区分不同的测点! | |
List<PointData.DataBean.RowsBean> datas = everyDayData.get(pointDataDateList.get(i)); | |
/*遍历多个测点 */ |
NewerOlder