Linking my account jasl on GitHub with my address 5EeRXiJHFLKCCu1CPKUKELfumNaKL2cCNweAvqE1wMwyhdUx on Substrate in prod.mycryptoprofile.io, and the challenge code is: c66426db5413b0c72ff352d0cf9ace04. #LitentryVerifyMyAddress
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
# -*- coding:utf-8 -*- | |
'写了一个简单的支持中文的正向最大匹配的机械分词,其它不用解释了,就几十行代码' | |
'搜狗词库下载地址:http://vdisk.weibo.com/s/7RlE5' | |
import string | |
__dict = {} | |
def load_dict(dict_file='words.dic'): | |
'加载词库,把词库加载成一个key为首字符,value为相关词的列表的字典' |
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
gem 'pg' | |
group :development do | |
gem 'ruby-debug' | |
end | |
gem 'rake', '~> 0.8.7' | |
gem 'devise' | |
gem 'oa-oauth', :require => 'omniauth/oauth' | |
gem 'omniauth' | |
gem 'haml' | |
gem 'dynamic_form' |
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
// As we all know, the generic List<T> class in .NET doesn't | |
// have a RemoveMultiple method. Could you implement it for me? | |
// Say the elements are kept in the _items field, which is an | |
// array of type T. Also, use _count to keep the current number | |
// of elements. | |
// PS: You can compare two items with "==" operator. | |
namespace System.Collections.Generic | |
{ | |
public class List<T> |
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
require 'ipaddr' | |
def decode(p, m = "i*") | |
p.unpack(m)[0] | |
end | |
def parse_ip_p(data) | |
r = {} | |
if data[12..13] == "\x08\x00" and data[14] == "\x45" and data[23] == "\x11" | |
puts "find a IPV4 UDP package" |
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
require 'securerandom' | |
def seed | |
SecureRandom.uuid.gsub(/[-a-z]/,"").to_i | |
end | |
total = 10000 | |
rights = 0 | |
(1..total).each do |
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 Net::HTTPResponse | |
class Inflater | |
## | |
# Finishes the inflate stream. | |
def finish | |
begin | |
@inflate.finish | |
rescue Zlib::DataError | |
# No luck with Zlib decompression. Let's try with raw deflate, |
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
<script> | |
// function doNothing(e){ | |
// e = e || window.event; //window.event, IE的写法 | |
// if(e.stopPropagation){ | |
// e.stopPropagation(); | |
// e.preventDefault(); | |
// }else{ //IE | |
// e.cancelBubble = true; | |
// e.returnValue = false; | |
// }; |
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
/** | |
* Created by codezjx on 2016/5/4. | |
*/ | |
public class CircleImageTransformation implements Transformation { | |
/** | |
* A unique key for the transformation, used for caching purposes. | |
*/ | |
private static final String KEY = "circleImageTransformation"; |
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
# frozen_string_literal: true | |
namespace :webpacker do | |
desc "Compile webpacker assets" | |
task :compile do | |
on release_roles(fetch(:assets_roles)) do | |
within release_path do | |
with rails_env: fetch(:rails_env), rails_groups: fetch(:rails_assets_groups) do | |
execute :rake, "yarn:install" | |
execute :rake, "webpacker:compile" |