text stringlengths 9 39.2M | dir stringlengths 25 226 | lang stringclasses 163
values | created_date timestamp[s] | updated_date timestamp[s] | repo_name stringclasses 751
values | repo_full_name stringclasses 752
values | star int64 1.01k 183k | len_tokens int64 1 18.5M |
|---|---|---|---|---|---|---|---|---|
```unknown
01_require_if_map.patch
``` | /content/code_sandbox/debian/patches/series | unknown | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 7 |
```unknown
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
CFLAGS += -g -O2 -fno-strict-aliasing -fno-strict-overflow -fPIC
LDFLAGS += -g -O2 -fno-strict-aliasing -fno-strict-overflow -fPIC -Wl,-z,defs -Wl,--as-needed
DPDK_PATH = $(she... | /content/code_sandbox/debian/rules | unknown | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 643 |
```diff
Index: gatekeeper/lua/gatekeeper/staticlib.lua
===================================================================
--- gatekeeper.orig/lua/gatekeeper/staticlib.lua
+++ gatekeeper/lua/gatekeeper/staticlib.lua
@@ -481,7 +481,7 @@ c = ffi.C
-- Network configuration functions
--
-local ifaces = require("if_map"... | /content/code_sandbox/debian/patches/01_require_if_map.patch | diff | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 113 |
```objective-c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTA... | /content/code_sandbox/gk/bpf.h | objective-c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 326 |
```c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or ... | /content/code_sandbox/gk/bpf.c | c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 4,667 |
```c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or ... | /content/code_sandbox/gk/rt.c | c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 21,753 |
```c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or ... | /content/code_sandbox/gk/main.c | c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 25,744 |
```c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or ... | /content/code_sandbox/cps/main.c | c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 10,093 |
```objective-c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTA... | /content/code_sandbox/cps/rd.h | objective-c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 213 |
```objective-c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTA... | /content/code_sandbox/cps/kni.h | objective-c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 380 |
```c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or ... | /content/code_sandbox/cps/kni.c | c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 3,628 |
```c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or ... | /content/code_sandbox/cps/rd.c | c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 11,636 |
```c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or ... | /content/code_sandbox/bpf/declined.c | c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 209 |
```unknown
CC = clang
CFLAGS += -O2 -g -target bpf -I../include \
-Wall -Wextra -Wno-int-to-void-pointer-cast
TARGETS = granted.bpf declined.bpf grantedv2.bpf web.bpf tcp-services.bpf
DESTDIR ?= "../lua/bpf"
INSTALL = install
all: $(TARGETS)
copy: all
$(INSTALL) -d $(DESTDIR)
$(INSTALL) -m660 $(TARGETS) $(DEST... | /content/code_sandbox/bpf/Makefile | unknown | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 171 |
```c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or ... | /content/code_sandbox/bpf/grantedv2.c | c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 378 |
```objective-c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTA... | /content/code_sandbox/bpf/grantedv2.h | objective-c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 1,409 |
```c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or ... | /content/code_sandbox/bpf/web.c | c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 1,009 |
```c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or ... | /content/code_sandbox/bpf/granted.c | c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 879 |
```c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or ... | /content/code_sandbox/bpf/tcp-services.c | c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 2,569 |
```objective-c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTA... | /content/code_sandbox/bpf/libicmp.h | objective-c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 636 |
```c
/*
* Gatekeeper - DDoS protection system.
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or ... | /content/code_sandbox/ggu/main.c | c | 2016-07-06T18:53:45 | 2024-08-15T00:24:19 | gatekeeper | AltraMayor/gatekeeper | 1,280 | 6,883 |
```unknown
var proxy = "PROXY 172.67.243.247:443;";
var domains = {
"slideshare.net": 1,
"huaglad.com": 1,
"doubleclick.net": 1,
"bbc.co.uk": 1,
"dongtaiwang.com": 1,
"tumblr.com": 1,
"googleadsensetvsite.com": 1,
"googlesyndication.com": 1,
"pinterest.com": 1,
"googletagmanager.com": 1,
"... | /content/code_sandbox/pac5 | unknown | 2016-03-23T08:43:36 | 2024-08-16T18:04:10 | new-pac | Alvin9999/new-pac | 53,813 | 6,326 |
```unknown
172.64.166.128 #
104.21.37.117 #
104.26.5.99 #
104.26.4.12 #
162.159.81.234 #
104.26.5.80 #
104.26.5.89 #
104.26.10.240 #
104.19.33.230 #
``` | /content/code_sandbox/CloudFlare优质IP | unknown | 2016-03-23T08:43:36 | 2024-08-16T18:04:10 | new-pac | Alvin9999/new-pac | 53,813 | 80 |
```unknown
var proxy = "PROXY 162.159.138.110:443;";
var domains = {
"huaglad.com": 1,
"slideshare.net": 1,
"tumblr.com": 1,
"bbc.co.uk": 1,
"pinterest.com": 1,
"googleadsensetvsite.com": 1,
"googlesyndication.com": 1,
"googletagmanager.com": 1,
"googletagservices.com": 1,
"googleusercon... | /content/code_sandbox/pac | unknown | 2016-03-23T08:43:36 | 2024-08-16T18:04:10 | new-pac | Alvin9999/new-pac | 53,813 | 24,044 |
```rust
// Automatically detect tsan in a way that's compatible with both stable (which
// doesn't support sanitizers) and nightly (which does). Works because build
// scripts gets `cfg` info, even if the cfg is unstable.
fn main() {
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rustc-check-cfg=c... | /content/code_sandbox/core/build.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 133 |
```toml
status = [
"build_tier_one",
"build_other_platforms",
]
``` | /content/code_sandbox/bors.toml | toml | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 20 |
```rust
use parking_lot::RwLock;
struct Lock(RwLock<i32>);
#[test]
fn issue_392() {
let lock = Lock(RwLock::new(0));
let mut rl = lock.0.upgradable_read();
rl.with_upgraded(|_| {
println!("lock upgrade");
});
rl.with_upgraded(|_| {
println!("lock upgrade");
});
}
``` | /content/code_sandbox/tests/issue_392.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 85 |
```rust
use parking_lot::RwLock;
use std::thread;
struct Bar(RwLock<()>);
impl Drop for Bar {
fn drop(&mut self) {
let _n = self.0.write();
}
}
thread_local! {
static B: Bar = Bar(RwLock::new(()));
}
#[test]
fn main() {
thread::spawn(|| {
B.with(|_| ());
let a = RwLock::new(... | /content/code_sandbox/tests/issue_203.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 114 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
// Option::unchecked_unwrap
pub trait UncheckedOptionExt<T> {
unsafe fn unchecked_unwrap(self) -> T;
}
impl<T> UncheckedOptionExt<T>... | /content/code_sandbox/core/src/util.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 173 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::thread_parker;
use core::hint::spin_loop;
// Wastes some CPU time for the given number of iterations,
// using a hint to indi... | /content/code_sandbox/core/src/spinwait.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 471 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
//! This library exposes a low-level API for creating your own efficient
//! synchronization primitives.
//!
//! # The parking lot
//!
//... | /content/code_sandbox/core/src/lib.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 579 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::spinwait::SpinWait;
use crate::thread_parker::{ThreadParker, ThreadParkerT, UnparkHandleT};
use core::{
cell::Cell,
me... | /content/code_sandbox/core/src/word_lock.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 2,341 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use core::sync::atomic::{AtomicBool, Ordering};
use std::time::Instant;
use std::{
io,
os::fortanix_sgx::{
thread::curren... | /content/code_sandbox/core/src/thread_parker/sgx.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 599 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
//! The wasm platform can't park when atomic support is not available.
//! So this ThreadParker just panics on any attempt to park.
use ... | /content/code_sandbox/core/src/thread_parker/wasm.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 304 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use core::{
ptr,
sync::atomic::{AtomicI32, Ordering},
};
use std::thread;
use std::time::Instant;
use syscall::{
call::futex,... | /content/code_sandbox/core/src/thread_parker/redox.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 921 |
```rust
use cfg_if::cfg_if;
use std::time::Instant;
/// Trait for the platform thread parker implementation.
///
/// All unsafe methods are unsafe because the Unix thread parker is based on
/// pthread mutexes and condvars. Those primitives must not be moved and used
/// from any other memory address than the one they... | /content/code_sandbox/core/src/thread_parker/mod.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 766 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use core::{
ptr,
sync::atomic::{AtomicI32, Ordering},
};
use libc;
use std::thread;
use std::time::Instant;
// x32 Linux uses a ... | /content/code_sandbox/core/src/thread_parker/linux.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 1,067 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use core::{
arch::wasm32,
sync::atomic::{AtomicI32, Ordering},
};
use std::time::{Duration, Instant};
use std::{convert::TryFrom,... | /content/code_sandbox/core/src/thread_parker/wasm_atomic.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 700 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
#[cfg(target_vendor = "apple")]
use core::ptr;
use core::{
cell::{Cell, UnsafeCell},
mem::MaybeUninit,
};
use libc;
use std::time... | /content/code_sandbox/core/src/thread_parker/unix.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 2,067 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
//! A simple spin lock based thread parker. Used on platforms without better
//! parking facilities available.
use core::hint::spin_loop... | /content/code_sandbox/core/src/thread_parker/generic.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 447 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use core::{
mem,
sync::atomic::{AtomicUsize, Ordering},
};
use std::{ffi, time::Instant};
use super::bindings::*;
#[allow(non_s... | /content/code_sandbox/core/src/thread_parker/windows/waitaddress.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 936 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use core::{
ptr,
sync::atomic::{AtomicPtr, AtomicUsize, Ordering},
};
use std::time::Instant;
mod bindings;
mod keyed_event;
mod... | /content/code_sandbox/core/src/thread_parker/windows/mod.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 1,332 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::thread_parker::{ThreadParker, ThreadParkerT, UnparkHandleT};
use crate::util::UncheckedOptionExt;
use crate::word_lock::WordLoc... | /content/code_sandbox/core/src/parking_lot.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 13,685 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use core::{
ffi,
mem::{self, MaybeUninit},
ptr,
};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::time::Instant;
c... | /content/code_sandbox/core/src/thread_parker/windows/keyed_event.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 1,544 |
```rust
//! Manual bindings to the win32 API to avoid dependencies on windows-sys or winapi
//! as these bindings will **never** change and `parking_lot_core` is a foundational
//! dependency for the Rust ecosystem, so the dependencies used by it have an
//! outsize affect
pub const INFINITE: u32 = 4294967295;
pub con... | /content/code_sandbox/core/src/thread_parker/windows/bindings.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 394 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use std::{env, process};
#[derive(Copy, Clone)]
pub struct ArgRange {
current: usize,
limit: usize,
step: usize,
}
impl Arg... | /content/code_sandbox/benchmark/src/args.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 763 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
mod args;
use crate::args::ArgRange;
#[cfg(any(windows, unix))]
use std::cell::UnsafeCell;
use std::{
sync::{
atomic::{Atomi... | /content/code_sandbox/benchmark/src/rwlock.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 2,923 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
mod args;
use crate::args::ArgRange;
#[cfg(any(windows, unix))]
use std::cell::UnsafeCell;
use std::{
sync::{
atomic::{Atomi... | /content/code_sandbox/benchmark/src/mutex.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 2,126 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::raw_mutex::RawMutex;
use lock_api::RawMutexFair;
/// Raw fair mutex type backed by the parking lot.
pub struct RawFairMutex(R... | /content/code_sandbox/src/raw_fair_mutex.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 391 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use std::sync::atomic::AtomicUsize;
// Extension trait to add lock elision primitives to atomic types
pub trait AtomicElisionExt {
t... | /content/code_sandbox/src/elision.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 735 |
```rust
//! \[Experimental\] Deadlock detection
//!
//! This feature is optional and can be enabled via the `deadlock_detection` feature flag.
//!
//! # Example
//!
//! ```
//! #[cfg(feature = "deadlock_detection")]
//! { // only for #[cfg]
//! use std::thread;
//! use std::time::Duration;
//! use parking_lot::deadlock... | /content/code_sandbox/src/deadlock.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 1,564 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use std::time::{Duration, Instant};
// Option::unchecked_unwrap
pub trait UncheckedOptionExt<T> {
unsafe fn unchecked_unwrap(self) -... | /content/code_sandbox/src/util.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 210 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::raw_fair_mutex::RawFairMutex;
/// A mutual exclusive primitive that is always fair, useful for protecting shared data
///
///... | /content/code_sandbox/src/fair_mutex.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 2,193 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::util::UncheckedOptionExt;
use core::{
fmt, mem,
sync::atomic::{fence, AtomicU8, Ordering},
};
use parking_lot_core::{s... | /content/code_sandbox/src/once.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 3,119 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::raw_rwlock::RawRwLock;
/// A reader-writer lock
///
/// This type of lock allows a number of readers or at most one writer at... | /content/code_sandbox/src/rwlock.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 4,689 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::{deadlock, util};
use core::{
sync::atomic::{AtomicU8, Ordering},
time::Duration,
};
use lock_api::RawMutex as RawMute... | /content/code_sandbox/src/raw_mutex.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 2,547 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
//! This library provides implementations of `Mutex`, `RwLock`, `Condvar` and
//! `Once` that are smaller, faster and more flexible than ... | /content/code_sandbox/src/lib.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 520 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::mutex::MutexGuard;
use crate::raw_mutex::{RawMutex, TOKEN_HANDOFF, TOKEN_NORMAL};
use crate::{deadlock, util};
use core::{
... | /content/code_sandbox/src/condvar.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 9,539 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::raw_mutex::RawMutex;
/// A mutual exclusion primitive useful for protecting shared data
///
/// This mutex will block threads... | /content/code_sandbox/src/mutex.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 2,476 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::raw_mutex::RawMutex;
use core::num::NonZeroUsize;
use lock_api::{self, GetThreadId};
/// Implementation of the `GetThreadId` ... | /content/code_sandbox/src/remutex.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 1,324 |
```rust
fn main() {
let cfg = autocfg::new();
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rustc-check-cfg=cfg(has_const_fn_trait_bound)");
if cfg.probe_rustc_version(1, 61) {
println!("cargo:rustc-cfg=has_const_fn_trait_bound");
}
}
``` | /content/code_sandbox/lock_api/build.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 81 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::elision::{have_elision, AtomicElisionExt};
use crate::raw_mutex::{TOKEN_HANDOFF, TOKEN_NORMAL};
use crate::util;
use core::{
... | /content/code_sandbox/src/raw_rwlock.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 8,191 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
//! This library provides type-safe and fully-featured [`Mutex`] and [`RwLock`]
//! types which wrap a simple raw mutex or rwlock type. T... | /content/code_sandbox/lock_api/src/lib.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 997 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use core::cell::UnsafeCell;
use core::fmt;
use core::marker::PhantomData;
use core::mem;
use core::ops::{Deref, DerefMut};
#[cfg(feature... | /content/code_sandbox/lock_api/src/mutex.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 8,238 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use core::cell::UnsafeCell;
use core::fmt;
use core::marker::PhantomData;
use core::mem;
use core::ops::{Deref, DerefMut};
#[cfg(feature... | /content/code_sandbox/lock_api/src/rwlock.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 27,358 |
```rust
//
// path_to_url or the MIT license <LICENSE-MIT or
// path_to_url at your option. This file may not be
// copied, modified, or distributed except according to those terms.
use crate::{
mutex::{RawMutex, RawMutexFair, RawMutexTimed},
GuardNoSend,
};
use core::{
cell::{Cell, UnsafeCell},
fmt,
... | /content/code_sandbox/lock_api/src/remutex.rs | rust | 2016-05-13T10:59:24 | 2024-08-16T17:17:37 | parking_lot | Amanieu/parking_lot | 2,662 | 9,186 |
```unknown
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM ... | /content/code_sandbox/gradlew | unknown | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 1,553 |
```ini
#Thu Jun 23 11:02:05 CST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
``` | /content/code_sandbox/gradle/wrapper/gradle-wrapper.properties | ini | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 71 |
```batchfile
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%... | /content/code_sandbox/gradlew.bat | batchfile | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 632 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="StockChart" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradl... | /content/code_sandbox/StockChart.iml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 243 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="StockChart2" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Grad... | /content/code_sandbox/StockChart2.iml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 232 |
```ini
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# path_to_url
# Specifies the JVM arguments used for the daemon process.
# ... | /content/code_sandbox/gradle.properties | ini | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 186 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="StockChart-master" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Jav... | /content/code_sandbox/StockChart-master.iml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 232 |
```qmake
#Use 5 step of optimization
#-optimizationpasses 5
#When not preverifing in a case-insensitive filing system, such as Windows. This tool will unpack your processed jars,(if using windows you should then use):
-dontusemixedcaseclassnames
#Specifies not to ignore non-public library classes. As of version 4.5,... | /content/code_sandbox/app/proguard-rules.pro | qmake | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 1,101 |
```java
package com.example.yanjiang.stockchart;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 +... | /content/code_sandbox/app/src/test/java/com/example/yanjiang/stockchart/ExampleUnitTest.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 74 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="path_to_url"
package="com.example.yanjiang.stockchart">
<!-- Required -->
<permission
android:name="${applicationId}.permission.JPUSH_MESSAGE"
android:protectionLevel="signature" />
<!-- Required -->
<uses-permis... | /content/code_sandbox/app/src/main/AndroidManifest.xml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 569 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="path_to_url"
xmlns:tools="path_to_url"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/minute_black"
tools:context="com.example.yanjiang.s... | /content/code_sandbox/app/src/main/res/layout/activity_minutes.xml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 288 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="path_to_url"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/marker_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_conte... | /content/code_sandbox/app/src/main/res/layout/mymarkerview.xml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 115 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="path_to_url"
xmlns:tools="path_to_url"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">
<Button
a... | /content/code_sandbox/app/src/main/res/layout/activity_fix.xml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 113 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="path_to_url"
xmlns:tools="path_to_url"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
tools:context=".MainActivity">
<Button
android:i... | /content/code_sandbox/app/src/main/res/layout/activity_main.xml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 191 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="path_to_url"
xmlns:tools="path_to_url"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/minute_black"
tools:context="com.example.yanjiang.s... | /content/code_sandbox/app/src/main/res/layout/activity_kline.xml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 216 |
```xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item na... | /content/code_sandbox/app/src/main/res/values/styles.xml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 87 |
```xml
<resources>
<string name="app_name">StockChart</string>
</resources>
``` | /content/code_sandbox/app/src/main/res/values/strings.xml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 20 |
```xml
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
``` | /content/code_sandbox/app/src/main/res/values/dimens.xml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 52 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="minute_grayLine">#2D3945</color>
<color name="minute_blue">#00D0FC</color>
<color name="minu... | /content/code_sandbox/app/src/main/res/values/colors.xml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 176 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gr... | /content/code_sandbox/app/app.iml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 2,931 |
```xml
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_... | /content/code_sandbox/app/src/main/res/values-w820dp/dimens.xml | xml | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 83 |
```java
package com.example.yanjiang.stockchart;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class MainActivity extends BaseActivity {
@Bind(R.id.btn)
... | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/MainActivity.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 230 |
```java
package com.example.yanjiang.stockchart;
import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.widget.Toast;
import com.example.yanjiang.stockchart.api.ClientApi;
import com.example.yanjiang.stockchart.application.App;
import com.example.yanjiang.stock... | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/BaseActivity.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 398 |
```java
package com.example.yanjiang.stockchart;
import android.graphics.Color;
import android.graphics.Matrix;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.annotation.NonNull;
import android.util.Log;
import com.example.yanjiang.stockchart.api.ConstantTest;
i... | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/KLineActivity.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 3,321 |
```java
package com.example.yanjiang.stockchart;
import android.graphics.Color;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.util.SparseArray;
import com.example.yanjiang.stockchart.api.ConstantTest;
import com.example.yanjiang.stockchart.bean.DataParse;
import com.... | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/MinutesActivity.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 3,616 |
```java
package com.example.yanjiang.stockchart.application;
import android.app.Application;
import com.example.yanjiang.stockchart.BuildConfig;
import com.example.yanjiang.stockchart.inject.component.AppComponent;
import com.example.yanjiang.stockchart.inject.component.DaggerAppComponent;
import com.example.yanjiang... | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/application/App.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 252 |
```java
package com.example.yanjiang.stockchart;
/**
* authorajiang
* mail1025065158@qq.com
* blogpath_to_url
*/
public class Test {
/* private ArrayList<Integer> listA, listB;
private int sum;
public static void main(String[] args) {
Test test=new Test();
test.listA = new ArrayList... | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/Test.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 457 |
```java
package com.example.yanjiang.stockchart.bean;
public class MinutesBean {
public String time;
public float cjprice;
public float cjnum;
public float avprice = Float.NaN;
public float per;
public float cha;
public float total;
public int color = 0xff000000;
}
``` | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/bean/MinutesBean.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 69 |
```java
package com.example.yanjiang.stockchart.bean;
/**
* authorajiang
* mail1025065158@qq.com
* blogpath_to_url
*/
public class KLineBean {
public String date;
public float open;
public float close;
public float high;
public float low;
public float vol;
}
``` | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/bean/KLineBean.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 70 |
```java
package com.example.yanjiang.stockchart.service;
import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.os.Environment;
import android.util.Log;
import com.example.yanjiang.stockchart.api.Constant;
import com.example.yanjiang.stockchart.api.DownLoadApi;... | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/service/DownLoadService.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 830 |
```java
package com.example.yanjiang.stockchart.bean;
import android.util.SparseArray;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.ArrayList;
public class DataParse {
private ArrayList<MinutesBean> datas = new ArrayList<>();
private ArrayList<KLineBean> kDatas = new ArrayList<>()... | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/bean/DataParse.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 992 |
```java
package com.example.yanjiang.stockchart.interceptor;
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.Response;
public class ProgressInterceptor implements Interceptor
{
// private ProgressListener progressListener;
/* public ProgressInterceptor(ProgressListener progressListen... | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/interceptor/ProgressInterceptor.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 116 |
```java
package com.example.yanjiang.stockchart.interceptor;
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.MediaType;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
import okio.Buffer;
/**
* Created by yanjiang on 2016/3/7.
*/
public class LoggingInterceptor... | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/interceptor/LoggingInterceptor.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 723 |
```java
package com.example.yanjiang.stockchart.interceptor;
import android.content.Context;
import android.content.SharedPreferences;
import android.support.annotation.Nullable;
import android.util.Base64;
import java.io.IOException;
import java.util.Random;
import okhttp3.Interceptor;
import okhttp3.Request;
impor... | /content/code_sandbox/app/src/main/java/com/example/yanjiang/stockchart/interceptor/HttpInterceptor.java | java | 2016-05-18T03:51:41 | 2024-08-09T09:00:29 | StockChart | AndroidJiang/StockChart | 1,086 | 683 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.