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 "code.google.com/p/go.net/html/charset" | |
ad := &models.ArticleDocument{} | |
d := xml.NewDecoder(bytes.NewReader([]byte(xmldoc))) | |
d.CharsetReader = func(s string, r io.Reader) (io.Reader, error) { | |
return charset.NewReader(r, s) | |
} | |
d.Decode(ad) |
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 | |
# Copyright 2012 The Go Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style | |
# license that can be found in the LICENSE file. | |
# support functions for go cross compilation | |
type setopt >/dev/null 2>&1 && setopt shwordsplit | |
PLATFORMS="darwin/386 darwin/amd64 openbsd/386 openbsd/amd64 netbsd/386 netbsd/amd64 dragonfly/386 dragonfly/amd64 freebsd/386 freebsd/amd64 freebsd/arm linux/386 linux/amd64 linux/arm windows/386 windows/amd64" |
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
set GOARCH=amd64 | |
set GOOS=darwin | |
call make.bat --no-clean | |
set GOOS=linux | |
call make.bat --no-clean | |
set GOOS=windows | |
call make.bat --no-clean | |
set GOOS=freebsd | |
call make.bat --no-clean | |
set GOOS=openbsd |
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
/* This code was written by Sergejs Kovrovs and has been placed in the public domain. */ | |
import QtQuick 2.0 | |
MouseArea { | |
property point origin | |
property bool ready: false | |
signal move(int x, int y) | |
signal swipe(string direction) |
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
Convention: Byte array notation as it would appear in a hexeditor. | |
= Layout= | |
KDBX files, the keepass database files, are layout as follows: | |
1) Bytes 0-3: Primary identifier, common across all kdbx versions: | |
private static $sigByte1=[0x03,0xD9,0xA2,0x9A]; | |
2) Bytes 4-7: Secondary identifier. Byte 4 can be used to identify the file version (0x67 is latest, 0x66 is the KeePass 2 pre-release format and 0x55 is KeePass 1) |
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
#=============================================================================== | |
# Filename: build-libc++.sh | |
# Author: Pete Goodliffe, Daniel Rosser | |
# Copyright: (c) Copyright 2009 Pete Goodliffe, 2014 Daniel Rosser | |
# Licence: Please feel free to use this, with attribution | |
# Modified version ## for ofxiOSBoost | |
#=============================================================================== | |
# | |
# Builds a Boost framework for the iPhone. | |
# Creates a set of universal libraries that can be used on an iPhone and in the |
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
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 | |
set cores=%NUMBER_OF_PROCESSORS% | |
echo Building boost with %cores% cores | |
call bootstrap.bat | |
rem Most libraries can be static libs | |
b2 -j%cores% toolset=msvc-14.0 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/msvc2015-x64 | |
b2 -j%cores% toolset=msvc-14.0 address-model=32 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/msvc2015-x86 |
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
#=============================================================================== | |
# Filename: boost.sh | |
# Author: Pete Goodliffe, Daniel Rosser | |
# Copyright: (c) Copyright 2009 Pete Goodliffe, 2013 Daniel Rosser | |
# Licence: Please feel free to use this, with attribution | |
# Modified version ## for ofxOSXBoost | |
#=============================================================================== | |
# | |
# Builds a Boost framework for the OSX. | |
# Creates a set of universal libraries that can be used on OSX (i386, x86_64) |
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 | |
env PATH=$androidNDKRoot/toolchains/x86-linux-android-4.9/prebuilt/darwin-x86_64/bin/:$PATH ./bjam -j2 --reconfigure link=static threading=multi threadapi=pthread target-os=android stage --stagedir=android/x86 toolset=gcc-x86 define=BOOST_MATH_DISABLE_FLOAT128 include=$androidNDKRoot/sources/cxx-stl/gnu-libstdc++/4.9/include include=$androidNDKRoot/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include/ include=$androidNDKRoot/platforms/android-21/arch-x86/usr/include | |
env PATH=$androidNDKRoot/toolchains/x86_64-linux-android-4.9/prebuilt/darwin-x86_64/bin/:$PATH ./bjam -j2 --reconfigure link=static threading=multi threadapi=pthread target-os=android stage --stagedir=android/x86_64 toolset=gcc-x86_64 define=BOOST_MATH_DISABLE_FLOAT128 include=$androidNDKRoot/sources/cxx-stl/gnu-libstdc++/4.9/include include=$androidNDKRoot/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64/include/ include=$androidNDKRoot/platforms/android-21/arch-x86_64/usr/include | |
env PATH=$androidNDKRoot/toolchains/arm-linux-android-4.9/p |
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
package com.mcxiaoke.next.utils; | |
import android.annotation.SuppressLint; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.net.Proxy; | |
import android.os.Build; | |
import android.os.Parcelable; | |
import android.util.ArrayMap; | |
import android.util.Log; |