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 void StartGame(string JavaPath, string max_memory, string playername, string version, bool login, string login_parameter) | |
{ | |
string path = System.Environment.CurrentDirectory; | |
string command = ""; | |
if (login) | |
{ | |
if (version == "旧版(1.5.2及以下版本)") | |
{ | |
command = String.Format("\"{0}\" -Xincgc -Xmx{3}m -cp \"{1}\\.minecraft\\bin\\minecraft.jar;{1}\\.minecraft\\bin\\lwjgl.jar ;{1}\\.minecraft\\bin\\lwjgl_util.jar;{1}\\.minecraft\\bin\\jinput.jar\" -Djava.library.path=\"{1}\\.minecraft\\bin\\natives\" net.minecraft.client.Minecraft {2}", JavaPath, path, login_parameter, max_memory); | |
} |
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
try | |
{ | |
label7.Text = "登录中..."; | |
string url = "https://login.minecraft.net/?user=" + Program.username + "&password=" + password + "&version=13"; | |
WebClient client = new WebClient(); | |
Stream data = client.OpenRead(url); | |
StreamReader reader = new StreamReader(data); | |
string s = reader.ReadToEnd(); | |
Console.WriteLine(s); | |
data.Close(); |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sqlite3 | |
import itertools | |
class Connection(object): | |
""" | |
A lightweight wrapper around sqlite3; based on tornado.database |
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 AutoSave(it) { | |
var _value = it.value; | |
if (_value) { | |
var expDays = 30; | |
var exp = new Date(); | |
exp.setTime( exp.getTime() + (expDays * 86400000) ); | |
var expires='; expires=' + exp.toGMTString(); | |
document.cookie = "AutoSaveContent=" + escape (_value) + expires; |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
import mistune | |
from pygments import highlight | |
from pygments.formatters import HtmlFormatter | |
from pygments.lexers import get_lexer_by_name |
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
# 上下文类,本例中主要用于存储当前调用的下文,即内层中间件 | |
class Context(): | |
def __init__(self): | |
self._next = [] | |
@property | |
def next(self): | |
return self._next | |
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
Go 2 hrs 21 mins █████████▌░░░░░░░░░░░ 45.4% | |
Other 2 hrs 18 mins █████████▎░░░░░░░░░░░ 44.1% | |
Protoco... 32 mins ██▏░░░░░░░░░░░░░░░░░░ 10.5% |
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
#!/bin/bash | |
# Add missing DCOs for current branch (starting from merge base to master) | |
# Following commit history as an example, this script will affect commits E,F,G. | |
# | |
# v master | |
# A - B - C - D - H - I | |
# \ | |
# E - F - G | |
# ^ feature (HEAD) |
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
#![feature(sort_internals)] | |
use std::{ | |
fs::OpenOptions, | |
io::{Read, Write}, | |
path::Path, | |
}; | |
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion}; | |
use rand::{rngs::StdRng, Rng, SeedableRng}; |