Skip to content

Instantly share code, notes, and snippets.

Avatar

包布丁 bdbai

  • Singapore Management University
  • 江苏苏州
View GitHub Profile
@bdbai
bdbai / dec_qq_number.rs
Created Dec 1, 2021
My QQ number Rust quiz
View dec_qq_number.rs
// https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=3a2c2557cb1b7d0a313c1e011ba16844
use rand::prelude::*;
fn main() {
let mut rng = SmallRng::from_seed([0x56u8; 32]);
(0..10).for_each(|_| (rng.next_u32(), ()).1);
let key: [u8; 20] = [
70, 121, 148, 150, 158, 158, 73, 14, 197, 164, 232, 30, 239, 6, 112, 10, 130, 30, 55, 173,
];
View ring-build-error.sh
cargo build -Z build-std=std,panic_abort --target thumbv7a-uwp-windows-msvc
Compiling core v0.0.0 (C:\Users\bdbai\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core)
Compiling ring v0.16.20
error: failed to run custom build command for `ring v0.16.20`
Caused by:
process didn't exit successfully: `D:\proj\ytflow\src\Maple\leaf\target\debug\build\ring-3b53a4a0d4ad7221\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at '"C:\\Users\\bdbai\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\ring-0.16.20\\pregenerated\\aesv8-armx-linux32.obj": Os { code: 2, kind: NotFound, message: "系统找不到指定的文件。" }', C:\Users\bdbai\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\build.rs:769:10
stack backtrace:
View DeviceList.jsx
class DeviceList extends Component {
initTable() {
$(this.refs.tableDom).bootgrid({
formatters:{
"operation":function(column , row){
return 'aaa';
}
}
});
}
@bdbai
bdbai / coreclr-debug
Last active Jun 30, 2016
.NET Core Debugger installation output
View coreclr-debug
Starting 'dotnet --info'
.NET Command Line Tools (1.0.0-preview2-003121)
Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5
Runtime Environment:
OS Name: opensuse
OS Version: 42.1
@bdbai
bdbai / youku_speedup.cs
Created May 14, 2016
Youku speed up claiming
View youku_speedup.cs
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
namespace HttpWebRequestDemo
{
class Program
{
async static Task<int> Run(string user, string pass) {
@bdbai
bdbai / IIFE.js
Created Jan 26, 2016
TvCat Encrypt Algorithm
View IIFE.js
$(function() {
var b = "src";
var d = A.d("a", b);
$.get("/api/pg", {
p: d
},
function(a) {
if (a[0] == 1) {
$("#noon").after(a[1])
}